prompt
stringlengths
83
247k
response
stringlengths
121
36.1k
metadata
stringlengths
314
42.3k
feat(connector): Added a new CaptureMethod SequentialAutomatic to Support CIT Mandates for Paybox ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description 1) Added a new CaptureMethod : SequentialAutomatic -> does Auth and capture in two api calls one after the other 1. **For Paybox**: - If the payment is a Customer-Initiated Transaction (CIT), two API calls will be made: - First for Authorization (`Auth`) - Followed by Capture (`Capture`) - For all other payment types, `SequentialAutomatic` will function the same as `Automatic`. 2. **For other connectors**: - `SequentialAutomatic` will behave the same as `Automatic`. https://docs.google.com/document/d/1pokpfrBJGVrHGcyeTkfArAxdIo2ZBR3jNefSj5qbG6E/edit?tab=t.0 ### 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 For Customer-Initiated Transactions (CIT) with Paybox, authorization and capture must be performed as two separate operations. Paybox does not support a combined authorization and capture in a single request. To avoid requiring the merchant to handle this process, we introduced a new capture method: SequentialAutomatic, which ensures that two API calls are made automatically. ## How did you test it? 1. **CIT Payment + 3DS Test** - **Request**: curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_wmCOQW4LM2BHYugFWaU8crmipDtmGDsq0iozaQhe17CtM59tqCHSAtD8w646AkZU' \ --data '{ "amount": 501, "currency": "EUR", "confirm": true, "capture_method": "sequential_automatic", "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "customer_acceptance": { "acceptance_type": "online", "accepted_at":"1963-05-03T04:07:52.723Z", "online": { "ip_address":"127.0.0.1", "user_agent": "amet irure esse" } }, "payment_method": "card", "payment_method_data": { "card": { "card_number": "5200000000000007", "card_exp_month": "01", "card_exp_year": "26", "card_holder_name": "John T", "card_cvc": "123" } }, "customer_id":"test_mit", "authentication_type": "three_ds", "return_url": "https://google.com", "setup_future_usage": "off_session" }' - **Response**: { "payment_id": "pay_Q75JaLo7wPiCAh8nrkZc", "merchant_id": "postman_merchant_GHAction_3a560136-e947-4667-bb84-2f015fcc1196", "status": "requires_customer_action", "amount": 501, "net_amount": 501, "shipping_cost": null, "amount_capturable": 501, "amount_received": null, "connector": "paybox", "client_secret": "pay_Q75JaLo7wPiCAh8nrkZc_secret_Qa4XYmBSyuDUbaqKtJ7r", "created": "2024-11-19T03:58:16.513Z", "currency": "EUR", "customer_id": "test_mit", "customer": { "id": "test_mit", "name": "Joseph Doe", "email": "something@gmail.com", "phone": "999999999", "phone_country_code": "+65" }, "description": null, "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "off_session", "off_session": null, "capture_on": null, "capture_method": "sequential_automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "0007", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "520000", "card_extended_bin": null, "card_exp_month": "01", "card_exp_year": "26", "card_holder_name": null, "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": "token_9qL6FgoOzIVLvviNRNwL", "shipping": null, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "order_details": null, "email": "something@gmail.com", "name": "Joseph Doe", "phone": "999999999", "return_url": "https://google.com/", "authentication_type": "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_Q75JaLo7wPiCAh8nrkZc/postman_merchant_GHAction_3a560136-e947-4667-bb84-2f015fcc1196/pay_Q75JaLo7wPiCAh8nrkZc_1" }, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": null, "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "test_mit", "created_at": 1731988696, "expires": 1731992296, "secret": "epk_e83b819668e84eb99ab249e855471ed8" }, "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_hl5seUYAuPOk5MN8bSGO", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_DsQkwRcnsQVWJ7jbsSZl", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2024-11-19T04:13:16.513Z", "fingerprint": null, "browser_info": null, "payment_method_id": "pm_vdP2g5rwDJBoKDubJPvQ", "payment_method_status": "inactive", "updated": "2024-11-19T03:58:17.469Z", "charges": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null } 1.1. **Payment Sync** - **Request**: curl --location 'http://localhost:8080/payments/pay_DMkbjecVspKCAf7Sjl2o' \ --header 'Accept: application/json' \ --header 'api-key: dev_wmCOQW4LM2BHYugFWaU8crmipDtmGDsq0iozaQhe17CtM59tqCHSAtD8w646AkZU' - **Response**: { "payment_id": "pay_Q75JaLo7wPiCAh8nrkZc", "merchant_id": "postman_merchant_GHAction_3a560136-e947-4667-bb84-2f015fcc1196", "status": "succeeded", "amount": 501, "net_amount": 501, "shipping_cost": null, "amount_capturable": 0, "amount_received": 501, "connector": "paybox", "client_secret": "pay_Q75JaLo7wPiCAh8nrkZc_secret_Qa4XYmBSyuDUbaqKtJ7r", "created": "2024-11-19T03:58:16.513Z", "currency": "EUR", "customer_id": "test_mit", "customer": { "id": "test_mit", "name": "Joseph Doe", "email": "something@gmail.com", "phone": "999999999", "phone_country_code": "+65" }, "description": null, "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "off_session", "off_session": null, "capture_on": null, "capture_method": "sequential_automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "0007", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "520000", "card_extended_bin": null, "card_exp_month": "01", "card_exp_year": "26", "card_holder_name": null, "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": "token_9qL6FgoOzIVLvviNRNwL", "shipping": null, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "order_details": null, "email": "something@gmail.com", "name": "Joseph Doe", "phone": "999999999", "return_url": "https://google.com/", "authentication_type": "three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": null, "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": null, "manual_retry_allowed": false, "connector_transaction_id": "0080164085", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": null, "payment_link": null, "profile_id": "pro_hl5seUYAuPOk5MN8bSGO", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_DsQkwRcnsQVWJ7jbsSZl", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2024-11-19T04:13:16.513Z", "fingerprint": null, "browser_info": null, "payment_method_id": "pm_vdP2g5rwDJBoKDubJPvQ", "payment_method_status": "active", "updated": "2024-11-19T03:59:47.678Z", "charges": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null } 1.3. **MIT payment** - **Request** curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_wmCOQW4LM2BHYugFWaU8crmipDtmGDsq0iozaQhe17CtM59tqCHSAtD8w646AkZU' \ --data-raw '{ "amount": 7100, "currency": "EUR", "confirm": true, "customer_id": "test_mit", "email": "guest@example.com", "off_session": true, "recurring_details": { "type": "payment_method_id", "data": "pm_vdP2g5rwDJBoKDubJPvQ" }, "payment_method": "card", "billing": { "address": { "city": "test", "country": "US", "line1": "here", "line2": "there", "line3": "anywhere", "zip": "560095", "state": "Washington", "first_name": "One", "last_name": "Two" }, "phone": { "number": "1234567890", "country_code": "+1" }, "email": "guest@example.com" } }' -**Response** { "payment_id": "pay_DMkbjecVspKCAf7Sjl2o", "merchant_id": "postman_merchant_GHAction_3a560136-e947-4667-bb84-2f015fcc1196", "status": "succeeded", "amount": 7100, "net_amount": 7100, "shipping_cost": null, "amount_capturable": 0, "amount_received": 7100, "connector": "paybox", "client_secret": "pay_DMkbjecVspKCAf7Sjl2o_secret_Ub8XUCMAUqgIdWYgDN2N", "created": "2024-11-19T04:01:26.747Z", "currency": "EUR", "customer_id": "test_mit", "customer": { "id": "test_mit", "name": "Joseph Doe", "email": "guest@example.com", "phone": "999999999", "phone_country_code": "+65" }, "description": null, "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": true, "capture_on": null, "capture_method": null, "payment_method": "card", "payment_method_data": { "card": { "last4": "0007", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "520000", "card_extended_bin": null, "card_exp_month": "01", "card_exp_year": "26", "card_holder_name": "John T", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": { "city": "test", "country": "US", "line1": "here", "line2": "there", "line3": "anywhere", "zip": "560095", "state": "Washington", "first_name": "One", "last_name": "Two" }, "phone": { "number": "1234567890", "country_code": "+1" }, "email": "guest@example.com" }, "order_details": null, "email": "guest@example.com", "name": "Joseph Doe", "phone": "999999999", "return_url": null, "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": null, "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "test_mit", "created_at": 1731988886, "expires": 1731992486, "secret": "epk_d193d4bab05147aea937bdd6c5c84568" }, "manual_retry_allowed": false, "connector_transaction_id": "0080164087", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": null, "payment_link": null, "profile_id": "pro_hl5seUYAuPOk5MN8bSGO", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_DsQkwRcnsQVWJ7jbsSZl", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2024-11-19T04:16:26.747Z", "fingerprint": null, "browser_info": null, "payment_method_id": "pm_vdP2g5rwDJBoKDubJPvQ", "payment_method_status": "active", "updated": "2024-11-19T04:01:28.480Z", "charges": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": "SM@LpCp@L@C" } 2. **CIT Payment + No3DS Test** 2.1 -**Request** curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_wmCOQW4LM2BHYugFWaU8crmipDtmGDsq0iozaQhe17CtM59tqCHSAtD8w646AkZU' \ --data '{ "amount": 501, "currency": "EUR", "confirm": true, "capture_method": "sequential_automatic", "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "customer_acceptance": { "acceptance_type": "online", "accepted_at":"1963-05-03T04:07:52.723Z", "online": { "ip_address":"127.0.0.1", "user_agent": "amet irure esse" } }, "payment_method": "card", "payment_method_data": { "card": { "card_number": "5200000000000007", "card_exp_month": "01", "card_exp_year": "26", "card_holder_name": "John T", "card_cvc": "123" } }, "customer_id":"test_mit", "authentication_type": "no_three_ds", "return_url": "https://google.com", "setup_future_usage": "off_session" }' -**Response** { "payment_id": "pay_Adusyo4wM4lvxsG9G8Og", "merchant_id": "postman_merchant_GHAction_3a560136-e947-4667-bb84-2f015fcc1196", "status": "succeeded", "amount": 501, "net_amount": 501, "shipping_cost": null, "amount_capturable": 0, "amount_received": 501, "connector": "paybox", "client_secret": "pay_Adusyo4wM4lvxsG9G8Og_secret_zxcn25iSAsbZ8HKAIokb", "created": "2024-11-19T04:08:34.637Z", "currency": "EUR", "customer_id": "test_mit", "customer": { "id": "test_mit", "name": "Joseph Doe", "email": "guest@example.com", "phone": "999999999", "phone_country_code": "+65" }, "description": null, "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "off_session", "off_session": null, "capture_on": null, "capture_method": "sequential_automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "0007", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "520000", "card_extended_bin": null, "card_exp_month": "01", "card_exp_year": "26", "card_holder_name": null, "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": "token_R1rt2mhmfi7yN57PFJuO", "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": "guest@example.com", "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": "test_mit", "created_at": 1731989314, "expires": 1731992914, "secret": "epk_6727367741724d5fbf3e027fe31653a2" }, "manual_retry_allowed": false, "connector_transaction_id": "0080164102", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": null, "payment_link": null, "profile_id": "pro_hl5seUYAuPOk5MN8bSGO", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_DsQkwRcnsQVWJ7jbsSZl", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2024-11-19T04:23:34.637Z", "fingerprint": null, "browser_info": null, "payment_method_id": "pm_fjGE1FjOztrWm26w5gfS", "payment_method_status": "active", "updated": "2024-11-19T04:08:37.521Z", "charges": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": "SM@LpCp@L@C" } 2.2**MIT payment** -**Request** curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_wmCOQW4LM2BHYugFWaU8crmipDtmGDsq0iozaQhe17CtM59tqCHSAtD8w646AkZU' \ --data-raw '{ "amount": 7100, "currency": "EUR", "confirm": true, "customer_id": "test_mit", "email": "guest@example.com", "off_session": true, "recurring_details": { "type": "payment_method_id", "data": "pm_fjGE1FjOztrWm26w5gfS" }, "payment_method": "card", "billing": { "address": { "city": "test", "country": "US", "line1": "here", "line2": "there", "line3": "anywhere", "zip": "560095", "state": "Washington", "first_name": "One", "last_name": "Two" }, "phone": { "number": "1234567890", "country_code": "+1" }, "email": "guest@example.com" } }' -**Response** { "payment_id": "pay_ozT3qe38r1krdHLhyfDS", "merchant_id": "postman_merchant_GHAction_3a560136-e947-4667-bb84-2f015fcc1196", "status": "succeeded", "amount": 7100, "net_amount": 7100, "shipping_cost": null, "amount_capturable": 0, "amount_received": 7100, "connector": "paybox", "client_secret": "pay_ozT3qe38r1krdHLhyfDS_secret_RRTrzdf41k8C5J8CXFc4", "created": "2024-11-19T04:09:39.712Z", "currency": "EUR", "customer_id": "test_mit", "customer": { "id": "test_mit", "name": "Joseph Doe", "email": "guest@example.com", "phone": "999999999", "phone_country_code": "+65" }, "description": null, "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": true, "capture_on": null, "capture_method": null, "payment_method": "card", "payment_method_data": { "card": { "last4": "0007", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "520000", "card_extended_bin": null, "card_exp_month": "01", "card_exp_year": "26", "card_holder_name": "John T", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": { "city": "test", "country": "US", "line1": "here", "line2": "there", "line3": "anywhere", "zip": "560095", "state": "Washington", "first_name": "One", "last_name": "Two" }, "phone": { "number": "1234567890", "country_code": "+1" }, "email": "guest@example.com" }, "order_details": null, "email": "guest@example.com", "name": "Joseph Doe", "phone": "999999999", "return_url": null, "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": null, "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "test_mit", "created_at": 1731989379, "expires": 1731992979, "secret": "epk_ad52b99e9b23445f8f7688e4941b84c2" }, "manual_retry_allowed": false, "connector_transaction_id": "0080164108", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": null, "payment_link": null, "profile_id": "pro_hl5seUYAuPOk5MN8bSGO", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_DsQkwRcnsQVWJ7jbsSZl", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2024-11-19T04:24:39.712Z", "fingerprint": null, "browser_info": null, "payment_method_id": "pm_fjGE1FjOztrWm26w5gfS", "payment_method_status": "active", "updated": "2024-11-19T04:09:41.363Z", "charges": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": "SM@LpCp@L@C" } ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/router_response_types.rs` **2. Core Business Logic** - `crates/router/src/core/fraud_check/operation/fraud_check_post.rs` - `crates/router/src/core/payments.rs` - `crates/router/src/core/payments/flows.rs` - ... and 5 more files **3. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/airwallex.rs` - `crates/hyperswitch_connectors/src/connectors/airwallex/transformers.rs` - `crates/hyperswitch_connectors/src/connectors/bambora.rs` - ... and 69 more files **4. Type Definitions** - `crates/router/src/types.rs` **5. Other** - `api-reference-v2/openapi_spec.json` - `api-reference/openapi_spec.json` - `crates/common_enums/src/enums.rs` - ... and 3 more files **Code Patterns Applied:** - Implement new functions (14 changes) - Extend existing types with new fields (97 changes) - Add conditional logic for feature flags or filtering (7 changes) - Modify database queries (3 changes) **Detailed Identifier Changes:** Commit e5dde6ac: Files to modify: **crates/common_enums/src/enums.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/airwallex.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/airwallex/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/bambora.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/bamboraapac.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/billwerk.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/boku.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/cashtocode.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/coinbase.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/deutschebank.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/digitalvirgo.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/dlocal.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/dlocal/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/elavon.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/fiserv.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/fiserv/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/fiservemea.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/fiservemea/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/fiuu.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/fiuu/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/forte.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/globepay.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/gocardless.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/helcim.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/mollie/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/multisafepay.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/nexinets.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/nexixpay.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/nexixpay/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/novalnet.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/payeezy.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/payeezy/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/payu.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/powertranz.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/rapyd.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/rapyd/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/shift4.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/square.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/stax.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/tsys.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/worldline.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/worldline/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/worldpay.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/worldpay/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/zsl.rs** Modify existing code **crates/hyperswitch_connectors/src/utils.rs** Modify existing code **crates/hyperswitch_domain_models/src/router_response_types.rs** Add: - function: pub::get_connector_metadata - function: pub::get_connector_transaction_id - function: pub::merge_transaction_responses - impl: impl PaymentsResponseData **crates/hyperswitch_interfaces/src/api.rs** Modify existing code **crates/router/src/connector/adyen.rs** Modify existing code **crates/router/src/connector/authorizedotnet.rs** Modify existing code **crates/router/src/connector/authorizedotnet/transformers.rs** Modify existing code **crates/router/src/connector/bankofamerica.rs** Modify existing code **crates/router/src/connector/bluesnap.rs** Modify existing code **crates/router/src/connector/braintree.rs** Modify existing code **crates/router/src/connector/checkout.rs** Modify existing code **crates/router/src/connector/checkout/transformers.rs** Modify existing code **crates/router/src/connector/cybersource.rs** Modify existing code **crates/router/src/connector/datatrans.rs** Modify existing code **crates/router/src/connector/dummyconnector.rs** Modify existing code **crates/router/src/connector/globalpay.rs** Modify existing code **crates/router/src/connector/klarna.rs** Modify existing code **crates/router/src/connector/nmi.rs** Modify existing code **crates/router/src/connector/noon.rs** Modify existing code **crates/router/src/connector/nuvei.rs** Modify existing code **crates/router/src/connector/opayo.rs** Modify existing code **crates/router/src/connector/paybox.rs** Modify existing code **crates/router/src/connector/paybox/transformers.rs** Modify existing code **crates/router/src/connector/payme.rs** Modify existing code **crates/router/src/connector/paypal.rs** Modify existing code **crates/router/src/connector/placetopay.rs** Modify existing code **crates/router/src/connector/stripe.rs** Modify existing code **crates/router/src/connector/stripe/transformers.rs** Modify existing code **crates/router/src/connector/utils.rs** Add: - function: private::is_cit_mandate_payment - function: private::is_cit_mandate_payment **crates/router/src/connector/wellsfargo.rs** Modify existing code **crates/router/src/connector/wellsfargo/transformers.rs** Modify existing code **crates/router/src/core/fraud_check/operation/fraud_check_post.rs** Modify existing code **crates/router/src/core/payments.rs** Modify existing code **crates/router/src/core/payments/flows.rs** Add: - function: pub::should_initiate_capture_flow - function: pub::call_capture_request - function: private::handle_post_capture_response **crates/router/src/core/payments/flows/authorize_flow.rs** Add: - function: private::foreign_try_from - function: private::process_capture_flow - impl: impl ForeignTryFrom<types::RouterData<F, types::PaymentsAuthorizeData, types::PaymentsResponseData>> for types::PaymentsCaptureData **crates/router/src/core/payments/flows/complete_authorize_flow.rs** Modify existing code **crates/router/src/core/payments/helpers.rs** Modify existing code **crates/router/src/core/payments/routing/transformers.rs** Modify existing code **crates/router/src/core/utils.rs** Modify existing code **crates/router/src/types.rs** Modify existing code
{"pr_number": 6587, "pr_title": "feat(connector): Added a new CaptureMethod SequentialAutomatic to Support CIT Mandates for Paybox", "merged_at": "2024-12-05T14:03:43Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"domain": ["crates/hyperswitch_domain_models/src/router_response_types.rs"], "core_business": ["crates/router/src/core/fraud_check/operation/fraud_check_post.rs", "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/complete_authorize_flow.rs", "crates/router/src/core/payments/helpers.rs", "crates/router/src/core/payments/routing/transformers.rs", "crates/router/src/core/utils.rs"], "connectors": ["crates/hyperswitch_connectors/src/connectors/airwallex.rs", "crates/hyperswitch_connectors/src/connectors/airwallex/transformers.rs", "crates/hyperswitch_connectors/src/connectors/bambora.rs", "crates/hyperswitch_connectors/src/connectors/bamboraapac.rs", "crates/hyperswitch_connectors/src/connectors/billwerk.rs", "crates/hyperswitch_connectors/src/connectors/boku.rs", "crates/hyperswitch_connectors/src/connectors/cashtocode.rs", "crates/hyperswitch_connectors/src/connectors/coinbase.rs", "crates/hyperswitch_connectors/src/connectors/deutschebank.rs", "crates/hyperswitch_connectors/src/connectors/digitalvirgo.rs", "crates/hyperswitch_connectors/src/connectors/dlocal.rs", "crates/hyperswitch_connectors/src/connectors/dlocal/transformers.rs", "crates/hyperswitch_connectors/src/connectors/elavon.rs", "crates/hyperswitch_connectors/src/connectors/fiserv.rs", "crates/hyperswitch_connectors/src/connectors/fiserv/transformers.rs", "crates/hyperswitch_connectors/src/connectors/fiservemea.rs", "crates/hyperswitch_connectors/src/connectors/fiservemea/transformers.rs", "crates/hyperswitch_connectors/src/connectors/fiuu.rs", "crates/hyperswitch_connectors/src/connectors/fiuu/transformers.rs", "crates/hyperswitch_connectors/src/connectors/forte.rs", "crates/hyperswitch_connectors/src/connectors/globepay.rs", "crates/hyperswitch_connectors/src/connectors/gocardless.rs", "crates/hyperswitch_connectors/src/connectors/helcim.rs", "crates/hyperswitch_connectors/src/connectors/mollie/transformers.rs", "crates/hyperswitch_connectors/src/connectors/multisafepay.rs", "crates/hyperswitch_connectors/src/connectors/nexinets.rs", "crates/hyperswitch_connectors/src/connectors/nexixpay.rs", "crates/hyperswitch_connectors/src/connectors/nexixpay/transformers.rs", "crates/hyperswitch_connectors/src/connectors/novalnet.rs", "crates/hyperswitch_connectors/src/connectors/payeezy.rs", "crates/hyperswitch_connectors/src/connectors/payeezy/transformers.rs", "crates/hyperswitch_connectors/src/connectors/payu.rs", "crates/hyperswitch_connectors/src/connectors/powertranz.rs", "crates/hyperswitch_connectors/src/connectors/rapyd.rs", "crates/hyperswitch_connectors/src/connectors/rapyd/transformers.rs", "crates/hyperswitch_connectors/src/connectors/shift4.rs", "crates/hyperswitch_connectors/src/connectors/square.rs", "crates/hyperswitch_connectors/src/connectors/stax.rs", "crates/hyperswitch_connectors/src/connectors/tsys.rs", "crates/hyperswitch_connectors/src/connectors/worldline.rs", "crates/hyperswitch_connectors/src/connectors/worldline/transformers.rs", "crates/hyperswitch_connectors/src/connectors/worldpay.rs", "crates/hyperswitch_connectors/src/connectors/worldpay/transformers.rs", "crates/hyperswitch_connectors/src/connectors/zsl.rs", "crates/hyperswitch_connectors/src/utils.rs", "crates/router/src/connector/adyen.rs", "crates/router/src/connector/authorizedotnet.rs", "crates/router/src/connector/authorizedotnet/transformers.rs", "crates/router/src/connector/bankofamerica.rs", "crates/router/src/connector/bluesnap.rs", "crates/router/src/connector/braintree.rs", "crates/router/src/connector/checkout.rs", "crates/router/src/connector/checkout/transformers.rs", "crates/router/src/connector/cybersource.rs", "crates/router/src/connector/datatrans.rs", "crates/router/src/connector/dummyconnector.rs", "crates/router/src/connector/globalpay.rs", "crates/router/src/connector/klarna.rs", "crates/router/src/connector/nmi.rs", "crates/router/src/connector/noon.rs", "crates/router/src/connector/nuvei.rs", "crates/router/src/connector/opayo.rs", "crates/router/src/connector/paybox.rs", "crates/router/src/connector/paybox/transformers.rs", "crates/router/src/connector/payme.rs", "crates/router/src/connector/paypal.rs", "crates/router/src/connector/placetopay.rs", "crates/router/src/connector/stripe.rs", "crates/router/src/connector/stripe/transformers.rs", "crates/router/src/connector/utils.rs", "crates/router/src/connector/wellsfargo.rs", "crates/router/src/connector/wellsfargo/transformers.rs"], "types": ["crates/router/src/types.rs"], "other": ["api-reference-v2/openapi_spec.json", "api-reference/openapi_spec.json", "crates/common_enums/src/enums.rs", "crates/hyperswitch_interfaces/src/api.rs", "migrations/2024-11-15-171347_add_capture_method_sequential_automatic/down.sql", "migrations/2024-11-15-171347_add_capture_method_sequential_automatic/up.sql"]}, "change_types": {"functions_added": 14, "fields_added": 97, "imports_added": 5, "conditionals_added": 7, "database_queries": 3}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(analytics): retry implementation for forex crate call ## 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 --> Implementing a retry logic for forex crate call with linear time increment in retry counter ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the 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/router/src/core/currency.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). --> This was required as the Analytics API was returning 5xx when forex was returning error which would eventually resolve on retry ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> As soon as you hit the API of analytics `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 'authorization: Bearer token \ --data '[ { "timeRange": { "startTime": "2024-09-11T18:30:00Z", "endTime": "2024-09-25T09:22:00Z" }, "source": "BATCH", "metrics": [ "payment_processed_amount" ], "timeSeries": { "granularity": "G_ONEDAY" }, "delta": true } ]'` There is no change is response but how the evaluation of the request to give out response would change Added logs for the same are added below ![Screenshot 2025-02-17 at 12 26 37 PM](https://github.com/user-attachments/assets/cb8b3a61-7d87-4f7d-9e87-5a14de6d6263) ## 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/currency.rs` **2. Other** - `crates/router/src/consts.rs` **Code Patterns Applied:** - Add conditional logic for feature flags or filtering (2 changes) **Detailed Identifier Changes:** Commit e93fce26: Files to modify: **crates/router/src/consts.rs** Modify existing code **crates/router/src/core/currency.rs** Modify existing code
{"pr_number": 7280, "pr_title": "fix(analytics): retry implementation for forex crate call", "merged_at": "2025-03-20T14:26:48Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "user", "token"]}, "hierarchy": {"core_business": ["crates/router/src/core/currency.rs"], "other": ["crates/router/src/consts.rs"]}, "change_types": {"imports_added": 1, "conditionals_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor(webhook): add jwt authenticated endpoint to list unique webhook events for a profile ## 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 introduces a new JWT authenticated endpoint for listing unique webhook events for a profile. The endpoint URL is `/events/profile/list` and it will support only JWT authentication. The profile ID and merchant ID will be extracted directly from JWT token. The router handler will call the existing `list_initial_delivery_attempts()` supporting other filtering constraints, same as in the existing endpoint. ### 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)? --> - List initial delivery attempts ``` curl --location 'http://localhost:8080/events/profile/list' \ --header 'Authorization: Bearer eyJBdXRob3JpemF0aW9uIjoicnJyIiwiYWxnIjoiSFMyNTYifQ.eyJ1c2VyX2lkIjoiZDk1NTcyN2ItNDQxYi1iNjVmLWE2NTA5ZWZiYjQ0YiIsIm1lcmNoYW50X2lkIjoibWVyY2hhbnRfMTczOTUyMDc2NSIsInJvbGVfaWQiOiJvcmdfYWRtaW4iLCJleHAiOjE3NDAxMzYxNTUsIm9yZ19pZCI6Im9yZ19IY3gzRUlMcWVXSFhGN2V3bE91dyIsInByb2ZpbGVfaWQiOiJwcm9fWHpGb2lhaDFNbHNDbVJqY3ViUXEiLCJ0ZW5hbnRfaWQiOiJwdWJsaWMifQ.UwdflL4JuswgoPSLDFEGkXg0IUHMdqiftn1HS5arGhc' \ --header 'Cookie: login_token=eyJBdXRob3JpemF0aW9uIjoicnJyIiwiYWxnIjoiSFMyNTYifQ.eyJ1c2VyX2lkIjoiZDk1NTcyN2ItNDQxYi1iNjVmLWE2NTA5ZWZiYjQ0YiIsIm1lcmNoYW50X2lkIjoibWVyY2hhbnRfMTczOTUyMDc2NSIsInJvbGVfaWQiOiJvcmdfYWRtaW4iLCJleHAiOjE3NDAxMzYxNTUsIm9yZ19pZCI6Im9yZ19IY3gzRUlMcWVXSFhGN2V3bE91dyIsInByb2ZpbGVfaWQiOiJwcm9fWHpGb2lhaDFNbHNDbVJqY3ViUXEiLCJ0ZW5hbnRfaWQiOiJwdWJsaWMifQ.UwdflL4JuswgoPSLDFEGkXg0IUHMdqiftn1HS5arGhc' \ --data '' ``` - Response ``` [{"event_id":"evt_019503a21ce676f186def372c1678519","merchant_id":"merchant_1739520765","profile_id":"pro_XzFoiah1MlsCmRjcubQq","object_id":"pay_qF1JybZlZBLKU1m42nua","event_type":"payment_succeeded","event_class":"payments","is_delivery_successful":false,"initial_attempt_id":"evt_019503a21ce676f186def372c1678519","created":"2025-02-14T08:45:10.758Z"},{"event_id":"evt_0195039d99d47f519cb63e7752618825","merchant_id":"merchant_1739520765","profile_id":"pro_XzFoiah1MlsCmRjcubQq","object_id":"ref_dU8Rx4P5Mz25wtT7xIKS","event_type":"refund_succeeded","event_class":"refunds","is_delivery_successful":false,"initial_attempt_id":"evt_0195039d99d47f519cb63e7752618825","created":"2025-02-14T08:40:15.060Z"},{"event_id":"evt_0195039d6d6e79c1a407f83fe42ad994","merchant_id":"merchant_1739520765","profile_id":"pro_XzFoiah1MlsCmRjcubQq","object_id":"pay_uqIiFNnnpEOci2zPypY7","event_type":"payment_succeeded","event_class":"payments","is_delivery_successful":false,"initial_attempt_id":"evt_0195039d6d6e79c1a407f83fe42ad994","created":"2025-02-14T08:40:03.694Z"}] ``` - List initial delivery attempts with constraints ``` curl --location 'http://localhost:8080/events/profile/list?limit=2&offset=1' \ --header 'Authorization: Bearer eyJBdXRob3JpemF0aW9uIjoicnJyIiwiYWxnIjoiSFMyNTYifQ.eyJ1c2VyX2lkIjoiZDk1NTcyN2ItNDQxYi1iNjVmLWE2NTA5ZWZiYjQ0YiIsIm1lcmNoYW50X2lkIjoibWVyY2hhbnRfMTczOTUyMDc2NSIsInJvbGVfaWQiOiJvcmdfYWRtaW4iLCJleHAiOjE3NDAxMzYxNTUsIm9yZ19pZCI6Im9yZ19IY3gzRUlMcWVXSFhGN2V3bE91dyIsInByb2ZpbGVfaWQiOiJwcm9fWHpGb2lhaDFNbHNDbVJqY3ViUXEiLCJ0ZW5hbnRfaWQiOiJwdWJsaWMifQ.UwdflL4JuswgoPSLDFEGkXg0IUHMdqiftn1HS5arGhc' \ --header 'Cookie: login_token=eyJBdXRob3JpemF0aW9uIjoicnJyIiwiYWxnIjoiSFMyNTYifQ.eyJ1c2VyX2lkIjoiZDk1NTcyN2ItNDQxYi1iNjVmLWE2NTA5ZWZiYjQ0YiIsIm1lcmNoYW50X2lkIjoibWVyY2hhbnRfMTczOTUyMDc2NSIsInJvbGVfaWQiOiJvcmdfYWRtaW4iLCJleHAiOjE3NDAxMzYxNTUsIm9yZ19pZCI6Im9yZ19IY3gzRUlMcWVXSFhGN2V3bE91dyIsInByb2ZpbGVfaWQiOiJwcm9fWHpGb2lhaDFNbHNDbVJqY3ViUXEiLCJ0ZW5hbnRfaWQiOiJwdWJsaWMifQ.UwdflL4JuswgoPSLDFEGkXg0IUHMdqiftn1HS5arGhc' \ --data '' ``` - Response ``` [{"event_id":"evt_0195039d99d47f519cb63e7752618825","merchant_id":"merchant_1739520765","profile_id":"pro_XzFoiah1MlsCmRjcubQq","object_id":"ref_dU8Rx4P5Mz25wtT7xIKS","event_type":"refund_succeeded","event_class":"refunds","is_delivery_successful":false,"initial_attempt_id":"evt_0195039d99d47f519cb63e7752618825","created":"2025-02-14T08:40:15.060Z"},{"event_id":"evt_0195039d6d6e79c1a407f83fe42ad994","merchant_id":"merchant_1739520765","profile_id":"pro_XzFoiah1MlsCmRjcubQq","object_id":"pay_uqIiFNnnpEOci2zPypY7","event_type":"payment_succeeded","event_class":"payments","is_delivery_successful":false,"initial_attempt_id":"evt_0195039d6d6e79c1a407f83fe42ad994","created":"2025-02-14T08:40:03.694Z"}] ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Other** - `api-reference-v2/openapi_spec.json` - `api-reference/openapi_spec.json` - `crates/openapi/src/openapi.rs` - ... and 4 more files **Code Patterns Applied:** - Implement new functions (2 changes) - Extend existing types with new fields (6 changes) **Detailed Identifier Changes:** Commit 70107990: Files to modify: **crates/openapi/src/openapi.rs** Modify existing code **crates/openapi/src/routes/webhook_events.rs** Add: - function: pub::list_initial_webhook_delivery_attempts_with_jwtauth **crates/router/src/routes/app.rs** Modify existing code **crates/router/src/routes/webhook_events.rs** Add: - function: pub::list_initial_webhook_delivery_attempts_with_jwtauth **crates/router/src/services/authorization/permissions.rs** Modify existing code
{"pr_number": 7325, "pr_title": "refactor(webhook): add jwt authenticated endpoint to list unique webhook events for a profile", "merged_at": "2025-03-24T12:00:35Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "merchant", "refund"]}, "hierarchy": {"other": ["api-reference-v2/openapi_spec.json", "api-reference/openapi_spec.json", "crates/openapi/src/openapi.rs", "crates/openapi/src/routes/webhook_events.rs", "crates/router/src/routes/app.rs", "crates/router/src/routes/webhook_events.rs", "crates/router/src/services/authorization/permissions.rs"]}, "change_types": {"functions_added": 2, "fields_added": 6}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connectors): [Worldpayvantiv] add NTI flow and refactor sync flows ## 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 --> In this PR 1. We have implemented the CIT and MIT payments, only for - network transaction id flow 2. Completely refactored the status handling 3. Refactored Psync and Rsync flow. Any payment operation triggered to Vantiv (if didn't cause an API failure) will be marked as pending initially and later payment status gets updated via sync calls. Hotfix for https://github.com/juspay/hyperswitch/pull/8495 > Note: Psync after void will fail the payment - this is a known issue. ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> <details> <summary>MCA Create</summary> ```curl curl --location 'http://localhost:8080/account/postman_merchant_GHAction_0e454918-80a7-4094-bcff-daa8e346b243/connectors' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_2HAFolGlYSsegZm3**********' \ --data '{ "connector_type": "payment_processor", "connector_name": "worldpayvantiv", "business_country": "US", "business_label": "default", "connector_account_details": { "auth_type": "SignatureKey", "api_key": "**************", "key1": "**********", "api_secret": "************" }, "test_mode": false, "disabled": false, "payment_methods_enabled": [ { "payment_method": "card", "payment_method_types": [ { "payment_method_type": "credit", "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true } ] }, { "payment_method": "card", "payment_method_types": [ { "payment_method_type": "debit", "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true } ] }, { "payment_method": "wallet", "payment_method_types": [ { "payment_method_type": "apple_pay", "payment_experience": "invoke_sdk_client", "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true } ] }, { "payment_method": "wallet", "payment_method_types": [ { "payment_method_type": "google_pay", "payment_experience": "invoke_sdk_client", "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true } ] } ], "metadata": { "report_group" : "Hello", "merchant_config_currency":"USD", } }' ``` Response ``` {"connector_type":"payment_processor","connector_name":"worldpayvantiv","connector_label":"worldpayvantiv_US_default","merchant_connector_id":"mca_V5XFJarrAF5NstSv85Q2","profile_id":"pro_s7S7h1rpBqt5v5y4ccvK","connector_account_details":{"auth_type":"SignatureKey","api_key":"u8**************01","key1":"01*****81","api_secret":"qR***********Fr"},"payment_methods_enabled":[{"payment_method":"pay_later","payment_method_types":[{"payment_method_type":"affirm","payment_experience":"redirect_to_url","card_networks":null,"accepted_currencies":null,"accepted_countries":null,"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true}]},{"payment_method":"pay_later","payment_method_types":[{"payment_method_type":"afterpay_clearpay","payment_experience":"redirect_to_url","card_networks":null,"accepted_currencies":null,"accepted_countries":null,"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true}]},{"payment_method":"pay_later","payment_method_types":[{"payment_method_type":"klarna","payment_experience":"redirect_to_url","card_networks":null,"accepted_currencies":null,"accepted_countries":null,"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true}]},{"payment_method":"pay_later","payment_method_types":[{"payment_method_type":"klarna","payment_experience":"invoke_sdk_client","card_networks":null,"accepted_currencies":null,"accepted_countries":null,"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true}]},{"payment_method":"bank_redirect","payment_method_types":[{"payment_method_type":"ideal","payment_experience":null,"card_networks":null,"accepted_currencies":null,"accepted_countries":null,"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true},{"payment_method_type":"bancontact_card","payment_experience":null,"card_networks":null,"accepted_currencies":null,"accepted_countries":null,"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true},{"payment_method_type":"przelewy24","payment_experience":null,"card_networks":null,"accepted_currencies":null,"accepted_countries":null,"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true},{"payment_method_type":"giropay","payment_experience":null,"card_networks":null,"accepted_currencies":null,"accepted_countries":null,"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true},{"payment_method_type":"sofort","payment_experience":null,"card_networks":null,"accepted_currencies":null,"accepted_countries":null,"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true},{"payment_method_type":"eps","payment_experience":null,"card_networks":null,"accepted_currencies":null,"accepted_countries":null,"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true}]},{"payment_method":"bank_debit","payment_method_types":[{"payment_method_type":"ach","payment_experience":null,"card_networks":null,"accepted_currencies":null,"accepted_countries":null,"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true},{"payment_method_type":"becs","payment_experience":null,"card_networks":null,"accepted_currencies":null,"accepted_countries":null,"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true},{"payment_method_type":"sepa","payment_experience":null,"card_networks":null,"accepted_currencies":null,"accepted_countries":null,"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true},{"payment_method_type":"bacs","payment_experience":null,"card_networks":null,"accepted_currencies":null,"accepted_countries":null,"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true}]},{"payment_method":"bank_transfer","payment_method_types":[{"payment_method_type":"ach","payment_experience":null,"card_networks":null,"accepted_currencies":null,"accepted_countries":null,"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true},{"payment_method_type":"bacs","payment_experience":null,"card_networks":null,"accepted_currencies":null,"accepted_countries":null,"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true},{"payment_method_type":"sepa","payment_experience":null,"card_networks":null,"accepted_currencies":null,"accepted_countries":null,"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true}]},{"payment_method":"card","payment_method_types":[{"payment_method_type":"credit","payment_experience":null,"card_networks":null,"accepted_currencies":null,"accepted_countries":null,"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true}]},{"payment_method":"card","payment_method_types":[{"payment_method_type":"debit","payment_experience":null,"card_networks":null,"accepted_currencies":null,"accepted_countries":null,"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true}]},{"payment_method":"wallet","payment_method_types":[{"payment_method_type":"apple_pay","payment_experience":"invoke_sdk_client","card_networks":null,"accepted_currencies":null,"accepted_countries":null,"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true}]},{"payment_method":"wallet","payment_method_types":[{"payment_method_type":"google_pay","payment_experience":"invoke_sdk_client","card_networks":null,"accepted_currencies":null,"accepted_countries":null,"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true}]}],"connector_webhook_details":null,"metadata":{"google_pay":{"merchant_info":{"merchant_name":"Narayan Bhat"},"allowed_payment_methods":[{"type":"CARD","parameters":{"allowed_auth_methods":["PAN_ONLY","CRYPTOGRAM_3DS"],"allowed_card_networks":["AMEX","DISCOVER","INTERAC","JCB","MASTERCARD","VISA"]},"tokenization_specification":{"type":"PAYMENT_GATEWAY","parameters":{"gateway":"example","gateway_merchant_id":"{{gateway_merchant_id}}"}}}]},"report_group":"Hello","merchant_config_currency":"USD"},"test_mode":false,"disabled":false,"frm_configs":null,"business_country":"US","business_label":"default","business_sub_label":null,"applepay_verified_domains":null,"pm_auth_config":null,"status":"active","additional_merchant_data":null,"connector_wallets_details":null} ``` </details> <details> <summary> Mandates via NTI </summary> 0. Enable `is_connector_agnostic_mit_enabled` for your profile 1. Create a CIT with Vantiv ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_n7QiMoAbvyRDMYUD1YCqh0JOtSlKx4YbH55UG0WvPeOrKXOgdPLTsMikZcNjz6DY' \ --data '{ "amount": 10, "currency": "USD", "confirm": true, "description": "payments", "connector": ["worldpayvantiv"], "capture_method": "automatic", "customer_id": "9ad5a4e4-80f1-494d-b081-8dc5497f0145", "authentication_type": "no_three_ds", "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "Ceutâ", "zip": "94122", "country": "AR", "first_name": "joseph", "last_name": "Doe" } }, "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4111111111111111", "card_exp_month": "03", "card_exp_year": "30", "card_holder_name": "Joseph", "card_cvc": "737" } }, "customer_acceptance": { "acceptance_type": "online", "accepted_at": "2025-03-27T13:56:49.848Z", "online": { "ip_address": null, "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.3 Safari/605.1.15" } }, "setup_future_usage": "off_session", "browser_info": { "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "language": "nl-NL", "color_depth": 24, "screen_height": 723, "screen_width": 1536, "time_zone": 0, "java_enabled": true, "java_script_enabled": true, "ip_address": "13.232.74.226" }, "metadata": {"report_group": "test"} }' ``` Response ``` {"payment_id":"pay_2lKP1TDqbxFSb4LeKczw","merchant_id":"postman_merchant_GHAction_56a5457a-0ed4-46be-a355-f2f1e7665db0","status":"processing","amount":10,"net_amount":10,"shipping_cost":null,"amount_capturable":0,"amount_received":null,"connector":"worldpayvantiv","client_secret":"pay_2lKP1TDqbxFSb4LeKczw_secret_kteL8nR3S6vFvyQ56mmG","created":"2025-06-30T09:47:06.353Z","currency":"USD","customer_id":"ce5eae6b-563b-4f58-bd58-903d633a5a66","customer":{"id":"ce5eae6b-563b-4f58-bd58-903d633a5a66","name":null,"email":null,"phone":null,"phone_country_code":null},"description":"payments","refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":"off_session","off_session":null,"capture_on":null,"capture_method":"automatic","payment_method":"card","payment_method_data":{"card":{"last4":"1111","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"411111","card_extended_bin":null,"card_exp_month":"03","card_exp_year":"30","card_holder_name":"Joseph","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":null,"billing":{"address":{"city":"San Fransico","country":"AR","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"Ceutâ","first_name":"joseph","last_name":"Doe"},"phone":null,"email":null},"order_details":null,"email":null,"name":null,"phone":null,"return_url":null,"authentication_type":"no_three_ds","statement_descriptor_name":null,"statement_descriptor_suffix":null,"next_action":null,"cancellation_reason":null,"error_code":null,"error_message":null,"unified_code":null,"unified_message":null,"payment_experience":null,"payment_method_type":"credit","connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":{"customer_id":"ce5eae6b-563b-4f58-bd58-903d633a5a66","created_at":1751276826,"expires":1751280426,"secret":"epk_32a625084c354731b59c7d3accac3b70"},"manual_retry_allowed":false,"connector_transaction_id":"83997095739360411","frm_message":null,"metadata":{"report_group":"test"},"connector_metadata":null,"feature_metadata":null,"reference_id":"pay_2lKP1TDqbxFSb4LeKczw","payment_link":null,"profile_id":"pro_s7S7h1rpBqt5v5y4ccvK","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_V5XFJarrAF5NstSv85Q2","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-06-30T10:02:06.353Z","fingerprint":null,"browser_info":{"language":"nl-NL","time_zone":0,"ip_address":"13.232.74.226","user_agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36","color_depth":24,"java_enabled":true,"screen_width":1536,"accept_header":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8","screen_height":723,"java_script_enabled":true},"payment_method_id":"pm_QH26P6o4MrXFv09GaAd7","payment_method_status":"inactive","updated":"2025-06-30T09:47:07.025Z","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. Do a Psync ``` curl --location 'http://localhost:8080/payments/pay_2lKP1TDqbxFSb4LeKczw?force_sync=true' \ --header 'Accept: application/json' \ --header 'api-key: dev_n7QiMoAbvyRDMYUD1YCqh0JOtSlKx4YbH55UG0WvPeOrKXOgdPLTsMikZcNjz6DY' ``` Response ``` {"payment_id":"pay_2lKP1TDqbxFSb4LeKczw","merchant_id":"postman_merchant_GHAction_56a5457a-0ed4-46be-a355-f2f1e7665db0","status":"succeeded","amount":10,"net_amount":10,"shipping_cost":null,"amount_capturable":0,"amount_received":10,"connector":"worldpayvantiv","client_secret":"pay_2lKP1TDqbxFSb4LeKczw_secret_kteL8nR3S6vFvyQ56mmG","created":"2025-06-30T09:47:06.353Z","currency":"USD","customer_id":"ce5eae6b-563b-4f58-bd58-903d633a5a66","customer":{"id":"ce5eae6b-563b-4f58-bd58-903d633a5a66","name":null,"email":null,"phone":null,"phone_country_code":null},"description":"payments","refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":"off_session","off_session":null,"capture_on":null,"capture_method":"automatic","payment_method":"card","payment_method_data":{"card":{"last4":"1111","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"411111","card_extended_bin":null,"card_exp_month":"03","card_exp_year":"30","card_holder_name":"Joseph","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":null,"billing":{"address":{"city":"San Fransico","country":"AR","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"Ceutâ","first_name":"joseph","last_name":"Doe"},"phone":null,"email":null},"order_details":null,"email":null,"name":null,"phone":null,"return_url":null,"authentication_type":"no_three_ds","statement_descriptor_name":null,"statement_descriptor_suffix":null,"next_action":null,"cancellation_reason":null,"error_code":null,"error_message":null,"unified_code":null,"unified_message":null,"payment_experience":null,"payment_method_type":"credit","connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":null,"manual_retry_allowed":false,"connector_transaction_id":"83997095739360411","frm_message":null,"metadata":{"report_group":"test"},"connector_metadata":null,"feature_metadata":null,"reference_id":"pay_2lKP1TDqbxFSb4LeKczw","payment_link":null,"profile_id":"pro_s7S7h1rpBqt5v5y4ccvK","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_V5XFJarrAF5NstSv85Q2","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-06-30T10:02:06.353Z","fingerprint":null,"browser_info":{"language":"nl-NL","time_zone":0,"ip_address":"13.232.74.226","user_agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36","color_depth":24,"java_enabled":true,"screen_width":1536,"accept_header":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8","screen_height":723,"java_script_enabled":true},"payment_method_id":"pm_QH26P6o4MrXFv09GaAd7","payment_method_status":"inactive","updated":"2025-06-30T09:49:15.019Z","split_payments":null,"frm_metadata":null,"extended_authorization_applied":null,"capture_before":null,"merchant_order_reference_id":null,"order_tax_amount":null,"connector_mandate_id":null,"card_discovery":"manual","force_3ds_challenge":false,"force_3ds_challenge_trigger":false,"issuer_error_code":null,"issuer_error_message":null,"is_iframe_redirection_enabled":null,"whole_connector_response":null} ``` 3. Do a MIT payment with the same connector ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_n7QiMoAbvyRDMYUD1YCqh0JOtSlKx4YbH55UG0WvPeOrKXOgdPLTsMikZcNjz6DY' \ --data-raw '{ "amount": 6500, "currency": "USD", "confirm": true, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "customer_id": "ce5eae6b-563b-4f58-bd58-903d633a5a66", "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment request", "authentication_type": "no_three_ds", "return_url": "https://hyperswitch.io", "off_session": true, "recurring_details": { "type": "payment_method_id", "data": "pm_QH26P6o4MrXFv09GaAd7" }, "connector": [ "worldpayvantiv" ], "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_hzqIaJUelieO3OkgacKN","merchant_id":"postman_merchant_GHAction_56a5457a-0ed4-46be-a355-f2f1e7665db0","status":"processing","amount":6500,"net_amount":6500,"shipping_cost":null,"amount_capturable":0,"amount_received":null,"connector":"worldpayvantiv","client_secret":"pay_hzqIaJUelieO3OkgacKN_secret_6fYRsNwF8UdKNSvquyY7","created":"2025-06-30T09:52:21.261Z","currency":"USD","customer_id":"ce5eae6b-563b-4f58-bd58-903d633a5a66","customer":{"id":"ce5eae6b-563b-4f58-bd58-903d633a5a66","name":"John Doe","email":"guest@example.com","phone":"999999999","phone_country_code":"+65"},"description":"Its my first payment request","refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":null,"off_session":true,"capture_on":null,"capture_method":"automatic","payment_method":"card","payment_method_data":{"card":{"last4":"1111","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"411111","card_extended_bin":null,"card_exp_month":"03","card_exp_year":"30","card_holder_name":"Joseph","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":null,"billing":null,"order_details":null,"email":"guest@example.com","name":"John Doe","phone":"999999999","return_url":"https://hyperswitch.io/","authentication_type":"no_three_ds","statement_descriptor_name":"joseph","statement_descriptor_suffix":"JS","next_action":null,"cancellation_reason":null,"error_code":null,"error_message":null,"unified_code":null,"unified_message":null,"payment_experience":null,"payment_method_type":"credit","connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":{"customer_id":"ce5eae6b-563b-4f58-bd58-903d633a5a66","created_at":1751277141,"expires":1751280741,"secret":"epk_676600b403cd43be8c4b57c7d96faafd"},"manual_retry_allowed":false,"connector_transaction_id":"84085052987747238","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_hzqIaJUelieO3OkgacKN","payment_link":null,"profile_id":"pro_s7S7h1rpBqt5v5y4ccvK","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_V5XFJarrAF5NstSv85Q2","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-06-30T10:07:21.261Z","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_QH26P6o4MrXFv09GaAd7","payment_method_status":"active","updated":"2025-06-30T09:52:23.739Z","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} ``` 6. Do a Psync ``` curl --location 'http://localhost:8080/payments/pay_hzqIaJUelieO3OkgacKN?force_sync=true' \ --header 'Accept: application/json' \ --header 'api-key: dev_n7QiMoAbvyRDMYUD1YCqh0JOtSlKx4YbH55UG0WvPeOrKXOgdPLTsMikZcNjz6DY' ``` response ``` {"payment_id":"pay_hzqIaJUelieO3OkgacKN","merchant_id":"postman_merchant_GHAction_56a5457a-0ed4-46be-a355-f2f1e7665db0","status":"succeeded","amount":6500,"net_amount":6500,"shipping_cost":null,"amount_capturable":0,"amount_received":6500,"connector":"worldpayvantiv","client_secret":"pay_hzqIaJUelieO3OkgacKN_secret_6fYRsNwF8UdKNSvquyY7","created":"2025-06-30T09:52:21.261Z","currency":"USD","customer_id":"ce5eae6b-563b-4f58-bd58-903d633a5a66","customer":{"id":"ce5eae6b-563b-4f58-bd58-903d633a5a66","name":"John Doe","email":"guest@example.com","phone":"999999999","phone_country_code":"+65"},"description":"Its my first payment request","refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":null,"off_session":true,"capture_on":null,"capture_method":"automatic","payment_method":"card","payment_method_data":{"card":{"last4":"1111","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"411111","card_extended_bin":null,"card_exp_month":"03","card_exp_year":"30","card_holder_name":"Joseph","payment_checks":null,"authentication_data":null},"billing":{"address":{"city":"San Fransico","country":"AR","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"Ceutâ","first_name":"Joseph","last_name":null},"phone":null,"email":null}},"payment_token":null,"shipping":null,"billing":null,"order_details":null,"email":"guest@example.com","name":"John Doe","phone":"999999999","return_url":"https://hyperswitch.io/","authentication_type":"no_three_ds","statement_descriptor_name":"joseph","statement_descriptor_suffix":"JS","next_action":null,"cancellation_reason":null,"error_code":null,"error_message":null,"unified_code":null,"unified_message":null,"payment_experience":null,"payment_method_type":"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":"84085052987747238","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_hzqIaJUelieO3OkgacKN","payment_link":null,"profile_id":"pro_s7S7h1rpBqt5v5y4ccvK","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_V5XFJarrAF5NstSv85Q2","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-06-30T10:07:21.261Z","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_QH26P6o4MrXFv09GaAd7","payment_method_status":"active","updated":"2025-06-30T09:53:49.963Z","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} ``` </details> <details> <summary> Manual + Refund </summary> 1. Create a manual payment ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_n7QiMoAbvyRDMYUD1YCqh0JOtSlKx4YbH55UG0WvPeOrKXOgdPLTsMikZcNjz6DY' \ --data '{ "amount": 10, "currency": "USD", "confirm": true, "description": "payments", "connector": ["worldpayvantiv"], "capture_method": "manual", "customer_id": "082c2d86-e9e2-481a-bd7e-1bd2e86575ba", "authentication_type": "no_three_ds", "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "Ceutâ", "zip": "94122", "country": "AR", "first_name": "joseph", "last_name": "Doe" } }, "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4111111111111111", "card_exp_month": "03", "card_exp_year": "30", "card_holder_name": "Joseph", "card_cvc": "737" } } }' ``` Response ``` {"payment_id":"pay_uKMQNl7N9wfLvmtq7oJZ","merchant_id":"postman_merchant_GHAction_56a5457a-0ed4-46be-a355-f2f1e7665db0","status":"processing","amount":10,"net_amount":10,"shipping_cost":null,"amount_capturable":10,"amount_received":null,"connector":"worldpayvantiv","client_secret":"pay_uKMQNl7N9wfLvmtq7oJZ_secret_YqGIoiSGvX5aCT0GAM3F","created":"2025-06-30T09:57:16.636Z","currency":"USD","customer_id":"43dbe83d-b75c-496d-a546-59ce2c963322","customer":{"id":"43dbe83d-b75c-496d-a546-59ce2c963322","name":null,"email":null,"phone":null,"phone_country_code":null},"description":"payments","refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":null,"off_session":null,"capture_on":null,"capture_method":"manual","payment_method":"card","payment_method_data":{"card":{"last4":"1111","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"411111","card_extended_bin":null,"card_exp_month":"03","card_exp_year":"30","card_holder_name":"Joseph","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":null,"billing":{"address":{"city":"San Fransico","country":"AR","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"Ceutâ","first_name":"joseph","last_name":"Doe"},"phone":null,"email":null},"order_details":null,"email":null,"name":null,"phone":null,"return_url":null,"authentication_type":"no_three_ds","statement_descriptor_name":null,"statement_descriptor_suffix":null,"next_action":null,"cancellation_reason":null,"error_code":null,"error_message":null,"unified_code":null,"unified_message":null,"payment_experience":null,"payment_method_type":"credit","connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":{"customer_id":"43dbe83d-b75c-496d-a546-59ce2c963322","created_at":1751277436,"expires":1751281036,"secret":"epk_456b8bb12f6b4a0a8019c6745dc3e615"},"manual_retry_allowed":false,"connector_transaction_id":"83997095739384098","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"pay_uKMQNl7N9wfLvmtq7oJZ","payment_link":null,"profile_id":"pro_s7S7h1rpBqt5v5y4ccvK","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_V5XFJarrAF5NstSv85Q2","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-06-30T10:12:16.636Z","fingerprint":null,"browser_info":null,"payment_method_id":null,"payment_method_status":null,"updated":"2025-06-30T09:57:18.185Z","split_payments":null,"frm_metadata":null,"extended_authorization_applied":null,"capture_before":null,"merchant_order_reference_id":null,"order_tax_amount":null,"connector_mandate_id":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. Call Psync ``` curl --location 'http://localhost:8080/payments/pay_uKMQNl7N9wfLvmtq7oJZ?force_sync=true' \ --header 'Accept: application/json' \ --header 'api-key: dev_n7QiMoAbvyRDMYUD1YCqh0JOtSlKx4YbH55UG0WvPeOrKXOgdPLTsMikZcNjz6DY' ``` Response ``` {"payment_id":"pay_uKMQNl7N9wfLvmtq7oJZ","merchant_id":"postman_merchant_GHAction_56a5457a-0ed4-46be-a355-f2f1e7665db0","status":"requires_capture","amount":10,"net_amount":10,"shipping_cost":null,"amount_capturable":10,"amount_received":null,"connector":"worldpayvantiv","client_secret":"pay_uKMQNl7N9wfLvmtq7oJZ_secret_YqGIoiSGvX5aCT0GAM3F","created":"2025-06-30T09:57:16.636Z","currency":"USD","customer_id":"43dbe83d-b75c-496d-a546-59ce2c963322","customer":{"id":"43dbe83d-b75c-496d-a546-59ce2c963322","name":null,"email":null,"phone":null,"phone_country_code":null},"description":"payments","refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":null,"off_session":null,"capture_on":null,"capture_method":"manual","payment_method":"card","payment_method_data":{"card":{"last4":"1111","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"411111","card_extended_bin":null,"card_exp_month":"03","card_exp_year":"30","card_holder_name":"Joseph","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":null,"billing":{"address":{"city":"San Fransico","country":"AR","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"Ceutâ","first_name":"joseph","last_name":"Doe"},"phone":null,"email":null},"order_details":null,"email":null,"name":null,"phone":null,"return_url":null,"authentication_type":"no_three_ds","statement_descriptor_name":null,"statement_descriptor_suffix":null,"next_action":null,"cancellation_reason":null,"error_code":null,"error_message":null,"unified_code":null,"unified_message":null,"payment_experience":null,"payment_method_type":"credit","connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":null,"manual_retry_allowed":false,"connector_transaction_id":"83997095739384098","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"pay_uKMQNl7N9wfLvmtq7oJZ","payment_link":null,"profile_id":"pro_s7S7h1rpBqt5v5y4ccvK","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_V5XFJarrAF5NstSv85Q2","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-06-30T10:12:16.636Z","fingerprint":null,"browser_info":null,"payment_method_id":null,"payment_method_status":null,"updated":"2025-06-30T09:58:32.411Z","split_payments":null,"frm_metadata":null,"extended_authorization_applied":null,"capture_before":null,"merchant_order_reference_id":null,"order_tax_amount":null,"connector_mandate_id":null,"card_discovery":"manual","force_3ds_challenge":false,"force_3ds_challenge_trigger":false,"issuer_error_code":null,"issuer_error_message":null,"is_iframe_redirection_enabled":null,"whole_connector_response":null} ``` 3. Capture ``` curl --location 'http://localhost:8080/payments/pay_uKMQNl7N9wfLvmtq7oJZ/capture' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_n7QiMoAbvyRDMYUD1YCqh0JOtSlKx4YbH55UG0WvPeOrKXOgdPLTsMikZcNjz6DY' \ --data '{ "amount_to_capture": 10, "statement_descriptor_name": "Joseph", "statement_descriptor_suffix": "JS" }' ``` Response ``` {"payment_id":"pay_uKMQNl7N9wfLvmtq7oJZ","merchant_id":"postman_merchant_GHAction_56a5457a-0ed4-46be-a355-f2f1e7665db0","status":"processing","amount":10,"net_amount":10,"shipping_cost":null,"amount_capturable":10,"amount_received":null,"connector":"worldpayvantiv","client_secret":"pay_uKMQNl7N9wfLvmtq7oJZ_secret_YqGIoiSGvX5aCT0GAM3F","created":"2025-06-30T09:57:16.636Z","currency":"USD","customer_id":"43dbe83d-b75c-496d-a546-59ce2c963322","customer":{"id":"43dbe83d-b75c-496d-a546-59ce2c963322","name":null,"email":null,"phone":null,"phone_country_code":null},"description":"payments","refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":null,"off_session":null,"capture_on":null,"capture_method":"manual","payment_method":"card","payment_method_data":{"card":{"last4":"1111","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"411111","card_extended_bin":null,"card_exp_month":"03","card_exp_year":"30","card_holder_name":"Joseph","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":null,"billing":{"address":{"city":"San Fransico","country":"AR","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"Ceutâ","first_name":"joseph","last_name":"Doe"},"phone":null,"email":null},"order_details":null,"email":null,"name":null,"phone":null,"return_url":null,"authentication_type":"no_three_ds","statement_descriptor_name":null,"statement_descriptor_suffix":null,"next_action":null,"cancellation_reason":null,"error_code":null,"error_message":null,"unified_code":null,"unified_message":null,"payment_experience":null,"payment_method_type":"credit","connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":null,"manual_retry_allowed":false,"connector_transaction_id":"83997095739385384","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"pay_uKMQNl7N9wfLvmtq7oJZ","payment_link":null,"profile_id":"pro_s7S7h1rpBqt5v5y4ccvK","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_V5XFJarrAF5NstSv85Q2","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-06-30T10:12:16.636Z","fingerprint":null,"browser_info":null,"payment_method_id":null,"payment_method_status":null,"updated":"2025-06-30T09:59:22.847Z","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} ``` 4. Call Psync ``` curl --location 'http://localhost:8080/payments/pay_uKMQNl7N9wfLvmtq7oJZ?force_sync=true' \ --header 'Accept: application/json' \ --header 'api-key: dev_n7QiMoAbvyRDMYUD1YCqh0JOtSlKx4YbH55UG0WvPeOrKXOgdPLTsMikZcNjz6DY' ``` Response ``` {"payment_id":"pay_uKMQNl7N9wfLvmtq7oJZ","merchant_id":"postman_merchant_GHAction_56a5457a-0ed4-46be-a355-f2f1e7665db0","status":"succeeded","amount":10,"net_amount":10,"shipping_cost":null,"amount_capturable":0,"amount_received":10,"connector":"worldpayvantiv","client_secret":"pay_uKMQNl7N9wfLvmtq7oJZ_secret_YqGIoiSGvX5aCT0GAM3F","created":"2025-06-30T09:57:16.636Z","currency":"USD","customer_id":"43dbe83d-b75c-496d-a546-59ce2c963322","customer":{"id":"43dbe83d-b75c-496d-a546-59ce2c963322","name":null,"email":null,"phone":null,"phone_country_code":null},"description":"payments","refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":null,"off_session":null,"capture_on":null,"capture_method":"manual","payment_method":"card","payment_method_data":{"card":{"last4":"1111","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"411111","card_extended_bin":null,"card_exp_month":"03","card_exp_year":"30","card_holder_name":"Joseph","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":null,"billing":{"address":{"city":"San Fransico","country":"AR","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"Ceutâ","first_name":"joseph","last_name":"Doe"},"phone":null,"email":null},"order_details":null,"email":null,"name":null,"phone":null,"return_url":null,"authentication_type":"no_three_ds","statement_descriptor_name":null,"statement_descriptor_suffix":null,"next_action":null,"cancellation_reason":null,"error_code":null,"error_message":null,"unified_code":null,"unified_message":null,"payment_experience":null,"payment_method_type":"credit","connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":null,"manual_retry_allowed":false,"connector_transaction_id":"83997095739385384","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"pay_uKMQNl7N9wfLvmtq7oJZ","payment_link":null,"profile_id":"pro_s7S7h1rpBqt5v5y4ccvK","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_V5XFJarrAF5NstSv85Q2","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-06-30T10:12:16.636Z","fingerprint":null,"browser_info":null,"payment_method_id":null,"payment_method_status":null,"updated":"2025-06-30T10:00:09.795Z","split_payments":null,"frm_metadata":null,"extended_authorization_applied":null,"capture_before":null,"merchant_order_reference_id":null,"order_tax_amount":null,"connector_mandate_id":null,"card_discovery":"manual","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} ``` 5. Create a refund ``` curl --location 'http://localhost:8080/refunds' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_n7QiMoAbvyRDMYUD1YCqh0JOtSlKx4YbH55UG0WvPeOrKXOgdPLTsMikZcNjz6DY' \ --data '{ "payment_id": "pay_uKMQNl7N9wfLvmtq7oJZ", "amount": 10, "reason": "Customer returned product", "refund_type": "instant", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" }, "split_refunds": { "stripe_split_refund": { "revert_platform_fee": true, "revert_transfer": true } } }' ``` Response ``` {"refund_id":"ref_ONP0iAUqRWqq6v7gSGWS","payment_id":"pay_uKMQNl7N9wfLvmtq7oJZ","amount":10,"currency":"USD","status":"pending","reason":"Customer returned product","metadata":{"udf1":"value1","new_customer":"true","login_date":"2019-09-10T10:11:12Z"},"error_message":null,"error_code":null,"unified_code":null,"unified_message":null,"created_at":"2025-06-30T10:01:00.032Z","updated_at":"2025-06-30T10:01:01.059Z","connector":"worldpayvantiv","profile_id":"pro_s7S7h1rpBqt5v5y4ccvK","merchant_connector_id":"mca_V5XFJarrAF5NstSv85Q2","split_refunds":{"stripe_split_refund":{"revert_platform_fee":true,"revert_transfer":true}},"issuer_error_code":null,"issuer_error_message":null} ``` 6. Call Rsync ``` {"refund_id":"ref_ONP0iAUqRWqq6v7gSGWS","payment_id":"pay_uKMQNl7N9wfLvmtq7oJZ","amount":10,"currency":"USD","status":"pending","reason":"Customer returned product","metadata":{"udf1":"value1","new_customer":"true","login_date":"2019-09-10T10:11:12Z"},"error_message":null,"error_code":null,"unified_code":null,"unified_message":null,"created_at":"2025-06-30T10:01:00.032Z","updated_at":"2025-06-30T10:01:01.059Z","connector":"worldpayvantiv","profile_id":"pro_s7S7h1rpBqt5v5y4ccvK","merchant_connector_id":"mca_V5XFJarrAF5NstSv85Q2","split_refunds":{"stripe_split_refund":{"revert_platform_fee":true,"revert_transfer":true}},"issuer_error_code":null,"issuer_error_message":null} ``` Response ``` {"refund_id":"ref_ONP0iAUqRWqq6v7gSGWS","payment_id":"pay_uKMQNl7N9wfLvmtq7oJZ","amount":10,"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,"unified_code":null,"unified_message":null,"created_at":"2025-06-30T10:01:00.032Z","updated_at":"2025-06-30T10:02:07.545Z","connector":"worldpayvantiv","profile_id":"pro_s7S7h1rpBqt5v5y4ccvK","merchant_connector_id":"mca_V5XFJarrAF5NstSv85Q2","split_refunds":{"stripe_split_refund":{"revert_platform_fee":true,"revert_transfer":true}},"issuer_error_code":null,"issuer_error_message":null} ``` </details> <details> <summary>Void</summary> 1. Create a manual payment with vantiv ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_n7QiMoAbvyRDMYUD1YCqh0JOtSlKx4YbH55UG0WvPeOrKXOgdPLTsMikZcNjz6DY' \ --data '{ "amount": 10, "currency": "USD", "confirm": true, "description": "payments", "connector": ["worldpayvantiv"], "capture_method": "manual", "customer_id": "fb640a0d-6001-4d8d-9f8d-c7365092fbb2", "authentication_type": "no_three_ds", "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "Ceutâ", "zip": "94122", "country": "AR", "first_name": "joseph", "last_name": "Doe" } }, "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4111111111111111", "card_exp_month": "03", "card_exp_year": "30", "card_holder_name": "Joseph", "card_cvc": "737" } } }' ``` Response ``` {"payment_id":"pay_VYvdUN8QOKzzMYsJjsbL","merchant_id":"postman_merchant_GHAction_56a5457a-0ed4-46be-a355-f2f1e7665db0","status":"processing","amount":10,"net_amount":10,"shipping_cost":null,"amount_capturable":10,"amount_received":null,"connector":"worldpayvantiv","client_secret":"pay_VYvdUN8QOKzzMYsJjsbL_secret_PithWrAcFr0e4Kb3YBxW","created":"2025-06-30T10:05:18.411Z","currency":"USD","customer_id":"cd60638a-b1ee-420c-87e2-84a0cb417315","customer":{"id":"cd60638a-b1ee-420c-87e2-84a0cb417315","name":null,"email":null,"phone":null,"phone_country_code":null},"description":"payments","refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":null,"off_session":null,"capture_on":null,"capture_method":"manual","payment_method":"card","payment_method_data":{"card":{"last4":"1111","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"411111","card_extended_bin":null,"card_exp_month":"03","card_exp_year":"30","card_holder_name":"Joseph","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":null,"billing":{"address":{"city":"San Fransico","country":"AR","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"Ceutâ","first_name":"joseph","last_name":"Doe"},"phone":null,"email":null},"order_details":null,"email":null,"name":null,"phone":null,"return_url":null,"authentication_type":"no_three_ds","statement_descriptor_name":null,"statement_descriptor_suffix":null,"next_action":null,"cancellation_reason":null,"error_code":null,"error_message":null,"unified_code":null,"unified_message":null,"payment_experience":null,"payment_method_type":"credit","connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":{"customer_id":"cd60638a-b1ee-420c-87e2-84a0cb417315","created_at":1751277918,"expires":1751281518,"secret":"epk_b1782ed082fc40a7b7c1a3580dc68f8e"},"manual_retry_allowed":false,"connector_transaction_id":"83997095871395696","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"pay_VYvdUN8QOKzzMYsJjsbL","payment_link":null,"profile_id":"pro_s7S7h1rpBqt5v5y4ccvK","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_V5XFJarrAF5NstSv85Q2","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-06-30T10:20:18.411Z","fingerprint":null,"browser_info":null,"payment_method_id":null,"payment_method_status":null,"updated":"2025-06-30T10:05:20.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":"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. Call Psync ``` curl --location 'http://localhost:8080/payments/pay_VYvdUN8QOKzzMYsJjsbL?force_sync=true' \ --header 'Accept: application/json' \ --header 'api-key: dev_n7QiMoAbvyRDMYUD1YCqh0JOtSlKx4YbH55UG0WvPeOrKXOgdPLTsMikZcNjz6DY' ``` Response ``` {"payment_id":"pay_VYvdUN8QOKzzMYsJjsbL","merchant_id":"postman_merchant_GHAction_56a5457a-0ed4-46be-a355-f2f1e7665db0","status":"requires_capture","amount":10,"net_amount":10,"shipping_cost":null,"amount_capturable":10,"amount_received":null,"connector":"worldpayvantiv","client_secret":"pay_VYvdUN8QOKzzMYsJjsbL_secret_PithWrAcFr0e4Kb3YBxW","created":"2025-06-30T10:05:18.411Z","currency":"USD","customer_id":"cd60638a-b1ee-420c-87e2-84a0cb417315","customer":{"id":"cd60638a-b1ee-420c-87e2-84a0cb417315","name":null,"email":null,"phone":null,"phone_country_code":null},"description":"payments","refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":null,"off_session":null,"capture_on":null,"capture_method":"manual","payment_method":"card","payment_method_data":{"card":{"last4":"1111","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"411111","card_extended_bin":null,"card_exp_month":"03","card_exp_year":"30","card_holder_name":"Joseph","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":null,"billing":{"address":{"city":"San Fransico","country":"AR","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"Ceutâ","first_name":"joseph","last_name":"Doe"},"phone":null,"email":null},"order_details":null,"email":null,"name":null,"phone":null,"return_url":null,"authentication_type":"no_three_ds","statement_descriptor_name":null,"statement_descriptor_suffix":null,"next_action":null,"cancellation_reason":null,"error_code":null,"error_message":null,"unified_code":null,"unified_message":null,"payment_experience":null,"payment_method_type":"credit","connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":null,"manual_retry_allowed":false,"connector_transaction_id":"83997095871395696","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"pay_VYvdUN8QOKzzMYsJjsbL","payment_link":null,"profile_id":"pro_s7S7h1rpBqt5v5y4ccvK","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_V5XFJarrAF5NstSv85Q2","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-06-30T10:20:18.411Z","fingerprint":null,"browser_info":null,"payment_method_id":null,"payment_method_status":null,"updated":"2025-06-30T10:06:19.219Z","split_payments":null,"frm_metadata":null,"extended_authorization_applied":null,"capture_before":null,"merchant_order_reference_id":null,"order_tax_amount":null,"connector_mandate_id":null,"card_discovery":"manual","force_3ds_challenge":false,"force_3ds_challenge_trigger":false,"issuer_error_code":null,"issuer_error_message":null,"is_iframe_redirection_enabled":null,"whole_connector_response":null} ``` 3. Void the payment ``` curl --location 'http://localhost:8080/payments/pay_VYvdUN8QOKzzMYsJjsbL/cancel' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_n7QiMoAbvyRDMYUD1YCqh0JOtSlKx4YbH55UG0WvPeOrKXOgdPLTsMikZcNjz6DY' \ --data '{"cancellation_reason":"requested_by_customer"}' ``` Response ``` {"payment_id":"pay_VYvdUN8QOKzzMYsJjsbL","merchant_id":"postman_merchant_GHAction_56a5457a-0ed4-46be-a355-f2f1e7665db0","status":"processing","amount":10,"net_amount":10,"shipping_cost":null,"amount_capturable":0,"amount_received":null,"connector":"worldpayvantiv","client_secret":"pay_VYvdUN8QOKzzMYsJjsbL_secret_PithWrAcFr0e4Kb3YBxW","created":"2025-06-30T10:05:18.411Z","currency":"USD","customer_id":"cd60638a-b1ee-420c-87e2-84a0cb417315","customer":{"id":"cd60638a-b1ee-420c-87e2-84a0cb417315","name":null,"email":null,"phone":null,"phone_country_code":null},"description":"payments","refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":null,"off_session":null,"capture_on":null,"capture_method":"manual","payment_method":"card","payment_method_data":{"card":{"last4":"1111","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"411111","card_extended_bin":null,"card_exp_month":"03","card_exp_year":"30","card_holder_name":"Joseph","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":null,"billing":{"address":{"city":"San Fransico","country":"AR","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"Ceutâ","first_name":"joseph","last_name":"Doe"},"phone":null,"email":null},"order_details":null,"email":null,"name":null,"phone":null,"return_url":null,"authentication_type":"no_three_ds","statement_descriptor_name":null,"statement_descriptor_suffix":null,"next_action":null,"cancellation_reason":"requested_by_customer","error_code":null,"error_message":null,"unified_code":null,"unified_message":null,"payment_experience":null,"payment_method_type":"credit","connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":null,"manual_retry_allowed":false,"connector_transaction_id":"84085053114454037","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"pay_VYvdUN8QOKzzMYsJjsbL","payment_link":null,"profile_id":"pro_s7S7h1rpBqt5v5y4ccvK","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_V5XFJarrAF5NstSv85Q2","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-06-30T10:20:18.411Z","fingerprint":null,"browser_info":null,"payment_method_id":null,"payment_method_status":null,"updated":"2025-06-30T10:07:15.673Z","split_payments":null,"frm_metadata":null,"extended_authorization_applied":null,"capture_before":null,"merchant_order_reference_id":null,"order_tax_amount":null,"connector_mandate_id":null,"card_discovery":"manual","force_3ds_challenge":false,"force_3ds_challenge_trigger":false,"issuer_error_code":null,"issuer_error_message":null,"is_iframe_redirection_enabled":null,"whole_connector_response":null} ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **payment** feature, you'll need to modify these architectural layers: **1. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/configs.rs` **2. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/worldpayvantiv.rs` - `crates/hyperswitch_connectors/src/connectors/worldpayvantiv/transformers.rs` **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 (3 changes) - Implement new functions (7 changes) - Extend existing types with new fields (122 changes) - Add conditional logic for feature flags or filtering (4 changes) **Detailed Identifier Changes:** Commit 699cead9: Files to modify: **crates/hyperswitch_connectors/src/connectors/worldpayvantiv.rs** Remove: - function: private::get_request_body Add: - function: private::get_auth_header - function: private::validate_mandate_payment - function: private::handle_vantiv_json_error_response **crates/hyperswitch_connectors/src/connectors/worldpayvantiv/transformers.rs** Remove: - struct: pub::TransactionQuery Add: - function: private::get_processing_info - struct: pub::VantivSyncErrorResponse - struct: pub::VantivSyncResponse - struct: pub::PaymentDetail - enum: pub::VantivProcessingType - enum: pub::PaymentStatus **crates/hyperswitch_domain_models/src/configs.rs** Modify existing code
{"pr_number": 8528, "pr_title": "feat(connectors): [Worldpayvantiv] add NTI flow and refactor sync flows", "merged_at": "2025-07-02T10:16:30Z", "intent": {"feature_type": "payment", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"domain": ["crates/hyperswitch_domain_models/src/configs.rs"], "connectors": ["crates/hyperswitch_connectors/src/connectors/worldpayvantiv.rs", "crates/hyperswitch_connectors/src/connectors/worldpayvantiv/transformers.rs"], "tests": ["config/deployments/integration_test.toml", "loadtest/config/development.toml"], "config": ["config/config.example.toml", "config/deployments/production.toml", "config/deployments/sandbox.toml", "config/development.toml", "config/docker_compose.toml"]}, "change_types": {"structs_added": 3, "functions_added": 7, "enums_added": 2, "fields_added": 122, "imports_added": 5, "conditionals_added": 4}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(router): add three_ds decision rule execute api ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> add three_ds decision rule execute api This pull request introduces a new feature for executing 3DS decision rules, along with supporting changes across multiple modules. The changes include adding new structures for handling 3DS decision rule inputs and outputs, integrating these structures into the backend and frontend systems, and updating associated tests and documentation. ### New Feature: 3DS Decision Rule Execution * **API endpoint addition**: Added a new OpenAPI endpoint for executing 3DS decision rules (`post /three_ds_decision_rule/execute`). * **New module and structs**: Created `three_ds_decision_rule` module in `crates/api_models` with structs for handling request and response data (`ThreeDsDecisionRuleExecuteRequest` and `ThreeDsDecisionRuleExecuteResponse`). * **Enum updates**: Added `ThreeDsDecisionRule` to `ApiEventsType` and implemented a method to retrieve decisions in `ThreeDSDecisionRule`. [[1]](diffhunk://#diff-77f0e8abb88015b6a88d517bd4b0eb801b98ed2ac5a4a0fac5be92d4927ee780R129) [[2]](diffhunk://#diff-ba82fa34317032bd0f1c62875d639baf1907373d06e34821bbbafab853f128f8R49-R56) ### Backend Integration * **Backend input extension**: Enhanced `BackendInput` in `crates/euclid/src/backend/inputs.rs` to include new fields for acquirer, customer device, and issuer data. * **Context handling**: Updated `Context` implementation in `crates/euclid/src/backend/vir_interpreter/types.rs` to process the new input fields and map them to `EuclidValue`. ### Frontend and Testing Updates * **Frontend enums**: Added `ToSchema` trait to relevant enums in `crates/euclid/src/frontend/dir/enums.rs` for better schema integration. [[1]](diffhunk://#diff-a1285a70cb58ed604113326e553aad04ca7daa51716e67554e0b1cb68e66ec91R422) [[2]](diffhunk://#diff-a1285a70cb58ed604113326e553aad04ca7daa51716e67554e0b1cb68e66ec91R446) * **Test updates**: Modified multiple tests in `crates/euclid/src/backend/vir_interpreter.rs` to include the new input fields (`acquirer_data`, `customer_device_data`, and `issuer_data`). [[1]](diffhunk://#diff-144ce8844bd410b8677d28c0381ca28321ac5efc329e25b6e73e1fa5d683e22dR156-R158) [[2]](diffhunk://#diff-144ce8844bd410b8677d28c0381ca28321ac5efc329e25b6e73e1fa5d683e22dR419-R421) Tested wasm change - get_all_keys (Not to include 3DS Decision Keys) <img width="1056" alt="image" src="https://github.com/user-attachments/assets/6b213979-030d-4364-a21e-7252b1444ca3" /> ### Documentation and Configuration * **API documentation**: Added a new page for the 3DS decision rule API in `api-reference/mint.json`. * **Cargo.toml update**: Included `euclid` as a dependency in `crates/openapi/Cargo.toml`. ### Additional Changes - [x] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Tested Manually **Create a Three DS Decision Rule using Routing Create Config API** CURL ``` curl --location '{{BASE_URL}}/routing' \ --header 'api-key: {{API_KEY}}' \ --header 'Content-Type: application/json' \ --data '{ "name": "Three DS Decision Rule for exemption", "description": "This is a three_ds_decision_rule", "profile_id": "pro_grHb38qPPHB61ZxZQL4f", "transaction_type": "three_ds_authentication", "algorithm": { "type": "three_ds_decision_rule", "data": { "defaultSelection": { "decision": "no_three_ds" }, "rules": [ { "name": "rule_1", "connectorSelection": { "decision": "challenge_requested" }, "statements": [ { "condition": [ { "lhs": "issuer_country", "comparison": "equal", "value": { "type": "enum_variant", "value": "Switzerland" }, "metadata": {} }, { "lhs": "acquirer_country", "comparison": "equal", "value": { "type": "enum_variant", "value": "Switzerland" }, "metadata": {} } ] } ] } ], "metadata": {} } } }' ``` Response ``` { "id": "routing_d4PK8mS800gJWAatPRGS", "profile_id": "pro_grHb38qPPHB61ZxZQL4f", "name": "Three DS Decision Rule for exemption", "kind": "three_ds_decision_rule", "description": "This is a three_ds_decision_rule", "created_at": 1748276752, "modified_at": 1748276752, "algorithm_for": "three_ds_authentication", "decision_engine_routing_id": null } ``` **Call Execute API with appropriate Routing ID and Input Data** CURL ``` curl --location '{{BASE_URL}}/three_ds_decision/execute' \ --header 'Content-Type: application/json' \ --header 'api-key: {{API_KEY}}' \ --data '{ "routing_id": "routing_d4PK8mS800gJWAatPRGS", "payment": { "amount": 1, "currency": "AMD" }, "issuer": { "country": "Switzerland" }, "acquirer": { "country": "Switzerland" } }' ``` Response ``` { "decision": "challenge_requested" } ``` ## Checklist <!-- Put 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/lib.rs` - `crates/api_models/src/three_ds_decision_rule.rs` **2. Core Business Logic** - `crates/router/src/core.rs` - `crates/router/src/core/payments/routing.rs` - `crates/router/src/core/three_ds_decision_rule.rs` - ... and 1 more files **3. Type Definitions** - `crates/common_types/src/three_ds_decision_rule_engine.rs` - `crates/euclid/src/backend/vir_interpreter/types.rs` - `crates/router_env/src/logger/types.rs` **4. Utils** - `crates/common_utils/src/events.rs` - `crates/router/src/routes/lock_utils.rs` **5. Configuration Files** - `crates/openapi/Cargo.toml` **6. Other** - `Cargo.lock` - `api-reference/api-reference/3ds-decision-rule/execute-a-3ds-decision-rule-based-on-the-provided-input.mdx` - `api-reference/mint.json` - ... and 16 more files **Code Patterns Applied:** - Define new data structures (12 changes) - Implement new functions (16 changes) - Extend existing types with new fields (126 changes) - Add conditional logic for feature flags or filtering (9 changes) - Modify database queries (2 changes) **Detailed Identifier Changes:** Commit e90a95de: Files to modify: **crates/api_models/src/lib.rs** Add: - mod: pub::three_ds_decision_rule **crates/api_models/src/three_ds_decision_rule.rs** Add: - function: private::get_api_event_type - function: private::get_api_event_type - struct: pub::PaymentData - struct: pub::PaymentMethodMetaData - struct: pub::CustomerDeviceData - struct: pub::IssuerData - struct: pub::AcquirerData - struct: pub::ThreeDsDecisionRuleExecuteRequest - struct: pub::ThreeDsDecisionRuleExecuteResponse - impl: impl common_utils::events::ApiEventMetric for ThreeDsDecisionRuleExecuteRequest - impl: impl common_utils::events::ApiEventMetric for ThreeDsDecisionRuleExecuteResponse **crates/common_enums/src/enums.rs** Modify existing code **crates/common_types/src/three_ds_decision_rule_engine.rs** Add: - function: pub::get_decision - impl: impl ThreeDSDecisionRule **crates/common_utils/src/events.rs** Modify existing code **crates/euclid/benches/backends.rs** Modify existing code **crates/euclid/src/backend.rs** Add: - function: pub::get_output - impl: impl BackendOutput<O> **crates/euclid/src/backend/inputs.rs** Add: - struct: pub::AcquirerDataInput - struct: pub::CustomerDeviceDataInput - struct: pub::IssuerDataInput **crates/euclid/src/backend/vir_interpreter.rs** Modify existing code **crates/euclid/src/backend/vir_interpreter/types.rs** Modify existing code **crates/euclid/src/frontend/dir/enums.rs** Modify existing code **crates/euclid_wasm/src/lib.rs** Modify existing code **crates/openapi/src/openapi.rs** Modify existing code **crates/openapi/src/routes.rs** Add: - mod: pub::three_ds_decision_rule **crates/openapi/src/routes/three_ds_decision_rule.rs** Add: - function: pub::three_ds_decision_rule_execute **crates/router/src/consts.rs** Modify existing code **crates/router/src/core.rs** Add: - mod: pub::three_ds_decision_rule **crates/router/src/core/payments/routing.rs** Modify existing code **crates/router/src/core/three_ds_decision_rule.rs** Add: - function: pub::execute_three_ds_decision_rule - struct: pub::Algorithm - mod: pub::utils **crates/router/src/core/three_ds_decision_rule/utils.rs** Add: - function: pub::apply_psd2_validations_during_execute - function: private::foreign_from - function: private::foreign_from - function: private::foreign_from - function: private::foreign_from - function: private::foreign_from - function: private::foreign_from - impl: impl ForeignFrom<api_threedsecure::PaymentData> for dsl_inputs::PaymentInput - impl: impl ForeignFrom<Option<api_threedsecure::PaymentMethodMetaData>> for dsl_inputs::PaymentMethodInput - impl: impl ForeignFrom<api_threedsecure::CustomerDeviceData> for dsl_inputs::CustomerDeviceDataInput - impl: impl ForeignFrom<api_threedsecure::IssuerData> for dsl_inputs::IssuerDataInput - impl: impl ForeignFrom<api_threedsecure::AcquirerData> for dsl_inputs::AcquirerDataInput - impl: impl ForeignFrom<api_threedsecure::ThreeDsDecisionRuleExecuteRequest> for dsl_inputs::BackendInput **crates/router/src/lib.rs** Modify existing code **crates/router/src/routes.rs** Add: - mod: pub::three_ds_decision_rule **crates/router/src/routes/app.rs** Add: - function: pub::server - struct: pub::ThreeDsDecisionRule - impl: impl ThreeDsDecisionRule **crates/router/src/routes/lock_utils.rs** Modify existing code **crates/router/src/routes/three_ds_decision_rule.rs** Add: - function: pub::execute_decision_rule **crates/router_env/src/logger/types.rs** Modify existing code
{"pr_number": 8148, "pr_title": "feat(router): add three_ds decision rule execute api", "merged_at": "2025-06-06T16:52:13Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "user"]}, "hierarchy": {"api_models": ["crates/api_models/src/lib.rs", "crates/api_models/src/three_ds_decision_rule.rs"], "core_business": ["crates/router/src/core.rs", "crates/router/src/core/payments/routing.rs", "crates/router/src/core/three_ds_decision_rule.rs", "crates/router/src/core/three_ds_decision_rule/utils.rs"], "types": ["crates/common_types/src/three_ds_decision_rule_engine.rs", "crates/euclid/src/backend/vir_interpreter/types.rs", "crates/router_env/src/logger/types.rs"], "utils": ["crates/common_utils/src/events.rs", "crates/router/src/routes/lock_utils.rs"], "config": ["crates/openapi/Cargo.toml"], "other": ["Cargo.lock", "api-reference/api-reference/3ds-decision-rule/execute-a-3ds-decision-rule-based-on-the-provided-input.mdx", "api-reference/mint.json", "api-reference/openapi_spec.json", "crates/common_enums/src/enums.rs", "crates/euclid/benches/backends.rs", "crates/euclid/src/backend.rs", "crates/euclid/src/backend/inputs.rs", "crates/euclid/src/backend/vir_interpreter.rs", "crates/euclid/src/frontend/dir/enums.rs", "crates/euclid_wasm/src/lib.rs", "crates/openapi/src/openapi.rs", "crates/openapi/src/routes.rs", "crates/openapi/src/routes/three_ds_decision_rule.rs", "crates/router/src/consts.rs", "crates/router/src/lib.rs", "crates/router/src/routes.rs", "crates/router/src/routes/app.rs", "crates/router/src/routes/three_ds_decision_rule.rs"]}, "change_types": {"structs_added": 12, "functions_added": 16, "fields_added": 126, "imports_added": 20, "conditionals_added": 9, "database_queries": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor(debit_routing): Handle missing merchant_business_country by defaulting to US ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> If the business profile does not have a country set, we cannot perform debit routing, because the merchant_business_country will be treated as the acquirer_country, which is used to determine whether a transaction is local or global in the open router. For now, since debit routing is only implemented for USD, we can safely assume the acquirer_country is US if not provided by the merchant. Main branch pr https://github.com/juspay/hyperswitch/pull/8141 ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Core Business Logic** - `crates/router/src/core/debit_routing.rs` **Code Patterns Applied:** - Add conditional logic for feature flags or filtering (2 changes) **Detailed Identifier Changes:** Commit b9636611: Files to modify: **crates/router/src/core/debit_routing.rs** Modify existing code
{"pr_number": 8162, "pr_title": "refactor(debit_routing): Handle missing merchant_business_country by defaulting to US", "merged_at": "2025-05-28T07:10:06Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["merchant", "transaction"]}, "hierarchy": {"core_business": ["crates/router/src/core/debit_routing.rs"]}, "change_types": {"conditionals_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
ci(cypressV2): update cypress v2 framework to accommodate hyperswitch v2 changes ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [x] CI/CD ## Description <!-- Describe your changes in detail --> This PR introduces multiple fixes for Cypress V2 at framework level. The fixes include: - When Error is thrown, we would usually get `undefined` instead of valid error message. This [commit](https://github.com/juspay/hyperswitch/commit/3fdcbdbee3e45f2122135f024dec65c255c5a4f0) fixes that - [Generate Organization names based on UUID](https://github.com/juspay/hyperswitch/commit/a006eee594f8f4466b56ec5b504fef1270144f5d) - [Fix the MCA create call containing metadata](https://github.com/juspay/hyperswitch/commit/e3bc7c76f8a8a330f3aa95aa899bcb7164f14076) - Refactoring - Move `key_id` validations to a separate function to reduce duplicate code. Refer [here](https://github.com/juspay/hyperswitch/commit/413bfeb3932d0f24cfc36cdaba84a714ff444ba4) and [here](https://github.com/juspay/hyperswitch/commit/75c6e9bca50dcb96489cadbaf9f9f2b31bf973a8) - [Move `isoTimeTomorrow` to RequestBodyUtils](https://github.com/juspay/hyperswitch/commit/0f815b5f43c914a2ffe8e93253d525ca409b9ba0) - [Introduce Payment files](https://github.com/juspay/hyperswitch/commit/5eed97e1990bbeb503655973657ca8ee53d9353b) - These files in here are empty but contain only structures > [!IMPORTANT] > It is recommended that the PR is reviewed based on commits instead of going through the file at a time Payment tests have not been added, but only template example just to serve as a reference for devs working on v2 to fill in. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> I'm the motivation. ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Ran Cypress V2 tests against Hyperswitch V2 <img width="369" alt="image" src="https://github.com/user-attachments/assets/9974dac6-266a-49a3-9b02-84a1f24181e4"> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `prettier . --write` - [ ] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Utils** - `cypress-tests-v2/cypress/utils/RequestBodyUtils.js` **2. Tests** - `cypress-tests-v2/cypress/e2e/configs/Payment/Utils.js` - `cypress-tests-v2/cypress/e2e/configs/Payment/_Reusable.js` - `cypress-tests-v2/cypress/e2e/spec/Payment/0001-[No3DS]Payments.cy.js` - ... and 5 more files **Code Patterns Applied:** - Extend existing types with new fields (16 changes) - Add conditional logic for feature flags or filtering (8 changes)
{"pr_number": 6493, "pr_title": "ci(cypressV2): update cypress v2 framework to accommodate hyperswitch v2 changes", "merged_at": "2024-11-08T13:06:37Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "user"]}, "hierarchy": {"utils": ["cypress-tests-v2/cypress/utils/RequestBodyUtils.js"], "tests": ["cypress-tests-v2/cypress/e2e/configs/Payment/Utils.js", "cypress-tests-v2/cypress/e2e/configs/Payment/_Reusable.js", "cypress-tests-v2/cypress/e2e/spec/Payment/0001-[No3DS]Payments.cy.js", "cypress-tests-v2/cypress/e2e/spec/Payment/0002-[3DS]Payments.cy.js", "cypress-tests-v2/cypress/fixtures/organization.json", "cypress-tests-v2/cypress/support/commands.js", "cypress-tests-v2/package-lock.json", "cypress-tests-v2/package.json"]}, "change_types": {"fields_added": 16, "conditionals_added": 8}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
docs: simplify README Updated Readme, made it leaner ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [x] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Changed readme content to make it lean and easier for Contributor to consume content ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with 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)? --> NA ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Other** - `README.md`
{"pr_number": 6306, "pr_title": "docs: simplify README", "merged_at": "2024-10-16T09:34:00Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"other": ["README.md"]}, "change_types": {}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
fix(env): update env for network tokenization service ## 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 --> update env for network tokenization service with webhook source verification key ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Core Business Logic** - `crates/router/src/core/payments/tokenization.rs` **2. Type Definitions** - `crates/common_types/src/callback_mapper.rs` **3. Configuration Files** - `config/config.example.toml` - `config/deployments/env_specific.toml` **4. Other** - `crates/common_enums/src/enums.rs` **Detailed Identifier Changes:** Commit 6c66c36a: Files to modify: **crates/common_enums/src/enums.rs** Modify existing code **crates/common_types/src/callback_mapper.rs** Modify existing code **crates/router/src/core/payments/tokenization.rs** Modify existing code
{"pr_number": 8472, "pr_title": "fix(env): update env for network tokenization service", "merged_at": "2025-06-27T10:30:48Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["webhook", "token"]}, "hierarchy": {"core_business": ["crates/router/src/core/payments/tokenization.rs"], "types": ["crates/common_types/src/callback_mapper.rs"], "config": ["config/config.example.toml", "config/deployments/env_specific.toml"], "other": ["crates/common_enums/src/enums.rs"]}, "change_types": {}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(webhooks): add idempotent_event_id generation using URL-safe Base64 (no padding) and SHA256 digest ## 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 change updates the idempotent_event_id generation to first hash the base string with SHA256 and then encode it using URL-safe Base64 without padding. By doing this, the generated IDs are guaranteed to be short and deterministic, ensuring they always fit within the 64-character database column limit. This fix addresses the issue where long payment_ids combined with event types were exceeding the DB constraint and breaking the outgoing webhooks 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). --> The idempotent_event_id column is a combination of payment_id and event_type. The DB column length is limited to 64 characters. Since payment_id itself can be up to 64 characters long, appending event_type causes the field to exceed the limit, leading to database constraint violations. Currently, this breaks the outgoing webhooks flow. Additionally, during staggered deployments and rollback, the uniqueness of these IDs may cause dual webhook dispatches. closes #8460 ## How did you test 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. Started the local Node.js Express webhook listener on port 3000 using the server.js script. <details> <summary>server.js script</summary> ``` mkdir -p /tmp/hs-webhooks && cd /tmp/hs-webhooks npm init -y >/dev/null npm i express >/dev/null cat > server.js <<'JS' const express = require('express'); const app = express(); app.use(express.json({ type: '*/*' })); app.post('/webhooks/hs', (req, res) => { console.log('---- Webhook received ----'); console.log('Headers:', req.headers); console.log('Body:', JSON.stringify(req.body, null, 2)); res.sendStatus(200); }); app.listen(3000, () => console.log('Webhook listener running on port 3000')); JS node server.js ``` </details> 2. **Merchant Creation** <details> <summary>Merchant creation Curl</summary> ```bash 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_1758029612", "locker_id": "m0010", "merchant_name": "worldpay", "merchant_details": { "primary_contact_person": "John Test", "primary_email": "JohnTest@test.com", "primary_phone": "sunt laborum", "secondary_contact_person": "John Test2", "secondary_email": "JohnTest2@test.com", "secondary_phone": "cillum do dolor id", "website": "https://www.example.com", "about_business": "Online Retail with a wide selection of organic products for North America", "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name":"john", "last_name":"Doe" } }, "return_url": "https://google.com/success", "webhook_details": { "webhook_version": "1.0.1", "webhook_username": "ekart_retail", "webhook_password": "password_ekart@123", "webhook_url":"http://localhost:3000/webhooks/hs", "payment_created_enabled": true, "payment_succeeded_enabled": true, "payment_failed_enabled": true }, "sub_merchants_enabled": false, "parent_merchant_id":"merchant_123", "metadata": { "city": "NY", "unit": "245", "merchant_name": "Acme Widgets LLC" }, "primary_business_details": [ { "country": "US", "business": "default" } ] }' ``` </details> After this when i created payment it created event with these idempotent_event_id. <img width="533" height="165" alt="image" src="https://github.com/user-attachments/assets/6610ede4-6ffe-4de1-bde3-664ac00abec4" /> <details> <summary>Manual Retry Curl</summary> ``` curl --location --request POST 'http://localhost:8080/events/merchant_1758190753/evt_01995ce5346575608391d7f8b825175d/retry' \ --header 'api-key: test_admin' ``` </details> <img width="559" height="252" alt="image" src="https://github.com/user-attachments/assets/cb652d7b-5749-48f0-b2f7-78726411e789" /> For primary object id greater than 64 chars still generated idempotent_event_id will always be less than 64 characters in length. <img width="831" height="33" alt="image" src="https://github.com/user-attachments/assets/3d7b838a-df61-401e-ac2c-fd7e5cd5b4c8" /> ## Checklist <!-- Put 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/errors.rs` - `crates/router/src/core/webhooks/outgoing.rs` - `crates/router/src/core/webhooks/outgoing_v2.rs` - ... and 2 more files **2. Utils** - `crates/common_utils/src/consts.rs` **3. Other** - `crates/router/src/workflows/outgoing_webhook_retry.rs` **Code Patterns Applied:** **Detailed Identifier Changes:** Commit 0c38bc3d: Files to modify: **crates/common_utils/src/consts.rs** Modify existing code **crates/router/src/core/errors.rs** Modify existing code **crates/router/src/core/webhooks/outgoing.rs** Modify existing code **crates/router/src/core/webhooks/outgoing_v2.rs** Modify existing code **crates/router/src/core/webhooks/utils.rs** Modify existing code **crates/router/src/core/webhooks/webhook_events.rs** Modify existing code **crates/router/src/workflows/outgoing_webhook_retry.rs** Modify existing code
{"pr_number": 9405, "pr_title": "fix(webhooks): add idempotent_event_id generation using URL-safe Base64 (no padding) and SHA256 digest", "merged_at": "2025-09-22T08:30:21Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "merchant", "user"]}, "hierarchy": {"core_business": ["crates/router/src/core/errors.rs", "crates/router/src/core/webhooks/outgoing.rs", "crates/router/src/core/webhooks/outgoing_v2.rs", "crates/router/src/core/webhooks/utils.rs", "crates/router/src/core/webhooks/webhook_events.rs"], "utils": ["crates/common_utils/src/consts.rs"], "other": ["crates/router/src/workflows/outgoing_webhook_retry.rs"]}, "change_types": {"imports_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat: add primary key not null query to generic filter function ## 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 --> Since schema for both v1 and v2 can be unified, it paves way for a new bug. In v1, while querying a record with a column that is common for both v1 and v2, the query may retrieve list of records belonging to both v1 and v2. Now v1 application will be able to deserialise v1 records in the list without any problems. But v2 records would have few v1 required fields as null. This records will not be deserialized by the v1 application. For example: Lets say an orgnization has both v1 and v2 merchants. Lets do merchant list by organization_id in v1. This will fetch all v1 and v2 merchant_accounts from the DB. Since merchant_id column will not be populated in v2 records, it will cause deserialization failure. Fix: In order to fix this problem, for all filter DB queries in application, we will add `AND PRIMARY_KEY IS NOT NULL` along with existing where clause. This way v2 created records will not be fetched in v1 application. This will also make sure list endpoint in v2 application won't fail when backfill is not made. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with 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 merchant in v1 (org and profile with be created internally) ``` 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_1744289448", "locker_id": "m0010", "merchant_name": "NewAge Retailer", "merchant_details": { "primary_contact_person": "John Test", "primary_email": "JohnTest@test.com", "primary_phone": "sunt laborum", "secondary_contact_person": "John Test2", "secondary_email": "JohnTest2@test.com", "secondary_phone": "cillum do dolor id", "website": "www.example.com", "about_business": "Online Retail with a wide selection of organic products for North America", "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US" } }, "return_url": "https://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" } }' ``` Response: ``` { "merchant_id": "merchant_1744288162", "merchant_name": "NewAge Retailer", "return_url": "https://google.com/success", "enable_payment_response_hash": true, "payment_response_hash_key": "QzOPDGAfZ1NVNXim3qyyiJYjUXheuHY7IXoEQikHpN9iVnRFwM0D80qRqKdZI5l6", "redirect_to_merchant_with_http_post": false, "merchant_details": { "primary_contact_person": "John Test", "primary_phone": "sunt laborum", "primary_email": "JohnTest@test.com", "secondary_contact_person": "John Test2", "secondary_phone": "cillum do dolor id", "secondary_email": "JohnTest2@test.com", "website": "www.example.com", "about_business": "Online Retail with a wide selection of organic products for North America", "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": null, "last_name": null } }, "webhook_details": { "webhook_version": "1.0.1", "webhook_username": "ekart_retail", "webhook_password": "password_ekart@123", "webhook_url": null, "payment_created_enabled": true, "payment_succeeded_enabled": true, "payment_failed_enabled": true }, "payout_routing_algorithm": null, "sub_merchants_enabled": false, "parent_merchant_id": null, "publishable_key": "pk_dev_0eccdc2b95184c13885ae712f851d1ec", "metadata": { "city": "NY", "unit": "245", "compatible_connector": null }, "locker_id": "m0010", "primary_business_details": [], "frm_routing_algorithm": null, "organization_id": "org_6QGW3lXGhurZmJ2rfo8A", "is_recon_enabled": false, "default_profile": "pro_nOKzSPRoENNiLTMXlEdP", "recon_status": "not_requested", "pm_collect_link_config": null, "product_type": "orchestration" } ``` 2. Create a Merchant Account in v2 for the above Org. ``` curl --location 'localhost:8080/v2/merchant-accounts' \ --header 'x-organization-id: org_6QGW3lXGhurZmJ2rfo8A' \ --header 'Content-Type: application/json' \ --header 'Authorization: admin-api-key=test_admin' \ --data '{ "merchant_name": "cloth_seller" }' ``` Response: ``` { "id": "cloth_seller_5yMFtTAMqUQC4CyQwJD8", "merchant_name": "cloth_seller", "merchant_details": null, "publishable_key": "pk_dev_a9e62e6b0c3a4c1584fd7ae89bab646d", "metadata": null, "organization_id": "org_6QGW3lXGhurZmJ2rfo8A", "recon_status": "not_requested", "product_type": "orchestration" } ``` 3. Do merchant list for org in V1. ``` curl --location 'http://localhost:8080/accounts/list?organization_id=org_6QGW3lXGhurZmJ2rfo8A' \ --header 'Accept: application/json' \ --header 'api-key: test_admin' ``` Response: ``` [ { "merchant_id": "merchant_1744288162", "merchant_name": "NewAge Retailer", "return_url": "https://google.com/success", "enable_payment_response_hash": true, "payment_response_hash_key": "QzOPDGAfZ1NVNXim3qyyiJYjUXheuHY7IXoEQikHpN9iVnRFwM0D80qRqKdZI5l6", "redirect_to_merchant_with_http_post": false, "merchant_details": { "primary_contact_person": "John Test", "primary_phone": "sunt laborum", "primary_email": "JohnTest@test.com", "secondary_contact_person": "John Test2", "secondary_phone": "cillum do dolor id", "secondary_email": "JohnTest2@test.com", "website": "www.example.com", "about_business": "Online Retail with a wide selection of organic products for North America", "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": null, "last_name": null } }, "webhook_details": { "webhook_version": "1.0.1", "webhook_username": "ekart_retail", "webhook_password": "password_ekart@123", "webhook_url": null, "payment_created_enabled": true, "payment_succeeded_enabled": true, "payment_failed_enabled": true }, "payout_routing_algorithm": null, "sub_merchants_enabled": false, "parent_merchant_id": null, "publishable_key": "pk_dev_0eccdc2b95184c13885ae712f851d1ec", "metadata": { "city": "NY", "unit": "245", "compatible_connector": null }, "locker_id": "m0010", "primary_business_details": [], "frm_routing_algorithm": null, "organization_id": "org_6QGW3lXGhurZmJ2rfo8A", "is_recon_enabled": false, "default_profile": "pro_nOKzSPRoENNiLTMXlEdP", "recon_status": "not_requested", "pm_collect_link_config": null, "product_type": "orchestration" } ] ``` Only v1 merchants are being returned. Response: (only v1 merchant list should be returned). But in DB, there are v1 as well as v2 merchants. ![image](https://github.com/user-attachments/assets/2a7fa787-e96f-4c64-be53-fbcf1c041636) DB query has the appropriate IS NOT NULL clause. ![image](https://github.com/user-attachments/assets/02ad97ea-f5c8-4c4e-8334-f5ef62cc707f) ## Checklist <!-- Put 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.rs` - `crates/diesel_models/src/query/generics.rs` - `crates/diesel_models/src/query/utils.rs` **Code Patterns Applied:** - Implement new functions (11 changes) - Extend existing types with new fields (1 changes) - Modify database queries (3 changes) **Detailed Identifier Changes:** Commit 8738f190: Files to modify: **crates/diesel_models/src/query.rs** Add: - mod: private::utils **crates/diesel_models/src/query/generics.rs** Modify existing code **crates/diesel_models/src/query/utils.rs** Add: - function: private::get_local_unique_key - function: private::get_local_unique_key - function: private::get_local_unique_key - function: private::get_local_unique_key - function: private::get_local_unique_key - function: private::get_local_unique_key - function: private::get_local_unique_key - trait: pub::GetPrimaryKey - trait: pub::CompositeKey - impl: impl CompositeKey for <schema::payment_attempt::table as diesel::Table>::PrimaryKey - impl: impl CompositeKey for <schema::refund::table as diesel::Table>::PrimaryKey - impl: impl CompositeKey for <schema::customers::table as diesel::Table>::PrimaryKey - impl: impl CompositeKey for <schema::blocklist::table as diesel::Table>::PrimaryKey - impl: impl CompositeKey for <schema::incremental_authorization::table as diesel::Table>::PrimaryKey - impl: impl CompositeKey for <schema_v2::incremental_authorization::table as diesel::Table>::PrimaryKey - impl: impl CompositeKey for <schema_v2::blocklist::table as diesel::Table>::PrimaryKey - mod: private::composite_key
{"pr_number": 7785, "pr_title": "feat: add primary key not null query to generic filter function", "merged_at": "2025-04-17T05:38:08Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "merchant", "user"]}, "hierarchy": {"database": ["crates/diesel_models/src/query.rs", "crates/diesel_models/src/query/generics.rs", "crates/diesel_models/src/query/utils.rs"]}, "change_types": {"functions_added": 11, "fields_added": 1, "imports_added": 4, "database_queries": 3}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(core): language consumption from locale in payment and payout links ## 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/7993 ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context Fix for https://github.com/juspay/hyperswitch/pull/7993 ## How did you test it? Same as specified in https://github.com/juspay/hyperswitch/pull/7993 ## Checklist <!-- Put 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/locale.js` **2. Configuration Files** - `crates/router/locales/en-GB.yml` - `crates/router/locales/fr-BE.yml` **3. Other** - `crates/router/src/services/api/generic_link_response/context.rs` **Code Patterns Applied:** - Implement new functions (2 changes) - Extend existing types with new fields (1 changes) - Add conditional logic for feature flags or filtering (1 changes) **Detailed Identifier Changes:** Commit 82c2c3ef: Files to modify: **crates/router/src/services/api/generic_link_response/context.rs** Add: - function: private::get_language
{"pr_number": 8018, "pr_title": "fix(core): language consumption from locale in payment and payout links", "merged_at": "2025-05-13T11:44:37Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"core_business": ["crates/router/src/core/payment_link/locale.js"], "config": ["crates/router/locales/en-GB.yml", "crates/router/locales/fr-BE.yml"], "other": ["crates/router/src/services/api/generic_link_response/context.rs"]}, "change_types": {"functions_added": 2, "fields_added": 1, "imports_added": 1, "conditionals_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(nuvei): NTID Support + googlepay & applepay mandate support ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> 1. Add NTID proxy support for nuvei. ( NOTE: Nuvei is not responding with NTID as of now hence we cant make ntid originated flow via nuvei to other connector. We are verifying NTID originated from other connector through nuvei. ) 2. Extend mandate support for googlepay and applepay. ( decrypt flow only) ## test ### 1. NTID Proxy flow 1. Enable `is_connector_agnostic_mit_enabled` for business profile. ```sh curl --location 'localhost:8080/account/merchant_1756365601/business_profile/pro_081OLMJnVwN9FKpv728n' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_DtdoS2OQrXtZtx2ORkcSVGmwPs6fnV73boCOqv3XkXZa4RdYAxu8MEEIzIVplGQi' \ --data '{ "is_connector_agnostic_mit_enabled":true }' ``` <details> <summary> Make a mandate payment via cybersource to get ntid </summary> ## Request ```json { "amount": 0, "currency": "USD", "confirm": true, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "customer_id": "singh", "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment request", "authentication_type": "no_three_ds", "return_url": "https://google.com", "payment_method": "card", "payment_method_type": "credit", "connector": [ "cybersource" ], "payment_method_data": { "card": { "card_number": "4242424242424242", "card_exp_month": "03", "card_exp_year": "2030", "card_holder_name": "joseph Doe", "card_cvc": "123" } }, "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": "127.0.0.1", "user_agent": "amet irure esse" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "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": "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" } ] } ``` ## response ```json { "payment_id": "pay_xmji3uvqkwBFMjMBxRAZ", "merchant_id": "merchant_1756365601", "status": "processing", "amount": 0, "net_amount": 0, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": "cybersource", "client_secret": "pay_xmji3uvqkwBFMjMBxRAZ_secret_LyBJlTjcQFbIqyIviNiG", "created": "2025-08-29T04:10:34.820Z", "currency": "USD", "customer_id": "singh", "customer": { "id": "singh", "name": "John Doe", "email": "guest@example.com", "phone": "999999999", "phone_country_code": "+65" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "off_session", "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "4242", "card_type": "CREDIT", "card_network": "Visa", "card_issuer": "STRIPE PAYMENTS UK LIMITED", "card_issuing_country": "UNITEDKINGDOM", "card_isin": "424242", "card_extended_bin": null, "card_exp_month": "03", "card_exp_year": "2030", "card_holder_name": "joseph Doe", "payment_checks": { "avs_response": { "code": "Y", "codeRaw": "Y" }, "card_verification": null }, "authentication_data": null }, "billing": null }, "payment_token": "token_B4GiWHRdxg3g3BjsvoWY", "shipping": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "John", "last_name": "Doe", "origin_zip": null }, "phone": { "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": "John", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "order_details": [ { "sku": null, "upc": null, "brand": null, "amount": 0, "category": null, "quantity": 1, "tax_rate": null, "product_id": null, "description": null, "product_name": "Apple iphone 15", "product_type": null, "sub_category": null, "total_amount": null, "commodity_code": null, "unit_of_measure": null, "product_img_link": null, "product_tax_code": null, "total_tax_amount": null, "requires_shipping": null, "unit_discount_amount": null } ], "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "return_url": "https://google.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "singh", "created_at": 1756440634, "expires": 1756444234, "secret": "epk_7eb79d3657f24ff285bd9a532dc966f3" }, "manual_retry_allowed": false, "connector_transaction_id": "7564406363016111504807", "frm_message": null, "metadata": {}, "connector_metadata": null, "feature_metadata": { "redirect_response": null, "search_tags": null, "apple_pay_recurring_details": null, "gateway_system": "direct" }, "reference_id": "pay_xmji3uvqkwBFMjMBxRAZ_1", "payment_link": null, "profile_id": "pro_Gb5wEfhtfFlPj8H5vses", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_iXmGyeq1jo6FcvXLsQ78", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-08-29T04:25:34.819Z", "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_channel": null, "payment_method_id": "pm_DIW13s8bZ8neb24aSnov", "network_transaction_id": "016150703802094", "payment_method_status": "inactive", "updated": "2025-08-29T04:10:37.227Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null, "enable_partial_authorization": null } ``` </details> <details> <summary> Make a proxy call with nuvei with cybersource obtained ntid </summary> ## Request ```json { "amount": 10023, "currency": "EUR", "confirm": true, "customer_id": "nithxxinn", "return_url": "https://www.google.com", "capture_method": "automatic", "authentication_type": "no_three_ds", "description": "hellow world", "billing": { "address": { "zip": "560095", "country": "US", "first_name": "Sakil", "last_name": "Mostak", "line1": "Fasdf", "line2": "Fasdf", "city": "Fasdf" } }, "browser_info": { "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8", "ip_address": "192.168.1.1", "java_enabled": false, "java_script_enabled": true, "language": "en-US", "color_depth": 24, "screen_height": 1080, "screen_width": 1920, "time_zone": 330, "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36" }, "email": "hello@gmail.com", "payment_method": "card", "payment_method_type": "credit", "off_session": true, "recurring_details": { "type": "network_transaction_id_and_card_details", "data": { "card_number": "4242424242424242", "card_exp_month": "03", "card_exp_year": "2030", "card_network":"VISA", "network_transaction_id": "016150703802094" } } } ``` ## Response ```json { "payment_id": "pay_75VJuP2CMXo3Z43zThif", "merchant_id": "merchant_1756365601", "status": "succeeded", "amount": 10023, "net_amount": 10023, "shipping_cost": null, "amount_capturable": 0, "amount_received": 10023, "connector": "nuvei", "client_secret": "pay_75VJuP2CMXo3Z43zThif_secret_rHK1wcFimQTTTjwb6A72", "created": "2025-08-29T04:17:33.772Z", "currency": "EUR", "customer_id": null, "customer": null, "description": "hellow world", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": true, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "4242", "card_type": "CREDIT", "card_network": "Visa", "card_issuer": "STRIPE PAYMENTS UK LIMITED", "card_issuing_country": "UNITEDKINGDOM", "card_isin": "424242", "card_extended_bin": null, "card_exp_month": "03", "card_exp_year": "2030", "card_holder_name": null, "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": { "city": "Fasdf", "country": "US", "line1": "Fasdf", "line2": "Fasdf", "line3": null, "zip": "560095", "state": null, "first_name": "Sakil", "last_name": "Mostak", "origin_zip": null }, "phone": null, "email": null }, "order_details": null, "email": null, "name": null, "phone": null, "return_url": "https://www.google.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": null, "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "nithxxinn", "created_at": 1756441053, "expires": 1756444653, "secret": "epk_9107d76964ea44bb821a5a44eeabf189" }, "manual_retry_allowed": false, "connector_transaction_id": "7110000000016800600", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "8321086111", "payment_link": null, "profile_id": "pro_Gb5wEfhtfFlPj8H5vses", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_RFiJ87uP0hCqNImMBrZc", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-08-29T04:32:33.772Z", "fingerprint": null, "browser_info": { "language": "en-US", "time_zone": 330, "ip_address": "192.168.1.1", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36", "color_depth": 24, "java_enabled": false, "screen_width": 1920, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8", "screen_height": 1080, "java_script_enabled": true }, "payment_channel": null, "payment_method_id": null, "network_transaction_id": null, "payment_method_status": null, "updated": "2025-08-29T04:17:35.842Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null, "enable_partial_authorization": null } ``` </details> ### 2. NTID confirm via nuvei using payment token <details> <summary> Create a on session payment via cybersource</summary> ## Request ```json { "amount": 390, "currency": "USD", "confirm": false, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "customer_id": "singh", "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment request", "authentication_type": "no_three_ds", "return_url": "https://google.com", "payment_method": "card", "payment_method_type": "credit", "connector": [ "cybersource" ], "payment_method_data": { "card": { "card_number": "4242424242424242", "card_exp_month": "03", "card_exp_year": "2030", "card_holder_name": "joseph Doe", "card_cvc": "123" } }, "setup_future_usage": "on_session", "payment_type": "setup_mandate", "customer_acceptance": { "acceptance_type": "offline", "accepted_at": "1963-05-03T04:07:52.723Z", "online": { "ip_address": "127.0.0.1", "user_agent": "amet irure esse" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "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": "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" } ] } ``` ## Response ```json { "payment_id": "pay_1ImanuhWyquBc95H6hns", "merchant_id": "merchant_1756365601", "status": "requires_confirmation", "amount": 390, "net_amount": 390, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": null, "client_secret": "pay_1ImanuhWyquBc95H6hns_secret_llGkXJVaZI2TYZHvHI7v", "created": "2025-08-29T05:48:04.092Z", "currency": "USD", "customer_id": "singh", "customer": { "id": "singh", "name": "John Doe", "email": "guest@example.com", "phone": "999999999", "phone_country_code": "+65" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "on_session", "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "4242", "card_type": "CREDIT", "card_network": "Visa", "card_issuer": "STRIPE PAYMENTS UK LIMITED", "card_issuing_country": "UNITEDKINGDOM", "card_isin": "424242", "card_extended_bin": null, "card_exp_month": "03", "card_exp_year": "2030", "card_holder_name": "joseph Doe", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": "token_oq7VkgN5Ao3OAXnX190c", "shipping": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "John", "last_name": "Doe", "origin_zip": null }, "phone": { "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": "John", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "order_details": [ { "sku": null, "upc": null, "brand": null, "amount": 0, "category": null, "quantity": 1, "tax_rate": null, "product_id": null, "description": null, "product_name": "Apple iphone 15", "product_type": null, "sub_category": null, "total_amount": null, "commodity_code": null, "unit_of_measure": null, "product_img_link": null, "product_tax_code": null, "total_tax_amount": null, "requires_shipping": null, "unit_discount_amount": null } ], "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "return_url": "https://google.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "singh", "created_at": 1756446484, "expires": 1756450084, "secret": "epk_607f5a2355114e88b1e75523be174604" }, "manual_retry_allowed": null, "connector_transaction_id": null, "frm_message": null, "metadata": {}, "connector_metadata": null, "feature_metadata": null, "reference_id": null, "payment_link": null, "profile_id": "pro_Gb5wEfhtfFlPj8H5vses", "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-29T06:03:04.092Z", "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_channel": null, "payment_method_id": null, "network_transaction_id": null, "payment_method_status": null, "updated": "2025-08-29T05:48:04.118Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": null, "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null, "enable_partial_authorization": null } ``` </details> <details> <summary> Confirm via nuvei passing the payment token </summary> ## Request ```sh curl --location --globoff '{{baseUrl}}/payments/{{payment_id}}/confirm' \ --header 'api-key: api-key' \ --header 'Content-Type: application/json' \ --data '{ "payment_method": "card", "routing": { "type": "single", "data": { "connector": "nuvei", "merchant_connector_id": "mca_RFiJ87uP0hCqNImMBrZc" } }, "payment_token": "token_dWdH51U5LEGh7XA1qntS" }' ``` ## Response ```json { "payment_id": "pay_1ImanuhWyquBc95H6hns", "merchant_id": "merchant_1756365601", "status": "succeeded", "amount": 390, "net_amount": 390, "shipping_cost": null, "amount_capturable": 0, "amount_received": 390, "connector": "nuvei", "client_secret": "pay_1ImanuhWyquBc95H6hns_secret_llGkXJVaZI2TYZHvHI7v", "created": "2025-08-29T05:48:04.092Z", "currency": "USD", "customer_id": "singh", "customer": { "id": "singh", "name": "John Doe", "email": "guest@example.com", "phone": "999999999", "phone_country_code": "+65" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "on_session", "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "4242", "card_type": "CREDIT", "card_network": "Visa", "card_issuer": "STRIPE PAYMENTS UK LIMITED", "card_issuing_country": "UNITEDKINGDOM", "card_isin": "424242", "card_extended_bin": null, "card_exp_month": "03", "card_exp_year": "2030", "card_holder_name": "joseph Doe", "payment_checks": { "avs_description": null, "avs_result_code": "", "cvv_2_reply_code": "", "cvv_2_description": null, "merchant_advice_code": "", "merchant_advice_code_description": null }, "authentication_data": { "challengePreferenceReason": "12" } }, "billing": null }, "payment_token": "token_oq7VkgN5Ao3OAXnX190c", "shipping": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "John", "last_name": "Doe", "origin_zip": null }, "phone": { "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": "John", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "order_details": [ { "sku": null, "upc": null, "brand": null, "amount": 0, "category": null, "quantity": 1, "tax_rate": null, "product_id": null, "description": null, "product_name": "Apple iphone 15", "product_type": null, "sub_category": null, "total_amount": null, "commodity_code": null, "unit_of_measure": null, "product_img_link": null, "product_tax_code": null, "total_tax_amount": null, "requires_shipping": null, "unit_discount_amount": null } ], "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "return_url": "https://google.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": null, "manual_retry_allowed": false, "connector_transaction_id": "7110000000016803027", "frm_message": null, "metadata": {}, "connector_metadata": null, "feature_metadata": { "redirect_response": null, "search_tags": null, "apple_pay_recurring_details": null, "gateway_system": "direct" }, "reference_id": "8321797111", "payment_link": null, "profile_id": "pro_Gb5wEfhtfFlPj8H5vses", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_RFiJ87uP0hCqNImMBrZc", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-08-29T06:03:04.092Z", "fingerprint": null, "browser_info": { "os_type": null, "language": null, "time_zone": null, "ip_address": "::1", "os_version": null, "user_agent": null, "color_depth": null, "device_model": null, "java_enabled": null, "screen_width": null, "accept_header": null, "screen_height": null, "accept_language": "en", "java_script_enabled": null }, "payment_channel": null, "payment_method_id": null, "network_transaction_id": null, "payment_method_status": null, "updated": "2025-08-29T05:48:19.225Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null, "enable_partial_authorization": null } ``` </details> ### 3. Google pay mandates <details> <summary>Google pay Mandates </summary> ## Googlepay Mandate Request ```json { "amount": 12, "currency": "EUR", "confirm": true, "customer_id": "nithxxinn", "return_url": "https://www.google.com", "capture_method": "automatic", "payment_method": "wallet", "payment_method_type": "google_pay", "authentication_type": "no_three_ds", "description": "hellow world", "customer_acceptance": { "acceptance_type": "online", "accepted_at": "1963-05-03T04:07:52.723Z", "online": { "ip_address": "in sit", "user_agent": "amet irure esse" } }, // "order_tax_amount": 100, "setup_future_usage": "off_session", "billing": { "address": { "zip": "560095", "country": "UA", "first_name": "Sakil", "last_name": "Mostak", "line1": "Fasdf", "line2": "Fasdf", "city": "Fasdf" }, "email":"test@gmail.com" }, "browser_info": { "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8", "ip_address": "192.168.1.1", "java_enabled": false, "java_script_enabled": true, "language": "en-US", "color_depth": 24, "screen_height": 1080, "screen_width": 1920, "time_zone": 330, "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36" }, "email": "hello@gmail.com", "payment_method_data": { "wallet": { "google_pay": { "type": "CARD", "tokenization_data": { "application_primary_account_number": "4761*********1390", "card_exp_month": "12", "card_exp_year": "25", "cryptogram": "ejJ******************U=", "eci_indicator": "5" }, "info": { "card_details": "Discover 9319", "card_network": "VISA" }, "description": "something" } } } } ``` ## Response ```json { "payment_id": "pay_iywIHCV5A8QA4mtOWyGt", "merchant_id": "merchant_1756365601", "status": "succeeded", "amount": 0, "net_amount": 0, "shipping_cost": null, "amount_capturable": 0, "amount_received": 0, "connector": "nuvei", "client_secret": "pay_iywIHCV5A8QA4mtOWyGt_secret_p1YwZ5CEGkcNI5Gb07m1", "created": "2025-08-29T05:53:15.386Z", "currency": "EUR", "customer_id": "nithxxinn", "customer": { "id": "nithxxinn", "name": null, "email": "hello@gmail.com", "phone": null, "phone_country_code": null }, "description": "hellow world", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "off_session", "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "wallet", "payment_method_data": { "wallet": { "google_pay": { "last4": "Discover 9319", "card_network": "VISA", "type": "CARD" } }, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": { "city": "Fasdf", "country": "UA", "line1": "Fasdf", "line2": "Fasdf", "line3": null, "zip": "560095", "state": null, "first_name": "Sakil", "last_name": "Mostak", "origin_zip": null }, "phone": null, "email": "test@gmail.com" }, "order_details": null, "email": "hello@gmail.com", "name": null, "phone": null, "return_url": "https://www.google.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "google_pay", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "nithxxinn", "created_at": 1756446795, "expires": 1756450395, "secret": "epk_56c83dfed43e4766bdc0b4de08459f5b" }, "manual_retry_allowed": false, "connector_transaction_id": "7110000000016803203", "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": "8321860111", "payment_link": null, "profile_id": "pro_Gb5wEfhtfFlPj8H5vses", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_RFiJ87uP0hCqNImMBrZc", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-08-29T06:08:15.386Z", "fingerprint": null, "browser_info": { "language": "en-US", "time_zone": 330, "ip_address": "192.168.1.1", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36", "color_depth": 24, "java_enabled": false, "screen_width": 1920, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8", "screen_height": 1080, "java_script_enabled": true }, "payment_channel": null, "payment_method_id": "pm_jovQAOvn8XLwQg9OunFi", "network_transaction_id": null, "payment_method_status": "active", "updated": "2025-08-29T05:53:17.641Z", "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": "2117920111", "card_discovery": null, "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null, "enable_partial_authorization": null } ``` ## Mandate request using payment_method_id ```json { "amount": 333, "currency": "EUR", "customer_id": "nithxxinn", "confirm": true, "off_session": true, "recurring_details": { "type": "payment_method_id", "data": "{{payment_method_id}}"//pass the payment method id here }, "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" } } ``` ## Mandate Response ```JSON { "payment_id": "pay_QuQhI84yF81WPOAlV0LU", "merchant_id": "merchant_1756365601", "status": "succeeded", "amount": 333, "net_amount": 333, "shipping_cost": null, "amount_capturable": 0, "amount_received": 333, "connector": "nuvei", "client_secret": "pay_QuQhI84yF81WPOAlV0LU_secret_wtlIXP9sC20TnmhOQPUv", "created": "2025-08-29T05:54:22.157Z", "currency": "EUR", "customer_id": "nithxxinn", "customer": { "id": "nithxxinn", "name": null, "email": "hello@gmail.com", "phone": null, "phone_country_code": null }, "description": null, "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": true, "capture_on": null, "capture_method": null, "payment_method": "wallet", "payment_method_data": { "wallet": { "google_pay": { "last4": "Discover 9319", "card_network": "VISA", "type": "CARD" } }, "billing": null }, "payment_token": null, "shipping": null, "billing": null, "order_details": null, "email": "hello@gmail.com", "name": null, "phone": null, "return_url": null, "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "google_pay", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "nithxxinn", "created_at": 1756446862, "expires": 1756450462, "secret": "epk_ed76e2ce25ec45c5959e2219bfc2c686" }, "manual_retry_allowed": false, "connector_transaction_id": "7110000000016803225", "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": "8321866111", "payment_link": null, "profile_id": "pro_Gb5wEfhtfFlPj8H5vses", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_RFiJ87uP0hCqNImMBrZc", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-08-29T06:09:22.157Z", "fingerprint": null, "browser_info": { "language": "en-US", "time_zone": 330, "ip_address": "192.168.1.1", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36", "color_depth": 24, "java_enabled": false, "screen_width": 1920, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8", "screen_height": 1080, "java_script_enabled": true }, "payment_channel": null, "payment_method_id": "pm_jovQAOvn8XLwQg9OunFi", "network_transaction_id": null, "payment_method_status": "active", "updated": "2025-08-29T05:54:24.044Z", "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": "2117920111", "card_discovery": null, "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null, "enable_partial_authorization": null } ``` </details> ### 4. Applepay mandate <details> <summary> Apple pay mandates </summary> ## applepay mandate request ```json { "amount": 1, "currency": "EUR", "confirm": true, // "order_tax_amount": 100, // "setup_future_usage": "off_session", // "payment_type":"setup_mandate", "customer_acceptance": { "acceptance_type": "online", "accepted_at": "1963-05-03T04:07:52.723Z", "online": { "ip_address": "in sit", "user_agent": "amet irure esse" } }, // "order_tax_amount": 100, "setup_future_usage": "off_session", "customer_id": "nithxxinn", "return_url": "https://www.google.com", "capture_method": "automatic", "payment_method": "wallet", "payment_method_type": "apple_pay", "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" }, "email": "nithingowdan77@gmail.com" }, "browser_info": { "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8", "ip_address": "192.168.1.1", "java_enabled": false, "java_script_enabled": true, "language": "en-US", "color_depth": 24, "screen_height": 1080, "screen_width": 1920, "time_zone": 330, "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36" }, "email": "hello@gmail.com", "payment_method_data": { "wallet": { "apple_pay": { "payment_data": { "application_primary_account_number": "42*****2", "application_expiration_month": "09", "application_expiration_year": "30", "application_brand": "VISA", "payment_data": { "online_payment_cryptogram": "Ar******A", "eci_indicator": "7" } }, "payment_method": { "display_name": "Discover 9319", "network": "VISA", "type": "debit" }, "transaction_identifier": "c635c5b3af900d*******ee65ec7afd988a678194751" } } } } ``` ## Response ```json { "payment_id": "pay_m3H9lmnjHemVrTDl86Ra", "merchant_id": "merchant_1756365601", "status": "succeeded", "amount": 1, "net_amount": 1, "shipping_cost": null, "amount_capturable": 0, "amount_received": 1, "connector": "nuvei", "client_secret": "pay_m3H9lmnjHemVrTDl86Ra_secret_0nQUY9G0znF1u8ZghnO0", "created": "2025-08-29T05:59:23.232Z", "currency": "EUR", "customer_id": "nithxxinn", "customer": { "id": "nithxxinn", "name": null, "email": "hello@gmail.com", "phone": null, "phone_country_code": null }, "description": "hellow world", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "off_session", "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "wallet", "payment_method_data": { "wallet": { "apple_pay": { "last4": "9319", "card_network": "VISA", "type": "debit" } }, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": { "city": "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": "nithingowdan77@gmail.com" }, "order_details": null, "email": "hello@gmail.com", "name": null, "phone": null, "return_url": "https://www.google.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "apple_pay", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "nithxxinn", "created_at": 1756447163, "expires": 1756450763, "secret": "epk_ff4001bc18034075a9ea2c1cea803978" }, "manual_retry_allowed": false, "connector_transaction_id": "7110000000016803352", "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": "8321903111", "payment_link": null, "profile_id": "pro_Gb5wEfhtfFlPj8H5vses", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_RFiJ87uP0hCqNImMBrZc", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-08-29T06:14:23.232Z", "fingerprint": null, "browser_info": { "language": "en-US", "time_zone": 330, "ip_address": "192.168.1.1", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36", "color_depth": 24, "java_enabled": false, "screen_width": 1920, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8", "screen_height": 1080, "java_script_enabled": true }, "payment_channel": null, "payment_method_id": "pm_ojHZfjBQMQscy9fSih5M", "network_transaction_id": null, "payment_method_status": "active", "updated": "2025-08-29T05:59:29.451Z", "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": "2109690111", "card_discovery": null, "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null, "enable_partial_authorization": null } ``` ## MIT using payment method id ### Request ```json { "amount": 333, "currency": "EUR", "customer_id": "nithxxinn", "confirm": true, "off_session": true, "recurring_details": { "type": "payment_method_id", "data": "{{payment_method_id}}"//pass the payment method id here }, "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" } } ``` ### Response ```json { "payment_id": "pay_V80VZo4t4Cimc1AjRECd", "merchant_id": "merchant_1756365601", "status": "succeeded", "amount": 333, "net_amount": 333, "shipping_cost": null, "amount_capturable": 0, "amount_received": 333, "connector": "nuvei", "client_secret": "pay_V80VZo4t4Cimc1AjRECd_secret_8H3jqd3Fl0Wa6qVrxocf", "created": "2025-08-29T06:01:47.718Z", "currency": "EUR", "customer_id": "nithxxinn", "customer": { "id": "nithxxinn", "name": null, "email": "hello@gmail.com", "phone": null, "phone_country_code": null }, "description": null, "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": true, "capture_on": null, "capture_method": null, "payment_method": "wallet", "payment_method_data": { "wallet": { "apple_pay": { "last4": "9319", "card_network": "VISA", "type": "debit" } }, "billing": null }, "payment_token": null, "shipping": null, "billing": null, "order_details": null, "email": "hello@gmail.com", "name": null, "phone": null, "return_url": null, "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "apple_pay", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "nithxxinn", "created_at": 1756447307, "expires": 1756450907, "secret": "epk_fcc84a432dec4a869b1cac1e7a034147" }, "manual_retry_allowed": false, "connector_transaction_id": "7110000000016803458", "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": "8321949111", "payment_link": null, "profile_id": "pro_Gb5wEfhtfFlPj8H5vses", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_RFiJ87uP0hCqNImMBrZc", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-08-29T06:16:47.718Z", "fingerprint": null, "browser_info": { "language": "en-US", "time_zone": 330, "ip_address": "192.168.1.1", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36", "color_depth": 24, "java_enabled": false, "screen_width": 1920, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8", "screen_height": 1080, "java_script_enabled": true }, "payment_channel": null, "payment_method_id": "pm_ojHZfjBQMQscy9fSih5M", "network_transaction_id": null, "payment_method_status": "active", "updated": "2025-08-29T06:01:52.065Z", "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": "2109690111", "card_discovery": null, "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null, "enable_partial_authorization": null } ``` </details>
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/nuvei.rs` - `crates/hyperswitch_connectors/src/connectors/nuvei/transformers.rs` **2. Tests** - `config/deployments/integration_test.toml` **3. Configuration Files** - `config/deployments/production.toml` - `config/deployments/sandbox.toml` - `config/development.toml` **Code Patterns Applied:** - Define new data structures (1 changes) - Implement new functions (7 changes) - Extend existing types with new fields (81 changes) **Detailed Identifier Changes:** Commit a589e224: Files to modify: **crates/hyperswitch_connectors/src/connectors/nuvei.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/nuvei/transformers.rs** Add: - function: private::get_ntid - function: private::get_ntid - function: private::get_ntid - struct: pub::ExternalSchemeDetails
{"pr_number": 9081, "pr_title": "feat(nuvei): NTID Support + googlepay & applepay mandate support", "merged_at": "2025-08-29T13:21:26Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/nuvei.rs", "crates/hyperswitch_connectors/src/connectors/nuvei/transformers.rs"], "tests": ["config/deployments/integration_test.toml"], "config": ["config/deployments/production.toml", "config/deployments/sandbox.toml", "config/development.toml"]}, "change_types": {"structs_added": 1, "functions_added": 7, "fields_added": 81, "imports_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(core): added wasm changes for juspayThreeds server metadata ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Enhancement ## Description <!-- Describe your changes in detail --> added wasm changes for juspayThreeds server metadata ## How did you test 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="980" height="236" alt="Screenshot 2025-10-07 at 2 56 56 PM" src="https://github.com/user-attachments/assets/c4937bfb-f9b9-4881-9d18-55e7c8924d57" /> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **connector_integration** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/connector_configs/toml/development.toml` - `crates/connector_configs/toml/production.toml` - `crates/connector_configs/toml/sandbox.toml`
{"pr_number": 9708, "pr_title": "fix(core): added wasm changes for juspayThreeds server metadata", "merged_at": "2025-10-08T07:16:28Z", "intent": {"feature_type": "connector_integration", "action": "add_feature", "entities": ["user"]}, "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(analytics): remove additional filters from PaymentIntentFilters ## 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 PR for: [https://github.com/juspay/hyperswitch/pull/6403](https://github.com/juspay/hyperswitch/pull/6403) - Additional filters are added to `PaymentIntentFilters` as new analytics APIs are expected to be calculated from `Sessionizer Payment Intents` table. - Existing metrics on current dashboard are breaking due to these new filters as the fields are not present in the Payment Intents table. Removed the following additional filters from `PaymentIntentFilters` - connector - authentication_type - payment_method - payment_method_type - card_network - merchant_id - card_last_4 - card_issuer - error_reason ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with 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/6404](https://github.com/juspay/hyperswitch/issues/6406) Dashboard is raising error (status_code - 500) when payment intent based analytics APIs ae being hit, due to filter fields not present in the payment intents 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)? --> Added filters of connector, payment_method, etc on the dashboard and the payments v2 APIs should not return 500 error. - Hit the curl: ```bash curl --location 'http://localhost:8080/analytics/v2/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 'QueryType: SingleStatTimeseries' \ --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/129.0.0.0 Safari/537.36' \ --header 'api-key: snd_ug3Xjm7pNJ6u3SeC5jQCApLIPr6NdDppvEKht091zd62EJJ0pWF6KziALr0yQEuF' \ --header 'authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTQ5ZTNkMmItMTY5Yi00NzUzLWJmNTQtZDcxMTM2YjRiN2JkIiwibWVyY2hhbnRfaWQiOiJtZXJjaGFudF8xNzI2MDQ2MzI4Iiwicm9sZV9pZCI6Im9yZ19hZG1pbiIsImV4cCI6MTcyOTc0ODc1Mywib3JnX2lkIjoib3JnX1ZwU0hPanNZZkR2YWJWWUpnQ0FKIiwicHJvZmlsZV9pZCI6InByb192NXNGb0hlODBPZWlVbElvbm9jTSJ9.-NHlfMrAjUDwjMpCo9PAn86koRkkPMBygNfCTh2jiTw' \ --header 'sec-ch-ua: "Google Chrome";v="129", "Not=A?Brand";v="8", "Chromium";v="129"' \ --header 'sec-ch-ua-mobile: ?0' \ --header 'sec-ch-ua-platform: "macOS"' \ --data '[ { "timeRange": { "startTime": "2024-10-14T18:30:00Z", "endTime": "2024-10-22T15:24:00Z" }, "groupByNames": [ "currency" ], "filters": { "connector": [ "stripe_test" ] }, "timeSeries": { "granularity": "G_ONEDAY" }, "mode": "ORDER", "source": "BATCH", "metrics": [ "successful_smart_retries", "total_smart_retries", "smart_retried_amount" ] } ]' ``` - Response: ```bash { "queryData": [ { "successful_smart_retries": 1, "total_smart_retries": 1, "smart_retried_amount": 6540, "smart_retried_amount_without_smart_retries": 0, "payment_intent_count": null, "successful_payments": null, "successful_payments_without_smart_retries": null, "total_payments": null, "payments_success_rate": null, "payments_success_rate_without_smart_retries": null, "payment_processed_amount": 0, "payment_processed_count": null, "payment_processed_amount_without_smart_retries": 0, "payment_processed_count_without_smart_retries": null, "payments_success_rate_distribution_without_smart_retries": null, "payments_failure_rate_distribution_without_smart_retries": null, "status": null, "currency": "USD", "profile_id": null, "time_range": { "start_time": "2024-10-18T00:00:00.000Z", "end_time": "2024-10-18T23:00:00.000Z" }, "time_bucket": "2024-10-18 00:00:00" } ], "metaData": [ { "total_success_rate": null, "total_success_rate_without_smart_retries": null, "total_smart_retried_amount": 6540, "total_smart_retried_amount_without_smart_retries": 0, "total_payment_processed_amount": 0, "total_payment_processed_amount_without_smart_retries": 0, "total_payment_processed_count": 0, "total_payment_processed_count_without_smart_retries": 0 } ] } ``` ## Checklist <!-- Put 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/payment_intents.rs` **2. Core Business Logic** - `crates/analytics/src/payment_intents/core.rs` **3. Type Definitions** - `crates/analytics/src/payment_intents/types.rs` **4. Utils** - `crates/analytics/src/utils.rs` **5. Other** - `crates/analytics/src/payment_intents/filters.rs` - `crates/analytics/src/payment_intents/metrics.rs` - `crates/analytics/src/payment_intents/metrics/payment_intent_count.rs` - ... and 12 more files **Code Patterns Applied:** **Detailed Identifier Changes:** Commit 838788b5: Files to modify: **crates/analytics/src/payment_intents/core.rs** Modify existing code **crates/analytics/src/payment_intents/filters.rs** Modify existing code **crates/analytics/src/payment_intents/metrics.rs** Modify existing code **crates/analytics/src/payment_intents/metrics/payment_intent_count.rs** Modify existing code **crates/analytics/src/payment_intents/metrics/payments_success_rate.rs** Modify existing code **crates/analytics/src/payment_intents/metrics/sessionized_metrics/payment_intent_count.rs** Modify existing code **crates/analytics/src/payment_intents/metrics/sessionized_metrics/payment_processed_amount.rs** Modify existing code **crates/analytics/src/payment_intents/metrics/sessionized_metrics/payments_distribution.rs** Modify existing code **crates/analytics/src/payment_intents/metrics/sessionized_metrics/payments_success_rate.rs** Modify existing code **crates/analytics/src/payment_intents/metrics/sessionized_metrics/smart_retried_amount.rs** Modify existing code **crates/analytics/src/payment_intents/metrics/sessionized_metrics/successful_smart_retries.rs** Modify existing code **crates/analytics/src/payment_intents/metrics/sessionized_metrics/total_smart_retries.rs** Modify existing code **crates/analytics/src/payment_intents/metrics/smart_retried_amount.rs** Modify existing code **crates/analytics/src/payment_intents/metrics/successful_smart_retries.rs** Modify existing code **crates/analytics/src/payment_intents/metrics/total_smart_retries.rs** Modify existing code **crates/analytics/src/payment_intents/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/payment_intents.rs** Modify existing code
{"pr_number": 6407, "pr_title": "feat(analytics): remove additional filters from PaymentIntentFilters", "merged_at": "2024-10-23T09:58:10Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "merchant", "user"]}, "hierarchy": {"api_models": ["crates/api_models/src/analytics/payment_intents.rs"], "core_business": ["crates/analytics/src/payment_intents/core.rs"], "types": ["crates/analytics/src/payment_intents/types.rs"], "utils": ["crates/analytics/src/utils.rs"], "other": ["crates/analytics/src/payment_intents/filters.rs", "crates/analytics/src/payment_intents/metrics.rs", "crates/analytics/src/payment_intents/metrics/payment_intent_count.rs", "crates/analytics/src/payment_intents/metrics/payments_success_rate.rs", "crates/analytics/src/payment_intents/metrics/sessionized_metrics/payment_intent_count.rs", "crates/analytics/src/payment_intents/metrics/sessionized_metrics/payment_processed_amount.rs", "crates/analytics/src/payment_intents/metrics/sessionized_metrics/payments_distribution.rs", "crates/analytics/src/payment_intents/metrics/sessionized_metrics/payments_success_rate.rs", "crates/analytics/src/payment_intents/metrics/sessionized_metrics/smart_retried_amount.rs", "crates/analytics/src/payment_intents/metrics/sessionized_metrics/successful_smart_retries.rs", "crates/analytics/src/payment_intents/metrics/sessionized_metrics/total_smart_retries.rs", "crates/analytics/src/payment_intents/metrics/smart_retried_amount.rs", "crates/analytics/src/payment_intents/metrics/successful_smart_retries.rs", "crates/analytics/src/payment_intents/metrics/total_smart_retries.rs", "crates/analytics/src/sqlx.rs"]}, "change_types": {"imports_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): [PeachPayments] Add Cards Flow ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [X] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This PR implements the complete Peachpayments connector integration for Hyperswitch, adding support for payment processing, 3DS authentication, void transactions, and comprehensive validation. Key features implemented: - Complete Peachpayments connector with payment authorization, capture, and void flows - 3DS authentication support with enhanced security features - Network token handling with TAVV/XID fields for improved authentication - ConnectorValidation implementation for request validation - Comprehensive error handling and response transformations - Configuration and API endpoint management ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> This change adds Peachpayments as a new payment processor option in Hyperswitch, expanding payment gateway options for merchants. The implementation follows the connector integration pattern and includes all necessary features for production use including security validations and 3DS support. ## How did you test 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. Payment Connector - Create Request: ``` curl --location 'http://localhost:8080/account/merchant_1757610148/connectors' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_SFgSgDzIk5bWAMdai9p76lBeX4bvrRV15SEqDicJ7OhCG6KRzOTljGHUZxpKnZN6' \ --data-raw '{ "connector_type": "payment_processor", "connector_name": "peachpayments", "connector_account_details": { "auth_type": "BodyKey", "api_key": API KEY, "key1": KEY1 }, "test_mode": true, "disabled": false, "payment_methods_enabled": [ { "payment_method": "card", "payment_method_types": [ { "payment_method_type": "credit", "card_networks": [ "Visa", "Mastercard" ], "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_type": "debit", "card_networks": [ "Visa", "Mastercard" ], "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true } ] } ], "connector_webhook_details": { "merchant_secret": "MyWebhookSecret" }, "metadata": { "client_merchant_reference_id": CLIENT MERCHANT REFERENCE ID, "name": NAME, "mcc": MCC, "phone": "27726599258", "email": "hello@example.com", "mobile": "27726599258", "address": "35 Brickfield Rd", "city": "Cape Town", "postalCode": "7925", "regionCode": "WC", "merchantType": "sub", "websiteUrl": "example.com", "route": ROUTE, "mid": MID, "tid": TID, "subMid": SUBMID, "visaPaymentFacilitatorId": VISAPAYMENTFACILITATORID, "masterCardPaymentFacilitatorId": MASTERCARDPAYMENTFACILITATORID }, "business_country": "US", "business_label": "default", "additional_merchant_data": null, "status": "active", "pm_auth_config": null }' ``` Response: ``` { "connector_type": "payment_processor", "connector_name": "peachpayments", "connector_label": "peachpayments_US_default", "merchant_connector_id": "mca_ef4ONOxde7RCQQfvhHJJ", "profile_id": "pro_5BUfDMTQyz5EbHajw6SE", "connector_account_details": { "auth_type": "BodyKey", "api_key": "********************", "key1": "********************************" }, "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 } ] } ], "connector_webhook_details": { "merchant_secret": "MyWebhookSecret", "additional_secret": null }, "metadata": { "client_merchant_reference_id": CLIENT MERCHANT REFERENCE ID, "name": NAME, "mcc": MCC, "phone": "27726599258", "email": "hello@example.com", "mobile": "27726599258", "address": "35 Brickfield Rd", "city": "Cape Town", "postalCode": "7925", "regionCode": "WC", "merchantType": "sub", "websiteUrl": "example.com", "route": ROUTE, "mid": MID, "tid": TID, "subMid": SUBMID, "visaPaymentFacilitatorId": VISAPAYMENTFACILITATORID, "masterCardPaymentFacilitatorId": MASTERCARDPAYMENTFACILITATORID }, "test_mode": true, "disabled": false, "frm_configs": null, "business_country": "US", "business_label": "default", "business_sub_label": null, "applepay_verified_domains": null, "pm_auth_config": null, "status": "active", "additional_merchant_data": null, "connector_wallets_details": null } ``` 2. Payments - Create Request: ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_SFgSgDzIk5bWAMdai9p76lBeX4bvrRV15SEqDicJ7OhCG6KRzOTljGHUZxpKnZN6' \ --data-raw ' { "amount": 35308, "currency": "USD", "confirm": true, "capture_method": "manual", "customer_id": "StripeCustomer", "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+1", "description": "Its my first payment request", "authentication_type": "no_three_ds", "return_url": "https://duck.com", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4242424242424242", "card_exp_month": "10", "card_exp_year": "25", "card_holder_name": "joseph Doe", "card_cvc": "123" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "PiX" } }, "browser_info": { "color_depth": 24, "java_enabled": true, "java_script_enabled": true, "language": "en-US", "screen_height": 848, "screen_width": 1312, "time_zone": -330, "ip_address": "65.1.52.128", "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_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.3.1 Safari/605.1.15", "os_type": "macOS", "os_version": "10.15.7", "device_model": "Macintosh", "accept_language": "en" } }' ``` Response: ``` { "payment_id": "pay_2POhxvMBaEDy88vz9cwX", "merchant_id": "merchant_1757610148", "status": "requires_capture", "amount": 35308, "net_amount": 35308, "shipping_cost": null, "amount_capturable": 35308, "amount_received": null, "connector": "peachpayments", "client_secret": "pay_2POhxvMBaEDy88vz9cwX_secret_1BIiQY7RkIeBsyqU7YRF", "created": "2025-09-11T17:13:57.373Z", "currency": "USD", "customer_id": "StripeCustomer", "customer": { "id": "StripeCustomer", "name": "John Doe", "email": "guest@example.com", "phone": "999999999", "phone_country_code": "+1" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "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": "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, "origin_zip": null }, "phone": null, "email": null }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe", "origin_zip": null }, "phone": null, "email": null }, "order_details": null, "email": "guest@example.com", "name": "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": 1757610837, "expires": 1757614437, "secret": "epk_826cdebaa0dc4fb197d4a229381cff54" }, "manual_retry_allowed": null, "connector_transaction_id": "884be477-1865-4f40-b452-ae792e21a6d5", "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": "884be477-1865-4f40-b452-ae792e21a6d5", "payment_link": null, "profile_id": "pro_5BUfDMTQyz5EbHajw6SE", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_ef4ONOxde7RCQQfvhHJJ", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-11T17:28:57.373Z", "fingerprint": null, "browser_info": { "os_type": "macOS", "language": "en-US", "time_zone": -330, "ip_address": "65.1.52.128", "os_version": "10.15.7", "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.3.1 Safari/605.1.15", "color_depth": 24, "device_model": "Macintosh", "java_enabled": true, "screen_width": 1312, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 848, "accept_language": "en", "java_script_enabled": true }, "payment_channel": null, "payment_method_id": null, "network_transaction_id": null, "payment_method_status": null, "updated": "2025-09-11T17:13:59.291Z", "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 } ``` 3. Payments - Capture Request: ``` curl --location 'http://localhost:8080/payments/pay_2POhxvMBaEDy88vz9cwX/capture' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_SFgSgDzIk5bWAMdai9p76lBeX4bvrRV15SEqDicJ7OhCG6KRzOTljGHUZxpKnZN6' \ --data ' { "amount_to_capture": 35308, "statement_descriptor_name": "Joseph", "statement_descriptor_suffix": "JS" }' ``` Response: ``` { "payment_id": "pay_2POhxvMBaEDy88vz9cwX", "merchant_id": "merchant_1757610148", "status": "succeeded", "amount": 35308, "net_amount": 35308, "shipping_cost": null, "amount_capturable": 0, "amount_received": 35308, "connector": "peachpayments", "client_secret": "pay_2POhxvMBaEDy88vz9cwX_secret_1BIiQY7RkIeBsyqU7YRF", "created": "2025-09-11T17:13:57.373Z", "currency": "USD", "customer_id": "StripeCustomer", "customer": { "id": "StripeCustomer", "name": "John Doe", "email": "guest@example.com", "phone": "999999999", "phone_country_code": "+1" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "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": "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, "origin_zip": null }, "phone": null, "email": null }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe", "origin_zip": null }, "phone": null, "email": null }, "order_details": null, "email": "guest@example.com", "name": "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": null, "manual_retry_allowed": null, "connector_transaction_id": "884be477-1865-4f40-b452-ae792e21a6d5", "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": "884be477-1865-4f40-b452-ae792e21a6d5", "payment_link": null, "profile_id": "pro_5BUfDMTQyz5EbHajw6SE", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_ef4ONOxde7RCQQfvhHJJ", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-11T17:28:57.373Z", "fingerprint": null, "browser_info": { "os_type": "macOS", "language": "en-US", "time_zone": -330, "ip_address": "65.1.52.128", "os_version": "10.15.7", "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.3.1 Safari/605.1.15", "color_depth": 24, "device_model": "Macintosh", "java_enabled": true, "screen_width": 1312, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 848, "accept_language": "en", "java_script_enabled": true }, "payment_channel": null, "payment_method_id": null, "network_transaction_id": null, "payment_method_status": null, "updated": "2025-09-11T17:15:17.517Z", "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 } ``` 4. Payments - Retrieve Request: ``` curl --location 'http://localhost:8080/payments/pay_2POhxvMBaEDy88vz9cwX?force_sync=true' \ --header 'Accept: application/json' \ --header 'api-key: dev_SFgSgDzIk5bWAMdai9p76lBeX4bvrRV15SEqDicJ7OhCG6KRzOTljGHUZxpKnZN6' ``` Response: ``` { "payment_id": "pay_2POhxvMBaEDy88vz9cwX", "merchant_id": "merchant_1757610148", "status": "succeeded", "amount": 35308, "net_amount": 35308, "shipping_cost": null, "amount_capturable": 0, "amount_received": 35308, "connector": "peachpayments", "client_secret": "pay_2POhxvMBaEDy88vz9cwX_secret_1BIiQY7RkIeBsyqU7YRF", "created": "2025-09-11T17:13:57.373Z", "currency": "USD", "customer_id": "StripeCustomer", "customer": { "id": "StripeCustomer", "name": "John Doe", "email": "guest@example.com", "phone": "999999999", "phone_country_code": "+1" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "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": "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, "origin_zip": null }, "phone": null, "email": null }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe", "origin_zip": null }, "phone": null, "email": null }, "order_details": null, "email": "guest@example.com", "name": "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": null, "manual_retry_allowed": null, "connector_transaction_id": "884be477-1865-4f40-b452-ae792e21a6d5", "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": "884be477-1865-4f40-b452-ae792e21a6d5", "payment_link": null, "profile_id": "pro_5BUfDMTQyz5EbHajw6SE", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_ef4ONOxde7RCQQfvhHJJ", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-11T17:28:57.373Z", "fingerprint": null, "browser_info": { "os_type": "macOS", "language": "en-US", "time_zone": -330, "ip_address": "65.1.52.128", "os_version": "10.15.7", "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.3.1 Safari/605.1.15", "color_depth": 24, "device_model": "Macintosh", "java_enabled": true, "screen_width": 1312, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 848, "accept_language": "en", "java_script_enabled": true }, "payment_channel": null, "payment_method_id": null, "network_transaction_id": null, "payment_method_status": null, "updated": "2025-09-11T17:15:35.325Z", "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 } ``` 5. Payments - Cancel (with different paymentID) Request: ``` curl --location 'http://localhost:8080/payments/pay_jflZ4TICqo9uLRFDrbtc/cancel' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_SFgSgDzIk5bWAMdai9p76lBeX4bvrRV15SEqDicJ7OhCG6KRzOTljGHUZxpKnZN6' \ --data '{ "cancellation_reason": "requested_by_customer" }' ``` Response: ``` { "payment_id": "pay_jflZ4TICqo9uLRFDrbtc", "merchant_id": "merchant_1757610148", "status": "cancelled", "amount": 35308, "net_amount": 35308, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": "peachpayments", "client_secret": "pay_jflZ4TICqo9uLRFDrbtc_secret_qDuIgBJH7F07APir1zg8", "created": "2025-09-11T17:04:35.524Z", "currency": "USD", "customer_id": "StripeCustomer", "customer": { "id": "StripeCustomer", "name": "John Doe", "email": "guest@example.com", "phone": "999999999", "phone_country_code": "+1" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "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": "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, "origin_zip": null }, "phone": null, "email": null }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe", "origin_zip": null }, "phone": null, "email": null }, "order_details": null, "email": "guest@example.com", "name": "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": "requested_by_customer", "error_code": null, "error_message": null, "unified_code": "UE_9000", "unified_message": "Something went wrong", "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": null, "manual_retry_allowed": null, "connector_transaction_id": "0ca6ad99-d749-4a9e-96df-95fa761681ad", "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": "0ca6ad99-d749-4a9e-96df-95fa761681ad", "payment_link": null, "profile_id": "pro_5BUfDMTQyz5EbHajw6SE", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_ef4ONOxde7RCQQfvhHJJ", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-11T17:19:35.524Z", "fingerprint": null, "browser_info": { "os_type": "macOS", "language": "en-US", "time_zone": -330, "ip_address": "65.1.52.128", "os_version": "10.15.7", "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.3.1 Safari/605.1.15", "color_depth": 24, "device_model": "Macintosh", "java_enabled": true, "screen_width": 1312, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 848, "accept_language": "en", "java_script_enabled": true }, "payment_channel": null, "payment_method_id": null, "network_transaction_id": null, "payment_method_status": null, "updated": "2025-09-11T17:05:06.519Z", "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": { "network_advice_code": null } } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Core Business Logic** - `crates/router/src/core/connector_validation.rs` **2. External Connector Integration** - `crates/common_enums/src/connector_enums.rs` - `crates/connector_configs/src/connector.rs` - `crates/connector_configs/toml/development.toml` - ... and 7 more files **3. Type Definitions** - `crates/router/src/types/api/feature_matrix.rs` **4. Other** - `api-reference/v1/openapi_spec_v1.json` - `api-reference/v2/openapi_spec_v2.json` **Code Patterns Applied:** - Define new data structures (14 changes) - Implement new functions (10 changes) - Extend existing types with new fields (208 changes) - Add conditional logic for feature flags or filtering (2 changes) **Detailed Identifier Changes:** Commit f3635a2e: 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/peachpayments.rs** Remove: - 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::handle_response - impl: impl ConnectorValidation for Peachpayments - impl: impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Peachpayments - impl: impl ConnectorIntegration<Execute, RefundsData, RefundsResponseData> for utils::convert_amount( self.amount_converter, req.request.minor_refund_amount, req.request.currency, ) Add: - function: private::build_request - impl: impl ConnectorValidation for Peachpayments - impl: impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Peachpayments - impl: impl ConnectorIntegration<Execute, RefundsData, RefundsResponseData> for Peachpayments - impl: impl ConnectorIntegration<RSync, RefundsData, RefundsResponseData> for Peachpayments **crates/hyperswitch_connectors/src/connectors/peachpayments/transformers.rs** Add: - function: private::try_from - function: private::try_from - function: private::from_str - function: private::try_from - function: private::from - function: pub::description - function: pub::as_text - struct: pub::EcommerceCardPaymentOnlyTransactionData - struct: pub::MerchantInformation - struct: pub::Routing - struct: pub::CardDetails - struct: pub::RefundCardDetails - struct: pub::ThreeDSData - struct: pub::PeachpaymentsConfirmRequest - struct: pub::EcommerceCardPaymentOnlyConfirmationData - struct: pub::PeachpaymentsVoidRequest - struct: pub::PeachPaymentsConnectorMetadataObject - struct: pub::EcommerceCardPaymentOnlyResponseData - struct: pub::CardResponseData - enum: pub::PaymentMethod - enum: pub::FailureReason - enum: pub::AuthenticationStatus - enum: pub::ResponseCodeValue - impl: impl TryFrom<&Option<pii::SecretSerdeValue>> for PeachPaymentsConnectorMetadataObject - impl: impl TryFrom<&PeachpaymentsRouterData<&PaymentsCaptureRouterData>> for PeachpaymentsConfirmRequest - impl: impl FromStr for FailureReason - impl: impl TryFrom<&PaymentsCancelRouterData> for PeachpaymentsVoidRequest - impl: impl From<&str> for AuthenticationStatus **crates/hyperswitch_connectors/src/default_implementations.rs** Modify existing code **crates/router/src/core/connector_validation.rs** Modify existing code **crates/router/src/types/api/connector_mapping.rs** Modify existing code **crates/router/src/types/api/feature_matrix.rs** Modify existing code **crates/router/src/types/connector_transformers.rs** Modify existing code
{"pr_number": 9030, "pr_title": "feat(connector): [PeachPayments] Add Cards Flow", "merged_at": "2025-09-12T07:36:01Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"core_business": ["crates/router/src/core/connector_validation.rs"], "connectors": ["crates/common_enums/src/connector_enums.rs", "crates/connector_configs/src/connector.rs", "crates/connector_configs/toml/development.toml", "crates/connector_configs/toml/production.toml", "crates/connector_configs/toml/sandbox.toml", "crates/hyperswitch_connectors/src/connectors/peachpayments.rs", "crates/hyperswitch_connectors/src/connectors/peachpayments/transformers.rs", "crates/hyperswitch_connectors/src/default_implementations.rs", "crates/router/src/types/api/connector_mapping.rs", "crates/router/src/types/connector_transformers.rs"], "types": ["crates/router/src/types/api/feature_matrix.rs"], "other": ["api-reference/v1/openapi_spec_v1.json", "api-reference/v2/openapi_spec_v2.json"]}, "change_types": {"structs_added": 14, "functions_added": 10, "enums_added": 5, "fields_added": 208, "imports_added": 9, "conditionals_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
chore: address Rust 1.82.0 clippy lints ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This PR addresses the clippy lints occurring due to new rust version 1.82.0. Majorly addresses below warning - ![image](https://github.com/user-attachments/assets/f3f154e7-4062-4b48-a71b-ea5a2ea61e94) ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> This PR addresses clippy lint due to new rust version. So basic sanity testing should suffice. ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/connector_onboarding.rs` - `crates/api_models/src/payouts.rs` - `crates/api_models/src/webhooks.rs` **2. Database Layer (Queries & Schema)** - `crates/diesel_models/src/kv.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/router_response_types.rs` **4. Core Business Logic** - `crates/router/src/core/admin.rs` - `crates/router/src/core/connector_onboarding.rs` - `crates/router/src/core/customers.rs` - ... and 14 more files **5. External Connector Integration** - `add_connector.md` - `connector-template/transformers.rs` - `crates/hyperswitch_connectors/src/connectors/bambora/transformers.rs` - ... and 71 more files **6. Utils** - `crates/router/src/utils.rs` **7. Other** - `crates/router/src/compatibility/stripe/webhooks.rs` - `crates/router/src/db/address.rs` - `crates/router/src/db/customers.rs` - ... and 11 more files **Code Patterns Applied:** - Extend existing types with new fields (494 changes) - Add conditional logic for feature flags or filtering (1 changes) **Detailed Identifier Changes:** Commit 8708a5cb: Files to modify: **connector-template/transformers.rs** Modify existing code **crates/api_models/src/connector_onboarding.rs** Modify existing code **crates/api_models/src/payouts.rs** Modify existing code **crates/api_models/src/webhooks.rs** Modify existing code **crates/diesel_models/src/kv.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/bambora/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/billwerk/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/bitpay/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/cashtocode/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/coinbase/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/cryptopay/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/deutschebank/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/digitalvirgo/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/dlocal/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/fiserv/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/fiservemea/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/fiuu/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/forte/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/globepay/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/helcim/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/mollie/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/nexinets/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/nexixpay/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/novalnet/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/payeezy/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/payu/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/powertranz/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/thunes/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/tsys/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/volt/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/worldline/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/zen/transformers.rs** Modify existing code **crates/hyperswitch_domain_models/src/customer.rs** Modify existing code **crates/hyperswitch_domain_models/src/merchant_connector_account.rs** Modify existing code **crates/hyperswitch_domain_models/src/router_response_types.rs** Modify existing code **crates/router/src/compatibility/stripe/webhooks.rs** Modify existing code **crates/router/src/connector/aci/transformers.rs** Modify existing code **crates/router/src/connector/adyen/transformers.rs** Modify existing code **crates/router/src/connector/airwallex/transformers.rs** Modify existing code **crates/router/src/connector/authorizedotnet/transformers.rs** Modify existing code **crates/router/src/connector/bamboraapac/transformers.rs** Modify existing code **crates/router/src/connector/bankofamerica/transformers.rs** Modify existing code **crates/router/src/connector/bluesnap.rs** Modify existing code **crates/router/src/connector/bluesnap/transformers.rs** Modify existing code **crates/router/src/connector/boku/transformers.rs** Modify existing code **crates/router/src/connector/braintree/transformers.rs** Modify existing code **crates/router/src/connector/checkout/transformers.rs** Modify existing code **crates/router/src/connector/cybersource/transformers.rs** Modify existing code **crates/router/src/connector/datatrans/transformers.rs** Modify existing code **crates/router/src/connector/dummyconnector/transformers.rs** Modify existing code **crates/router/src/connector/globalpay/transformers.rs** Modify existing code **crates/router/src/connector/gocardless/transformers.rs** Modify existing code **crates/router/src/connector/iatapay/transformers.rs** Modify existing code **crates/router/src/connector/itaubank/transformers.rs** Modify existing code **crates/router/src/connector/klarna/transformers.rs** Modify existing code **crates/router/src/connector/mifinity/transformers.rs** Modify existing code **crates/router/src/connector/multisafepay/transformers.rs** Modify existing code **crates/router/src/connector/nmi/transformers.rs** Modify existing code **crates/router/src/connector/noon/transformers.rs** Modify existing code **crates/router/src/connector/nuvei/transformers.rs** Modify existing code **crates/router/src/connector/opayo/transformers.rs** Modify existing code **crates/router/src/connector/opennode/transformers.rs** Modify existing code **crates/router/src/connector/paybox/transformers.rs** Modify existing code **crates/router/src/connector/payme/transformers.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/connector/placetopay/transformers.rs** Modify existing code **crates/router/src/connector/plaid/transformers.rs** Modify existing code **crates/router/src/connector/prophetpay/transformers.rs** Modify existing code **crates/router/src/connector/rapyd/transformers.rs** Modify existing code **crates/router/src/connector/razorpay/transformers.rs** Modify existing code **crates/router/src/connector/shift4/transformers.rs** Modify existing code **crates/router/src/connector/stripe/transformers.rs** Modify existing code **crates/router/src/connector/trustpay/transformers.rs** Modify existing code **crates/router/src/connector/wellsfargo/transformers.rs** Modify existing code **crates/router/src/connector/wellsfargopayout/transformers.rs** Modify existing code **crates/router/src/connector/worldpay.rs** Modify existing code **crates/router/src/connector/worldpay/transformers.rs** Modify existing code **crates/router/src/connector/zsl/transformers.rs** Modify existing code **crates/router/src/core/admin.rs** Modify existing code **crates/router/src/core/connector_onboarding.rs** Modify existing code **crates/router/src/core/customers.rs** Modify existing code **crates/router/src/core/mandate.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_response.rs** Modify existing code **crates/router/src/core/payments/retry.rs** Modify existing code **crates/router/src/core/payments/tokenization.rs** Modify existing code **crates/router/src/core/payments/transformers.rs** Modify existing code **crates/router/src/core/payouts.rs** Modify existing code **crates/router/src/core/verification/utils.rs** Modify existing code **crates/router/src/core/webhooks/incoming.rs** Modify existing code **crates/router/src/core/webhooks/outgoing.rs** Modify existing code **crates/router/src/core/webhooks/utils.rs** Modify existing code **crates/router/src/core/webhooks/webhook_events.rs** Modify existing code **crates/router/src/db/address.rs** Modify existing code **crates/router/src/db/customers.rs** Modify existing code **crates/router/src/db/mandate.rs** Modify existing code **crates/router/src/db/payment_method.rs** Modify existing code **crates/router/src/db/refund.rs** Modify existing code **crates/router/src/db/reverse_lookup.rs** Modify existing code **crates/router/src/events/audit_events.rs** Modify existing code **crates/router/src/utils.rs** Modify existing code **crates/router/src/workflows/outgoing_webhook_retry.rs** Modify existing code **crates/storage_impl/src/lookup.rs** Modify existing code **crates/storage_impl/src/payments/payment_attempt.rs** Modify existing code **crates/storage_impl/src/payments/payment_intent.rs** Modify existing code **crates/storage_impl/src/payouts/payout_attempt.rs** Modify existing code **crates/storage_impl/src/payouts/payouts.rs** Modify existing code
{"pr_number": 6401, "pr_title": "chore: address Rust 1.82.0 clippy lints", "merged_at": "2024-10-24T16:04:52Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user"]}, "hierarchy": {"api_models": ["crates/api_models/src/connector_onboarding.rs", "crates/api_models/src/payouts.rs", "crates/api_models/src/webhooks.rs"], "database": ["crates/diesel_models/src/kv.rs"], "domain": ["crates/hyperswitch_domain_models/src/customer.rs", "crates/hyperswitch_domain_models/src/merchant_connector_account.rs", "crates/hyperswitch_domain_models/src/router_response_types.rs"], "core_business": ["crates/router/src/core/admin.rs", "crates/router/src/core/connector_onboarding.rs", "crates/router/src/core/customers.rs", "crates/router/src/core/mandate.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_response.rs", "crates/router/src/core/payments/retry.rs", "crates/router/src/core/payments/tokenization.rs", "crates/router/src/core/payments/transformers.rs", "crates/router/src/core/payouts.rs", "crates/router/src/core/verification/utils.rs", "crates/router/src/core/webhooks/incoming.rs", "crates/router/src/core/webhooks/outgoing.rs", "crates/router/src/core/webhooks/utils.rs", "crates/router/src/core/webhooks/webhook_events.rs"], "connectors": ["add_connector.md", "connector-template/transformers.rs", "crates/hyperswitch_connectors/src/connectors/bambora/transformers.rs", "crates/hyperswitch_connectors/src/connectors/billwerk/transformers.rs", "crates/hyperswitch_connectors/src/connectors/bitpay/transformers.rs", "crates/hyperswitch_connectors/src/connectors/cashtocode/transformers.rs", "crates/hyperswitch_connectors/src/connectors/coinbase/transformers.rs", "crates/hyperswitch_connectors/src/connectors/cryptopay/transformers.rs", "crates/hyperswitch_connectors/src/connectors/deutschebank/transformers.rs", "crates/hyperswitch_connectors/src/connectors/digitalvirgo/transformers.rs", "crates/hyperswitch_connectors/src/connectors/dlocal/transformers.rs", "crates/hyperswitch_connectors/src/connectors/fiserv/transformers.rs", "crates/hyperswitch_connectors/src/connectors/fiservemea/transformers.rs", "crates/hyperswitch_connectors/src/connectors/fiuu/transformers.rs", "crates/hyperswitch_connectors/src/connectors/forte/transformers.rs", "crates/hyperswitch_connectors/src/connectors/globepay/transformers.rs", "crates/hyperswitch_connectors/src/connectors/helcim/transformers.rs", "crates/hyperswitch_connectors/src/connectors/mollie/transformers.rs", "crates/hyperswitch_connectors/src/connectors/nexinets/transformers.rs", "crates/hyperswitch_connectors/src/connectors/nexixpay/transformers.rs", "crates/hyperswitch_connectors/src/connectors/novalnet/transformers.rs", "crates/hyperswitch_connectors/src/connectors/payeezy/transformers.rs", "crates/hyperswitch_connectors/src/connectors/payu/transformers.rs", "crates/hyperswitch_connectors/src/connectors/powertranz/transformers.rs", "crates/hyperswitch_connectors/src/connectors/square/transformers.rs", "crates/hyperswitch_connectors/src/connectors/stax/transformers.rs", "crates/hyperswitch_connectors/src/connectors/thunes/transformers.rs", "crates/hyperswitch_connectors/src/connectors/tsys/transformers.rs", "crates/hyperswitch_connectors/src/connectors/volt/transformers.rs", "crates/hyperswitch_connectors/src/connectors/worldline/transformers.rs", "crates/hyperswitch_connectors/src/connectors/zen/transformers.rs", "crates/router/src/connector/aci/transformers.rs", "crates/router/src/connector/adyen/transformers.rs", "crates/router/src/connector/airwallex/transformers.rs", "crates/router/src/connector/authorizedotnet/transformers.rs", "crates/router/src/connector/bamboraapac/transformers.rs", "crates/router/src/connector/bankofamerica/transformers.rs", "crates/router/src/connector/bluesnap.rs", "crates/router/src/connector/bluesnap/transformers.rs", "crates/router/src/connector/boku/transformers.rs", "crates/router/src/connector/braintree/transformers.rs", "crates/router/src/connector/checkout/transformers.rs", "crates/router/src/connector/cybersource/transformers.rs", "crates/router/src/connector/datatrans/transformers.rs", "crates/router/src/connector/dummyconnector/transformers.rs", "crates/router/src/connector/globalpay/transformers.rs", "crates/router/src/connector/gocardless/transformers.rs", "crates/router/src/connector/iatapay/transformers.rs", "crates/router/src/connector/itaubank/transformers.rs", "crates/router/src/connector/klarna/transformers.rs", "crates/router/src/connector/mifinity/transformers.rs", "crates/router/src/connector/multisafepay/transformers.rs", "crates/router/src/connector/nmi/transformers.rs", "crates/router/src/connector/noon/transformers.rs", "crates/router/src/connector/nuvei/transformers.rs", "crates/router/src/connector/opayo/transformers.rs", "crates/router/src/connector/opennode/transformers.rs", "crates/router/src/connector/paybox/transformers.rs", "crates/router/src/connector/payme/transformers.rs", "crates/router/src/connector/paypal.rs", "crates/router/src/connector/paypal/transformers.rs", "crates/router/src/connector/placetopay/transformers.rs", "crates/router/src/connector/plaid/transformers.rs", "crates/router/src/connector/prophetpay/transformers.rs", "crates/router/src/connector/rapyd/transformers.rs", "crates/router/src/connector/razorpay/transformers.rs", "crates/router/src/connector/shift4/transformers.rs", "crates/router/src/connector/stripe/transformers.rs", "crates/router/src/connector/trustpay/transformers.rs", "crates/router/src/connector/wellsfargo/transformers.rs", "crates/router/src/connector/wellsfargopayout/transformers.rs", "crates/router/src/connector/worldpay.rs", "crates/router/src/connector/worldpay/transformers.rs", "crates/router/src/connector/zsl/transformers.rs"], "utils": ["crates/router/src/utils.rs"], "other": ["crates/router/src/compatibility/stripe/webhooks.rs", "crates/router/src/db/address.rs", "crates/router/src/db/customers.rs", "crates/router/src/db/mandate.rs", "crates/router/src/db/payment_method.rs", "crates/router/src/db/refund.rs", "crates/router/src/db/reverse_lookup.rs", "crates/router/src/events/audit_events.rs", "crates/router/src/workflows/outgoing_webhook_retry.rs", "crates/storage_impl/src/lookup.rs", "crates/storage_impl/src/payments/payment_attempt.rs", "crates/storage_impl/src/payments/payment_intent.rs", "crates/storage_impl/src/payouts/payout_attempt.rs", "crates/storage_impl/src/payouts/payouts.rs"]}, "change_types": {"fields_added": 494, "conditionals_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(core): Address Deserialization issue ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> The #[serde(deny_unknown_fields)] lines are now commented out to handle backward incompatibility ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with 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 Call (CIT ) ``` { "amount": 1000, "currency": "USD", "amount_to_capture": 1000, "customer_id":"131123", "confirm": true, "capture_method": "automatic", "setup_future_usage": "off_session", "authentication_type": "no_three_ds", "payment_method": "card", "payment_method_type": "credit", "customer_acceptance": { "acceptance_type": "offline", "accepted_at": "1963-05-03T04:07:52.723Z", "online": { "ip_address": "in sit", "user_agent": "amet irure esse" } }, "email": "guest@example.com", "payment_method_data": { "card": { "card_number": "5404000000000001", "card_exp_month": "09", "card_exp_year": "25", "card_holder_name": "joseph Doe", "card_cvc": "123" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "Zurich", "state": "asd", "zip": "8008", "country": "CH", "first_name": "joseph", "last_name": "Doe", "origin_zip":"43234" } } } ``` Listing down the Customer Payment Methods API ( 5XX ) ``` curl --location 'http://localhost:8080/customers/131123/payment_methods' \ --header 'Accept: application/json' \ --header 'api-key: dev_vEJmbVDXEZU9TTIAo1txUgatXBnqknKOSzfJjvO8JZIj5Ex393ME6FCXXDvqpuz6' ``` <img width="887" height="492" alt="Screenshot 2025-08-18 at 5 41 56 PM" src="https://github.com/user-attachments/assets/eaf64e1c-e30a-4cc3-8696-e578c87a76c4" /> After we removed the `#[serde(deny_unknown_fields)]` ``` curl --location 'http://localhost:8080/customers/131123/payment_methods' \ --header 'Accept: application/json' \ --header 'api-key: dev_vEJmbVDXEZU9TTIAo1txUgatXBnqknKOSzfJjvO8JZIj5Ex393ME6FCXXDvqpuz6' ``` Response ``` { "customer_payment_methods": [ { "payment_token": "", "payment_method_id": "", "customer_id": "131123", "payment_method": "card", "payment_method_type": "credit", "payment_method_issuer": null, "payment_method_issuer_code": null, "recurring_enabled": false, "installment_payment_enabled": false, "payment_experience": [ "redirect_to_url" ], "card": { "scheme": null, "issuer_country": null, "last4_digits": "0001", "expiry_month": "09", "expiry_year": "25", "card_token": null, "card_holder_name": "joseph Doe", "card_fingerprint": null, "nick_name": null, "card_network": null, "card_isin": "540400", "card_issuer": null, "card_type": null, "saved_to_locker": true }, "metadata": null, "created": "2025-08-18T11:45:29.029Z", "bank": null, "surcharge_details": null, "requires_cvv": true, "last_used_at": "2025-08-18T11:45:29.029Z", "default_payment_method_set": false, "billing": { "address": { "city": "Zurich", "country": "CH", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "8008", "state": "asd", "first_name": "joseph", "last_name": "Doe", "origin_zip": null }, "phone": null, "email": null } }, { "payment_token": "", "payment_method_id": "", "customer_id": "131123", "payment_method": "card", "payment_method_type": "credit", "payment_method_issuer": null, "payment_method_issuer_code": null, "recurring_enabled": false, "installment_payment_enabled": false, "payment_experience": [ "redirect_to_url" ], "card": { "scheme": null, "issuer_country": null, "last4_digits": "0001", "expiry_month": "09", "expiry_year": "25", "card_token": null, "card_holder_name": "joseph Doe", "card_fingerprint": null, "nick_name": null, "card_network": null, "card_isin": "540400", "card_issuer": null, "card_type": null, "saved_to_locker": true }, "metadata": null, "created": "2025-08-18T11:18:20.670Z", "bank": null, "surcharge_details": null, "requires_cvv": true, "last_used_at": "2025-08-18T11:18:20.670Z", "default_payment_method_set": false, "billing": { "address": { "city": "Zurich", "country": "CH", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "8008", "state": "asd", "first_name": "joseph", "last_name": "Doe", "origin_zip": "43234" }, "phone": null, "email": null } }, { "payment_token": "", "payment_method_id": "", "customer_id": "131123", "payment_method": "card", "payment_method_type": "credit", "payment_method_issuer": null, "payment_method_issuer_code": null, "recurring_enabled": false, "installment_payment_enabled": false, "payment_experience": [ "redirect_to_url" ], "card": { "scheme": null, "issuer_country": null, "last4_digits": "0001", "expiry_month": "09", "expiry_year": "25", "card_token": null, "card_holder_name": "joseph Doe", "card_fingerprint": null, "nick_name": null, "card_network": null, "card_isin": "540400", "card_issuer": null, "card_type": null, "saved_to_locker": true }, "metadata": null, "created": "2025-08-18T11:18:09.508Z", "bank": null, "surcharge_details": null, "requires_cvv": true, "last_used_at": "2025-08-18T11:18:09.508Z", "default_payment_method_set": false, "billing": { "address": { "city": "Zurich", "country": "CH", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "8008", "state": "asd", "first_name": "joseph", "last_name": "Doe", "origin_zip": "43234" }, "phone": null, "email": null } }, { "payment_token": "", "payment_method_id": "", "customer_id": "131123", "payment_method": "card", "payment_method_type": "credit", "payment_method_issuer": null, "payment_method_issuer_code": null, "recurring_enabled": false, "installment_payment_enabled": false, "payment_experience": [ "redirect_to_url" ], "card": { "scheme": null, "issuer_country": null, "last4_digits": "0001", "expiry_month": "09", "expiry_year": "25", "card_token": null, "card_holder_name": "joseph Doe", "card_fingerprint": null, "nick_name": null, "card_network": null, "card_isin": "540400", "card_issuer": null, "card_type": null, "saved_to_locker": true }, "metadata": null, "created": "2025-08-18T11:16:46.866Z", "bank": null, "surcharge_details": null, "requires_cvv": true, "last_used_at": "2025-08-18T11:16:46.866Z", "default_payment_method_set": false, "billing": { "address": { "city": "Zurich", "country": "CH", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "8008", "state": "asd", "first_name": "joseph", "last_name": "Doe", "origin_zip": null }, "phone": null, "email": null } }, { "payment_token": "", "payment_method_id": "", "customer_id": "131123", "payment_method": "card", "payment_method_type": "credit", "payment_method_issuer": null, "payment_method_issuer_code": null, "recurring_enabled": false, "installment_payment_enabled": false, "payment_experience": [ "redirect_to_url" ], "card": { "scheme": null, "issuer_country": null, "last4_digits": "0001", "expiry_month": "09", "expiry_year": "25", "card_token": null, "card_holder_name": "joseph Doe", "card_fingerprint": null, "nick_name": null, "card_network": null, "card_isin": "540400", "card_issuer": null, "card_type": null, "saved_to_locker": true }, "metadata": null, "created": "2025-08-18T11:15:29.669Z", "bank": null, "surcharge_details": null, "requires_cvv": true, "last_used_at": "2025-08-18T11:15:29.669Z", "default_payment_method_set": true, "billing": { "address": { "city": "Zurich", "country": "CH", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "8008", "state": "asd", "first_name": "joseph", "last_name": "Doe", "origin_zip": null }, "phone": null, "email": null } } ], "is_guest_customer": null } ``` CIT without removing the Serde check: Request ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_vEJmbVDXEZU9TTIAo1txUgatXBnqknKOSzfJjvO8JZIj5Ex393ME6FCXXDvqpuz6' \ --data-raw '{ "amount": 1000, "currency": "USD", "amount_to_capture": 1000, "customer_id":"131123", "confirm": true, "capture_method": "automatic", "setup_future_usage": "off_session", "authentication_type": "no_three_ds", "payment_method": "card", "payment_method_type": "credit", "customer_acceptance": { "acceptance_type": "offline", "accepted_at": "1963-05-03T04:07:52.723Z", "online": { "ip_address": "in sit", "user_agent": "amet irure esse" } }, "email": "guest@example.com", "payment_method_data": { "card": { "card_number": "5404000000000001", "card_exp_month": "09", "card_exp_year": "25", "card_holder_name": "joseph Doe", "card_cvc": "123" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "Zurich", "state": "asd", "zip": "8008", "country": "CH", "first_name": "joseph", "last_name": "Doe", "origin_zip":"43234" } } }' ``` Response ``` { "payment_id": "pay_Xk1ZbXuwr84hM040dSxu", "merchant_id": "merchant_1755515675", "status": "processing", "amount": 1000, "net_amount": 1000, "shipping_cost": null, "amount_capturable": 1000, "amount_received": null, "connector": "worldpayvantiv", "client_secret": "pay_Xk1ZbXuwr84hM040dSxu_secret_iHXw3t1295XvpKutbP0b", "created": "2025-08-19T07:25:00.923Z", "currency": "USD", "customer_id": "131123", "customer": { "id": "131123", "name": null, "email": "guest@example.com", "phone": null, "phone_country_code": null }, "description": null, "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "off_session", "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "0001", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "540400", "card_extended_bin": null, "card_exp_month": "09", "card_exp_year": "25", "card_holder_name": "joseph Doe", "payment_checks": { "avs_result": "00", "advanced_a_v_s_result": null, "authentication_result": null, "card_validation_result": "M" }, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": { "city": "Zurich", "country": "CH", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "8008", "state": "asd", "first_name": "joseph", "last_name": "Doe", "origin_zip": "43234" }, "phone": null, "email": null }, "order_details": null, "email": "guest@example.com", "name": null, "phone": null, "return_url": null, "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "131123", "created_at": 1755588300, "expires": 1755591900, "secret": "epk_fee0ffb42f1b4ff88f365c6308a0f886" }, "manual_retry_allowed": false, "connector_transaction_id": "84085406412379142", "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_Xk1ZbXuwr84hM040dSxu_1", "payment_link": null, "profile_id": "pro_6JndjequmBt0SRQZr6sQ", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_8cauu9F7cHzgOlCmLZYq", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-08-19T07:40:00.923Z", "fingerprint": null, "browser_info": null, "payment_channel": null, "payment_method_id": "pm_xfpcVHdoLNMQLchsUkRD", "network_transaction_id": "7277286190819", "payment_method_status": "inactive", "updated": "2025-08-19T07:25:04.277Z", "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": "2592937072890001", "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 } ``` MIT after removing the serde check Request ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_vEJmbVDXEZU9TTIAo1txUgatXBnqknKOSzfJjvO8JZIj5Ex393ME6FCXXDvqpuz6' \ --data-raw '{"amount": 7100, "currency": "USD", "confirm": true, "customer_id": "131123", "capture_method":"automatic", "return_url": "https://google.com", "recurring_details": { "type": "payment_method_id", "data": "pm_xfpcVHdoLNMQLchsUkRD" }, "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", "origin_zip":"123" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email":"xyz@gmail.com" } }' ``` Response ``` { "payment_id": "pay_iL5W78vHVaGJhEVaXZ2M", "merchant_id": "merchant_1755515675", "status": "processing", "amount": 7100, "net_amount": 7100, "shipping_cost": null, "amount_capturable": 7100, "amount_received": null, "connector": "worldpayvantiv", "client_secret": "pay_iL5W78vHVaGJhEVaXZ2M_secret_rOXwk1RUKGMInjLm8UA9", "created": "2025-08-19T07:50:04.201Z", "currency": "USD", "customer_id": "131123", "customer": { "id": "131123", "name": null, "email": "guest@example.com", "phone": null, "phone_country_code": null }, "description": null, "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": true, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "0001", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "540400", "card_extended_bin": null, "card_exp_month": "09", "card_exp_year": "25", "card_holder_name": "joseph Doe", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "John", "last_name": "Doe", "origin_zip": "123" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "xyz@gmail.com" }, "order_details": null, "email": "guest@example.com", "name": null, "phone": null, "return_url": "https://google.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "131123", "created_at": 1755589804, "expires": 1755593404, "secret": "epk_4b74a97bc7d446db93bd1fda3ff5b017" }, "manual_retry_allowed": false, "connector_transaction_id": "83997449168141786", "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_iL5W78vHVaGJhEVaXZ2M_1", "payment_link": null, "profile_id": "pro_6JndjequmBt0SRQZr6sQ", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_8cauu9F7cHzgOlCmLZYq", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-08-19T08:05:04.201Z", "fingerprint": null, "browser_info": null, "payment_channel": null, "payment_method_id": "pm_xfpcVHdoLNMQLchsUkRD", "network_transaction_id": "7277286190819", "payment_method_status": "active", "updated": "2025-08-19T07:50:06.564Z", "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": "2592937072890001", "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null, "enable_partial_authorization": null } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/payments.rs` **2. Other** - `api-reference/v1/openapi_spec_v1.json` - `api-reference/v2/openapi_spec_v2.json` **Detailed Identifier Changes:** Commit f76c6a78: Files to modify: **crates/api_models/src/payments.rs** Modify existing code
{"pr_number": 8980, "pr_title": "fix(core): Address Deserialization issue ", "merged_at": "2025-08-19T10:38:56Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/payments.rs"], "other": ["api-reference/v1/openapi_spec_v1.json", "api-reference/v2/openapi_spec_v2.json"]}, "change_types": {}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat: Added grpc based health 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 --> Implemented gRPC based health check ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [x] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Tested locally ``` curl --location --request GET 'http://localhost:8080/health/ready' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_Li5BLbzNIHjf2t0J6kYgS7sQurtmLubs1sGAxTE6MVo59aMBEMDSK6Qt8me7kJZQ' ``` Response ``` { "database": true, "redis": true, "analytics": true, "opensearch": true, "outgoing_request": true, "grpc_health_check": { "dynamic_routing_service": true } } ``` <img width="1345" alt="image" src="https://github.com/user-attachments/assets/aaae7e48-63b4-4dfc-b9c0-832dfe569469"> Response when runtime config is disabled ``` { "database": true, "redis": true, "analytics": true, "opensearch": true, "outgoing_request": true, "grpc_health_check": {} } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] 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/health_check.rs` **2. Core Business Logic** - `crates/router/src/core/health_check.rs` **3. Configuration Files** - `config/config.example.toml` - `config/deployments/env_specific.toml` - `crates/router/Cargo.toml` **4. Other** - `crates/external_services/build.rs` - `crates/external_services/src/grpc_client.rs` - `crates/external_services/src/grpc_client/dynamic_routing.rs` - ... and 4 more files **Code Patterns Applied:** - Define new data structures (1 changes) - Implement new functions (5 changes) - Extend existing types with new fields (12 changes) - Add conditional logic for feature flags or filtering (1 changes) **Detailed Identifier Changes:** Commit e922f96c: Files to modify: **crates/api_models/src/health_check.rs** Add: - enum: pub::HealthCheckServices **crates/external_services/build.rs** Modify existing code **crates/external_services/src/grpc_client.rs** Add: - mod: pub::health_check_client **crates/external_services/src/grpc_client/dynamic_routing.rs** Modify existing code **crates/external_services/src/grpc_client/health_check_client.rs** Add: - function: pub::build_connections - function: pub::perform_health_check - function: private::get_response_from_grpc_service - struct: pub::HealthCheckClient - enum: pub::HealthCheckError - impl: impl HealthCheckClient - mod: pub::health_check **crates/router/src/core/health_check.rs** Add: - function: private::health_check_grpc **crates/router/src/routes/health.rs** Modify existing code **crates/storage_impl/src/errors.rs** Add: - enum: pub::HealthCheckGRPCServiceError
{"pr_number": 6441, "pr_title": "feat: Added grpc based health check", "merged_at": "2024-11-26T13:58:33Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user"]}, "hierarchy": {"api_models": ["crates/api_models/Cargo.toml", "crates/api_models/src/health_check.rs"], "core_business": ["crates/router/src/core/health_check.rs"], "config": ["config/config.example.toml", "config/deployments/env_specific.toml", "crates/router/Cargo.toml"], "other": ["crates/external_services/build.rs", "crates/external_services/src/grpc_client.rs", "crates/external_services/src/grpc_client/dynamic_routing.rs", "crates/external_services/src/grpc_client/health_check_client.rs", "crates/router/src/routes/health.rs", "crates/storage_impl/src/errors.rs", "proto/health_check.proto"]}, "change_types": {"structs_added": 1, "functions_added": 5, "enums_added": 4, "fields_added": 12, "imports_added": 14, "conditionals_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" :"example@gmail.com", "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` **3. Other** - `Cargo.lock` **Code Patterns Applied:** - Define new data structures (1 changes) - Implement new functions (2 changes) - Extend existing types with new fields (6 changes) - Add conditional logic for feature flags or filtering (1 changes) **Detailed Identifier Changes:** Commit ab543208: 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": 6823, "pr_title": "fix(webhooks): mask custom outgoing webhook headers in profile response", "merged_at": "2024-12-12T08:42:26Z", "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"], "other": ["Cargo.lock"]}, "change_types": {"structs_added": 1, "functions_added": 2, "fields_added": 6, "imports_added": 1, "conditionals_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(analytics): remove first_attempt group by in Payment Intent old metrics ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> `first_attempt` as a group by is getting added internally in the queries as it is required by the new PaymentIntent based metrics for Analytics V2 Dashboard. The logic was added for the existing older metrics as well for PaymentIntents on the older dashboard, and is failing when using sqlx as the Pool. Need to remove the logic for adding `first_attempt` as a group_by in the older metrics, and also tweak the manner in which this is getting added as a group_by in the new metrics. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> Fix the error when using older metrics on the old dashboard (PaymentIntent based metrics) ## How did you test 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 curls to test the various metrics. Sessionized_metrics should be tested only on clickhouse. Older metricss can be tested on both sqlx and clickhouse. ```bash curl --location 'http://localhost:8080/analytics/v2/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 'QueryType: SingleStatTimeseries' \ --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: dev_LZcIA7XeMpnK5satp4CDvjcnHCaeKTBcosyuBBJaknZu1odhFo96cwS0nSdfzuJF' \ --header 'authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTQ5ZTNkMmItMTY5Yi00NzUzLWJmNTQtZDcxMTM2YjRiN2JkIiwibWVyY2hhbnRfaWQiOiJtZXJjaGFudF8xNzI2MDQ2MzI4Iiwicm9sZV9pZCI6Im9yZ19hZG1pbiIsImV4cCI6MTczMjI3OTExOSwib3JnX2lkIjoib3JnX1ZwU0hPanNZZkR2YWJWWUpnQ0FKIiwicHJvZmlsZV9pZCI6InByb192NXNGb0hlODBPZWlVbElvbm9jTSIsInRlbmFudF9pZCI6InB1YmxpYyJ9.c3u-icFmoDrNwBzR5Av3IiK-tNktGLZarVxSqg3-LgY' \ --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-14T18:30:00Z", "endTime": "2024-11-22T15:24:00Z" }, "mode": "ORDER", "source": "BATCH", "metrics": [ "smart_retried_amount", "payments_success_rate", "payment_processed_amount", "sessionized_smart_retried_amount", "sessionized_payments_success_rate", "sessionized_payment_processed_amount", "sessionized_payments_distribution" ] } ]' ``` API should not fail, and should give out response as expected. ```json { "queryData": [ { "successful_smart_retries": null, "total_smart_retries": null, "smart_retried_amount": 0, "smart_retried_amount_in_usd": null, "smart_retried_amount_without_smart_retries": 0, "smart_retried_amount_without_smart_retries_in_usd": null, "payment_intent_count": null, "successful_payments": 15, "successful_payments_without_smart_retries": 7, "total_payments": 15, "payments_success_rate": 100.0, "payments_success_rate_without_smart_retries": 46.666666666666664, "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_in_usd": null, "payment_processed_count_without_smart_retries": null, "payments_success_rate_distribution_without_smart_retries": 87.5, "payments_failure_rate_distribution_without_smart_retries": 0.0, "status": null, "currency": null, "profile_id": null, "connector": null, "auth_type": null, "payment_method": null, "payment_method_type": null, "card_network": null, "merchant_id": null, "card_last_4": null, "card_issuer": null, "error_reason": null, "time_range": { "start_time": "2024-11-14T18:30:00.000Z", "end_time": "2024-11-22T15:24:00.000Z" }, "time_bucket": "2024-11-14 18:30:00" }, { "successful_smart_retries": null, "total_smart_retries": null, "smart_retried_amount": 0, "smart_retried_amount_in_usd": 0, "smart_retried_amount_without_smart_retries": 0, "smart_retried_amount_without_smart_retries_in_usd": 0, "payment_intent_count": null, "successful_payments": null, "successful_payments_without_smart_retries": null, "total_payments": null, "payments_success_rate": null, "payments_success_rate_without_smart_retries": null, "payment_processed_amount": 40000, "payment_processed_amount_in_usd": 40000, "payment_processed_count": 4, "payment_processed_amount_without_smart_retries": 20000, "payment_processed_amount_without_smart_retries_in_usd": 20000, "payment_processed_count_without_smart_retries": 2, "payments_success_rate_distribution_without_smart_retries": null, "payments_failure_rate_distribution_without_smart_retries": null, "status": null, "currency": "USD", "profile_id": null, "connector": null, "auth_type": null, "payment_method": null, "payment_method_type": null, "card_network": null, "merchant_id": null, "card_last_4": null, "card_issuer": null, "error_reason": null, "time_range": { "start_time": "2024-11-14T18:30:00.000Z", "end_time": "2024-11-22T15:24:00.000Z" }, "time_bucket": "2024-11-14 18:30:00" }, { "successful_smart_retries": null, "total_smart_retries": null, "smart_retried_amount": 0, "smart_retried_amount_in_usd": 0, "smart_retried_amount_without_smart_retries": 0, "smart_retried_amount_without_smart_retries_in_usd": 0, "payment_intent_count": null, "successful_payments": null, "successful_payments_without_smart_retries": null, "total_payments": null, "payments_success_rate": null, "payments_success_rate_without_smart_retries": null, "payment_processed_amount": 110000, "payment_processed_amount_in_usd": 1302, "payment_processed_count": 11, "payment_processed_amount_without_smart_retries": 50000, "payment_processed_amount_without_smart_retries_in_usd": 591, "payment_processed_count_without_smart_retries": 5, "payments_success_rate_distribution_without_smart_retries": null, "payments_failure_rate_distribution_without_smart_retries": null, "status": null, "currency": "INR", "profile_id": null, "connector": null, "auth_type": null, "payment_method": null, "payment_method_type": null, "card_network": null, "merchant_id": null, "card_last_4": null, "card_issuer": null, "error_reason": null, "time_range": { "start_time": "2024-11-14T18:30:00.000Z", "end_time": "2024-11-22T15:24:00.000Z" }, "time_bucket": "2024-11-14 18:30:00" } ], "metaData": [ { "total_success_rate": 100.0, "total_success_rate_without_smart_retries": 46.666666666666664, "total_smart_retried_amount": 0, "total_smart_retried_amount_without_smart_retries": 0, "total_payment_processed_amount": 150000, "total_payment_processed_amount_without_smart_retries": 70000, "total_smart_retried_amount_in_usd": 0, "total_smart_retried_amount_without_smart_retries_in_usd": 0, "total_payment_processed_amount_in_usd": 41302, "total_payment_processed_amount_without_smart_retries_in_usd": 20591, "total_payment_processed_count": 15, "total_payment_processed_count_without_smart_retries": 7 } ] } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Other** - `crates/analytics/src/payment_intents/metrics/payment_processed_amount.rs` - `crates/analytics/src/payment_intents/metrics/payments_success_rate.rs` - `crates/analytics/src/payment_intents/metrics/sessionized_metrics/payment_processed_amount.rs` - ... and 4 more files **Detailed Identifier Changes:** Commit 54e393bf: Files to modify: **crates/analytics/src/payment_intents/metrics/payment_processed_amount.rs** Modify existing code **crates/analytics/src/payment_intents/metrics/payments_success_rate.rs** Modify existing code **crates/analytics/src/payment_intents/metrics/sessionized_metrics/payment_processed_amount.rs** Modify existing code **crates/analytics/src/payment_intents/metrics/sessionized_metrics/payments_distribution.rs** Modify existing code **crates/analytics/src/payment_intents/metrics/sessionized_metrics/payments_success_rate.rs** Modify existing code **crates/analytics/src/payment_intents/metrics/sessionized_metrics/smart_retried_amount.rs** Modify existing code **crates/analytics/src/payment_intents/metrics/smart_retried_amount.rs** Modify existing code
{"pr_number": 6627, "pr_title": "fix(analytics): remove first_attempt group by in Payment Intent old metrics", "merged_at": "2024-11-22T08:52:30Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "merchant", "user"]}, "hierarchy": {"other": ["crates/analytics/src/payment_intents/metrics/payment_processed_amount.rs", "crates/analytics/src/payment_intents/metrics/payments_success_rate.rs", "crates/analytics/src/payment_intents/metrics/sessionized_metrics/payment_processed_amount.rs", "crates/analytics/src/payment_intents/metrics/sessionized_metrics/payments_distribution.rs", "crates/analytics/src/payment_intents/metrics/sessionized_metrics/payments_success_rate.rs", "crates/analytics/src/payment_intents/metrics/sessionized_metrics/smart_retried_amount.rs", "crates/analytics/src/payment_intents/metrics/smart_retried_amount.rs"]}, "change_types": {}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
chore(deps): update scylla driver ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Dependency updates ## Description <!-- Describe your changes in detail --> Update scylla driver on masking crate ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with 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 scylla driver on masking 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)? --> Compiler guided. Testing not needed in environments ## Checklist <!-- Put 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 **connector_integration** feature, you'll need to modify these architectural layers: **1. Configuration Files** - `crates/masking/Cargo.toml` **2. Other** - `Cargo.lock` - `crates/masking/src/cassandra.rs` **Code Patterns Applied:** - Implement new functions (1 changes) - Extend existing types with new fields (3 changes) **Detailed Identifier Changes:** Commit 71574a85: Files to modify: **crates/masking/src/cassandra.rs** Remove: - function: private::from_cql - impl: impl DeserializeValue<'frame> for impl<T> FromCqlVal<CqlValue> for StrongSecret<T>
{"pr_number": 6799, "pr_title": "chore(deps): update scylla driver", "merged_at": "2024-12-16T09:20:21Z", "intent": {"feature_type": "connector_integration", "action": "add_feature", "entities": []}, "hierarchy": {"config": ["crates/masking/Cargo.toml"], "other": ["Cargo.lock", "crates/masking/src/cassandra.rs"]}, "change_types": {"functions_added": 1, "fields_added": 3}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(kafka): add correct topic name for connector-logs for docker config and local development ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> The ClickHouse queue table for connector events was configured to consume from the wrong Kafka topic in the local and Docker config files. Current (incorrect) topic in config: `hyperswitch-connector-api-events` Expected (correct) topic: `hyperswitch-outgoing-connector-events` Updated the Kafka topic name in the relevant config files (local and Docker) to use the correct topic name. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with 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 ensures the ClickHouse queue table correctly ingests connector events as expected. ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Make a payment, and see the audit trail on dashboard. Clickhouse connector_events table should be populated with data now. <img width="1721" alt="image" src="https://github.com/user-attachments/assets/75b0a86e-ab6f-4f18-840e-8960cf1f4f04" /> <img width="1713" alt="image" src="https://github.com/user-attachments/assets/2ebc5749-a834-47b7-931d-cab43c7c4aea" /> ## Checklist <!-- Put 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/development.toml` - `config/docker_compose.toml` **2. Other** - `crates/analytics/docs/clickhouse/scripts/authentications.sql` **Code Patterns Applied:** - Modify database queries (1 changes)
{"pr_number": 8169, "pr_title": "fix(kafka): add correct topic name for connector-logs for docker config and local development", "merged_at": "2025-05-30T08:02:47Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "user", "connector"]}, "hierarchy": {"config": ["config/development.toml", "config/docker_compose.toml"], "other": ["crates/analytics/docs/clickhouse/scripts/authentications.sql"]}, "change_types": {"database_queries": 1}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
feat(crypto): add RSA-SHA-256 signature verification ## 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 RSA-SHA-256 signature verification in crypto module. - rsa crate is used for cryptography implementation ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with 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)? --> Unit test added <img width="813" height="282" alt="image" src="https://github.com/user-attachments/assets/d8551d85-8e78-4522-8b82-b6db70023981" /> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [x] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/wise.rs` **2. Utils** - `crates/common_utils/Cargo.toml` - `crates/common_utils/src/crypto.rs` **3. Other** - `Cargo.lock` **Code Patterns Applied:** - Define new data structures (1 changes) - Implement new functions (6 changes) - Extend existing types with new fields (7 changes) **Detailed Identifier Changes:** Commit 3fcbe40e: Files to modify: **crates/common_utils/src/crypto.rs** Add: - function: private::verify_signature - function: private::test_rsasha256_verify_signature - struct: pub::RsaSha256 - impl: impl VerifySignature for RsaSha256 **crates/hyperswitch_connectors/src/connectors/wise.rs** Add: - function: private::get_webhook_source_verification_algorithm - function: private::get_webhook_source_verification_signature - function: private::get_webhook_source_verification_message
{"pr_number": 9080, "pr_title": "feat(crypto): add RSA-SHA-256 signature verification", "merged_at": "2025-09-03T14:33:36Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/wise.rs"], "utils": ["crates/common_utils/Cargo.toml", "crates/common_utils/src/crypto.rs"], "other": ["Cargo.lock"]}, "change_types": {"structs_added": 1, "functions_added": 6, "fields_added": 7, "imports_added": 6}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(users): Send welcome to community email in magic link signup ## 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 --> Magic link will send one more email along with magic link email if user is signing up. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with 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 #6638. ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Local SES ![image](https://github.com/user-attachments/assets/f4e15419-31c7-452e-ba77-4a8815944ca0) ``` curl --location 'http://localhost:8080/user/connect_account' \ --header 'Content-Type: application/json' \ --data-raw '{ "email": "new user email" }' ``` The above email should be sent. ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Core Business Logic** - `crates/router/src/core/user.rs` **2. Type Definitions** - `crates/router/src/services/email/types.rs` **3. Other** - `crates/router/src/consts/user.rs` - `crates/router/src/services/email/assets/welcome_to_community.html` **Code Patterns Applied:** - Define new data structures (1 changes) - Implement new functions (1 changes) - Extend existing types with new fields (34 changes) **Detailed Identifier Changes:** Commit 03423a1f: Files to modify: **crates/router/src/consts/user.rs** Modify existing code **crates/router/src/core/user.rs** Modify existing code **crates/router/src/services/email/types.rs** Add: - function: private::get_email_data - struct: private::WelcomeToCommunity - impl: impl EmailData for WelcomeToCommunity
{"pr_number": 6639, "pr_title": "feat(users): Send welcome to community email in magic link signup", "merged_at": "2024-11-26T09:10:41Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user"]}, "hierarchy": {"core_business": ["crates/router/src/core/user.rs"], "types": ["crates/router/src/services/email/types.rs"], "other": ["crates/router/src/consts/user.rs", "crates/router/src/services/email/assets/welcome_to_community.html"]}, "change_types": {"structs_added": 1, "functions_added": 1, "fields_added": 34}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix: fixes the docker setup to clean up the scarf data ## Type of Change <!-- Put an `x` in the boxes that apply --> - [X] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> The hyperswitch server would run even without the completion of migration runner polluting the data in the scarf dashboard. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> helps close #7945 #7963 raised to main for similar changes ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Configuration Files** - `docker-compose.yml` **2. Other** - `scripts/poststart_hook.sh` **Code Patterns Applied:** - Extend existing types with new fields (3 changes)
{"pr_number": 7999, "pr_title": "fix: fixes the docker setup to clean up the scarf data", "merged_at": "2025-05-12T08:26:50Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"config": ["docker-compose.yml"], "other": ["scripts/poststart_hook.sh"]}, "change_types": {"fields_added": 3}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
refactor(connector): implement amount converter framework for authorizedotnet, bankofamerica ## 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 --> the existing amount conversion framework for certain connector is outdated. we need to migrate those connector to using the latest and greatest amount converter framework. base - float/string major unit minor - minor unit / string minor unit ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with 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_currency_unit is outdated. use `convert_amount` instead. closes https://github.com/juspay/hyperswitch/issues/8877 ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Make a payment through the below given connectors: <details> <summary>AuthorizeDotNet</summary> ```curl curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_GPAm65scUWcFztLSboWLXKFGeTVEHb3gnvFU5hBUCDITplwIhCvZTIJtoEJXHm4f' \ --data-raw '{ "amount": 91571, "currency": "USD", "confirm": true, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 91571, "customer_id": "abcd", "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment request", "authentication_type": "no_three_ds", "return_url": "https://duck.com", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "370000000000002", "card_exp_month": "10", "card_exp_year": "25", "card_holder_name": "joseph Doe", "card_cvc": "900" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "IN", "first_name": "PiX" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "IN", "first_name": "PiX" } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } }' ``` ```json { "payment_id": "pay_6X2FhljlpXZElDX4S6w4", "merchant_id": "postman_merchant_GHAction_1754653643", "status": "succeeded", "amount": 91571, "net_amount": 91571, "shipping_cost": null, "amount_capturable": 0, "amount_received": 91571, "connector": "authorizedotnet", "client_secret": "pay_6X2FhljlpXZElDX4S6w4_secret_wzBJ9hkLmMcvSi0TeOEO", "created": "2025-08-08T11:47:35.240Z", "currency": "USD", "customer_id": "abcd", "customer": { "id": "abcd", "name": "John Doe", "email": "guest@example.com", "phone": "999999999", "phone_country_code": "+65" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "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": { "description": "The street address and postal code matched.", "avs_result_code": "Y" }, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": "IN", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "PiX", "last_name": null, "origin_zip": null }, "phone": null, "email": null }, "billing": { "address": { "city": "San Fransico", "country": "IN", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "PiX", "last_name": null, "origin_zip": null }, "phone": null, "email": null }, "order_details": null, "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "return_url": "https://duck.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "abcd", "created_at": 1754653655, "expires": 1754657255, "secret": "epk_ea6ff7c1100c41d1bba3b9da469d973c" }, "manual_retry_allowed": false, "connector_transaction_id": "120068658794", "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2019-09-10T10:11:12Z", "new_customer": "true" }, "connector_metadata": null, "feature_metadata": null, "reference_id": "120068658794", "payment_link": null, "profile_id": "pro_NKH5miAdwTzhqZnuLPi0", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_bPe6GSr5FuXF6Rt5G61B", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-08-08T12:02:35.240Z", "fingerprint": null, "browser_info": null, "payment_channel": null, "payment_method_id": null, "network_transaction_id": null, "payment_method_status": null, "updated": "2025-08-08T11:47:36.237Z", "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 } ``` <img width="1852" height="196" alt="image" src="https://github.com/user-attachments/assets/b4cbc146-b88e-4b9f-8b2c-ad99501b2589" /> </details> <details> <summary>BankOfAmerica</summary> ```curl curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_HVl6AlLdFHw0br1H7IymoIgOV4rO4SMCHUl1ZUKtXO3qQy3s1wlEEA5IVRUqPTxn' \ --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", "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+1", "description": "Its my first payment request", "authentication_type": "no_three_ds", "return_url": "https://duck.com", "payment_method": "card", "setup_future_usage": "on_session", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4111111111111111", "card_exp_month": "12", "card_exp_year": "30", "card_holder_name": "joseph Doe", "card_cvc": "123" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } }' ``` ```json { "payment_id": "pay_25C27lo5euAv5R8VDQQg", "merchant_id": "postman_merchant_GHAction_9700a943-a6a8-4bed-b484-3e2f24f5344a", "status": "succeeded", "amount": 6540, "net_amount": 6540, "shipping_cost": null, "amount_capturable": 0, "amount_received": 6540, "connector": "bankofamerica", "client_secret": "pay_25C27lo5euAv5R8VDQQg_secret_OEIaAxPmEZgTswpAE59V", "created": "2025-08-08T12:24:05.622Z", "currency": "USD", "customer_id": "StripeCustomer", "customer": { "id": "StripeCustomer", "name": "John Doe", "email": "guest@example.com", "phone": "999999999", "phone_country_code": "+1" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "on_session", "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "1111", "card_type": "CREDIT", "card_network": "Visa", "card_issuer": "JP Morgan", "card_issuing_country": "INDIA", "card_isin": "411111", "card_extended_bin": null, "card_exp_month": "12", "card_exp_year": "30", "card_holder_name": "joseph Doe", "payment_checks": { "eci": null, "cavv": null, "eci_raw": null, "avs_response": { "code": "Y", "codeRaw": "Y" }, "approval_code": "831000", "card_verification": null, "consumer_authentication_response": null }, "authentication_data": { "acs_transaction_id": null, "system_trace_audit_number": null, "retrieval_reference_number": null } }, "billing": null }, "payment_token": "token_KTsWPzXqxSUFnBg64dG9", "shipping": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "order_details": null, "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "return_url": "https://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": 1754655845, "expires": 1754659445, "secret": "epk_dbaa2f9dc5ca4740a7ee13edb03af456" }, "manual_retry_allowed": false, "connector_transaction_id": "7546558471516585304807", "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_25C27lo5euAv5R8VDQQg_1", "payment_link": null, "profile_id": "pro_7ehsLWIksrpK2lU2ZorM", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_QXI5zECI8F4KGJwceq1a", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-08-08T12:39:05.622Z", "fingerprint": null, "browser_info": null, "payment_channel": null, "payment_method_id": null, "network_transaction_id": null, "payment_method_status": null, "updated": "2025-08-08T12:24:07.638Z", "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 } ``` <img width="1852" height="174" alt="image" src="https://github.com/user-attachments/assets/cb60d35d-c7f6-4518-aabc-2a836e38c860" /> </details> <details> <summary>Refunds should work too</summary> ```curl curl --location 'http://localhost:8080/refunds' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_ecAzD6wCRTJ9vle4P8dSItXfE8hyWMx5ZInf03wYUoDE9YuOnbOU4ppvw24R12HP' \ --data '{ "payment_id": "pay_fFRCa0avK5F1mMiNIRDo", "amount": 600, "reason": "Customer returned product", "refund_type": "instant", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } }' ``` ```json { "refund_id": "ref_yiG83sVnRamfqs9wZui4", "payment_id": "pay_fFRCa0avK5F1mMiNIRDo", "amount": 600, "currency": "USD", "status": "pending", "reason": "Customer returned product", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" }, "error_message": null, "error_code": null, "unified_code": null, "unified_message": null, "created_at": "2025-08-08T12:39:37.424Z", "updated_at": "2025-08-08T12:39:39.187Z", "connector": "barclaycard", "profile_id": "pro_zdyJ6MbtU1anAIfbiSim", "merchant_connector_id": "mca_P2TahMotR8ucEv5vaKDr", "split_refunds": null, "issuer_error_code": null, "issuer_error_message": null } ``` <img width="1857" height="61" alt="image" src="https://github.com/user-attachments/assets/df2907dd-7c18-47fa-af6d-b3652411cc19" /> </details> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `just clippy && just clippy_v2` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/authorizedotnet.rs` - `crates/hyperswitch_connectors/src/connectors/authorizedotnet/transformers.rs` - `crates/hyperswitch_connectors/src/connectors/bankofamerica.rs` - ... and 4 more files **2. Type Definitions** - `crates/router/src/types/api/feature_matrix.rs` **Code Patterns Applied:** - Define new data structures (2 changes) - Implement new functions (4 changes) - Extend existing types with new fields (14 changes) **Detailed Identifier Changes:** Commit 30925ca5: Files to modify: **crates/hyperswitch_connectors/src/connectors/authorizedotnet.rs** Remove: - struct: pub::Authorizedotnet Add: - function: pub::new - struct: pub::Authorizedotnet - impl: impl Authorizedotnet **crates/hyperswitch_connectors/src/connectors/authorizedotnet/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/bankofamerica.rs** Remove: - struct: pub::Bankofamerica Add: - function: pub::new - struct: pub::Bankofamerica - impl: impl Bankofamerica **crates/hyperswitch_connectors/src/connectors/bankofamerica/transformers.rs** Modify existing code **crates/router/src/types/api/connector_mapping.rs** Modify existing code **crates/router/src/types/api/feature_matrix.rs** Modify existing code **crates/router/tests/connectors/authorizedotnet.rs** Modify existing code **crates/router/tests/connectors/bankofamerica.rs** Modify existing code
{"pr_number": 8878, "pr_title": "refactor(connector): implement amount converter framework for authorizedotnet, bankofamerica", "merged_at": "2025-08-26T07:22:25Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/authorizedotnet.rs", "crates/hyperswitch_connectors/src/connectors/authorizedotnet/transformers.rs", "crates/hyperswitch_connectors/src/connectors/bankofamerica.rs", "crates/hyperswitch_connectors/src/connectors/bankofamerica/transformers.rs", "crates/router/src/types/api/connector_mapping.rs", "crates/router/tests/connectors/authorizedotnet.rs", "crates/router/tests/connectors/bankofamerica.rs"], "types": ["crates/router/src/types/api/feature_matrix.rs"]}, "change_types": {"structs_added": 2, "functions_added": 4, "fields_added": 14, "imports_added": 3}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
ci(cypress): address lints and refactor redirection handler ## 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 --> ci checks are failing on every pr because of failed lint check. this pr aims to address that. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ci checks failing on every pr. closes https://github.com/juspay/hyperswitch/issues/7436 ## How did you test 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. adyen: <img width="721" alt="image" src="https://github.com/user-attachments/assets/b379bfc1-a765-456f-bf11-25020db2793f" /> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `npm run format` - [x] I addressed lints thrown by `npm run lint` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Tests** - `cypress-tests/cypress/support/redirectionHandler.js` **Code Patterns Applied:** - Extend existing types with new fields (2 changes) - Add conditional logic for feature flags or filtering (2 changes)
{"pr_number": 7437, "pr_title": "ci(cypress): address lints and refactor redirection handler", "merged_at": "2025-03-07T11:57:27Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user"]}, "hierarchy": {"tests": ["cypress-tests/cypress/support/redirectionHandler.js"]}, "change_types": {"fields_added": 2, "conditionals_added": 2}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
feat(core): Add product authentication ids in business profile ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] New feature ## Description <!-- Describe your changes in detail --> Add product authentication id's column in business profile ### Additional Changes - [x] This PR modifies the API contract - [x] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **authentication** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/admin.rs` **2. Database Layer (Queries & Schema)** - `crates/diesel_models/src/business_profile.rs` - `crates/diesel_models/src/schema.rs` - `crates/diesel_models/src/schema_v2.rs` **3. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/business_profile.rs` **4. Core Business Logic** - `crates/router/src/core/admin.rs` **5. Type Definitions** - `crates/router/src/types/api/admin.rs` **6. Other** - `api-reference-v2/openapi_spec.json` - `api-reference/openapi_spec.json` - `migrations/2024-12-11-092649_add-authentication-product-ids-in-business-profile/down.sql` - ... and 1 more files **Code Patterns Applied:** - Extend existing types with new fields (42 changes) **Detailed Identifier Changes:** Commit 1564ad72: Files to modify: **crates/api_models/src/admin.rs** Modify existing code **crates/diesel_models/src/business_profile.rs** Modify existing code **crates/diesel_models/src/schema.rs** Modify existing code **crates/diesel_models/src/schema_v2.rs** Modify existing code **crates/hyperswitch_domain_models/src/business_profile.rs** Modify existing code **crates/router/src/core/admin.rs** Modify existing code **crates/router/src/types/api/admin.rs** Modify existing code
{"pr_number": 6811, "pr_title": "feat(core): Add product authentication ids in business profile", "merged_at": "2024-12-12T15:01:35Z", "intent": {"feature_type": "authentication", "action": "add_feature", "entities": []}, "hierarchy": {"api_models": ["crates/api_models/src/admin.rs"], "database": ["crates/diesel_models/src/business_profile.rs", "crates/diesel_models/src/schema.rs", "crates/diesel_models/src/schema_v2.rs"], "domain": ["crates/hyperswitch_domain_models/src/business_profile.rs"], "core_business": ["crates/router/src/core/admin.rs"], "types": ["crates/router/src/types/api/admin.rs"], "other": ["api-reference-v2/openapi_spec.json", "api-reference/openapi_spec.json", "migrations/2024-12-11-092649_add-authentication-product-ids-in-business-profile/down.sql", "migrations/2024-12-11-092649_add-authentication-product-ids-in-business-profile/up.sql"]}, "change_types": {"fields_added": 42}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): [facilitapay] fix refunds, add webhook and void support ## 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 --> This Facilitapay PR introudces 2 new features and a bug fix which is described below: - Add support for webhooks - Source verification supported - Payments - Refunds (It is only supported for pix payment when a third party makes a transaction instead of the actual user). The payload for both payments and refunds is exactly the same with 0 difference. It is kind of use less to have webhook for support for Refunds - Add support for voiding payments - At Facilita, `refund` means voiding a payment - This is a `GET` call with no request body - Fix a bug in Refunds (It was not testable until now) - At Facilita, `refund_received_transaction` means refunding a payment - This is a `GET` call with no request body - Does not support partial refunds ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with 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/8777 ## How did you test 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>Partial refunds</summary> ```sh curl --location 'http://localhost:8080/refunds' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_FwRHVH9xL5cvYOsONW8YzIphnGhIibnEy9tCWuNCpDLwSnzR4Ilogl6sia26pcND' \ --data '{ "payment_id": "pay_le5uOFoizxZPXFHPQuK1", "amount": 1000, "reason": "Customer returned product", "refund_type": "instant", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } }' ``` ```json { "error": { "type": "invalid_request", "message": "Payment method type not supported", "code": "IR_19", "reason": "Partial refund not supported by Facilitapay is not supported by Facilitapay" } } ``` </details> <details> <summary>Refunds</summary> ```sh curl --location 'http://localhost:8080/refunds' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_FwRHVH9xL5cvYOsONW8YzIphnGhIibnEy9tCWuNCpDLwSnzR4Ilogl6sia26pcND' \ --data '{ "payment_id": "pay_le5uOFoizxZPXFHPQuK1", "amount": 10400, "reason": "Customer returned product", "refund_type": "instant", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } }' ``` ```json { "refund_id": "ref_bEMav88LA7llD0KS6Twk", "payment_id": "pay_le5uOFoizxZPXFHPQuK1", "amount": 10400, "currency": "BRL", "status": "succeeded", "reason": "Customer returned product", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" }, "error_message": null, "error_code": null, "unified_code": null, "unified_message": null, "created_at": "2025-07-28T18:43:11.748Z", "updated_at": "2025-07-28T18:43:12.819Z", "connector": "facilitapay", "profile_id": "pro_ODZKRkH2uJIfAPClUy8B", "merchant_connector_id": "mca_A4Kpc6NUvBsN8RGvvJsm", "split_refunds": null, "issuer_error_code": null, "issuer_error_message": null } ``` will introduce cypress in a separate pr </details> <details> <summary>Void</summary> ```sh curl --location 'https://pix-mbp.orthrus-monster.ts.net/payments/pay_XIq2h8snAnSp425StpHM/cancel' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_FwRHVH9xL5cvYOsONW8YzIphnGhIibnEy9tCWuNCpDLwSnzR4Ilogl6sia26pcND' \ --data '{"cancellation_reason":"requested_by_customer"}' ``` ```json { "payment_id": "pay_XIq2h8snAnSp425StpHM", "merchant_id": "postman_merchant_GHAction_1753728068", "status": "cancelled", "amount": 10400, "net_amount": 10400, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": null, "client_secret": "pay_XIq2h8snAnSp425StpHM_secret_Za7LqUCCvag8LBMCyYBp", "created": "2025-07-28T18:44:39.081Z", "currency": "BRL", "customer_id": null, "customer": { "id": null, "name": null, "email": "guesjhvghht@example.com", "phone": "999999999", "phone_country_code": "+1" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": null, "payment_method_data": null, "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": "BR", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "PiX", "last_name": null }, "phone": null, "email": null }, "billing": { "address": { "city": "San Fransico", "country": "BR", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "PiX", "last_name": "THE" }, "phone": null, "email": null }, "order_details": null, "email": null, "name": null, "phone": null, "return_url": "https://duck.com/", "authentication_type": "three_ds", "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "next_action": null, "cancellation_reason": "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": 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_ODZKRkH2uJIfAPClUy8B", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": null, "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-07-28T18:59:39.081Z", "fingerprint": null, "browser_info": { "language": "en-GB", "time_zone": -330, "ip_address": "208.127.127.193", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0", "color_depth": 24, "java_enabled": true, "screen_width": 1280, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 720, "java_script_enabled": true }, "payment_method_id": null, "payment_method_status": null, "updated": "2025-07-28T18:44:43.912Z", "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>Webhook Setup</summary> ```sh curl --location 'https://sandbox-api.facilitapay.com/api/v1/enable_webhooks' \ --header 'Authorization: Bearer <jwt_token>' \ --header 'Content-Type: application/json' \ --data '{ "url": "https://baseUrl/webhooks/:merchant_id/facilitapay" }' ``` ```json { "data": { "secret": "1111" } } ``` </details> <details> <summary>Payment Webhook</summary> Source verification: <img width="930" height="192" alt="image" src="https://github.com/user-attachments/assets/cfcb1f63-4102-4b84-95d7-c16522725e67" /> Incoming Webhook Logs: <img width="1682" height="607" alt="image" src="https://github.com/user-attachments/assets/1411a32c-195a-4e4c-b0ba-2fc062087d43" /> Outgoing Webhook: <img width="1435" height="558" alt="image" src="https://github.com/user-attachments/assets/b98c4292-1855-4315-8962-62b7bfb4ba85" /> </details> <details> <summary>Refund Webhook</summary> The `payment_refunded` webhook is only sent for a very specific use case - when a pix payment is automatically refunded because it was paid from a third-party account. for regular api-initiated refunds, facilitapay sends the same identified and wire_created webhooks as for payments, making it impossible to distinguish between payment and refund webhooks. </details> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `just clippy && just clippy_v2` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/connector_configs/toml/development.toml` - `crates/connector_configs/toml/production.toml` - `crates/connector_configs/toml/sandbox.toml` - ... and 4 more files **Code Patterns Applied:** - Define new data structures (5 changes) - Implement new functions (9 changes) - Extend existing types with new fields (95 changes) - Add conditional logic for feature flags or filtering (1 changes) **Detailed Identifier Changes:** Commit c38ce386: Files to modify: **crates/hyperswitch_connectors/src/connectors/facilitapay.rs** Remove: - impl: impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Facilitapay Add: - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_headers - function: private::get_content_type - function: private::verify_webhook_source **crates/hyperswitch_connectors/src/connectors/facilitapay/requests.rs** Remove: - struct: pub::FacilitapayRefundRequest **crates/hyperswitch_connectors/src/connectors/facilitapay/responses.rs** Remove: - struct: pub::RefundData Add: - struct: pub::VoidBankTransaction - struct: pub::VoidData - struct: pub::FacilitapayVoidResponse - struct: pub::FacilitapayWebhookNotification - struct: pub::FacilitapayWebhookBody - enum: pub::FacilitapayWebhookEventType - enum: pub::FacilitapayWebhookErrorCode - enum: pub::FacilitapayWebhookData **crates/hyperswitch_connectors/src/connectors/facilitapay/transformers.rs** Remove: - function: private::try_from - impl: impl TryFrom<&FacilitapayRouterData<&types::RefundsRouterData<F>>> for FacilitapayRefundRequest Add: - function: private::try_from - impl: impl TryFrom< ResponseRouterData<Void, FacilitapayVoidResponse, PaymentsCancelData, PaymentsResponseData>, > for RouterData<Void, PaymentsCancelData, PaymentsResponseData>
{"pr_number": 8778, "pr_title": "feat(connector): [facilitapay] fix refunds, add webhook and void support", "merged_at": "2025-07-31T07:07:17Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/connector_configs/toml/development.toml", "crates/connector_configs/toml/production.toml", "crates/connector_configs/toml/sandbox.toml", "crates/hyperswitch_connectors/src/connectors/facilitapay.rs", "crates/hyperswitch_connectors/src/connectors/facilitapay/requests.rs", "crates/hyperswitch_connectors/src/connectors/facilitapay/responses.rs", "crates/hyperswitch_connectors/src/connectors/facilitapay/transformers.rs"]}, "change_types": {"structs_added": 5, "functions_added": 9, "enums_added": 3, "fields_added": 95, "imports_added": 2, "conditionals_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(openapi): correct schema references and semantics for v1 openApi spec ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Fixed Open API Spec until Payment methods - tag Changes done in this PR 1. SDK generation from Open API failed due to having a unit variant in an untagged enum. In this PR, we have refactored the `NoSessionResponse` variant to use Custom `NullObject` with serialize_none() 2. In the doc - remove request body from `/payment_link/{payment_link_id}` get call and add `client_secret` as an optional query param. In accordance with the code. 3. In the doc - replace invalid params with valid params for `/account/payment_methods` 4. In the doc - replace invalid params with valid params for `/customers/{customer_id}/payment_methods` 5. In the doc - replace invalid params with valid params for `/customers/payment_methods` 6. In the doc - add `jwt_key` to security scehem 7. In the doc - correct the url syntax of `/account/{account_id}/business_profile/{profile_id}/dynamic_routing/contracts/toggle` endpoint 8. In the doc - fix example of "Merchant Account - KV Status" 9. In the doc - fix merchant account path `/account/{account_id}/connectors` 10. In the doc - fix all merchant connector endpoint path. Replace `accounts/` with `account` 11. In the doc - change the HTTP method of `/customers/{customer_id}/mandates` to `GET` 12. In the doc - add offset and limit for `/customers/list` > Note: Payment link endpoints are not added to the Openapi spec ## How did you test 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.Initiate a payment with truspay with confirm false ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_nbKzEwDan8WKjKsjDuCexEjTqWm7udZh5EoE0GTvnzDTBeEtwGSglz8aNFVLmDod' \ --data-raw '{ "return_url": "https://example.com", "confirm": false, "customer_acceptance": null, "description": "Test Payment", "email": "hyperswitch_sdk_demo_id@gmail.com", "browser_info": { "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "language": "en-US", "color_depth": 32, "screen_height": 1117, "screen_width": 1728, "time_zone": -330, "java_enabled": true, "java_script_enabled": true, "ip_address": "127.0.0.1" }, "amount": 5000, "currency": "USD" }' ``` Response ``` {"payment_id":"pay_6DfpEoQFBIIfWUfp93Y6","merchant_id":"postman_merchant_GHAction_0ff7d76e-ddc4-48fd-b678-9216d96591ab","status":"requires_payment_method","amount":5000,"net_amount":5000,"shipping_cost":null,"amount_capturable":0,"amount_received":null,"connector":null,"client_secret":"pay_6DfpEoQFBIIfWUfp93Y6_secret_Q0ayl2368c9dn6WEcTMA","created":"2025-05-23T15:02:34.158Z","currency":"USD","customer_id":null,"customer":{"id":null,"name":null,"email":"hyperswitch_sdk_demo_id@gmail.com","phone":null,"phone_country_code":null},"description":"Test Payment","refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":null,"off_session":null,"capture_on":null,"capture_method":null,"payment_method":null,"payment_method_data":null,"payment_token":null,"shipping":null,"billing":null,"order_details":null,"email":null,"name":null,"phone":null,"return_url":"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":null,"manual_retry_allowed":null,"connector_transaction_id":null,"frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":null,"payment_link":null,"profile_id":"pro_CcwJ1BMBv33IsKYTsWEh","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-23T15:17:34.158Z","fingerprint":null,"browser_info":{"language":"en-US","time_zone":-330,"ip_address":"127.0.0.1","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36","color_depth":32,"java_enabled":true,"screen_width":1728,"accept_header":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8","screen_height":1117,"java_script_enabled":true},"payment_method_id":null,"payment_method_status":null,"updated":"2025-05-23T15:02:34.202Z","split_payments":null,"frm_metadata":null,"extended_authorization_applied":null,"capture_before":null,"merchant_order_reference_id":null,"order_tax_amount":null,"connector_mandate_id":null,"card_discovery":null,"force_3ds_challenge":false,"force_3ds_challenge_trigger":false,"issuer_error_code":null,"issuer_error_message":null,"is_iframe_redirection_enabled":null,"whole_connector_response":null} ``` 2. Do a session call ``` curl --location 'http://localhost:8080/payments/session_tokens' \ --header 'Content-Type: application/json' \ --header 'api-key: pk_dev_0d3aa63ce9424a30998e0022739542cf' \ --data '{"payment_id":"pay_mPOZW9xuADD3lEM649O8","wallets":["apple_pay"],"client_secret":"pay_mPOZW9xuADD3lEM649O8_secret_1Y8UXoaiF6wXTJtaMP3T"}' ``` Response ``` {"payment_id":"pay_mPOZW9xuADD3lEM649O8","client_secret":"pay_mPOZW9xuADD3lEM649O8_secret_1Y8UXoaiF6wXTJtaMP3T","session_token":[{"wallet_name":"apple_pay","session_token_data":null,"payment_request_data":null,"connector":"trustpay","delayed_session_token":true,"sdk_next_action":{"next_action":"confirm"},"connector_reference_id":null,"connector_sdk_public_key":null,"connector_merchant_id":null}]} ``` 3. JWT token auth <img width="1271" alt="Screenshot 2025-05-27 at 4 40 25 PM" src="https://github.com/user-attachments/assets/10385ae0-c3e5-43e2-adee-edd6aee664d7" /> Replace invalid params with valid params for `/account/payment_methods` ``` curl --location --globoff 'http://localhost:8080/account/payment_methods?client_secret=pay_n4ZLSFnSUMI0EjEBzAu9_secret_m20UEEPlEuFlX7uwULSh&accepted_countries[]=US%2CCA&accepted_currencies[]=USD%2CEUR&card_networks[]=visa' \ --header 'Accept: application/json' \ --header 'api-key: pk_dev_fb0464e529ab4518ad8a8e45f6765d2f' ``` Response ``` {"redirect_url":"https://duck.com/success","currency":"EUR","payment_methods":[{"payment_method":"pay_later","payment_method_types":[{"payment_method_type":"klarna","payment_experience":[{"payment_experience_type":"invoke_sdk_client","eligible_connectors":["redsys"]},{"payment_experience_type":"redirect_to_url","eligible_connectors":["redsys"]}],"card_networks":null,"bank_names":null,"bank_debits":null,"bank_transfers":null,"required_fields":null,"surcharge_details":null,"pm_auth_connector":null}]},{"payment_method":"wallet","payment_method_types":[{"payment_method_type":"apple_pay","payment_experience":[{"payment_experience_type":"invoke_sdk_client","eligible_connectors":["redsys"]}],"card_networks":null,"bank_names":null,"bank_debits":null,"bank_transfers":null,"required_fields":null,"surcharge_details":null,"pm_auth_connector":null},{"payment_method_type":"google_pay","payment_experience":[{"payment_experience_type":"invoke_sdk_client","eligible_connectors":["redsys"]}],"card_networks":null,"bank_names":null,"bank_debits":null,"bank_transfers":null,"required_fields":null,"surcharge_details":null,"pm_auth_connector":null}]},{"payment_method":"bank_redirect","payment_method_types":[{"payment_method_type":"eps","payment_experience":null,"card_networks":null,"bank_names":[],"bank_debits":null,"bank_transfers":null,"required_fields":null,"surcharge_details":null,"pm_auth_connector":null},{"payment_method_type":"giropay","payment_experience":null,"card_networks":null,"bank_names":[{"bank_name":[],"eligible_connectors":["redsys"]}],"bank_debits":null,"bank_transfers":null,"required_fields":null,"surcharge_details":null,"pm_auth_connector":null},{"payment_method_type":"bancontact_card","payment_experience":null,"card_networks":null,"bank_names":[],"bank_debits":null,"bank_transfers":null,"required_fields":null,"surcharge_details":null,"pm_auth_connector":null},{"payment_method_type":"sofort","payment_experience":null,"card_networks":null,"bank_names":[{"bank_name":[],"eligible_connectors":["redsys"]}],"bank_debits":null,"bank_transfers":null,"required_fields":null,"surcharge_details":null,"pm_auth_connector":null},{"payment_method_type":"ideal","payment_experience":null,"card_networks":null,"bank_names":[],"bank_debits":null,"bank_transfers":null,"required_fields":null,"surcharge_details":null,"pm_auth_connector":null},{"payment_method_type":"przelewy24","payment_experience":null,"card_networks":null,"bank_names":[],"bank_debits":null,"bank_transfers":null,"required_fields":null,"surcharge_details":null,"pm_auth_connector":null}]},{"payment_method":"bank_debit","payment_method_types":[{"payment_method_type":"becs","payment_experience":null,"card_networks":null,"bank_names":null,"bank_debits":{"eligible_connectors":["redsys"]},"bank_transfers":null,"required_fields":null,"surcharge_details":null,"pm_auth_connector":null},{"payment_method_type":"ach","payment_experience":null,"card_networks":null,"bank_names":null,"bank_debits":{"eligible_connectors":["redsys"]},"bank_transfers":null,"required_fields":null,"surcharge_details":null,"pm_auth_connector":null},{"payment_method_type":"sepa","payment_experience":null,"card_networks":null,"bank_names":null,"bank_debits":{"eligible_connectors":["redsys"]},"bank_transfers":null,"required_fields":null,"surcharge_details":null,"pm_auth_connector":null},{"payment_method_type":"bacs","payment_experience":null,"card_networks":null,"bank_names":null,"bank_debits":{"eligible_connectors":["redsys"]},"bank_transfers":null,"required_fields":null,"surcharge_details":null,"pm_auth_connector":null}]},{"payment_method":"bank_transfer","payment_method_types":[{"payment_method_type":"sepa","payment_experience":null,"card_networks":null,"bank_names":null,"bank_debits":null,"bank_transfers":{"eligible_connectors":["redsys"]},"required_fields":null,"surcharge_details":null,"pm_auth_connector":null},{"payment_method_type":"ach","payment_experience":null,"card_networks":null,"bank_names":null,"bank_debits":null,"bank_transfers":{"eligible_connectors":["redsys"]},"required_fields":null,"surcharge_details":null,"pm_auth_connector":null},{"payment_method_type":"bacs","payment_experience":null,"card_networks":null,"bank_names":null,"bank_debits":null,"bank_transfers":{"eligible_connectors":["redsys"]},"required_fields":null,"surcharge_details":null,"pm_auth_connector":null}]}],"mandate_payment":null,"merchant_name":"NewAge Retailer","show_surcharge_breakup_screen":false,"payment_type":"normal","request_external_three_ds_authentication":false,"collect_shipping_details_from_wallets":false,"collect_billing_details_from_wallets":false,"is_tax_calculation_enabled":false} ``` 4. Replace invalid params with valid params for `/customers/{customer_id}/payment_methods` ``` curl --location --globoff 'http://localhost:8080/customers/test_customer/payment_methods?accepted_countries[]=US%2CCA&accepted_currencies[]=USD%2CEUR&card_networks[]=visa' \ --header 'Accept: application/json' \ --header 'api-key: dev_4TatGqeyGyVJErk5UVWVGwRg9fb9EjqUY6r2hvhFp9MdKLAPsa8HvSGRrxJgxG7d' ``` Response ``` {"customer_payment_methods":[{"payment_token":"token_CPB8PcPU3iOW4LT6Nrw3","payment_method_id":"pm_3rCYnAk93SM6bu7K2TsG","customer_id":"test_customer","payment_method":"card","payment_method_type":null,"payment_method_issuer":null,"payment_method_issuer_code":null,"recurring_enabled":false,"installment_payment_enabled":false,"payment_experience":["redirect_to_url"],"card":{"scheme":null,"issuer_country":null,"last4_digits":"7229","expiry_month":"01","expiry_year":"27","card_token":null,"card_holder_name":null,"card_fingerprint":null,"nick_name":null,"card_network":null,"card_isin":"454881","card_issuer":null,"card_type":null,"saved_to_locker":true},"metadata":null,"created":"2025-06-17T08:54:13.036Z","bank":null,"surcharge_details":null,"requires_cvv":true,"last_used_at":"2025-06-17T08:54:13.036Z","default_payment_method_set":true,"billing":null}],"is_guest_customer":null} ``` 5. Replace invalid params with valid params for `/customers/payment_methods` ``` curl --location --globoff 'http://localhost:8080/customers/payment_methods?accepted_countries[]=US%2CCA&accepted_currencies[]=USD%2CEUR&card_networks[]=visa' \ --header 'Accept: application/json' \ --header 'api-key: dev_4TatGqeyGyVJErk5UVWVGwRg9fb9EjqUY6r2hvhFp9MdKLAPsa8HvSGRrxJgxG7d' ``` Response ``` {"customer_payment_methods":[],"is_guest_customer":true} ``` 6. Add offset and limit for `/customers/list` ![Screenshot 2025-06-17 at 2 13 38 PM](https://github.com/user-attachments/assets/a2aed86e-25ac-47ee-ae25-548b8adea100) 7. Change the HTTP method of `/customers/{customer_id}/mandates` to `GET`. Earlier it gave a method not found error ![Screenshot 2025-06-17 at 2 02 09 PM](https://github.com/user-attachments/assets/934e83c3-70d8-4d54-bbb2-02fc1d724f22) </br> Unit test case for `NullObject` serialization <img width="720" alt="Screenshot 2025-06-09 at 3 04 39 PM" src="https://github.com/user-attachments/assets/d1f2d978-9770-4328-b6b3-d11fcc08a4fe" /> </br> There is no change reflected in the API Contract ## Checklist <!-- Put 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 </br> Unit test case for `NullObject` serialization <img width="720" alt="Screenshot 2025-06-09 at 3 04 39 PM" src="https://github.com/user-attachments/assets/d1f2d978-9770-4328-b6b3-d11fcc08a4fe" /> </br> There is no change reflected in the API Contract ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/payments.rs` **2. Core Business Logic** - `crates/router/src/core/payments/flows/session_flow.rs` **3. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/payme/transformers.rs` - `crates/openapi/src/routes/merchant_connector_account.rs` **4. Other** - `api-reference/v1/openapi_spec_v1.json` - `api-reference/v2/openapi_spec_v2.json` - `crates/openapi/src/openapi.rs` - ... and 12 more files **Code Patterns Applied:** - Define new data structures (1 changes) - Implement new functions (2 changes) - Extend existing types with new fields (1 changes) **Detailed Identifier Changes:** Commit 02dee9c5: Files to modify: **crates/api_models/src/payments.rs** Add: - function: private::serialize - function: private::test_null_object_serialization - struct: pub::NullObject - impl: impl Serialize for NullObject - mod: private::null_object_test **crates/hyperswitch_connectors/src/connectors/payme/transformers.rs** Modify existing code **crates/openapi/src/openapi.rs** Modify existing code **crates/openapi/src/openapi_v2.rs** Modify existing code **crates/openapi/src/routes/customers.rs** Modify existing code **crates/openapi/src/routes/mandates.rs** Modify existing code **crates/openapi/src/routes/merchant_connector_account.rs** Modify existing code **crates/openapi/src/routes/payment_link.rs** Modify existing code **crates/openapi/src/routes/payment_method.rs** Modify existing code **crates/openapi/src/routes/payments.rs** Modify existing code **crates/openapi/src/routes/routing.rs** Modify existing code **crates/router/src/core/payments/flows/session_flow.rs** Modify existing code **crates/router/src/routes/admin.rs** Modify existing code **crates/router/src/routes/mandates.rs** Modify existing code **crates/router/src/routes/payment_link.rs** Modify existing code **crates/router/src/routes/payment_methods.rs** Modify existing code **crates/router/src/routes/refunds.rs** Modify existing code
{"pr_number": 8127, "pr_title": "fix(openapi): correct schema references and semantics for v1 openApi spec", "merged_at": "2025-06-20T13:23:26Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/payments.rs"], "core_business": ["crates/router/src/core/payments/flows/session_flow.rs"], "connectors": ["crates/hyperswitch_connectors/src/connectors/payme/transformers.rs", "crates/openapi/src/routes/merchant_connector_account.rs"], "other": ["api-reference/v1/openapi_spec_v1.json", "api-reference/v2/openapi_spec_v2.json", "crates/openapi/src/openapi.rs", "crates/openapi/src/openapi_v2.rs", "crates/openapi/src/routes/customers.rs", "crates/openapi/src/routes/mandates.rs", "crates/openapi/src/routes/payment_link.rs", "crates/openapi/src/routes/payment_method.rs", "crates/openapi/src/routes/payments.rs", "crates/openapi/src/routes/routing.rs", "crates/router/src/routes/admin.rs", "crates/router/src/routes/mandates.rs", "crates/router/src/routes/payment_link.rs", "crates/router/src/routes/payment_methods.rs", "crates/router/src/routes/refunds.rs"]}, "change_types": {"structs_added": 1, "functions_added": 2, "fields_added": 1, "imports_added": 3}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(core): Fix Wasm changes for Tokenio Open Banking ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description 1)Fix Wasm changes for Tokenio Open Banking ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [x] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ![image](https://github.com/user-attachments/assets/67a0c7dc-a57c-4076-a374-bb4baa488533) ![image](https://github.com/user-attachments/assets/46018769-881a-4917-9ec3-00fa48844c6b) ## Checklist <!-- Put 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": 8347, "pr_title": "feat(core): Fix Wasm changes for Tokenio Open Banking", "merged_at": "2025-06-16T08:54:07Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user", "token"]}, "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(connector): [novalnet] Remove first name, last name as required fields for Applepay, Googlepay, Paypal ## Type of Change <!-- Put an `x` in the boxes that apply --> - [X] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description For Novalnet Connector, for Applepay, Googlepay, Paypal the following fields are not required ``` payment_method_data.billing.address.first_name payment_method_data.billing.address.last_name ``` This PR removes these required fields for Applepay, Googlepay, Paypal 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 <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with 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? Applepay can't be tested locally Tested Googlepay and Paypal locally without passing ``` payment_method_data.billing.address.first_name payment_method_data.billing.address.last_name ``` ### Testing Paypal ### Request ``` curl --location --request POST 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_tAW8Ub52irOZ4OGMRHftVI2amltitI5Y8SvnWg9rAgz6tkKEVwbrQsVEgHFrPDOM' \ --data-raw '{ "amount": 100, "currency": "EUR", "confirm": true, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 100, "customer_id": "StripeCustomer", "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+1", "description": "Its my first payment request", "return_url": "https://google.com", "payment_method": "wallet", "payment_method_type": "paypal", "payment_method_data": { "wallet": { "paypal_redirect": {} } }, "billing": { "address": { "line1": "1467", "line2": "CA", "line3": "CA", "city": "Musterhausen", "state": "California", "zip": "12345", "country": "DE" }, "email": "test@novalnet.de", "phone": { "number": "8056594427", "country_code": "+91" } }, "shipping": { "address": { "line1": "Musterstr", "line2": "CA", "line3": "CA", "city": "Musterhausen", "state": "California", "zip": "94122", "country": "DE", "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, "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="1199" alt="Screenshot 2025-01-31 at 09 55 32" src="https://github.com/user-attachments/assets/54c08a96-3856-4c70-b49f-90d7d460d739" /> ### After Redirection <img width="1560" alt="Screenshot 2025-01-31 at 09 55 43" src="https://github.com/user-attachments/assets/26b2e1c8-2b3d-4ec1-b387-dd3c7c251c31" /> ### Testing Googlepay ### Request ``` curl --location --request POST 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_tAW8Ub52irOZ4OGMRHftVI2amltitI5Y8SvnWg9rAgz6tkKEVwbrQsVEgHFrPDOM' \ --data-raw '{ "amount": 100, "currency": "USD", "confirm": true, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 100, "customer_id": "StripeCustomer", "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+1", "description": "Its my first payment request", "authentication_type": "three_ds", "return_url": "https://google.com", "payment_method": "wallet", "payment_method_type": "google_pay", "payment_method_data": { "wallet": { "google_pay": { "description": "Visa •••• 1111", "tokenization_data": { "type": "PAYMENT_GATEWAY", "token": "{\"signature\":\"MEUCIQCKws9XNehiwnH8gkAMRk0kh8YhN0WpOB4ko+JVYRcrSwIgRCoqyjU7+cKS2zXboUeEEsjJq/gqkQVpZBQZColFjII\\u003d\",\"intermediateSigningKey\":{\"signedKey\":\"{\\\"keyValue\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUrCoJa2WMkb4Y2f2Qq/MtpFyfRq1wwCMfvPYVehhxig2sgJ0SacbQtC1UZvjEq1XJxT+EdVsfU4cBR+87nLscQ\\\\u003d\\\\u003d\\\",\\\"keyExpiration\\\":\\\"1738969274860\\\"}\",\"signatures\":[\"MEQCIHyMLCxZi+g9S8ylPDy7Op+AFKCnwKYB7zwPl4JXyxqZAiAEljmRRc++ctSnDKO7+a6DPBeB8tXZy2mxDE7/yWd95Q\\u003d\\u003d\"]},\"protocolVersion\":\"ECv2\",\"signedMessage\":\"{\\\"encryptedMessage\\\":\\\"Nkr+4M8wqlTW6WYwBDyxF+CCdWF+kk+rCQFknbOit9H59PrQ+17vvJ5TvqzDB8MebKjoICRbgSXXqwYeLve/vb+uLllQgaL2l/aJvZQNBZ4n5MkGffPMqZ2vjcInCrg5bmFnkis2fNkP2dsbBXhRMt9Dg4esRB+WlcshiA92msjXaR/ZWWsDmRWMyezlJ9zDXiSBTVx12hvNA96gQHu1kWzf2WpGG6IF4ig+AoBcbCCsYbna2WL6bYA2tndV1x83U01vEncD2q3JS59jWdDEYkg6ybMHlTT5ZSA9mzyhVvSoKnKbBoOfNSw5Onnh2wT/2MqAuz3p/pGQB++U2B4cMw+8b3y1LRr2OIY5jdbLbhWhBLEcR9eu3NnNrQC7PLy/98r6gsfYKC0XOG/lXjVh0A3/VNV1siLRn565OVcw4S2LVhLvZxpVVJ0yxdVTYSST3vNKACgCGlFXZOWdeQPO8jyu5mC8FozCJihBlmRZ4nUp/pKwlGb4wkvMZkgt51bus/c01r8DC0c5rHGvLHyMekl6053WdReZ4kK2yMRtH5YQljV/9Us3Qsi2FThw/CGgTuiLDsc+/6d/tTMK6nU9gve5CIE7cspDUkbGJUvxGg\\\\u003d\\\\u003d\\\",\\\"ephemeralPublicKey\\\":\\\"BAIZf7NWUbKxftmfIfYPGtNMudq14wMk6u3kwp53iSgKqyebEJuyTNjr/MVBtbdwFoNw7TPUHrQdochyhZL18aA\\\\u003d\\\",\\\"tag\\\":\\\"5V6sbwFahwJCD482VsTd4tYRDo+TZByQ9LnAIfWyfeU\\\\u003d\\\"}\"}" }, "type": "CARD", "info": { "card_network": "VISA", "card_details": "1111" } } } }, "billing": { "address": { "line1": "1467", "line2": "CA", "line3": "CA", "city": "Musterhausen", "state": "California", "zip": "12345", "country": "DE" }, "email": "test@novalnet.de", "phone": { "number": "8056594427", "country_code": "+91" } }, "shipping": { "address": { "line1": "Musterstr", "line2": "CA", "line3": "CA", "city": "Musterhausen", "state": "California", "zip": "94122", "country": "DE", "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, "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="1264" alt="Screenshot 2025-01-31 at 10 10 08" src="https://github.com/user-attachments/assets/85331a17-b409-4f62-b831-b949e5e20b3a" /> ## Checklist <!-- Put 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` - `crates/router/src/configs/defaults/payment_connector_required_fields.rs` **Code Patterns Applied:** - Implement new functions (4 changes) - Extend existing types with new fields (6 changes) **Detailed Identifier Changes:** Commit f0b443ed: 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 **crates/router/src/configs/defaults/payment_connector_required_fields.rs** Modify existing code Commit 3e116b81: 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 **crates/router/src/configs/defaults/payment_connector_required_fields.rs** Modify existing code
{"pr_number": 7152, "pr_title": "fix(connector): [novalnet] Remove first name, last name as required fields for Applepay, Googlepay, Paypal ", "merged_at": "2025-02-04T19:22:41Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "user"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/novalnet/transformers.rs", "crates/hyperswitch_connectors/src/utils.rs", "crates/router/src/configs/defaults/payment_connector_required_fields.rs"]}, "change_types": {"functions_added": 4, "fields_added": 6}, "has_identifier_data": true, "commits_matched": 2, "match_method": "pr_number"}
ci: add tests that make use of locker ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [x] CI/CD ## Description <!-- Describe your changes in detail --> This PR introduces necessary refactoring to add support for locker specific tests. This includes `addition of delete payment method` (which is restricted to work only on hosted environments and not local given `tartarus` is unavailable and is complicated to setup things) but not limited to: - fixes: - fix reports not being generated - fix multiple credential not picking proper api keys - refactoring: - move configs that makes use of response custom under `getCustomExchange` - misc: - clarify ntid files to make them meaningful - update dependencies - update cypress credential to support stripe multiple api keys - feat: - add multiple credential support for stripe - add ntid support for stripe with another api key - add recurring mit payment endpoint to ntid connector agnostic flows ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> delete payment method: |local|hosted| |-|-| |<img width="457" alt="image" src="https://github.com/user-attachments/assets/8b65aa07-3ee6-46f7-83ac-8850e3530aa2">|<img width="462" alt="image" src="https://github.com/user-attachments/assets/2712463c-a458-483c-9daf-d17b3f9b573b">| |`5xx` is expected since this requires locker to be set up locally which is not optimal|`2xx` is expected since locker is already setup| ntid with mit based on payment token: |cybersource|stripe| |-|-| |<img width="463" alt="image" src="https://github.com/user-attachments/assets/64686ac4-4b0f-4bbc-94c7-f60d0c5c4a7f" />|<img width="467" alt="image" src="https://github.com/user-attachments/assets/4059ac5c-2ad1-4bc0-b149-a2c867b465ed" />| |adyen|bluesnap|cybersource|stripe| |-|-|-|-| |<img width="467" alt="image" src="https://github.com/user-attachments/assets/0716b0bb-f34b-47bf-a27f-32bfe322935f" />|<img width="462" alt="image" src="https://github.com/user-attachments/assets/ca98cc84-cb72-4dc8-91c3-7654c628f347" />|<img width="554" alt="image" src="https://github.com/user-attachments/assets/4e01f0fe-acb0-4ecf-8873-be35a16c052c" />|<img width="555" alt="image" src="https://github.com/user-attachments/assets/86a052c2-3a51-4952-abf8-8f93826959e9" />| |adyen ntid failure has been addressed in #6851. #6735 has been soft cherry-picked and the tests have been run against local|||stripe with multiple credential support (ntid)| ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `prettier . --write` - [ ] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Utils** - `cypress-tests/cypress/utils/RequestBodyUtils.js` - `cypress-tests/cypress/utils/featureFlags.js` **2. Tests** - `cypress-tests/cypress/e2e/PaymentTest/00003-ConnectorCreate.cy.js` - `cypress-tests/cypress/e2e/PaymentTest/00020-MandatesUsingNTID.cy.js` - `cypress-tests/cypress/e2e/PaymentTest/00023-PaymentMethods.cy.js` - ... and 8 more files **Code Patterns Applied:** - Extend existing types with new fields (69 changes) - Add conditional logic for feature flags or filtering (14 changes)
{"pr_number": 6735, "pr_title": "ci: add tests that make use of locker", "merged_at": "2024-12-26T12:15:14Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "user", "connector"]}, "hierarchy": {"utils": ["cypress-tests/cypress/utils/RequestBodyUtils.js", "cypress-tests/cypress/utils/featureFlags.js"], "tests": ["cypress-tests/cypress/e2e/PaymentTest/00003-ConnectorCreate.cy.js", "cypress-tests/cypress/e2e/PaymentTest/00020-MandatesUsingNTID.cy.js", "cypress-tests/cypress/e2e/PaymentTest/00023-PaymentMethods.cy.js", "cypress-tests/cypress/e2e/PaymentTest/00024-ConnectorAgnostic.cy.js", "cypress-tests/cypress/e2e/PaymentUtils/Adyen.js", "cypress-tests/cypress/e2e/PaymentUtils/Commons.js", "cypress-tests/cypress/e2e/PaymentUtils/Cybersource.js", "cypress-tests/cypress/e2e/PaymentUtils/Stripe.js", "cypress-tests/cypress/e2e/PaymentUtils/Utils.js", "cypress-tests/cypress/e2e/PaymentUtils/WorldPay.js", "cypress-tests/cypress/support/commands.js"]}, "change_types": {"fields_added": 69, "conditionals_added": 14}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
feat(router): Add v2 endpoint to retrieve payment filters at merchant and profile level ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Added the `v2/payments/filter` and `v2/payments/profile/filter` API to retrieve available payment filters (connectors, statuses, payment methods, authentication types, etc.) at merchant and profile level. ### Key Changes 1. `get_payment_filters_profile` -> `crates/router/src/routes/payments.rs` - Supports profile-based filtering for merchants. 2. `get_payment_filters` -> `crates/router/src/core/payments.rs` - Refactor get_payment_filters to support both v1 and v2 - Updated get_payment_filters to work with both PaymentListFiltersV1 and PaymentListFiltersV2 ### Additional Changes - [x] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables Links to the files with corresponding changes. 1. `crates/api_models/src/admin.rs` 2. `crates/api_models/src/payment_methods.rs` 3. `crates/router/src/routes/payments.rs` 4. `crates/common_types/src/payment_methods.rs` 5. `crates/router/Cargo.toml` 6. `crates/router/src/core/payments.rs` 7. `crates/router/src/routes/app.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). --> ## How did you test it? -Request ```bash curl --location 'http://localhost:8080/v2/payments/filter' \ --header 'X-Profile-Id: pro_68rBAUSCoq91kQ870GFR' \ --header 'X-Merchant-Id: cloth_seller_cnwkRpdOSnP0vLY1lhGb' \ --header 'api-key: dev_elV1dBHRfYgbT09Q3R914ZOZzKCsJFjMJRot4TUcByFCYDseSZHTrZbCJuBX6ZHO' ``` - Response ```{ "connector": { "stripe": [ { "connector_label": "stripe_business11", "merchant_connector_id": "mca_2jsckz0TAfE0z52dJUY1" } ] }, "currency": [ "AED", "AFN", "ALL", "AMD", "ANG", "AOA", "ARS", "AUD", "AWG", "AZN", "BAM", "BBD", "BDT", "BGN", "BHD", "BIF", "BMD", "BND", "BOB", "BRL", "BSD", "BTN", "BWP", "BYN", "BZD", "CAD", "CDF", "CHF", "CLP", "CNY", "COP", "CRC", "CUP", "CVE", "CZK", "DJF", "DKK", "DOP", "DZD", "EGP", "ERN", "ETB", "EUR", "FJD", "FKP", "GBP", "GEL", "GHS", "GIP", "GMD", "GNF", "GTQ", "GYD", "HKD", "HNL", "HRK", "HTG", "HUF", "IDR", "ILS", "INR", "IQD", "IRR", "ISK", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LYD", "MAD", "MDL", "MGA", "MKD", "MMK", "MNT", "MOP", "MRU", "MUR", "MVR", "MWK", "MXN", "MYR", "MZN", "NAD", "NGN", "NIO", "NOK", "NPR", "NZD", "OMR", "PAB", "PEN", "PGK", "PHP", "PKR", "PLN", "PYG", "QAR", "RON", "RSD", "RUB", "RWF", "SAR", "SBD", "SCR", "SDG", "SEK", "SGD", "SHP", "SLE", "SLL", "SOS", "SRD", "SSP", "STN", "SVC", "SYP", "SZL", "THB", "TJS", "TMT", "TND", "TOP", "TRY", "TTD", "TWD", "TZS", "UAH", "UGX", "USD", "UYU", "UZS", "VES", "VND", "VUV", "WST", "XAF", "XCD", "XOF", "XPF", "YER", "ZAR", "ZMW", "ZWL" ], "status": [ "succeeded", "failed", "cancelled", "processing", "requires_customer_action", "requires_merchant_action", "requires_payment_method", "requires_confirmation", "requires_capture", "partially_captured", "partially_captured_and_capturable" ], "payment_method": { "card": [ "debit", "credit" ] }, "authentication_type": [ "three_ds", "no_three_ds" ], "card_network": [ "Visa", "Mastercard", "AmericanExpress", "JCB", "DinersClub", "Discover", "CartesBancaires", "UnionPay", "Interac", "RuPay", "Maestro" ] } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
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/payment_methods.rs` **2. Core Business Logic** - `crates/router/src/core/payments.rs` **3. Type Definitions** - `crates/common_types/src/payment_methods.rs` **4. Configuration Files** - `crates/router/Cargo.toml` **5. Other** - `crates/router/src/routes/app.rs` - `crates/router/src/routes/payments.rs` **Code Patterns Applied:** - Implement new functions (9 changes) - Extend existing types with new fields (3 changes) - Add conditional logic for feature flags or filtering (1 changes) - Modify database queries (2 changes) **Detailed Identifier Changes:** Commit 3d9d75cd: Files to modify: **crates/api_models/src/admin.rs** Add: - function: pub::get_connector_name - function: pub::get_connector_name - function: pub::get_payment_method - function: pub::get_payment_method_type - impl: impl PaymentMethodsEnabled **crates/api_models/src/payment_methods.rs** Add: - function: pub::get_payment_method_type - impl: impl RequestPaymentMethodTypes **crates/common_types/src/payment_methods.rs** Add: - function: pub::get_payment_method - function: pub::get_payment_method_type - function: pub::get_payment_method_type - impl: impl PaymentMethodsEnabled - impl: impl RequestPaymentMethodTypes **crates/router/src/core/payments.rs** Modify existing code **crates/router/src/routes/app.rs** Modify existing code **crates/router/src/routes/payments.rs** Add: - function: pub::get_payment_filters_profile
{"pr_number": 7171, "pr_title": "feat(router): Add v2 endpoint to retrieve payment filters at merchant and profile level", "merged_at": "2025-02-25T18:48:16Z", "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/payment_methods.rs"], "core_business": ["crates/router/src/core/payments.rs"], "types": ["crates/common_types/src/payment_methods.rs"], "config": ["crates/router/Cargo.toml"], "other": ["crates/router/src/routes/app.rs", "crates/router/src/routes/payments.rs"]}, "change_types": {"functions_added": 9, "fields_added": 3, "conditionals_added": 1, "database_queries": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): [Nexixpay] add setup mandate flow ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Add zero auth mandate flow for nexixpay connector. It uses 3ds payments flow to create mandates. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> We have to add support for zero amount CIT payments for nexixpay so that merchants can do MIT payments with required value. ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Cypress test: <img width="1728" alt="image" src="https://github.com/user-attachments/assets/63853683-40cd-409c-a3e7-00c1b0ffc0e0" /> Below curls should be used for testing zero auth mandates: 1. Payments CIT ``` curl --location 'localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_PczXRK73enU0k1JDyjEZ8u76iSUxrocg963jiEzfbY7z1ncgosfLvQFlRoHOcux4' \ --data-raw '{ "amount": 0, "currency": "EUR", "confirm": false, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "authentication_type": "three_ds", "return_url": "https://abc.com", "email": "something@gmail.com", "name": "Joseph Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment request", "setup_future_usage": "off_session" }' ``` 2. Confirm CIT ``` curl --location 'http://localhost:8080/payments/pay_I46gW94NSY7cGwi0BTjl/confirm' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_PczXRK73enU0k1JDyjEZ8u76iSUxrocg963jiEzfbY7z1ncgosfLvQFlRoHOcux4' \ --data-raw '{ "confirm": true, "customer_id": "customer123", "payment_type": "setup_mandate", "customer_acceptance": { "acceptance_type": "online", "accepted_at": "1963-05-03T04:07:52.723Z", "online": { "ip_address": "127.0.0.1", "user_agent": "amet irure esse" } }, "payment_method": "card", "payment_method_type": "credit", "email": "test@novalnet.de", "payment_method_data": { "card": { "card_number": "4349940199004549", "card_exp_month": "12", "card_exp_year": "30", "card_holder_name": "joseph Doe", "card_cvc": "396" }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "IT", "first_name": "joseph", "last_name": "Doe" }, "email": "test@novalnet.de", "phone": { "number": "8056594427", "country_code": "+91" } } } }' ``` 3. MIT payment ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_PczXRK73enU0k1JDyjEZ8u76iSUxrocg963jiEzfbY7z1ncgosfLvQFlRoHOcux4' \ --data '{ "amount": 3545, "currency": "EUR", "confirm": true, "customer_id": "customer123", "recurring_details": { "type": "payment_method_id", "data": "pm_unSAF4FSldeu1wAeLvpe" }, "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. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/router_request_types.rs` **2. Core Business Logic** - `crates/router/src/core/payments/transformers.rs` **3. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/adyen.rs` - `crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs` - `crates/hyperswitch_connectors/src/connectors/nexixpay.rs` - ... and 2 more files **4. Tests** - `cypress-tests/cypress/e2e/configs/Payment/Nexixpay.js` **Code Patterns Applied:** - Implement new functions (12 changes) - Extend existing types with new fields (172 changes) - Add conditional logic for feature flags or filtering (1 changes) **Detailed Identifier Changes:** Commit f6633a72: Files to modify: **crates/hyperswitch_connectors/src/connectors/adyen.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs** Remove: - function: pub::convert_setup_mandate_router_data_to_authorize_router_data - function: pub::convert_payment_authorize_router_response **crates/hyperswitch_connectors/src/connectors/nexixpay.rs** Add: - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::get_request_body - function: private::build_request - function: private::handle_response - function: private::get_error_response **crates/hyperswitch_connectors/src/connectors/nexixpay/transformers.rs** Add: - function: private::try_from - impl: impl TryFrom< ResponseRouterData< SetupMandate, PaymentsResponse, SetupMandateRequestData, PaymentsResponseData, >, > for RouterData<SetupMandate, SetupMandateRequestData, PaymentsResponseData> **crates/hyperswitch_connectors/src/utils.rs** Add: - function: private::get_complete_authorize_url - function: private::is_auto_capture - function: pub::convert_setup_mandate_router_data_to_authorize_router_data - function: pub::convert_payment_authorize_router_response **crates/hyperswitch_domain_models/src/router_request_types.rs** Modify existing code **crates/router/src/core/payments/transformers.rs** Modify existing code
{"pr_number": 7532, "pr_title": "feat(connector): [Nexixpay] add setup mandate flow", "merged_at": "2025-03-18T18:15:56Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"domain": ["crates/hyperswitch_domain_models/src/router_request_types.rs"], "core_business": ["crates/router/src/core/payments/transformers.rs"], "connectors": ["crates/hyperswitch_connectors/src/connectors/adyen.rs", "crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs", "crates/hyperswitch_connectors/src/connectors/nexixpay.rs", "crates/hyperswitch_connectors/src/connectors/nexixpay/transformers.rs", "crates/hyperswitch_connectors/src/utils.rs"], "tests": ["cypress-tests/cypress/e2e/configs/Payment/Nexixpay.js"]}, "change_types": {"functions_added": 12, "fields_added": 172, "imports_added": 1, "conditionals_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(wasm): remove chasenet from jpmorgan wasm as ChaseNet doesn’t exist in PMT ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description remove chasenet from jpmorgan wasm as ChaseNet doesn’t exist in PMT ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with 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 ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/connector_configs/src/connector.rs` - `crates/connector_configs/toml/development.toml` - `crates/connector_configs/toml/production.toml` - ... and 1 more files **Code Patterns Applied:** - Extend existing types with new fields (5 changes) **Detailed Identifier Changes:** Commit 5e4eded8: Files to modify: **crates/connector_configs/src/connector.rs** Modify existing code
{"pr_number": 6927, "pr_title": "fix(wasm): remove chasenet from jpmorgan wasm as ChaseNet doesn\u2019t exist in PMT", "merged_at": "2024-12-24T09:11:48Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "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": {"fields_added": 5}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
docs(cypress): update file structure ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [x] Refactoring - [ ] Dependency updates - [x] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This PR updates Cypress documentation to deal with recent file structure change. - `cypress-tests` folder structure to reduce confusion and chaos in within `e2e` directory - previous: ```sh . └── cypress ├── e2e │   ├── PaymentMethodListTest │   ├── PaymentMethodListUtils │   ├── PaymentTest │   ├── PaymentUtils │   ├── PayoutTest │   ├── PayoutUtils │   ├── RoutingTest │   └── RoutingUtils ├── fixtures ├── support └── utils ``` - present: ```sh . └── cypress ├── e2e │   ├── configs │   │   ├── Payment │   │   ├── PaymentMethodList │   │   ├── Payout │   │   └── Routing │   └── spec │   ├── Misc │   ├── Payment │   ├── PaymentMethodList │   ├── Payout │   └── Routing ├── fixtures ├── support └── utils ``` closes #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). --> Just trying to be up-to-date with the latest changes. ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> NA ## 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/README.md` - `cypress-tests/cypress/support/e2e.js`
{"pr_number": 7016, "pr_title": "docs(cypress): update file structure", "merged_at": "2025-01-13T07:50:55Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment"]}, "hierarchy": {"tests": ["cypress-tests/README.md", "cypress-tests/cypress/support/e2e.js"]}, "change_types": {}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
fix(users): use global Redis prefix for all user-related cache operations ## 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 updates all **user-related Redis operations** to consistently use the **global Redis key prefix** (`global:`) instead of environment-specific prefixes like `public:` (V1) or `public_v2:` (V2). Previously, different deployments used different prefixes, which caused inconsistencies especially during login, logout, switch, and caching flows. ### Changes Introduced: - Updated Redis connection fetchers for all user modules (lineage context, SSO, blacklist, etc.) to use a global Redis connection. ## Affected functions: ### `utils/user.rs` - `set_sso_id_in_redis` - `get_sso_id_from_redis` ### `utils/user/two_factor_auth.rs` - `check_totp_in_redis` - `check_recovery_code_in_redis` - `insert_totp_in_redis` - `insert_totp_secret_in_redis` - `get_totp_secret_from_redis` - `delete_totp_secret_from_redis` - `insert_recovery_code_in_redis` - `delete_totp_from_redis` - `delete_recovery_code_from_redis` - `insert_totp_attempts_in_redis` - `get_totp_attempts_from_redis` - `insert_recovery_code_attempts_in_redis` - `get_recovery_code_attempts_from_redis` - `delete_totp_attempts_from_redis` - `delete_recovery_code_attempts_from_redis` ### `services/authorization.rs` - `get_role_info_from_cache` - `set_role_info_in_cache` ### `services/openidconnect.rs` - `get_authorization_url` - `get_nonce_from_redis` ### `services/user.rs` - `insert_user_in_blacklist` - `insert_role_in_blacklist` - `invalidate_role_cache` - `check_user_in_blacklist` - `check_role_in_blacklist` - `insert_email_token_in_blacklist` - `check_email_token_in_blacklist` ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> - It helps in storing the redis keys which are common to both v1 and v2 deployments under a common prefix, so it can be used irrespective of the version of the deployment. ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Used the dashboard and then signed out. <img width="520" alt="Screenshot 2025-04-29 at 3 52 37 PM" src="https://github.com/user-attachments/assets/6ea3fde2-5e1a-4afd-8855-434bfc99d7da" /> As it is evident in the screenshot, blacklist functions, and lineage context now use `global:` prefix while setting the key in redis. We need to check the redis-cli and verify that the user-related keys have the `global` prefix, instead of deployment specific keys like `public` and `public_v2`. ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Utils** - `crates/router/src/utils/user.rs` - `crates/router/src/utils/user/two_factor_auth.rs` **2. Other** - `crates/router/src/db.rs` - `crates/router/src/db/kafka_store.rs` - `crates/router/src/routes/app.rs` - ... and 3 more files **Code Patterns Applied:** - Implement new functions (9 changes) - Extend existing types with new fields (3 changes) **Detailed Identifier Changes:** Commit 6750b10f: Files to modify: **crates/router/src/db.rs** Remove: - impl: impl GlobalStorageInterface for Store - impl: impl GlobalStorageInterface for MockDb Add: - function: private::get_cache_store - function: private::get_cache_store - impl: impl GlobalStorageInterface for Store - impl: impl GlobalStorageInterface for MockDb **crates/router/src/db/kafka_store.rs** Remove: - impl: impl GlobalStorageInterface for KafkaStore Add: - function: private::get_cache_store - impl: impl GlobalStorageInterface for KafkaStore **crates/router/src/routes/app.rs** Add: - function: private::global_store **crates/router/src/services/authentication/blacklist.rs** Modify existing code **crates/router/src/services/authorization.rs** Modify existing code **crates/router/src/services/openidconnect.rs** Modify existing code **crates/router/src/utils/user.rs** Remove: - function: pub::get_redis_connection **crates/router/src/utils/user/two_factor_auth.rs** Modify existing code
{"pr_number": 7932, "pr_title": "fix(users): use global Redis prefix for all user-related cache operations", "merged_at": "2025-05-05T16:02:25Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user", "token"]}, "hierarchy": {"utils": ["crates/router/src/utils/user.rs", "crates/router/src/utils/user/two_factor_auth.rs"], "other": ["crates/router/src/db.rs", "crates/router/src/db/kafka_store.rs", "crates/router/src/routes/app.rs", "crates/router/src/services/authentication/blacklist.rs", "crates/router/src/services/authorization.rs", "crates/router/src/services/openidconnect.rs"]}, "change_types": {"functions_added": 9, "fields_added": 3}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
revert(connector): [Worldpay] add root CA certificate Reverts juspay/hyperswitch#8205
To implement this **unknown** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/connector_configs/toml/development.toml` - `crates/connector_configs/toml/production.toml` - `crates/connector_configs/toml/sandbox.toml` - ... and 2 more files **Detailed Identifier Changes:** Commit dab4058b: Files to modify: **crates/hyperswitch_connectors/src/connectors/worldpay.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/worldpay/transformers.rs** Modify existing code
{"pr_number": 8224, "pr_title": "revert(connector): [Worldpay] add root CA certificate", "merged_at": "2025-06-10T08:33:22Z", "intent": {"feature_type": "unknown", "action": "unknown", "entities": []}, "hierarchy": {"connectors": ["crates/connector_configs/toml/development.toml", "crates/connector_configs/toml/production.toml", "crates/connector_configs/toml/sandbox.toml", "crates/hyperswitch_connectors/src/connectors/worldpay.rs", "crates/hyperswitch_connectors/src/connectors/worldpay/transformers.rs"]}, "change_types": {}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor(routing): Add connectors from current active routing algorithm before adding fallback 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 --> This PR modifies critical paths , specifically the `decide_connector` function and the `route_connector_v1_for_payments` function in the payments confirm flow. These changes are made corresponding to a use case for Narvar. In case the connector specified in straight through routing is not eligible, the connectors configured in the active routing rule by the merchant should be added to the list of connectors before the fallback connectors are added to this list. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> This PR closes #7920 ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Stripe and Adyen created with credit disabled for stripe 1. Payment Connector Create - Stripe with credit card disabled ``` curl --location 'http://localhost:8080/account/merchant_1747224808/connectors' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_sdnmIWRnyDu7lgktwcQ*******' \ --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": "debit", "card_networks": [ "Visa", "Mastercard" ], "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true, "accepted_countries": { "type": "disable_only", "list": [ "HK" ] }, "accepted_currencies": { "type": "enable_only", "list": [ "USD", "GBP", "INR" ] } } ] }, { "payment_method": "pay_later", "payment_method_types": [ { "payment_method_type": "klarna", "payment_experience": "redirect_to_url", "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_type": "affirm", "payment_experience": "redirect_to_url", "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_type": "afterpay_clearpay", "payment_experience": "redirect_to_url", "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true } ] } ], "metadata": { "city": "NY", "unit": "245" }, "connector_webhook_details": { "merchant_secret": "MyWebhookSecret" }, "business_country": "US", "business_label": "default" }' ``` - Adyen with credit card enabled ``` curl --location 'http://localhost:8080/account/merchant_1747224808/connectors' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_sdnmIWRnyDu7lgktwcQHoLHEy93541YEgitCw********' \ --data '{ "connector_type": "payment_processor", "connector_name": "adyen", "connector_account_details": { "auth_type": "SignatureKey", "api_key": "AQEqhmfxK43MaR1Hw0m/n3Q5qf3*******", "key1": "Jus******", "api_secret": "AQEzgmDBbd+uOlwd9********" }, "test_mode": true, "disabled": false, "payment_methods_enabled": [ { "payment_method": "card", "payment_method_types": [ { "payment_method_type": "credit", "card_networks": [ "Visa", "Mastercard" ], "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true, "accepted_countries": { "type": "disable_only", "list": [ "HK" ] }, "accepted_currencies": { "type": "enable_only", "list": [ "USD", "GBP", "INR", "AED" ] } }, { "payment_method_type": "debit", "card_networks": [ "Visa", "Mastercard" ], "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true, "accepted_countries": { "type": "disable_only", "list": [ "HK" ] }, "accepted_currencies": { "type": "enable_only", "list": [ "USD", "GBP", "INR" ] } } ] }, { "payment_method": "pay_later", "payment_method_types": [ { "payment_method_type": "klarna", "payment_experience": "redirect_to_url", "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_type": "affirm", "payment_experience": "redirect_to_url", "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_type": "afterpay_clearpay", "payment_experience": "redirect_to_url", "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true } ] } ], "metadata": { "city": "NY", "unit": "245" }, "connector_webhook_details": { "merchant_secret": "MyWebhookSecret" }, "business_country": "US", "business_label": "default" }' ``` 2. Create Routing Rule ``` curl --location 'http://localhost:8080/routing' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_sdnmIWRnyDu7lgktwcQHoLHEy93541YEgitCwrluXot******' \ --data '{ "profile_id": "pro_czT9ODMwNqYMmO0Uxnrl", "name": "App based", "description": "This is a rule based routing created at Wed, 21 Aug 2024 08:28:31 GMT", "algorithm": { "type": "advanced", "data": { "defaultSelection": { "type": "priority", "data": [] }, "rules": [ { "name": "rule_1", "connectorSelection": { "type": "priority", "data": [ { "connector": "adyen", "merchant_connector_id": "mca_mduR1DRRqZ9LJQweTxxi" } ] }, "statements": [ { "condition": [ { "lhs": "metadata", "comparison": "equal", "value": { "type": "metadata_variant", "value": { "key": "app", "value": "a" } }, "metadata": {} } ], "nested": null } ] } ], "metadata": {} } } }' ``` 3. Activate Routing rule request ``` curl --location --request POST 'http://localhost:8080/routing/routing_X5yMXyw4NPDt91IapIXi/activate' \ --header 'api-key: dev_sdnmIWRnyDu7lgktwcQHoLHEy93541YEgitC****' ``` 4. Payments Create request ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_sdnmIWRnyDu7lgktwcQHoLHEy93541YEgitC*******' \ --data-raw '{ "amount": 1000, "currency": "USD", "amount_to_capture": 1000, "confirm": false, "profile_id": "pro_czT9ODMwNqYMmO0Uxnrl", "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "authentication_type": "no_three_ds", "setup_future_usage": "on_session", "customer": { "id": "customer123", "name": "John Doe", "email": "customer@gmail.com", "phone": "9999999999", "phone_country_code": "+1" }, "customer_id": "customer123", "phone_country_code": "+1", **"routing": { "type": "single", "data": { "connector": "stripe", "merchant_connector_id": "mca_Dau6dVR2mgr3oNkNEKXb" } },** "description": "Its my first payment request", "return_url": "https://google.com", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4242424242424242", "card_exp_month": "03", "card_exp_year": "30", "card_holder_name": "joseph Doe", "card_cvc": "123" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "guest@example.com" }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "guest@example.com" }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "order_details": [ { "product_name": "Apple iphone 15", "quantity": 1, "amount": 6540, "account_name": "transaction_processing" } ], "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" }, "browser_info": { "user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36", "accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8", "language": "nl-NL", "color_depth": 24, "screen_height": 723, "screen_width": 1536, "time_zone": 0, "java_enabled": true, "java_script_enabled": true, "ip_address": "128.0.0.1" }, "customer_acceptance": { "acceptance_type": "offline", "accepted_at": "1963-05-03T04:07:52.723Z", "online": { "ip_address": "125.0.0.1", "user_agent": "amet irure esse" } }, "connector_metadata": { "noon": { "order_category": "pay" } }, "payment_link": false, "payment_link_config": { "theme": "", "logo": "", "seller_name": "", "sdk_layout": "", "display_sdk_only": false, "enabled_saved_payment_method": false }, "payment_type": "normal", "request_incremental_authorization": false, "merchant_order_reference_id": "test_ord", "session_expiry": 900 }' ``` response ``` { "payment_id": "pay_BMLwyVUwefqz4mtXqJhK", "merchant_id": "merchant_1746679457", "status": "requires_confirmation", "amount": 1000, "net_amount": 1000, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": null, "client_secret": "pay_BMLwyVUwefqz*****", "created": "2025-05-08T05:31:07.782Z", "currency": "USD", "customer_id": "customer123", "customer": { "id": "customer123", "name": "John Doe", "email": "customer@gmail.com", "phone": "9999999999", "phone_country_code": "+1" }, ..... ``` 5. Payments Confirm request ``` curl --location 'http://localhost:8080/payments/pay_BMLwyVUwefqz4mtXqJhK/confirm' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_sdnmIWRnyDu7lgktwcQHoLHE*****' \ --data-raw '{ "amount": 1000, "currency": "USD", "amount_to_capture": 1000, "confirm": true, "profile_id": "pro_czT9ODMwNqYMmO0Uxnrl", "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "authentication_type": "no_three_ds", "setup_future_usage": "on_session", "customer": { "id": "customer123", "name": "John Doe", "email": "customer@gmail.com", "phone": "9999999999", "phone_country_code": "+1" }, "customer_id": "customer123", "phone_country_code": "+1", **"routing": { "type": "single", "data": { "connector": "stripe", "merchant_connector_id": "mca_Dau6dVR2mgr3oNkNEKXb" } },** "description": "Its my first payment request", "return_url": "https://google.com", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4242424242424242", "card_exp_month": "03", "card_exp_year": "30", "card_holder_name": "joseph Doe", "card_cvc": "123" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "guest@example.com" }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "guest@example.com" }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "order_details": [ { "product_name": "Apple iphone 15", "quantity": 1, "amount": 6540, "account_name": "transaction_processing" } ], "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" }, "browser_info": { "user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36", "accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8", "language": "nl-NL", "color_depth": 24, "screen_height": 723, "screen_width": 1536, "time_zone": 0, "java_enabled": true, "java_script_enabled": true, "ip_address": "128.0.0.1" }, "customer_acceptance": { "acceptance_type": "offline", "accepted_at": "1963-05-03T04:07:52.723Z", "online": { "ip_address": "125.0.0.1", "user_agent": "amet irure esse" } }, "connector_metadata": { "noon": { "order_category": "pay" } }, "payment_link": false, "payment_link_config": { "theme": "", "logo": "", "seller_name": "", "sdk_layout": "", "display_sdk_only": false, "enabled_saved_payment_method": false }, "payment_type": "normal", "request_incremental_authorization": false, "merchant_order_reference_id": "test_ord", "session_expiry": 900 }' ``` response ``` { "payment_id": "pay_BMLwyVUwefqz4mtXqJhK", "merchant_id": "merchant_1746679457", "status": "failed", "amount": 1000, "net_amount": 1000, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": "adyen", "client_secret": "pay_BMLwyVUwefqz4mtXqJhK_se******", "created": "2025-05-08T05:31:07.782Z", "currency": "USD", "customer_id": "customer123", "customer": { "id": "customer123", "name": "John Doe", "email": "customer@gmail.com", "phone": "9999999999", "phone_country_code": "+1" }, . . . "error_code": "2", "error_message": "Refused", "unified_code": "UE_9000", "unified_message": "Something went wrong", "payment_experience": null, "payment_method_type": "credit", "connector_label": null, . . . "payment_method_id": null, "payment_method_status": null, "updated": "2025-05-08T05:31:14.287Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": "test_ord", "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": "DECLINED Expiry Incorrect" } ``` The connector specified in the routing rule was stripe, but the payment was routed to adyen instead since credit was disabled for stripe at the time of payment connector create. The payment failed because the test card details initially added for stripe are not supported by adyen ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Core Business Logic** - `crates/router/src/core/payments.rs` **Code Patterns Applied:** - Extend existing types with new fields (1 changes) **Detailed Identifier Changes:** Commit c2ad04f4: Files to modify: **crates/router/src/core/payments.rs** Modify existing code
{"pr_number": 7921, "pr_title": "refactor(routing): Add connectors from current active routing algorithm before adding fallback connectors", "merged_at": "2025-05-14T18:35:38Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"core_business": ["crates/router/src/core/payments.rs"]}, "change_types": {"fields_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(connector): [CYBERSOURCE] Passing pares_status for MasterCard & Visa and transaction_type field ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Passing a field `transaction_type` as 3 if its an MIT. For all others, we should be passing 1. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> Ref Doc : https://developer.cybersource.com/api-reference-assets/index.html#payments https://docs.cybersource.com/content/dam/new-documentation/documentation/en/reference/api-fields/api-fields-so.pdf Page : 1127 ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> 1. Payments Create - Cards (No3DS) cURL: ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_0CBr33MgzjRaqH4yI6Y6DGxzptpf3M54jmkfo3lEk4hHuQ3k1QNvtqZOh7ULkhRY' \ --header 'Cookie: PHPSESSID=0b47db9d7de94c37b6b272087a9f2fa7' \ --data-raw '{ "amount": 700, "currency": "EUR", "connector": ["cybersource"], "confirm": true, "payment_link": false, "capture_on": "2029-09-10T10:11:12Z", "amount_to_capture": 700, "name": "John Doe", "email": "dg@example.com", "phone": "999999999", "phone_country_code": "+1", "description": "Its my first payment request", "authentication_type": "no_three_ds", "return_url": "https://google.com", "payment_method_data": { "card": { "card_number": "4111111111111111", "card_exp_month": "03", "card_exp_year": "2030", "card_holder_name": "joseph Doe", "card_cvc": "737", "card_network": "VISA" }, "billing": { "address": { "line1": "1467", "line2": "CA", "city": "Thise", "state": "Alsace", "zip": "94122", "country": "FR", "first_name": "Henry", "last_name": "Henry" } } }, "payment_method": "card", "payment_method_type": "credit", "browser_info": { "color_depth": 24, "java_enabled": true, "java_script_enabled": true, "language": "en-GB", "screen_height": 720, "screen_width": 1280, "time_zone": -330, "ip_address": "208.127.127.193", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0" }, "metadata": { "disable_avs": true, "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" }, "order_details": [ { "product_name": "Tea", "quantity": 1, "amount": 110, "product_img_link": "https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg" }, { "product_name": "Tea", "quantity": 1, "amount": 110, "product_img_link": "https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg" }, { "product_name": "Tea", "quantity": 1, "amount": 110, "product_img_link": "https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg" } ] }' ``` Response: ``` { "payment_id": "pay_rh1sY8fgwzktQ9zOM2tA", "merchant_id": "merchant_1751445775", "status": "succeeded", "amount": 700, "net_amount": 700, "shipping_cost": null, "amount_capturable": 0, "amount_received": 700, "connector": "cybersource", "client_secret": "pay_rh1sY8fgwzktQ9zOM2tA_secret_rZDNCoAO6rZIx3nash1P", "created": "2025-07-02T09:08:34.095Z", "currency": "EUR", "customer_id": null, "customer": { "id": null, "name": "John Doe", "email": "dg@example.com", "phone": "999999999", "phone_country_code": "+1" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": 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": "joseph Doe", "payment_checks": { "avs_response": { "code": "Y", "codeRaw": "Y" }, "card_verification": null }, "authentication_data": null }, "billing": { "address": { "city": "Thise", "country": "FR", "line1": "1467", "line2": "CA", "line3": null, "zip": "94122", "state": "Alsace", "first_name": "Henry", "last_name": "Henry" }, "phone": null, "email": null } }, "payment_token": "token_ZCtYEfGsQUNKjmTx2OY2", "shipping": null, "billing": null, "order_details": [ { "brand": null, "amount": 110, "category": null, "quantity": 1, "tax_rate": null, "product_id": null, "product_name": "Tea", "product_type": null, "sub_category": null, "product_img_link": "https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg", "product_tax_code": null, "total_tax_amount": null, "requires_shipping": null }, { "brand": null, "amount": 110, "category": null, "quantity": 1, "tax_rate": null, "product_id": null, "product_name": "Tea", "product_type": null, "sub_category": null, "product_img_link": "https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg", "product_tax_code": null, "total_tax_amount": null, "requires_shipping": null }, { "brand": null, "amount": 110, "category": null, "quantity": 1, "tax_rate": null, "product_id": null, "product_name": "Tea", "product_type": null, "sub_category": null, "product_img_link": "https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg", "product_tax_code": null, "total_tax_amount": null, "requires_shipping": null } ], "email": null, "name": null, "phone": null, "return_url": "https://google.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": 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": "7514473165356444603814", "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2019-09-10T10:11:12Z", "disable_avs": true, "new_customer": "true" }, "connector_metadata": null, "feature_metadata": null, "reference_id": "pay_rh1sY8fgwzktQ9zOM2tA_1", "payment_link": null, "profile_id": "pro_1FbCCLIMKSjSmhmaMQlX", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_YJ9hAq1kQMV5R69nEjbx", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-07-02T09:23:34.095Z", "fingerprint": null, "browser_info": { "language": "en-GB", "time_zone": -330, "ip_address": "208.127.127.193", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0", "color_depth": 24, "java_enabled": true, "screen_width": 1280, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 720, "java_script_enabled": true }, "payment_method_id": null, "payment_method_status": null, "updated": "2025-07-02T09:08:37.410Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null } ``` 2. Payments Create - Cards (3DS) cURL : ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_0CBr33MgzjRaqH4yI6Y6DGxzptpf3M54jmkfo3lEk4hHuQ3k1QNvtqZOh7ULkhRY' \ --header 'Cookie: PHPSESSID=0b47db9d7de94c37b6b272087a9f2fa7' \ --data-raw '{ "amount": 700, "all_keys_required": true, "currency": "EUR", "connector": ["cybersource"], "confirm": true, "payment_link": false, "capture_on": "2029-09-10T10:11:12Z", "amount_to_capture": 700, "name": "John Doe", "email": "dg@example.com", "phone": "999999999", "phone_country_code": "+1", "description": "Its my first payment request", "authentication_type": "three_ds", "return_url": "https://google.com", "payment_method_data": { "card": { "card_number": "4111111111111111", "card_exp_month": "03", "card_exp_year": "2030", "card_holder_name": "joseph Doe", "card_cvc": "737", "card_network": "VISA" }, "billing": { "address": { "line1": "1467", "line2": "CA", "city": "Thise", "state": "Alsace", "zip": "94122", "country": "FR", "first_name": "Henry", "last_name": "Henry" }, "email": "dg@example.com" } }, "payment_method": "card", "payment_method_type": "credit", "browser_info": { "color_depth": 24, "java_enabled": true, "java_script_enabled": true, "language": "en-GB", "screen_height": 720, "screen_width": 1280, "time_zone": -330, "ip_address": "208.127.127.193", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0" }, "metadata": { "disable_avs": true, "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" }, "order_details": [ { "product_name": "Tea", "quantity": 1, "amount": 110, "product_img_link": "https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg" }, { "product_name": "Tea", "quantity": 1, "amount": 110, "product_img_link": "https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg" }, { "product_name": "Tea", "quantity": 1, "amount": 110, "product_img_link": "https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg" } ] }' ``` Response: ``` { "payment_id": "pay_3S7sbyK7jVYKhebf46st", "merchant_id": "merchant_1751445775", "status": "requires_customer_action", "amount": 700, "net_amount": 700, "shipping_cost": null, "amount_capturable": 700, "amount_received": null, "connector": "cybersource", "client_secret": "pay_3S7sbyK7jVYKhebf46st_secret_sQTGhIQOjbSSsm6pvrsX", "created": "2025-07-02T10:15:06.478Z", "currency": "EUR", "customer_id": null, "customer": { "id": null, "name": "John Doe", "email": "dg@example.com", "phone": "999999999", "phone_country_code": "+1" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": 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": "joseph Doe", "payment_checks": null, "authentication_data": null }, "billing": { "address": { "city": "Thise", "country": "FR", "line1": "1467", "line2": "CA", "line3": null, "zip": "94122", "state": "Alsace", "first_name": "Henry", "last_name": "Henry" }, "phone": null, "email": "dg@example.com" } }, "payment_token": "token_gG1QXJu61AKGMj6hm8VE", "shipping": null, "billing": null, "order_details": [ { "brand": null, "amount": 110, "category": null, "quantity": 1, "tax_rate": null, "product_id": null, "product_name": "Tea", "product_type": null, "sub_category": null, "product_img_link": "https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg", "product_tax_code": null, "total_tax_amount": null, "requires_shipping": null }, { "brand": null, "amount": 110, "category": null, "quantity": 1, "tax_rate": null, "product_id": null, "product_name": "Tea", "product_type": null, "sub_category": null, "product_img_link": "https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg", "product_tax_code": null, "total_tax_amount": null, "requires_shipping": null }, { "brand": null, "amount": 110, "category": null, "quantity": 1, "tax_rate": null, "product_id": null, "product_name": "Tea", "product_type": null, "sub_category": null, "product_img_link": "https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg", "product_tax_code": null, "total_tax_amount": null, "requires_shipping": null } ], "email": null, "name": null, "phone": null, "return_url": "https://google.com/", "authentication_type": "three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": { "type": "redirect_to_url", "redirect_to_url": "http://localhost:8080/payments/redirect/pay_3S7sbyK7jVYKhebf46st/merchant_1751445775/pay_3S7sbyK7jVYKhebf46st_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": null, "manual_retry_allowed": null, "connector_transaction_id": null, "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2019-09-10T10:11:12Z", "disable_avs": true, "new_customer": "true" }, "connector_metadata": null, "feature_metadata": null, "reference_id": "pay_3S7sbyK7jVYKhebf46st_1", "payment_link": null, "profile_id": "pro_1FbCCLIMKSjSmhmaMQlX", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_YJ9hAq1kQMV5R69nEjbx", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-07-02T10:30:06.478Z", "fingerprint": null, "browser_info": { "language": "en-GB", "time_zone": -330, "ip_address": "208.127.127.193", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0", "color_depth": 24, "java_enabled": true, "screen_width": 1280, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 720, "java_script_enabled": true }, "payment_method_id": null, "payment_method_status": null, "updated": "2025-07-02T10:15:08.432Z", "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": "{\"clientReferenceInformation\":{\"code\":\"pay_3S7sbyK7jVYKhebf46st_1\"},\"consumerAuthenticationInformation\":{\"accessToken\":\"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIyYmY2ZDAxMi1iZmFlLTQyNDktOTk3NC02MDIzOTRjMjQwMTgiLCJpYXQiOjE3NTE0NTEzMDgsImlzcyI6IjVkZDgzYmYwMGU0MjNkMTQ5OGRjYmFjYSIsImV4cCI6MTc1MTQ1NDkwOCwiT3JnVW5pdElkIjoiNjU1MmIzMGEwOTE4ZTE1MzYwNDc3ODI3IiwiUmVmZXJlbmNlSWQiOiI0NzFkZTVlNy00ZjllLTRjNTYtYmMyYi02NmNlMmViMzJkOTEifQ.TW6DK0wgy_j0AcX7ZSh0UdB1u4U75iCWEK7J3pqJxVA\",\"deviceDataCollectionUrl\":\"https://centinelapistag.cardinalcommerce.com/V1/Cruise/Collect\",\"referenceId\":\"471de5e7-4f9e-4c56-bc2b-66ce2eb32d91\",\"token\":\"AxizbwSTl1zRaWWyjoiEABsBT35lpinAAofwyaSZejGB8p2AmAAAlQtd\"},\"id\":\"7514513080806917703812\",\"status\":\"COMPLETED\",\"submitTimeUtc\":\"2025-07-02T10:15:08Z\"}" } ``` PSync : cURL : ``` curl --location 'http://localhost:8080/payments/pay_eVx6DvluTIQV9nMovfQ0?force_sync=true&expand_captures=true&expand_attempts=true' \ --header 'Accept: application/json' \ --header 'api-key: dev_0CBr33MgzjRaqH4yI6Y6DGxzptpf3M54jmkfo3lEk4hHuQ3k1QNvtqZOh7ULkhRY' \ --header 'Cookie: PHPSESSID=0b47db9d7de94c37b6b272087a9f2fa7' ``` Response: ``` { "payment_id": "pay_eVx6DvluTIQV9nMovfQ0", "merchant_id": "merchant_1751445775", "status": "succeeded", "amount": 700, "net_amount": 700, "shipping_cost": null, "amount_capturable": 0, "amount_received": 700, "connector": "cybersource", "client_secret": "pay_eVx6DvluTIQV9nMovfQ0_secret_B00V3JAIxUIrm0Y8M1tn", "created": "2025-07-02T10:09:11.212Z", "currency": "EUR", "customer_id": null, "customer": { "id": null, "name": "John Doe", "email": "dg@example.com", "phone": "999999999", "phone_country_code": "+1" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "attempts": [ { "attempt_id": "pay_eVx6DvluTIQV9nMovfQ0_1", "status": "charged", "amount": 700, "order_tax_amount": null, "currency": "EUR", "connector": "cybersource", "error_message": null, "payment_method": "card", "connector_transaction_id": "7514509619876883203813", "capture_method": null, "authentication_type": "three_ds", "created_at": "2025-07-02T10:09:11.213Z", "modified_at": "2025-07-02T10:09:23.026Z", "cancellation_reason": null, "mandate_id": null, "error_code": null, "payment_token": "token_sc41ktlbdzim67t6PPyr", "connector_metadata": null, "payment_experience": null, "payment_method_type": "credit", "reference_id": "pay_eVx6DvluTIQV9nMovfQ0_1", "unified_code": null, "unified_message": null, "client_source": null, "client_version": null } ], "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": 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": "joseph Doe", "payment_checks": { "avs_response": { "code": "Y", "codeRaw": "Y" }, "card_verification": null }, "authentication_data": null }, "billing": { "address": { "city": "Thise", "country": "FR", "line1": "1467", "line2": "CA", "line3": null, "zip": "94122", "state": "Alsace", "first_name": "Henry", "last_name": "Henry" }, "phone": null, "email": "dg@example.com" } }, "payment_token": "token_sc41ktlbdzim67t6PPyr", "shipping": null, "billing": null, "order_details": [ { "brand": null, "amount": 110, "category": null, "quantity": 1, "tax_rate": null, "product_id": null, "product_name": "Tea", "product_type": null, "sub_category": null, "product_img_link": "https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg", "product_tax_code": null, "total_tax_amount": null, "requires_shipping": null }, { "brand": null, "amount": 110, "category": null, "quantity": 1, "tax_rate": null, "product_id": null, "product_name": "Tea", "product_type": null, "sub_category": null, "product_img_link": "https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg", "product_tax_code": null, "total_tax_amount": null, "requires_shipping": null }, { "brand": null, "amount": 110, "category": null, "quantity": 1, "tax_rate": null, "product_id": null, "product_name": "Tea", "product_type": null, "sub_category": null, "product_img_link": "https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg", "product_tax_code": null, "total_tax_amount": null, "requires_shipping": null } ], "email": null, "name": null, "phone": null, "return_url": "https://google.com/", "authentication_type": "three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "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": "7514509619876883203813", "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2019-09-10T10:11:12Z", "disable_avs": true, "new_customer": "true" }, "connector_metadata": null, "feature_metadata": null, "reference_id": "pay_eVx6DvluTIQV9nMovfQ0_1", "payment_link": null, "profile_id": "pro_1FbCCLIMKSjSmhmaMQlX", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_YJ9hAq1kQMV5R69nEjbx", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-07-02T10:24:11.212Z", "fingerprint": null, "browser_info": { "language": "en-GB", "time_zone": -330, "ip_address": "208.127.127.193", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0", "color_depth": 24, "java_enabled": true, "screen_width": 1280, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 720, "java_script_enabled": true }, "payment_method_id": null, "payment_method_status": null, "updated": "2025-07-02T10:09:23.026Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null } ``` 3. Payments Create - GooglePay cURL: ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_JAMmatXF7VNM8fgezapmgfZIE5FSlvPisx75j8mEuqm0kE4VnFZdMGEhLBCPekd6' \ --header 'Cookie: PHPSESSID=0b47db9d7de94c37b6b272087a9f2fa7' \ --data-raw '{ "amount": 100, "currency": "EUR", "connector": ["cybersource"], "confirm": true, "payment_link": false, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 100, "customer_id": "StripeCustomer", "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+1", "description": "Its my first payment request", "authentication_type": "no_three_ds", "return_url": "https://google.com", "payment_method": "wallet", "payment_method_type": "google_pay", "payment_method_data": { "wallet": { "google_pay": { "description": "Visa •••• 1111", "tokenization_data": { "type": "PAYMENT_GATEWAY", "token": "{\"signature\":\"MEUCIQDQhvIMyvNSQs46o9JXIxytVd+6bcIwD5jU1mXUKiRZhAIgZCax0GeGpgPPnXDiklUamrSm9xIoCOtEGps4lEVVMfw\\u003d\",\"protocolVersion\":\"ECv1\",\"signedMessage\":\"{\\\"encryptedMessage\\\":\\\"bDx3u5NQf0Ubsl9NAyvfUi85Id7xRJogaTCMRZQOnkwD9G+bpg0UF68is8+I31ZYB1cUvn/CJb8y9Os5dDEwKf+nPaPhfn9inKFJhCnKoCPNa8QhzGSYbSzTAcV/hhaI+ki9NaoMwbWAXtNduLQ0gmcdhSWQ6G5+B8Q/tNeKOt0jzjlGijWlXhKJJE+Sa/xBV4SWeJBFvoPc2YIAmJVwJlPPnMGrdbzWQ9IyH7ZiQqGVbVqWO4nLXY0IMeBGVnvSHko48XVtK8Z0rEw/GYLB3OI5vYEBic+kFzaOvt9YkpnnGW8oaa+tVGdXi+JwL+GsaavObWRuAoElijKqoN9dAL4rzqn0FQhh0TXtsPuxu6zCsy9kndYfOaPrGk4boR9jvgCPTmaAiWAeR9k0kJjXcun/pB9GlsoJhkk00dSO3y0eBuDvARo\\\\u003d\\\",\\\"ephemeralPublicKey\\\":\\\"BAZatfZVQBO7lmKGEG/aVTxFsEqbq7Lrl4EMSvblvqhH6SghZ4C0k/3PgOK8/M8hPvAI5J9Ixp9LMSuiOeuVkKY\\\\u003d\\\",\\\"tag\\\":\\\"0eaHGyQWU4qmIunldLkdrx8273t3vouY1W+uxcOhEVY\\\\u003d\\\"}\"}" }, "type": "CARD", "info": { "card_network": "VISA", "card_details": "1111" } } } }, "billing": { "address": { "line1": "1467", "line2": "CA", "line3": "CA", "city": "Musterhausen", "state": "California", "zip": "12345", "country": "DE", "first_name": "Max", "last_name": "Mustermann" }, "email": "test@novalnet.de", "phone": { "number": "8056594427", "country_code": "+91" } }, "shipping": { "address": { "line1": "Musterstr", "line2": "CA", "line3": "CA", "city": "Musterhausen", "state": "California", "zip": "94122", "country": "DE", "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, "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: ``` { "payment_id": "pay_bsw3kJyfXOv4paDccXrk", "merchant_id": "merchant_1751453606", "status": "processing", "amount": 100, "net_amount": 100, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": "cybersource", "client_secret": "pay_bsw3kJyfXOv4paDccXrk_secret_RrzXE0UPrdRKtR4nc2N3", "created": "2025-07-02T10:56:15.842Z", "currency": "EUR", "customer_id": "StripeCustomer", "customer": { "id": "StripeCustomer", "name": "John Doe", "email": "guest@example.com", "phone": "999999999", "phone_country_code": "+1" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "wallet", "payment_method_data": { "wallet": { "google_pay": { "last4": "1111", "card_network": "VISA", "type": "CARD" } }, "billing": null }, "payment_token": null, "shipping": { "address": { "city": "Musterhausen", "country": "DE", "line1": "Musterstr", "line2": "CA", "line3": "CA", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "billing": { "address": { "city": "Musterhausen", "country": "DE", "line1": "1467", "line2": "CA", "line3": "CA", "zip": "12345", "state": "California", "first_name": "Max", "last_name": "Mustermann" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "test@novalnet.de" }, "order_details": null, "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "return_url": "https://google.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "google_pay", "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": 1751453775, "expires": 1751457375, "secret": "epk_81bcb3dcfc1f4909bb2aab6990466844" }, "manual_retry_allowed": false, "connector_transaction_id": "7514537773666449003814", "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2019-09-10T10:11:12Z", "new_customer": "true" }, "connector_metadata": null, "feature_metadata": null, "reference_id": "7514537773666449003814", "payment_link": null, "profile_id": "pro_NRhRxj7ZaBOkzqcNbCjf", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_kEAotiJ5vlMWqEYUsPp8", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-07-02T11:11:15.842Z", "fingerprint": null, "browser_info": { "language": "nl-NL", "time_zone": 0, "ip_address": "103.77.139.95", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "color_depth": 24, "java_enabled": true, "screen_width": 1536, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,/;q=0.8", "screen_height": 723, "java_script_enabled": true }, "payment_method_id": null, "payment_method_status": null, "updated": "2025-07-02T10:56:17.858Z", "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 } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs` **Code Patterns Applied:** - Extend existing types with new fields (8 changes) - Add conditional logic for feature flags or filtering (5 changes) **Detailed Identifier Changes:** Commit 721f780c: Files to modify: **crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs** Add: - enum: pub::CybersourceParesStatus
{"pr_number": 8518, "pr_title": "fix(connector): [CYBERSOURCE] Passing pares_status for MasterCard & Visa and transaction_type field", "merged_at": "2025-07-03T07:01:38Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs"]}, "change_types": {"enums_added": 1, "fields_added": 8, "conditionals_added": 5}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
Refactor(core): interpolate success_based_routing config params with their specific values ## 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 interpolate the success_based_routing config params with the specific payment's values: So for now the redis key was something like PaymentMethod:Currency After this change it will be something like Card:USD ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> This is tested locally can't be tested on sbx or integ as it requires access for redis. <img width="1292" alt="Screenshot 2024-11-07 at 5 14 06 PM" src="https://github.com/user-attachments/assets/b5a096ae-3ab7-4e94-9aa0-502b7ab94417"> ## Checklist <!-- Put 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/routing.rs` **2. Core Business Logic** - `crates/router/src/core/errors.rs` - `crates/router/src/core/payments.rs` - `crates/router/src/core/payments/operations/payment_response.rs` - ... and 2 more files **3. Other** - `crates/external_services/src/grpc_client.rs` - `crates/external_services/src/grpc_client/dynamic_routing.rs` **Code Patterns Applied:** - Define new data structures (1 changes) - Implement new functions (3 changes) - Extend existing types with new fields (21 changes) - Add conditional logic for feature flags or filtering (1 changes) **Detailed Identifier Changes:** Commit d9ce42fd: Files to modify: **crates/api_models/src/routing.rs** Modify existing code **crates/external_services/src/grpc_client.rs** Modify existing code **crates/external_services/src/grpc_client/dynamic_routing.rs** Modify existing code **crates/router/src/core/errors.rs** Modify existing code **crates/router/src/core/payments.rs** Modify existing code **crates/router/src/core/payments/operations/payment_response.rs** Modify existing code **crates/router/src/core/payments/routing.rs** Modify existing code **crates/router/src/core/routing/helpers.rs** Modify existing code
{"pr_number": 6448, "pr_title": "Refactor(core): interpolate success_based_routing config params with their specific values", "merged_at": "2024-11-08T13:06:37Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "user", "card"]}, "hierarchy": {"api_models": ["crates/api_models/src/routing.rs"], "core_business": ["crates/router/src/core/errors.rs", "crates/router/src/core/payments.rs", "crates/router/src/core/payments/operations/payment_response.rs", "crates/router/src/core/payments/routing.rs", "crates/router/src/core/routing/helpers.rs"], "other": ["crates/external_services/src/grpc_client.rs", "crates/external_services/src/grpc_client/dynamic_routing.rs"]}, "change_types": {"structs_added": 1, "functions_added": 3, "fields_added": 21, "imports_added": 3, "conditionals_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(router): add connector field to PaymentRevenueRecoveryMetadata and implement schedule_failed_payment ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Dependency updates - [ ] Refactoring - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Added connector field in `PaymentRevenueRecoveryMetadata` and made `insert_execute_pcr_task` function which creates and inserts a process tracker entry for executing a PCR (Payment Control & Reconciliation) workflow. It generates a unique `process_tracker_id`, fetches the schedule time for retrying MIT payments, and validates the presence of a payment_attempt_id. If any step fails, it returns an Internal Server Error. After constructing a `PcrWorkflowTrackingData` object with payment details, it inserts the process tracker entry into the database. If successful, it increments a task metrics counter and returns the inserted entry; otherwise, it returns 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)? --> Testcase 1: create payment connector mca ``` curl --location 'http://localhost:8080/v2/connector-accounts' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'x-merchant-id: cloth_seller_FFzEuYGiJhp3SfL7AXoZ' \ --header 'x-profile-id: pro_upiJkbJOOOTQny6DRwAF' \ --header 'api-key: test_admin' \ --data '{ "connector_type": "payment_processor", "connector_name": "stripe", "connector_account_details": { "auth_type": "HeaderKey", "api_key": "stripe apikey" }, "connector_webhook_details": { "merchant_secret": "" }, "profile_id": "pro_upiJkbJOOOTQny6DRwAF" }' ``` response : ``` { "connector_type": "payment_processor", "connector_name": "stripe", "connector_label": "stripe_business", "id": "mca_LGU3THy8GsYCwNmIY226", "profile_id": "pro_upiJkbJOOOTQny6DRwAF", "connector_account_details": { "auth_type": "HeaderKey", "api_key": "{{*****************}}" }, "payment_methods_enabled": null, "connector_webhook_details": { "merchant_secret": "", "additional_secret": null }, "metadata": null, "disabled": false, "frm_configs": null, "applepay_verified_domains": null, "pm_auth_config": null, "status": "active", "additional_merchant_data": null, "connector_wallets_details": null, "feature_metadata": null } ``` get the payment connector mca and create billing connector mca Create billing connector mca:- ``` curl --location 'http://localhost:8080/v2/connector-accounts' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'x-merchant-id: cloth_seller_43a1PFUTB0Ga8Fk4pMfy' \ --header 'x-profile-id: pro_upiJkbJOOOTQny6DRwAF' \ --header 'api-key: test_admin' \ --data '{ "connector_type": "billing_processor", "connector_name": "chargebee", "connector_account_details": { "auth_type": "HeaderKey", "api_key": "{{connector_api_key}}" }, "connector_webhook_details": { "merchant_secret": "chargebee", "additional_secret" : "password" }, "profile_id": "pro_upiJkbJOOOTQny6DRwAF", "feature_metadata" : { "revenue_recovery" : { "max_retry_count" : 27, "billing_connector_retry_threshold" : 16, "billing_account_reference" :{ "mca_LGU3THy8GsYCwNmIY226" : "gw_17BlyOUaPA0eq12MZ" } } } }' ``` response:- ``` { "connector_type": "billing_processor", "connector_name": "chargebee", "connector_label": "chargebee_business", "id": "mca_JbxRy7MozRPhluRWOcWs", "profile_id": "pro_U7N6Id4cHXirpSZfTG08", "connector_account_details": { "auth_type": "HeaderKey", "api_key": "{{*****************}}" }, "payment_methods_enabled": null, "connector_webhook_details": { "merchant_secret": "chargebee", "additional_secret": "password" }, "metadata": null, "disabled": false, "frm_configs": null, "applepay_verified_domains": null, "pm_auth_config": null, "status": "active", "additional_merchant_data": null, "connector_wallets_details": null, "feature_metadata": { "revenue_recovery": { "max_retry_count": 27, "billing_connector_retry_threshold": 16, "billing_account_reference": { "mca_B16pBbm16yn5Ud2pnOQx": "gw_16BlyOUaPA0eq12MZ" } } } } ``` Send chargebee simulated webhook either from dashboard or postman request : ``` curl --location 'http://localhost:8080/v2/webhooks/cloth_seller_nIw80EwT6E01JF4OC7SQ/pro_U7N6Id4cHXirpSZfTG08/mca_JbxRy7MozRPhluRWOcWs' \ --header 'Content-Type: application/json' \ --header 'Authorization: ••••••' \ --data-raw '{ "id": "ev_169vy3UaPFn4L4mf", "occurred_at": 1737361021, "source": "admin_console", "user": "ns22eem1r18@student.nitw.ac.in", "object": "event", "api_version": "v2", "content": { "transaction": { "id": "txn_169vy3UaPFmC44me", "customer_id": "Azq8o5UaLqWWvyGd", "subscription_id": "Azq8o5UaLr2WnyHG", "gateway_account_id": "gw_16BlyOUaPA0eq12MZ", "payment_source_id": "pm_169vy3UaPDo0t4hL", "payment_method": "card", "gateway": "stripe", "type": "payment", "date": 1737361019, "exchange_rate": 1, "amount": 5, "id_at_gateway": "ch_3QjGAJSHworDX2hs0B120C0A", "status": "failure", "updated_at": 1737361021, "fraud_reason": "Payment complete.", "resource_version": 1737361021397, "deleted": false, "object": "transaction", "masked_card_number": "************4242", "currency_code": "INR", "base_currency_code": "INR", "amount_unused": 0, "linked_invoices": [ { "invoice_id": "9", "applied_amount": 500000, "applied_at": 1737361021, "invoice_date": 1737361018, "invoice_total": 500000, "invoice_status": "paid" } ], "linked_refunds": [], "initiator_type": "merchant", "three_d_secure": false, "payment_method_details": "{\"card\":{\"first_name\":\"test2\",\"last_name\":\"name2\",\"iin\":\"424242\",\"last4\":\"4242\",\"funding_type\":\"credit\",\"expiry_month\":12,\"expiry_year\":2026,\"billing_addr1\":\"asdf\",\"billing_addr2\":\"asd\",\"billing_city\":\"asdf\",\"billing_state\":\"asdfaf\",\"billing_country\":\"AF\",\"billing_zip\":\"12345\",\"masked_number\":\"************4242\",\"object\":\"card\",\"brand\":\"visa\"}}" }, "invoice": { "id": "invoice_1234", "customer_id": "Azq8o5UaLqWWvyGd", "subscription_id": "Azq8o5UaLr2WnyHG", "recurring": false, "status": "paid", "price_type": "tax_exclusive", "date": 1737361018, "due_date": 1737361018, "net_term_days": 0, "exchange_rate": 1, "total": 5, "amount_paid": 0, "amount_adjusted": 0, "write_off_amount": 0, "credits_applied": 0, "amount_due": 0, "paid_at": 1737361019, "updated_at": 1737361021, "resource_version": 1737361021401, "deleted": false, "object": "invoice", "first_invoice": false, "amount_to_collect": 0, "round_off_amount": 0, "has_advance_charges": false, "currency_code": "INR", "base_currency_code": "INR", "generated_at": 1737361018, "is_gifted": false, "term_finalized": true, "channel": "web", "tax": 0, "line_items": [ { "id": "li_169vy3UaPFmBR4md", "date_from": 1737361004, "date_to": 1737361004, "unit_amount": 500000, "quantity": 1, "amount": 500000, "pricing_model": "flat_fee", "is_taxed": false, "tax_amount": 0, "object": "line_item", "subscription_id": "Azq8o5UaLr2WnyHG", "customer_id": "Azq8o5UaLqWWvyGd", "description": "Implementation Charge", "entity_type": "charge_item_price", "entity_id": "cbdemo_implementation-charge-INR", "tax_exempt_reason": "tax_not_configured", "discount_amount": 0, "item_level_discount_amount": 0 } ], "sub_total": 500000, "linked_payments": [ { "txn_id": "txn_169vy3UaPFmC44me", "applied_amount": 500000, "applied_at": 1737361021, "txn_status": "success", "txn_date": 1737361019, "txn_amount": 500000 } ], "applied_credits": [], "adjustment_credit_notes": [], "issued_credit_notes": [], "linked_orders": [], "dunning_attempts": [], "billing_address": { "first_name": "test1", "last_name": "name", "email": "johndoe@gmail.com", "company": "johndoe", "phone": "+91 83 17 575848", "line1": "asdf", "line2": "asd", "line3": "ahjkd", "city": "asdf", "state_code": "TG", "state": "Telangana", "country": "IN", "zip": "561432", "validation_status": "not_validated", "object": "billing_address" }, "site_details_at_creation": { "timezone": "Asia/Calcutta" } }, "customer": { "id": "Azq8o5UaLqWWvyGd", "first_name": "john", "last_name": "doe", "email": "john@gmail.com", "phone": "831 757 5848", "company": "johndoe", "auto_collection": "on", "net_term_days": 0, "allow_direct_debit": false, "created_at": 1737310670, "created_from_ip": "205.254.163.189", "taxability": "taxable", "updated_at": 1737360899, "pii_cleared": "active", "channel": "web", "resource_version": 1737360899990, "deleted": false, "object": "customer", "billing_address": { "first_name": "test1", "last_name": "name", "email": "johndoe@gmail.com", "company": "johndoe", "phone": "+91 83 17 575848", "line1": "asdf", "line2": "asd", "line3": "ahjkd", "city": "asdf", "state_code": "TG", "state": "Telangana", "country": "IN", "zip": "561432", "validation_status": "not_validated", "object": "billing_address" }, "card_status": "valid", "promotional_credits": 0, "refundable_credits": 0, "excess_payments": 0, "unbilled_charges": 0, "preferred_currency_code": "INR", "mrr": 0, "primary_payment_source_id": "pm_169vy3UaPDo0t4hL", "payment_method": { "object": "payment_method", "type": "card", "reference_id": "cus_RcUo8xTwe0sHP7/card_1QjG2dSHworDX2hs6YIjKdML", "gateway": "stripe", "gateway_account_id": "gw_16BlyOUaPA0eq12MZ", "status": "valid" } }, "subscription": { "id": "Azq8o5UaLr2WnyHG", "billing_period": 1, "billing_period_unit": "month", "customer_id": "Azq8o5UaLqWWvyGd", "status": "active", "current_term_start": 1737310793, "current_term_end": 1739989193, "next_billing_at": 1739989193, "created_at": 1737310793, "started_at": 1737310793, "activated_at": 1737310793, "created_from_ip": "205.254.163.189", "updated_at": 1737310799, "has_scheduled_changes": false, "channel": "web", "resource_version": 1737310799688, "deleted": false, "object": "subscription", "currency_code": "INR", "subscription_items": [ { "item_price_id": "cbdemo_premium-INR-monthly", "item_type": "plan", "quantity": 1, "unit_price": 100000, "amount": 0, "free_quantity": 3, "object": "subscription_item" } ], "shipping_address": { "first_name": "test1", "last_name": "name", "email": "johndoe@gmail.com", "company": "johndoe", "phone": "+91 83 17 575848", "line1": "asdf", "line2": "asd", "line3": "ahjkd", "city": "asdf", "state_code": "TG", "state": "Telangana", "country": "IN", "zip": "561432", "validation_status": "not_validated", "object": "shipping_address" }, "due_invoices_count": 0, "mrr": 0, "exchange_rate": 1, "base_currency_code": "INR", "has_scheduled_advance_invoices": false } }, "event_type": "payment_failed", "webhook_status": "scheduled", "webhooks": [ { "id": "whv2_6oZfZUaLmtchA5Bl", "webhook_status": "scheduled", "object": "webhook" } ] }' ``` Response:- 200 OK (Postman) This should create Payment intent, payment attempt in our system with right values in DB Payment intent details in DB <img width="1199" alt="Screenshot 2025-03-10 at 14 08 56" src="https://github.com/user-attachments/assets/baa26e0f-dd6b-42bb-90d8-2f0ce6a1aab7" /> Payment attempt details in DB <img width="1138" alt="Screenshot 2025-03-10 at 14 09 53" src="https://github.com/user-attachments/assets/101f79e1-67a8-4aad-b8f7-dd20c565bfcc" /> Test case 2 : change the transaction id in above simulated webhooks and hit the request again, it should create new payment attempt but update the payment intent feature metadata. <img width="1177" alt="Screenshot 2025-03-10 at 14 26 53" src="https://github.com/user-attachments/assets/29873c6d-79b8-43b4-8ec8-fec1bb755d8f" /> Scheduling to failed payments in log(schedule_time: Some(2025-03-10 8:46:43.815835)):- <img width="858" alt="Screenshot 2025-03-10 at 14 52 45" src="https://github.com/user-attachments/assets/c9b7f9b2-41c3-44f7-9249-a34747fe0b28" /> ## Checklist <!-- Put 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/process_tracker.rs` - `crates/diesel_models/src/types.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/revenue_recovery.rs` - ... and 1 more files **4. Core Business Logic** - `crates/router/src/core/api_keys.rs` - `crates/router/src/core/errors.rs` - `crates/router/src/core/passive_churn_recovery.rs` - ... and 8 more files **Code Patterns Applied:** - Implement new functions (3 changes) - Extend existing types with new fields (20 changes) - Add conditional logic for feature flags or filtering (2 changes) **Detailed Identifier Changes:** Commit aa337eee: Files to modify: **crates/api_models/src/payments.rs** Add: - function: pub::get_retry_count - impl: impl FeatureMetadata **crates/diesel_models/src/process_tracker.rs** Modify existing code **crates/diesel_models/src/types.rs** Modify existing code **crates/hyperswitch_domain_models/src/lib.rs** Modify existing code **crates/hyperswitch_domain_models/src/payments.rs** Remove: - function: pub::set_payment_connector_transmission **crates/hyperswitch_domain_models/src/revenue_recovery.rs** Modify existing code **crates/hyperswitch_domain_models/src/router_data.rs** Modify existing code **crates/router/src/core/api_keys.rs** Modify existing code **crates/router/src/core/errors.rs** Modify existing code **crates/router/src/core/passive_churn_recovery.rs** Modify existing code **crates/router/src/core/payment_methods.rs** Modify existing code **crates/router/src/core/payment_methods/vault.rs** Modify existing code **crates/router/src/core/payments.rs** Modify existing code **crates/router/src/core/payments/operations/proxy_payments_intent.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/core/webhooks/outgoing.rs** Modify existing code **crates/router/src/core/webhooks/recovery_incoming.rs** Add: - function: private::insert_execute_pcr_task
{"pr_number": 7462, "pr_title": "feat(router): add connector field to PaymentRevenueRecoveryMetadata and implement schedule_failed_payment ", "merged_at": "2025-03-13T10:04: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/process_tracker.rs", "crates/diesel_models/src/types.rs"], "domain": ["crates/hyperswitch_domain_models/src/lib.rs", "crates/hyperswitch_domain_models/src/payments.rs", "crates/hyperswitch_domain_models/src/revenue_recovery.rs", "crates/hyperswitch_domain_models/src/router_data.rs"], "core_business": ["crates/router/src/core/api_keys.rs", "crates/router/src/core/errors.rs", "crates/router/src/core/passive_churn_recovery.rs", "crates/router/src/core/payment_methods.rs", "crates/router/src/core/payment_methods/vault.rs", "crates/router/src/core/payments.rs", "crates/router/src/core/payments/operations/proxy_payments_intent.rs", "crates/router/src/core/payouts.rs", "crates/router/src/core/refunds.rs", "crates/router/src/core/webhooks/outgoing.rs", "crates/router/src/core/webhooks/recovery_incoming.rs"]}, "change_types": {"functions_added": 3, "fields_added": 20, "imports_added": 4, "conditionals_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(nuvei): add mandate support for integ,prod,and sbx for googlepay applepay ## 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 apple_pay and google_pay mandate support for nuvei in integ,sbx and prod ( updation of config files) Parent pr : https://github.com/juspay/hyperswitch/pull/9081 Refer test cases with above pr ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test 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** - `config/deployments/integration_test.toml` **2. Configuration Files** - `config/deployments/production.toml` - `config/deployments/sandbox.toml` - `config/docker_compose.toml`
{"pr_number": 9256, "pr_title": "feat(nuvei): add mandate support for integ,prod,and sbx for googlepay applepay", "merged_at": "2025-09-03T12:35:52Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"tests": ["config/deployments/integration_test.toml"], "config": ["config/deployments/production.toml", "config/deployments/sandbox.toml", "config/docker_compose.toml"]}, "change_types": {}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
fix(router): change click_to_pay const to snake_case and remove camel_case serde rename for clicktopay metadata ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> change click_to_pay const to snake_case and remove camel_case serde rename for clicktopay metadata ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Tested Manually ``` curl --location 'localhost:8080/payments/session_tokens' \ --header 'Content-Type: application/json' \ --header 'api-key: pk_dev_1d6e3c969ee44dc1877257462954b31e' \ --data '{ "payment_id": "pay_Xquzo6fvqyN2uWBcXBKK", "client_secret": "pay_Xquzo6fvqyN2uWBcXBKK_secret_gXvcFn55sgVFHTOc678K", "wallets": [] }' ``` Response ``` { "payment_id": "pay_Xquzo6fvqyN2uWBcXBKK", "client_secret": "pay_Xquzo6fvqyN2uWBcXBKK_secret_gXvcFn55sgVFHTOc678K", "session_token": [ { "wallet_name": "google_pay", "merchant_info": { "merchant_name": "Narayan Bhat" }, "shipping_address_required": false, "email_required": false, "shipping_address_parameters": { "phone_number_required": false }, "allowed_payment_methods": [ { "type": "CARD", "parameters": { "allowed_auth_methods": [ "PAN_ONLY", "CRYPTOGRAM_3DS" ], "allowed_card_networks": [ "AMEX", "DISCOVER", "INTERAC", "JCB", "MASTERCARD", "VISA" ], "billing_address_required": false }, "tokenization_specification": { "type": "PAYMENT_GATEWAY", "parameters": { "gateway": "example", "gateway_merchant_id": "pk_test_51Msk2GAGHc77EJXX78h549SX2uaOnEkUYqBfjcoD05PIpAnDkYxMn8nQ4d19im85NQuX4Z6WDyHaUw2fFTPBWsIY00Wa7oNerO" } } } ], "transaction_info": { "country_code": "US", "currency_code": "GBP", "total_price_status": "Final", "total_price": "10.40" }, "delayed_session_token": false, "connector": "adyen", "sdk_next_action": { "next_action": "confirm" }, "secrets": null }, { "wallet_name": "click_to_pay", "dpa_id": "b6e06cc6-3018-4c4c-bbf5-9fb232615090", "dpa_name": "TestMerchant", "locale": "en_AU", "card_brands": [ "mastercard", "visa" ], "acquirer_bin": "545301", "acquirer_merchant_id": "SRC3DS", "merchant_category_code": "0001", "merchant_country_code": "US", "transaction_amount": "10.40", "transaction_currency_code": "GBP" } ] } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/payments.rs` **2. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/payments.rs` **3. Other** - `api-reference-v2/openapi_spec.json` - `api-reference/openapi_spec.json` - `crates/router/src/consts.rs` **Detailed Identifier Changes:** Commit 3d4fd2f7: Files to modify: **crates/api_models/src/payments.rs** Modify existing code **crates/hyperswitch_domain_models/src/payments.rs** Modify existing code **crates/router/src/consts.rs** Modify existing code
{"pr_number": 6852, "pr_title": "fix(router): change click_to_pay const to snake_case and remove camel_case serde rename for clicktopay metadata", "merged_at": "2024-12-16T14:27:33Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "merchant", "connector"]}, "hierarchy": {"api_models": ["crates/api_models/src/payments.rs"], "domain": ["crates/hyperswitch_domain_models/src/payments.rs"], "other": ["api-reference-v2/openapi_spec.json", "api-reference/openapi_spec.json", "crates/router/src/consts.rs"]}, "change_types": {}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
chore: address Rust 1.86.0 clippy lints ## Type of Change - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This PR addresses the clippy lints occurring due to new rust version 1.86.0 https://rust-lang.github.io/rust-clippy/master/index.html ### 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)? --> CI checks should pass as this PR addresses clippy lints. 1. ran `rustc --version` ![image](https://github.com/user-attachments/assets/b154032b-dff4-4582-b525-9b97ce83ce55) 3. ran `just clippy` with new rust version (1.86.0) <img width="1004" alt="Screenshot 2025-04-07 at 5 46 05 PM" src="https://github.com/user-attachments/assets/5951c74e-8f3d-44e2-8172-e376c01c2e9d" /> 4. ran `just clippy_v2` with new rust version (1.86.0) <img width="1019" alt="Screenshot 2025-04-07 at 5 46 38 PM" src="https://github.com/user-attachments/assets/ecdf5c2a-dc31-45b4-be01-cedc041cf59d" /> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **connector_integration** feature, you'll need to modify these architectural layers: **1. Core Business Logic** - `crates/router/src/core/errors/utils.rs` **2. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/bluesnap.rs` - `crates/hyperswitch_connectors/src/connectors/bluesnap/transformers.rs` - `crates/hyperswitch_connectors/src/connectors/chargebee/transformers.rs` - ... and 12 more files **3. Type Definitions** - `crates/common_utils/src/types.rs` **4. Utils** - `crates/common_utils/src/validation.rs` **5. Other** - `crates/euclid/src/backend/vir_interpreter.rs` - `crates/router/src/events/audit_events.rs` **Code Patterns Applied:** - Extend existing types with new fields (1 changes) - Add conditional logic for feature flags or filtering (1 changes) **Detailed Identifier Changes:** Commit 2123f63b: Files to modify: **crates/common_utils/src/types.rs** Modify existing code **crates/common_utils/src/validation.rs** Modify existing code **crates/euclid/src/backend/vir_interpreter.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/bluesnap.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/bluesnap/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/chargebee/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/checkout/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/cryptopay/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/forte/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/noon/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/paypal.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/square/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/volt.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/worldpay.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/zen/transformers.rs** Modify existing code **crates/router/src/connector/netcetera/netcetera_types.rs** Modify existing code **crates/router/src/connector/netcetera/transformers.rs** Modify existing code **crates/router/src/core/errors/utils.rs** Modify existing code **crates/router/src/events/audit_events.rs** Modify existing code **crates/router/tests/connectors/cashtocode.rs** Modify existing code
{"pr_number": 7735, "pr_title": "chore: address Rust 1.86.0 clippy lints", "merged_at": "2025-04-11T12:07:07Z", "intent": {"feature_type": "connector_integration", "action": "add_feature", "entities": ["user"]}, "hierarchy": {"core_business": ["crates/router/src/core/errors/utils.rs"], "connectors": ["crates/hyperswitch_connectors/src/connectors/bluesnap.rs", "crates/hyperswitch_connectors/src/connectors/bluesnap/transformers.rs", "crates/hyperswitch_connectors/src/connectors/chargebee/transformers.rs", "crates/hyperswitch_connectors/src/connectors/checkout/transformers.rs", "crates/hyperswitch_connectors/src/connectors/cryptopay/transformers.rs", "crates/hyperswitch_connectors/src/connectors/forte/transformers.rs", "crates/hyperswitch_connectors/src/connectors/noon/transformers.rs", "crates/hyperswitch_connectors/src/connectors/paypal.rs", "crates/hyperswitch_connectors/src/connectors/square/transformers.rs", "crates/hyperswitch_connectors/src/connectors/volt.rs", "crates/hyperswitch_connectors/src/connectors/worldpay.rs", "crates/hyperswitch_connectors/src/connectors/zen/transformers.rs", "crates/router/src/connector/netcetera/netcetera_types.rs", "crates/router/src/connector/netcetera/transformers.rs", "crates/router/tests/connectors/cashtocode.rs"], "types": ["crates/common_utils/src/types.rs"], "utils": ["crates/common_utils/src/validation.rs"], "other": ["crates/euclid/src/backend/vir_interpreter.rs", "crates/router/src/events/audit_events.rs"]}, "change_types": {"fields_added": 1, "conditionals_added": 1}, "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. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> **Postman Tests** **1. Payments Create - Auto Capture (3DS)** -Request ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_BSEa5RAml7T8rN9KiiXvH0ezVnTtBVT0r1ohojFYl8mHJQtpy0BHiuHJbUJdEUIs' \ --data-raw '{ "amount": 2500, "currency": "USD", "confirm": true, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 2500, "customer_id": "abcdef", "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment request", "authentication_type": "three_ds", "return_url": "https://duck.com", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "5200000000001096", "card_exp_month": "10", "card_exp_year": "25", "card_holder_name": "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": "9123456789", "country_code": "+91" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "9123456789", "country_code": "+91" } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } }' ``` -Response ``` { "payment_id": "pay_f04oP2zHI4vsRmD9Z7vW", "merchant_id": "postman_merchant_GHAction_d1487ded-b209-4a40-89e8-f33317fe0b51", "status": "requires_customer_action", "amount": 2500, "net_amount": 2500, "shipping_cost": null, "amount_capturable": 2500, "amount_received": null, "connector": "braintree", "client_secret": "pay_f04oP2zHI4vsRmD9Z7vW_secret_0HolQBPjusYCZlOpLmxq", "created": "2025-03-06T11:43:47.443Z", "currency": "USD", "customer_id": "abcdef", "customer": { "id": "abcdef", "name": "John Doe", "email": "guest@example.com", "phone": "999999999", "phone_country_code": "+65" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "1096", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "520000", "card_extended_bin": null, "card_exp_month": "10", "card_exp_year": "25", "card_holder_name": "joseph Doe", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "9123456789", "country_code": "+91" }, "email": null }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "9123456789", "country_code": "+91" }, "email": null }, "order_details": null, "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "return_url": "https://duck.com/", "authentication_type": "three_ds", "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "next_action": { "type": "redirect_to_url", "redirect_to_url": "http://localhost:8080/payments/redirect/pay_f04oP2zHI4vsRmD9Z7vW/postman_merchant_GHAction_d1487ded-b209-4a40-89e8-f33317fe0b51/pay_f04oP2zHI4vsRmD9Z7vW_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": "abcdef", "created_at": 1741261427, "expires": 1741265027, "secret": "epk_9656a4b1e7a84673a582d23a3a1a14c8" }, "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_4XYp22wx6Z0bXFMfgO5a", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_q8VvI2YuW5yH99i45UH4", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-03-06T11:58:47.443Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2025-03-06T11:43:49.627Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": "manual" } ``` **2. PSync (After redirection)** -Request ``` curl --location 'http://localhost:8080/payments/pay_f04oP2zHI4vsRmD9Z7vW' \ --header 'Accept: application/json' \ --header 'api-key: dev_BSEa5RAml7T8rN9KiiXvH0ezVnTtBVT0r1ohojFYl8mHJQtpy0BHiuHJbUJdEUIs' ``` -Response ``` { "payment_id": "pay_f04oP2zHI4vsRmD9Z7vW", "merchant_id": "postman_merchant_GHAction_d1487ded-b209-4a40-89e8-f33317fe0b51", "status": "processing", "amount": 2500, "net_amount": 2500, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": "braintree", "client_secret": "pay_f04oP2zHI4vsRmD9Z7vW_secret_0HolQBPjusYCZlOpLmxq", "created": "2025-03-06T11:43:47.443Z", "currency": "USD", "customer_id": "abcdef", "customer": { "id": "abcdef", "name": "John Doe", "email": "guest@example.com", "phone": "999999999", "phone_country_code": "+65" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "1096", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "520000", "card_extended_bin": null, "card_exp_month": "10", "card_exp_year": "25", "card_holder_name": "joseph Doe", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "9123456789", "country_code": "+91" }, "email": null }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "9123456789", "country_code": "+91" }, "email": null }, "order_details": null, "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "return_url": "https://duck.com/", "authentication_type": "three_ds", "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "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": "dHJhbnNhY3Rpb25fNGF2bXZidDE", "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_4XYp22wx6Z0bXFMfgO5a", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_q8VvI2YuW5yH99i45UH4", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-03-06T11:58:47.443Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2025-03-06T11:47:12.220Z", "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" } ``` **3. CIT (3DS)** -Request ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_BSEa5RAml7T8rN9KiiXvH0ezVnTtBVT0r1ohojFYl8mHJQtpy0BHiuHJbUJdEUIs' \ --data-raw '{ "amount": 1650, "currency": "USD", "confirm": true, "customer_id": "customer123", "setup_future_usage": "off_session", "authentication_type": "three_ds", "payment_method_type": "debit", "payment_method": "card", "payment_method_data": { "card": { "card_number": "5200000000001096", "card_exp_month": "03", "card_exp_year": "30", "card_holder_name": "joseph Doe", "card_cvc": "737" } }, "billing": { "address": { "first_name": "joseph", "last_name": "Doe" } }, "email": "something@example.com", "customer_acceptance": { "acceptance_type": "offline" } }' ``` -Response ``` { "payment_id": "pay_FAC8CNJ73Wye9zW3JCOD", "merchant_id": "postman_merchant_GHAction_d1487ded-b209-4a40-89e8-f33317fe0b51", "status": "requires_customer_action", "amount": 1650, "net_amount": 1650, "shipping_cost": null, "amount_capturable": 1650, "amount_received": null, "connector": "braintree", "client_secret": "pay_FAC8CNJ73Wye9zW3JCOD_secret_qHM0kXPyH0Wh2yXU817x", "created": "2025-03-06T11:51:36.654Z", "currency": "USD", "customer_id": "customer123", "customer": { "id": "customer123", "name": null, "email": "something@example.com", "phone": null, "phone_country_code": null }, "description": null, "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "off_session", "off_session": null, "capture_on": null, "capture_method": null, "payment_method": "card", "payment_method_data": { "card": { "last4": "1096", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "520000", "card_extended_bin": null, "card_exp_month": "03", "card_exp_year": "30", "card_holder_name": "joseph Doe", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": { "city": null, "country": null, "line1": null, "line2": null, "line3": null, "zip": null, "state": null, "first_name": "joseph", "last_name": "Doe" }, "phone": null, "email": null }, "order_details": null, "email": "something@example.com", "name": null, "phone": null, "return_url": null, "authentication_type": "three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": { "type": "redirect_to_url", "redirect_to_url": "http://localhost:8080/payments/redirect/pay_FAC8CNJ73Wye9zW3JCOD/postman_merchant_GHAction_d1487ded-b209-4a40-89e8-f33317fe0b51/pay_FAC8CNJ73Wye9zW3JCOD_1" }, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "debit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "customer123", "created_at": 1741261896, "expires": 1741265496, "secret": "epk_1140443cdda04b60b173df5e8a07df00" }, "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_4XYp22wx6Z0bXFMfgO5a", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_q8VvI2YuW5yH99i45UH4", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-03-06T12:06:36.654Z", "fingerprint": null, "browser_info": null, "payment_method_id": "pm_hSPBtrM3LGVMlqfSszDV", "payment_method_status": "inactive", "updated": "2025-03-06T11:51:38.652Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": "manual" } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. 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 00d69bd9: 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": 7408, "pr_title": "fix(connector): [Braintree] Consume merchant_account_id and merchant_config_currency in payment requests", "merged_at": "2025-03-05T12:09:19Z", "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"}
feat(connector): [ARCHIPEL] fix Mastercard scheme string for Applepay payments Hotfix for [PR 8450](https://github.com/juspay/hyperswitch/pull/8450) ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/archipel/transformers.rs` **Detailed Identifier Changes:** Commit 639f0ac1: Files to modify: **crates/hyperswitch_connectors/src/connectors/archipel/transformers.rs** Modify existing code
{"pr_number": 8451, "pr_title": "feat(connector): [ARCHIPEL] fix Mastercard scheme string for Applepay payments", "merged_at": "2025-06-24T14:29:45Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/archipel/transformers.rs"]}, "change_types": {}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(wasm): [Worldpayvantiv] add support for metadata.report_group ## 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 change adds support for capturing the reportGroup in the dashboard. Currently, the dashboard does not extract the reportGroup from the metadata. With this update, it will start collecting and displaying the reportGroup field correctly. Hotfix for https://github.com/juspay/hyperswitch/pull/8260 ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ![image (13)](https://github.com/user-attachments/assets/d018f601-8645-47d4-b6b7-fa153268d1f8) ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **connector_integration** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/connector_configs/src/connector.rs` **Code Patterns Applied:** - Extend existing types with new fields (1 changes) **Detailed Identifier Changes:** Commit 9b127d2f: Files to modify: **crates/connector_configs/src/connector.rs** Modify existing code
{"pr_number": 8270, "pr_title": "fix(wasm): [Worldpayvantiv] add support for metadata.report_group", "merged_at": "2025-06-06T08:00:24Z", "intent": {"feature_type": "connector_integration", "action": "add_feature", "entities": ["user"]}, "hierarchy": {"connectors": ["crates/connector_configs/src/connector.rs"]}, "change_types": {"fields_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 This is hot fix for the [PR](https://github.com/juspay/hyperswitch/pull/6446) 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": "something@gmail.com", "name": "Joseph Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment request", "setup_future_usage":"off_session", "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "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": "something@gmail.com", "phone": "999999999", "phone_country_code": "+65" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "off_session", "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "4242", "card_type": 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": "something@gmail.com", "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 a71219c7: Files to modify: **crates/router/src/core/payments/operations/payment_response.rs** Modify existing code
{"pr_number": 6450, "pr_title": "fix(core): fix setup mandate payments to store connector mandate details", "merged_at": "2024-10-28T10:08:40Z", "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(connector): [ADYEN, CHECKOUT] Added In Feature Matrix API ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Added Adyen and Checkout connectors in feature matrix 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? Request cURL : ``` curl --location 'http://localhost:8080/feature_matrix' \ --header 'Cookie: PHPSESSID=0b47db9d7de94c37b6b272087a9f2fa7' ``` Response : Checkout : ``` { "name": "CHECKOUT", "display_name": "Checkout", "description": "Checkout.com is a British multinational financial technology company that processes payments for other companies.", "category": "payment_gateway", "supported_payment_methods": [ { "payment_method": "wallet", "payment_method_type": "google_pay", "payment_method_type_display_name": "Google Pay", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic", "manual_multiple" ], "supported_countries": [ "ROU", "DEU", "SVK", "BEL", "GBR", "POL", "FIN", "HRV", "ARE", "FRA", "AUS", "LTU", "BGR", "CZE", "ESP", "HKG", "IRL", "AUT", "GRC", "LUX", "SGP", "DNK", "CHE", "NOR", "USA", "HUN", "NLD", "PRT", "ITA", "EST", "SAU", "SWE" ], "supported_currencies": [ "MDL", "NIO", "XPF", "EGP", "NPR", "ZAR", "HNL", "AED", "NGN", "FKP", "AZN", "CRC", "SEK", "TJS", "KWD", "KPW", "MYR", "ARS", "SYP", "MRU", "HTG", "MGA", "RWF", "USD", "COP", "ZMW", "BBD", "KRW", "INR", "SSP", "IDR", "BRL", "MKD", "HKD", "ISK", "BYN", "SVC", "XAF", "XCD", "CVE", "JOD", "WST", "TND", "LKR", "BND", "UZS", "PLN", "PHP", "LYD", "BIF", "BMD", "TMT", "BDT", "PGK", "MAD", "CHF", "NZD", "CDF", "KMF", "GEL", "GNF", "DOP", "JPY", "GBP", "KZT", "NAD", "CLF", "CUC", "HRK", "CNY", "GTQ", "SGD", "SOS", "STN", "TRY", "OMR", "LSL", "NOK", "GMD", "TOP", "BAM", "MXN", "CLP", "KGS", "PYG", "ZWL", "MMK", "HUF", "DKK", "MUR", "PKR", "RUB", "AMD", "CAD", "GHS", "THB", "BSD", "ETB", "SDG", "UAH", "UYU", "TWD", "ANG", "XOF", "IRR", "SHP", "KHR", "VND", "JMD", "IQD", "LRD", "CZK", "EUR", "UGX", "VES", "BHD", "PAB", "MVR", "GYD", "ILS", "FJD", "LBP", "AOA", "MWK", "SLL", "SZL", "SAR", "BWP", "SBD", "CUP", "TTD", "BOB", "TZS", "SRD", "KES", "SLE", "PEN", "DZD", "GIP", "LAK", "RON", "BGN", "BTN", "ALL", "KYD", "MNT", "STD", "VUV", "AFN", "ERN", "SCR", "DJF", "AWG", "MOP", "BZD", "YER", "AUD", "MZN", "RSD", "QAR" ] }, { "payment_method": "wallet", "payment_method_type": "apple_pay", "payment_method_type_display_name": "Apple Pay", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic", "manual_multiple" ], "supported_countries": [ "SVK", "ARE", "LUX", "ESP", "ROU", "NOR", "AUT", "LVA", "HKG", "HUN", "FIN", "USA", "EST", "IRL", "LIE", "JOR", "GBR", "MLT", "CZE", "SGP", "CHE", "POL", "DNK", "BEL", "LTU", "PRT", "BGR", "SAU", "DEU", "HRV", "QAT", "ITA", "SVN", "ISL", "CYP", "AUS", "FRA", "KWT", "GRC", "NLD", "SWE" ], "supported_currencies": [ "CNY", "PLN", "THB", "KYD", "CLF", "SEK", "CZK", "SLL", "MUR", "VND", "CUC", "DJF", "TMT", "DOP", "DZD", "HRK", "AUD", "GTQ", "MWK", "GNF", "IQD", "SOS", "CVE", "ILS", "KHR", "JOD", "QAR", "LSL", "BRL", "AWG", "CRC", "AFN", "MNT", "RSD", "HKD", "KRW", "OMR", "STD", "HUF", "CLP", "DKK", "MXN", "MKD", "AED", "JPY", "BZD", "BSD", "GMD", "MRU", "GEL", "TOP", "NOK", "TTD", "GHS", "BMD", "BDT", "IDR", "SVC", "ZAR", "PAB", "BGN", "RWF", "ERN", "AOA", "SLE", "SZL", "BWP", "KWD", "PGK", "SDG", "TRY", "XOF", "MMK", "YER", "GBP", "CHF", "UYU", "VUV", "ISK", "TWD", "RUB", "HTG", "SCR", "XCD", "UGX", "ANG", "FJD", "MDL", "SHP", "LKR", "PKR", "LBP", "KES", "MGA", "BTN", "MZN", "NZD", "KZT", "SBD", "ETB", "FKP", "CUP", "EGP", "ALL", "PHP", "KMF", "EUR", "PEN", "RON", "GYD", "SGD", "SYP", "COP", "NPR", "SAR", "ZWL", "MAD", "PYG", "UAH", "ZMW", "AMD", "KPW", "MYR", "STN", "NIO", "USD", "BIF", "IRR", "CAD", "LRD", "CDF", "LAK", "BAM", "GIP", "SRD", "NGN", "INR", "XPF", "LYD", "BBD", "HNL", "TJS", "ARS", "BND", "SSP", "BOB", "JMD", "MVR", "KGS", "UZS", "NAD", "BYN", "MOP", "TND", "TZS", "AZN", "WST", "XAF", "VES", "BHD" ] }, { "payment_method": "card", "payment_method_type": "credit", "payment_method_type_display_name": "Credit Card", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic", "manual_multiple" ], "three_ds": "supported", "no_three_ds": "supported", "supported_card_networks": [ "AmericanExpress", "CartesBancaires", "DinersClub", "Discover", "JCB", "Mastercard", "Visa", "UnionPay" ], "supported_countries": [ "GBR", "ARE", "HUN", "LIE", "LTU", "SVN", "ESP", "ITA", "LVA", "CZE", "HRV", "NLD", "AUS", "DNK", "USA", "FIN", "ROU", "SGP", "MEX", "EST", "POL", "LUX", "NOR", "PER", "CYP", "BEL", "BGR", "MLT", "DEU", "ARG", "COL", "CHE", "SWE", "SAU", "IRL", "FRA", "GRC", "BHR", "AUT", "SVK", "HKG", "ISL", "CHL", "PRT" ], "supported_currencies": [ "CLP", "WST", "BZD", "DOP", "NZD", "PAB", "COP", "UAH", "XAF", "SEK", "NOK", "HUF", "TTD", "CZK", "BOB", "FKP", "SYP", "ETB", "GHS", "BMD", "LAK", "CHF", "AMD", "YER", "KRW", "BSD", "ISK", "MDL", "AFN", "RON", "STN", "SOS", "GBP", "LKR", "DJF", "LSL", "SSP", "MMK", "OMR", "AZN", "BBD", "BAM", "QAR", "SGD", "BDT", "XCD", "ZWL", "IQD", "NPR", "MUR", "LRD", "SLE", "KES", "SCR", "FJD", "TND", "AUD", "HNL", "JOD", "BGN", "IDR", "PGK", "MWK", "SZL", "PKR", "DKK", "ILS", "TZS", "BYN", "KYD", "TWD", "KMF", "MGA", "HTG", "MNT", "GIP", "UZS", "ZAR", "KHR", "LBP", "MAD", "VES", "RWF", "JMD", "BND", "EUR", "USD", "GMD", "AOA", "RUB", "SDG", "NIO", "PLN", "SRD", "TJS", "VND", "KGS", "CRC", "XPF", "ZMW", "CAD", "HKD", "BWP", "TOP", "TMT", "BRL", "GNF", "GYD", "VUV", "NAD", "GTQ", "ANG", "ERN", "HRK", "GEL", "MKD", "BTN", "RSD", "AWG", "PYG", "BIF", "INR", "PHP", "UYU", "MVR", "BHD", "IRR", "SBD", "MZN", "ALL", "KZT", "EGP", "JPY", "DZD", "MRU", "SAR", "NGN", "PEN", "THB", "TRY", "SLL", "LYD", "UGX", "CNY", "AED", "MXN", "MYR", "CDF", "XOF", "SHP", "CVE", "KWD", "MOP", "CUP" ] }, { "payment_method": "card", "payment_method_type": "debit", "payment_method_type_display_name": "Debit Card", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic", "manual_multiple" ], "three_ds": "supported", "no_three_ds": "supported", "supported_card_networks": [ "AmericanExpress", "CartesBancaires", "DinersClub", "Discover", "JCB", "Mastercard", "Visa", "UnionPay" ], "supported_countries": [ "SAU", "SVN", "LUX", "BGR", "AUS", "MEX", "MLT", "PRT", "ARG", "LIE", "ROU", "BEL", "DEU", "HKG", "LTU", "GRC", "NLD", "NOR", "POL", "DNK", "ISL", "IRL", "HRV", "SGP", "ESP", "COL", "FIN", "GBR", "AUT", "SWE", "ARE", "CHE", "CHL", "USA", "BHR", "CZE", "SVK", "PER", "EST", "ITA", "CYP", "FRA", "LVA", "HUN" ], "supported_currencies": [ "XOF", "MZN", "QAR", "MNT", "KZT", "CVE", "LAK", "MYR", "BZD", "SOS", "DZD", "ANG", "LYD", "NAD", "PHP", "PGK", "SZL", "UYU", "HRK", "RSD", "SLE", "IQD", "BWP", "RWF", "JPY", "ZAR", "MRU", "CUP", "VUV", "EUR", "MKD", "BGN", "KHR", "IDR", "MMK", "BOB", "PLN", "LRD", "CHF", "MUR", "DJF", "XAF", "GTQ", "GNF", "AUD", "HKD", "CDF", "BSD", "HTG", "KGS", "SBD", "WST", "ISK", "GYD", "TMT", "AOA", "BYN", "BIF", "PYG", "XCD", "ZWL", "KMF", "DKK", "KWD", "UAH", "TJS", "HNL", "AMD", "ILS", "BBD", "JMD", "LBP", "CRC", "PKR", "BND", "HUF", "TRY", "RON", "BDT", "SRD", "FJD", "YER", "EGP", "MAD", "MWK", "MOP", "USD", "AZN", "SCR", "THB", "TND", "JOD", "BHD", "ETB", "ERN", "STN", "BAM", "GHS", "GEL", "GIP", "XPF", "CLP", "KRW", "GMD", "NZD", "CNY", "RUB", "UGX", "DOP", "CAD", "NOK", "KES", "INR", "BTN", "CZK", "KYD", "MVR", "GBP", "IRR", "AWG", "COP", "NIO", "NPR", "SEK", "SAR", "SGD", "SHP", "ZMW", "ALL", "LSL", "MXN", "TOP", "VES", "TWD", "SSP", "OMR", "MDL", "UZS", "TZS", "AFN", "VND", "NGN", "AED", "BRL", "SLL", "TTD", "BMD", "FKP", "PEN", "LKR", "MGA", "SDG", "SYP", "PAB" ] } ], "supported_webhook_flows": [ "payments", "refunds", "disputes" ] }, ``` Adyen : ``` { "name": "ADYEN", "display_name": "Adyen", "description": "Adyen is a Dutch payment company with the status of an acquiring bank that allows businesses to accept e-commerce, mobile, and point-of-sale payments. It is listed on the stock exchange Euronext Amsterdam", "category": "payment_gateway", "supported_payment_methods": [ { "payment_method": "wallet", "payment_method_type": "paze", "payment_method_type_display_name": "Paze", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "supported_countries": null, "supported_currencies": null }, { "payment_method": "wallet", "payment_method_type": "google_pay", "payment_method_type_display_name": "Google Pay", "mandates": "supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic", "manual_multiple" ], "supported_countries": [ "THA", "VNM", "AUS", "LIE", "SVN", "CYP", "ARE", "LTU", "DEU", "HKG", "LVA", "ESP", "IRL", "ITA", "ISL", "CZE", "AUT", "NLD", "GRC", "FRA", "KWT", "JPN", "ROU", "HRV", "GBR", "CHE", "SGP", "BRA", "DNK", "TUR", "USA", "CAN", "SVK", "MLT", "SWE", "EST", "POL", "LUX", "NZL", "MYS", "HUN", "BHR", "PRT", "NOR", "BEL" ], "supported_currencies": [ "GNF", "AUD", "PEN", "CUP", "KRW", "STN", "EUR", "MMK", "VUV", "KHR", "RSD", "BDT", "TZS", "KGS", "IDR", "GYD", "JMD", "JOD", "HUF", "KES", "NIO", "SZL", "GHS", "XAF", "MOP", "XPF", "AWG", "TOP", "BYN", "MVR", "RUB", "SHP", "TWD", "RWF", "VES", "PGK", "UYU", "LBP", "ALL", "ETB", "FJD", "LAK", "BGN", "VND", "CRC", "MXN", "PAB", "SBD", "CAD", "ARS", "BND", "NPR", "GIP", "SLE", "BSD", "MWK", "THB", "XOF", "TRY", "BHD", "MAD", "TTD", "WST", "CLP", "HKD", "PKR", "UAH", "PHP", "PLN", "FKP", "SRD", "GEL", "BZD", "AOA", "ILS", "HNL", "KWD", "ZMW", "LYD", "DZD", "RON", "BOB", "XCD", "HTG", "KZT", "MUR", "MZN", "AZN", "MKD", "NOK", "COP", "IQD", "SGD", "DKK", "ANG", "AMD", "BAM", "BBD", "KMF", "GBP", "DJF", "QAR", "MNT", "SVC", "AED", "CNY", "EGP", "BWP", "MRU", "MYR", "NGN", "OMR", "YER", "LKR", "BRL", "UGX", "DOP", "TND", "BMD", "GTQ", "SAR", "UZS", "JPY", "MDL", "SCR", "ZAR", "NZD", "CZK", "CHF", "GMD", "USD", "SEK", "KYD", "INR", "SOS", "CVE", "NAD", "PYG" ] }, { "payment_method": "wallet", "payment_method_type": "swish", "payment_method_type_display_name": "Swish", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": [ "SWE" ], "supported_currencies": [ "SEK" ] }, { "payment_method": "wallet", "payment_method_type": "go_pay", "payment_method_type_display_name": "GoPay", "mandates": "supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": [ "IDN" ], "supported_currencies": [ "IDR" ] }, { "payment_method": "wallet", "payment_method_type": "vipps", "payment_method_type_display_name": "Vipps", "mandates": "supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic", "manual_multiple" ], "supported_countries": null, "supported_currencies": null }, { "payment_method": "wallet", "payment_method_type": "apple_pay", "payment_method_type_display_name": "Apple Pay", "mandates": "supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic", "manual_multiple" ], "supported_countries": [ "JPN", "GRC", "HUN", "AUS", "IRL", "BHR", "ITA", "DNK", "HRV", "ROU", "ESP", "UKR", "ISL", "FIN", "NLD", "LUX", "CHN", "FRA", "LTU", "LVA", "BRA", "CHE", "MLT", "SVN", "SWE", "PRT", "EST", "CAN", "AUT", "NZL", "KWT", "NOR", "CZE", "ARE", "BEL", "DEU", "SGP", "CYP", "HKG", "MYS", "GBR", "POL", "LIE", "USA" ], "supported_currencies": [ "AUD", "USD", "CHF", "MYR", "EUR", "SGD", "HKD", "GBP", "CAD" ] }, { "payment_method": "wallet", "payment_method_type": "mb_way", "payment_method_type_display_name": "MB WAY", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": [ "PRT" ], "supported_currencies": [ "EUR" ] }, { "payment_method": "wallet", "payment_method_type": "mobile_pay", "payment_method_type_display_name": "MobilePay", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic", "manual_multiple" ], "supported_countries": [ "DNK", "FIN" ], "supported_currencies": [ "DKK", "NOK", "SEK", "EUR" ] }, { "payment_method": "wallet", "payment_method_type": "dana", "payment_method_type_display_name": "DANA", "mandates": "supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": null, "supported_currencies": null }, { "payment_method": "wallet", "payment_method_type": "momo", "payment_method_type_display_name": "MoMo", "mandates": "supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": [ "VNM" ], "supported_currencies": [ "VND" ] }, { "payment_method": "wallet", "payment_method_type": "ali_pay", "payment_method_type_display_name": "Alipay", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": [ "PRT", "CYP", "CAN", "ITA", "DNK", "AUS", "USA", "ESP", "BEL", "FIN", "THA", "MLT", "NLD", "SVN", "ROU", "IRL", "SWE", "AUT", "GBR", "JPN", "HKG", "FRA", "GRC", "DEU", "NOR", "CHE", "SGP", "MYS" ], "supported_currencies": [ "GBP", "USD", "SEK", "JPY", "NZD", "EUR", "AUD", "HKD", "CAD", "SGD", "THB", "CHF", "NOK" ] }, { "payment_method": "wallet", "payment_method_type": "twint", "payment_method_type_display_name": "TWINT", "mandates": "supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "supported_countries": null, "supported_currencies": null }, { "payment_method": "wallet", "payment_method_type": "gcash", "payment_method_type_display_name": "GCash", "mandates": "supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": [ "PHL" ], "supported_currencies": [ "PHP" ] }, { "payment_method": "wallet", "payment_method_type": "samsung_pay", "payment_method_type_display_name": "Samsung Pay", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "supported_countries": null, "supported_currencies": null }, { "payment_method": "wallet", "payment_method_type": "touch_n_go", "payment_method_type_display_name": "Touch 'n Go", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": [ "MYS" ], "supported_currencies": [ "MYR" ] }, { "payment_method": "wallet", "payment_method_type": "kakao_pay", "payment_method_type_display_name": "KakaoPay", "mandates": "supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": [ "KOR" ], "supported_currencies": [ "KRW" ] }, { "payment_method": "wallet", "payment_method_type": "paypal", "payment_method_type_display_name": "PayPal", "mandates": "supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic", "manual_multiple" ], "supported_countries": [ "CAN", "AUS", "KWT", "ARE", "PHL", "DNK", "THA", "EST", "ROU", "NOR", "UKR", "FRA", "GIB", "HUN", "LVA", "CHE", "ITA", "NLD", "NZL", "HRV", "CHN", "IDN", "HKG", "SVN", "CYP", "ESP", "BEL", "LUX", "POL", "SVK", "MYS", "DEU", "AUT", "JPN", "BRA", "MLT", "ISL", "FIN", "SWE", "USA", "IRL", "GBR", "LTU", "PRT", "CZE", "KOR" ], "supported_currencies": [ "BRL", "HKD", "NZD", "HUF", "RUB", "USD", "DKK", "NOK", "CAD", "SGD", "SEK", "MYR", "THB", "CHF", "JPY", "EUR", "PHP", "PLN", "GBP", "MXN", "CZK", "INR", "AUD" ] }, { "payment_method": "wallet", "payment_method_type": "ali_pay_hk", "payment_method_type_display_name": "AlipayHK", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": [ "HKG" ], "supported_currencies": [ "HKD" ] }, { "payment_method": "wallet", "payment_method_type": "we_chat_pay", "payment_method_type_display_name": "WeChat Pay", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": [ "BEL", "SVN", "HKG", "MLT", "ITA", "AUS", "GRC", "CHE", "SGP", "CYP", "NOR", "LIE", "AUT", "PRT", "DNK", "NLD", "USA", "NZL", "FRA", "DEU", "GBR", "SWE", "ESP", "CAN", "JPN", "CHN" ], "supported_currencies": [ "CAD", "CNY", "SGD", "JPY", "USD", "EUR", "NZD", "HKD", "GBP", "AUD" ] }, { "payment_method": "bank_redirect", "payment_method_type": "bancontact_card", "payment_method_type_display_name": "Bancontact Card", "mandates": "supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": [ "BEL" ], "supported_currencies": [ "EUR" ] }, { "payment_method": "bank_redirect", "payment_method_type": "online_banking_poland", "payment_method_type_display_name": "Online Banking Poland", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": [ "POL" ], "supported_currencies": [ "PLN" ] }, { "payment_method": "bank_redirect", "payment_method_type": "blik", "payment_method_type_display_name": "BLIK", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": [ "POL" ], "supported_currencies": [ "PLN" ] }, { "payment_method": "bank_redirect", "payment_method_type": "ideal", "payment_method_type_display_name": "iDEAL", "mandates": "supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": [ "NLD" ], "supported_currencies": [ "EUR" ] }, { "payment_method": "bank_redirect", "payment_method_type": "trustly", "payment_method_type_display_name": "Trustly", "mandates": "supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": [ "ESP", "DEU", "AUT", "GBR", "NLD", "LTU", "SWE", "LVA", "EST", "DNK", "NOR", "FIN" ], "supported_currencies": [ "GBP", "EUR", "NOK", "SEK", "CZK", "DKK" ] }, { "payment_method": "bank_redirect", "payment_method_type": "eps", "payment_method_type_display_name": "EPS", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": [ "AUT" ], "supported_currencies": [ "EUR" ] }, { "payment_method": "bank_redirect", "payment_method_type": "open_banking_uk", "payment_method_type_display_name": "Open Banking UK", "mandates": "supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": [ "GBR" ], "supported_currencies": [ "GBP" ] }, { "payment_method": "bank_redirect", "payment_method_type": "online_banking_finland", "payment_method_type_display_name": "Online Banking Finland", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": [ "FIN" ], "supported_currencies": [ "EUR" ] }, { "payment_method": "bank_redirect", "payment_method_type": "bizum", "payment_method_type_display_name": "Bizum", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": [ "ESP" ], "supported_currencies": [ "EUR" ] }, { "payment_method": "bank_redirect", "payment_method_type": "online_banking_slovakia", "payment_method_type_display_name": "Online Banking Slovakia", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": [ "SVK" ], "supported_currencies": [ "CZK", "EUR" ] }, { "payment_method": "bank_redirect", "payment_method_type": "online_banking_fpx", "payment_method_type_display_name": "Online Banking FPX", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": [ "MYS" ], "supported_currencies": [ "MYR" ] }, { "payment_method": "bank_redirect", "payment_method_type": "online_banking_thailand", "payment_method_type_display_name": "Online Banking Thailand", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": [ "THA" ], "supported_currencies": [ "THB" ] }, { "payment_method": "bank_redirect", "payment_method_type": "online_banking_czech_republic", "payment_method_type_display_name": "Online Banking Czech Republic", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": [ "CZE" ], "supported_currencies": [ "EUR", "CZK" ] }, { "payment_method": "bank_transfer", "payment_method_type": "bri_va", "payment_method_type_display_name": "BRI Virtual Account", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": [ "IDN" ], "supported_currencies": [ "IDR" ] }, { "payment_method": "bank_transfer", "payment_method_type": "cimb_va", "payment_method_type_display_name": "CIMB Virtual Account", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": [ "IDN" ], "supported_currencies": [ "IDR" ] }, { "payment_method": "bank_transfer", "payment_method_type": "danamon_va", "payment_method_type_display_name": "Danamon Virtual Account", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": [ "IDN" ], "supported_currencies": [ "IDR" ] }, { "payment_method": "bank_transfer", "payment_method_type": "mandiri_va", "payment_method_type_display_name": "Mandiri Virtual Account", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": [ "IDN" ], "supported_currencies": [ "IDR" ] }, { "payment_method": "bank_transfer", "payment_method_type": "pix", "payment_method_type_display_name": "Pix", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": [ "BRA" ], "supported_currencies": [ "BRL" ] }, { "payment_method": "bank_transfer", "payment_method_type": "permata_bank_transfer", "payment_method_type_display_name": "Permata Bank Transfer", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": [ "IDN" ], "supported_currencies": [ "IDR" ] }, { "payment_method": "bank_transfer", "payment_method_type": "bca_bank_transfer", "payment_method_type_display_name": "BCA Bank Transfer", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": [ "IDN" ], "supported_currencies": [ "IDR" ] }, { "payment_method": "bank_transfer", "payment_method_type": "bni_va", "payment_method_type_display_name": "BNI Virtual Account", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": [ "IDN" ], "supported_currencies": [ "IDR" ] }, { "payment_method": "card_redirect", "payment_method_type": "knet", "payment_method_type_display_name": "KNET", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": null, "supported_currencies": null }, { "payment_method": "card_redirect", "payment_method_type": "benefit", "payment_method_type_display_name": "Benefit", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": null, "supported_currencies": null }, { "payment_method": "card_redirect", "payment_method_type": "momo_atm", "payment_method_type_display_name": "MoMo ATM", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": null, "supported_currencies": null }, { "payment_method": "bank_debit", "payment_method_type": "sepa", "payment_method_type_display_name": "SEPA Direct Debit", "mandates": "supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic", "manual_multiple" ], "supported_countries": [ "EST", "DEU", "ESP", "BEL", "IRL", "SVK", "LVA", "LTU", "AUT", "PRT", "FIN", "ITA", "NLD", "FRA" ], "supported_currencies": [ "EUR" ] }, { "payment_method": "bank_debit", "payment_method_type": "bacs", "payment_method_type_display_name": "BACS Direct Debit", "mandates": "supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "supported_countries": [ "GBR" ], "supported_currencies": [ "GBP" ] }, { "payment_method": "bank_debit", "payment_method_type": "ach", "payment_method_type_display_name": "ACH Direct Debit", "mandates": "supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "supported_countries": [ "USA" ], "supported_currencies": [ "USD" ] }, { "payment_method": "pay_later", "payment_method_type": "pay_bright", "payment_method_type_display_name": "PayBright", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic", "manual_multiple" ], "supported_countries": [ "CAN" ], "supported_currencies": [ "CAD" ] }, { "payment_method": "pay_later", "payment_method_type": "walley", "payment_method_type_display_name": "Walley", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "supported_countries": [ "FIN", "DNK", "SWE", "NOR" ], "supported_currencies": [ "EUR", "SEK", "DKK", "NOK" ] }, { "payment_method": "pay_later", "payment_method_type": "afterpay_clearpay", "payment_method_type_display_name": "Afterpay Clearpay", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic", "manual_multiple" ], "supported_countries": [ "ESP", "USA", "AUS", "ITA", "NZL", "GBR", "CAN", "FRA" ], "supported_currencies": [ "GBP" ] }, { "payment_method": "pay_later", "payment_method_type": "klarna", "payment_method_type_display_name": "Klarna", "mandates": "supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "supported_countries": [ "ESP", "DEU", "CZE", "IRL", "AUT", "AUS", "CAN", "SWE", "ROU", "BEL", "PRT", "DNK", "GRC", "FRA", "NLD", "POL", "CHE", "USA", "GBR", "ITA", "NOR", "FIN" ], "supported_currencies": [ "GBP", "USD", "SEK", "DKK", "CZK", "PLN", "CAD", "EUR", "AUD", "RON", "CHF", "NOK" ] }, { "payment_method": "pay_later", "payment_method_type": "affirm", "payment_method_type_display_name": "Affirm", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic", "manual_multiple" ], "supported_countries": [ "USA" ], "supported_currencies": [ "USD" ] }, { "payment_method": "pay_later", "payment_method_type": "alma", "payment_method_type_display_name": "Alma", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "supported_countries": null, "supported_currencies": null }, { "payment_method": "pay_later", "payment_method_type": "atome", "payment_method_type_display_name": "Atome", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": [ "MYS", "SGP" ], "supported_currencies": [ "SGD", "MYR" ] }, { "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", "manual_multiple" ], "three_ds": "supported", "no_three_ds": "supported", "supported_card_networks": [ "AmericanExpress", "CartesBancaires", "UnionPay", "DinersClub", "Discover", "Interac", "JCB", "Maestro", "Mastercard", "Visa" ], "supported_countries": null, "supported_currencies": null }, { "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", "manual_multiple" ], "three_ds": "supported", "no_three_ds": "supported", "supported_card_networks": [ "AmericanExpress", "CartesBancaires", "UnionPay", "DinersClub", "Discover", "Interac", "JCB", "Maestro", "Mastercard", "Visa" ], "supported_countries": null, "supported_currencies": null }, { "payment_method": "voucher", "payment_method_type": "alfamart", "payment_method_type_display_name": "Alfamart", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": [ "IDN" ], "supported_currencies": [ "IDR" ] }, { "payment_method": "voucher", "payment_method_type": "family_mart", "payment_method_type_display_name": "FamilyMart", "mandates": "not_supported", "refunds": "not_supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": [ "JPN" ], "supported_currencies": [ "JPY" ] }, { "payment_method": "voucher", "payment_method_type": "indomaret", "payment_method_type_display_name": "Indomaret", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": [ "IDN" ], "supported_currencies": [ "IDR" ] }, { "payment_method": "voucher", "payment_method_type": "oxxo", "payment_method_type_display_name": "OXXO", "mandates": "not_supported", "refunds": "not_supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": [ "MEX" ], "supported_currencies": [ "MXN" ] }, { "payment_method": "voucher", "payment_method_type": "boleto", "payment_method_type_display_name": "Boleto Bancário", "mandates": "not_supported", "refunds": "not_supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": [ "BRA" ], "supported_currencies": [ "BRL" ] }, { "payment_method": "voucher", "payment_method_type": "pay_easy", "payment_method_type_display_name": "PayEasy", "mandates": "not_supported", "refunds": "not_supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": [ "JPN" ], "supported_currencies": [ "JPY" ] }, { "payment_method": "voucher", "payment_method_type": "seven_eleven", "payment_method_type_display_name": "7-Eleven", "mandates": "not_supported", "refunds": "not_supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": [ "JPN" ], "supported_currencies": [ "JPY" ] }, { "payment_method": "voucher", "payment_method_type": "lawson", "payment_method_type_display_name": "Lawson", "mandates": "not_supported", "refunds": "not_supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": [ "JPN" ], "supported_currencies": [ "JPY" ] }, { "payment_method": "voucher", "payment_method_type": "mini_stop", "payment_method_type_display_name": "Mini Stop", "mandates": "not_supported", "refunds": "not_supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": [ "JPN" ], "supported_currencies": [ "JPY" ] }, { "payment_method": "voucher", "payment_method_type": "seicomart", "payment_method_type_display_name": "Seicomart", "mandates": "not_supported", "refunds": "not_supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": [ "JPN" ], "supported_currencies": [ "JPY" ] }, { "payment_method": "gift_card", "payment_method_type": "pay_safe_card", "payment_method_type_display_name": "PaySafeCard", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": [ "DNK", "MLT", "TUR", "LVA", "USA", "ESP", "CAN", "MNE", "ROU", "CZE", "LIE", "KWT", "NLD", "DEU", "SWE", "PRY", "POL", "BEL", "PER", "HRV", "AUS", "GIB", "AUT", "PRT", "NOR", "URY", "CYP", "MDA", "SVK", "FIN", "ARE", "BRA", "GBR", "SVN", "HUN", "IRL", "MEX", "NZL", "CHE", "GEO", "LTU", "LUX", "SAU", "ISL", "SRB", "FRA" ], "supported_currencies": [ "GBP", "GIP", "MDL", "NZD", "DKK", "KWD", "CHF", "BRL", "UYU", "RON", "NOK", "AUD", "PYG", "PLN", "SAR", "HUF", "PEN", "CZK", "EUR", "SEK", "USD", "GEL", "CAD", "MXN", "TRY", "AED", "RSD" ] }, { "payment_method": "gift_card", "payment_method_type": "givex", "payment_method_type_display_name": "Givex", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "supported_countries": null, "supported_currencies": null } ], "supported_webhook_flows": [ "payments", "refunds", "disputes", "payouts", "mandates" ] }, ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/adyen.rs` - `crates/hyperswitch_connectors/src/connectors/checkout.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 (302 changes) **Detailed Identifier Changes:** Commit e404c0ce: Files to modify: **crates/hyperswitch_connectors/src/connectors/adyen.rs** Remove: - impl: impl ConnectorSpecifications for Adyen Add: - function: private::get_connector_about - function: private::get_supported_payment_methods - function: private::get_supported_webhook_flows - impl: impl ConnectorSpecifications for Adyen **crates/hyperswitch_connectors/src/connectors/checkout.rs** Remove: - impl: impl ConnectorSpecifications for Checkout Add: - function: private::get_connector_about - function: private::get_supported_payment_methods - function: private::get_supported_webhook_flows - impl: impl ConnectorSpecifications for Checkout
{"pr_number": 7914, "pr_title": "feat(connector): [ADYEN, CHECKOUT] Added In Feature Matrix API", "merged_at": "2025-05-12T14:31:35Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "refund", "connector"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/adyen.rs", "crates/hyperswitch_connectors/src/connectors/checkout.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": 302, "imports_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): [checkout] add support for MOTO payments ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Support MOTO payments for checkout. Updated status flag - if capture method is Automatic, we can map the Authorized status received from the connector to Charged. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with 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 ``` { "amount": 100, "currency": "USD", "confirm": true, "customer_id": "c1", "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", "payment_channel": "mail_order", "billing": { "address": { "zip": "560095", "country": "US", "first_name": "Sakil", "last_name": "Mostak", "line1": "Fasdf", "line2": "Fasdf", "city": "Fasdf" } }, "browser_info": { "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8", "ip_address": "192.168.1.1", "java_enabled": false, "java_script_enabled": true, "language": "en-US", "color_depth": 24, "screen_height": 1080, "screen_width": 1920, "time_zone": 330, "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36" }, "email": "hello@gmail.com", "payment_method_data": { "card": { "card_number": "5137210000000158", "card_exp_month": "12", "card_exp_year": "2030", "card_holder_name": "CL-BRW2", "card_cvc": "217" } } } ``` Response ``` { "payment_id": "pay_BE5P0sU8sLpTwR7vdABP", "merchant_id": "merchant_1757406017", "status": "succeeded", "amount": 100, "net_amount": 100, "shipping_cost": null, "amount_capturable": 0, "amount_received": 100, "connector": "checkout", "client_secret": "pay_BE5P0sU8sLpTwR7vdABP_secret_7ysL4yAfpGjP1Zd636Pi", "created": "2025-09-09T11:05:33.401Z", "currency": "USD", "customer_id": "c1", "customer": { "id": "c1", "name": null, "email": "hello@gmail.com", "phone": null, "phone_country_code": null }, "description": "hellow world", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "0158", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "513721", "card_extended_bin": null, "card_exp_month": "12", "card_exp_year": "2030", "card_holder_name": "CL-BRW2", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": { "city": "Fasdf", "country": "US", "line1": "Fasdf", "line2": "Fasdf", "line3": null, "zip": "560095", "state": null, "first_name": "Sakil", "last_name": "Mostak", "origin_zip": null }, "phone": null, "email": null }, "order_details": null, "email": "hello@gmail.com", "name": null, "phone": null, "return_url": "https://www.google.com/", "authentication_type": "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": "c1", "created_at": 1757415933, "expires": 1757419533, "secret": "epk_ff4bc544eed345daaef026988c07468b" }, "manual_retry_allowed": false, "connector_transaction_id": "pay_rzjq5hlrtkyujebqooc6luimc4", "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_BE5P0sU8sLpTwR7vdABP_1", "payment_link": null, "profile_id": "pro_3yPo6zW5RXXgkGq0EMZh", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_e1Q75qciffxB32B0kK3M", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-09T11:20:33.400Z", "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": "mail_order", "payment_method_id": null, "network_transaction_id": null, "payment_method_status": null, "updated": "2025-09-09T11:05:34.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": null, "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": "{\"id\":\"pay_rzjq5hlrtkyujebqooc6luimc4\",\"action_id\":\"act_3xzsie3fqueurhwuyvci5rfr44\",\"amount\":100,\"currency\":\"USD\",\"approved\":true,\"status\":\"Authorized\",\"auth_code\":\"124203\",\"response_code\":\"10000\",\"response_summary\":\"Approved\",\"balances\":{\"total_authorized\":100,\"total_voided\":0,\"available_to_void\":100,\"total_captured\":0,\"available_to_capture\":100,\"total_refunded\":0,\"available_to_refund\":0},\"risk\":{\"flagged\":false,\"score\":0.0},\"source\":{\"id\":\"src_o7l4wgjktpzunnaxazbe26lmju\",\"type\":\"card\",\"expiry_month\":12,\"expiry_year\":2030,\"scheme\":\"Mastercard\",\"scheme_local\":\"cartes_bancaires\",\"last4\":\"0158\",\"fingerprint\":\"F6044B07C3770BC948DF7AE193C1FA809E1B4DB5C72EDF7C0B23888A4D09CF0F\",\"bin\":\"51372100\",\"card_type\":\"CREDIT\",\"card_category\":\"CONSUMER\",\"issuer\":\"BANQUE CHAABI DU MAROC\",\"issuer_country\":\"FR\",\"product_id\":\"BPD\",\"product_type\":\"Business Premium Debit\",\"avs_check\":\"S\",\"cvv_check\":\"Y\",\"payment_account_reference\":\"\",\"local_schemes\":[\"cartes_bancaires\"],\"regulated_indicator\":false},\"processed_on\":\"2025-09-09T11:05:33.8708642Z\",\"reference\":\"pay_BE5P0sU8sLpTwR7vdABP_1\",\"scheme_id\":\"797465286826444\",\"processing\":{\"acquirer_transaction_id\":\"891469072910485862211\",\"retrieval_reference_number\":\"549909054380\",\"merchant_category_code\":\"5815\",\"scheme_merchant_id\":\"788826\",\"scheme\":\"MASTERCARD\",\"aft\":false,\"pan_type_processed\":\"fpan\",\"cko_network_token_available\":false},\"expires_on\":\"2025-10-09T11:05:33.8708642Z\",\"_links\":{\"self\":{\"href\":\"https://api.sandbox.checkout.com/payments/pay_rzjq5hlrtkyujebqooc6luimc4\"},\"actions\":{\"href\":\"https://api.sandbox.checkout.com/payments/pay_rzjq5hlrtkyujebqooc6luimc4/actions\"},\"capture\":{\"href\":\"https://api.sandbox.checkout.com/payments/pay_rzjq5hlrtkyujebqooc6luimc4/captures\"},\"void\":{\"href\":\"https://api.sandbox.checkout.com/payments/pay_rzjq5hlrtkyujebqooc6luimc4/voids\"}}}", "enable_partial_authorization": null } ``` CIT/MIT: Request: <img width="1313" height="905" alt="Screenshot 2025-09-09 at 5 10 41 PM" src="https://github.com/user-attachments/assets/d4850fa7-ed35-40dc-93fb-b58c720b9c31" /> Response: <img width="1313" height="907" alt="Screenshot 2025-09-09 at 5 12 07 PM" src="https://github.com/user-attachments/assets/d4c3cf54-eee4-4f20-8eeb-4c29c9d559b7" /> Cypress : <img width="720" height="809" alt="Screenshot 2025-09-09 at 6 52 10 PM" src="https://github.com/user-attachments/assets/7fae0012-e190-406e-8c0d-4ec5e96234b0" /> ## Checklist <!-- Put 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` - `crates/hyperswitch_connectors/src/utils.rs` **2. Tests** - `cypress-tests/cypress/e2e/configs/Payment/Checkout.js` **Code Patterns Applied:** - Extend existing types with new fields (210 changes) **Detailed Identifier Changes:** Commit 3f8943bd: Files to modify: **crates/hyperswitch_connectors/src/connectors/checkout/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/utils.rs** Modify existing code
{"pr_number": 9327, "pr_title": "feat(connector): [checkout] add support for MOTO payments", "merged_at": "2025-09-10T14:18:55Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/checkout/transformers.rs", "crates/hyperswitch_connectors/src/utils.rs"], "tests": ["cypress-tests/cypress/e2e/configs/Payment/Checkout.js"]}, "change_types": {"fields_added": 210, "imports_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(core): Add support for Void after Capture ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description - Add core flow for Void after Capture - Add PostCaptureVoid Flow in worldpayVantiv connector ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? Added in Mintlify API reference <img width="1490" height="681" alt="Screenshot 2025-08-05 at 6 38 43 PM" src="https://github.com/user-attachments/assets/192a2e9b-beca-46b7-90a2-5b2428bac7f4" /> 1. Create a Vantiv payment ``` { "amount": 100, "currency": "USD", "confirm": true, "capture_method": "automatic", "customer_id": "aaaa", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4457000300000007", "card_exp_month": "01", "card_exp_year": "50", // "card_holder_name": "Joseph", "card_cvc": "987" // "card_network":"M" } }, "billing": { "address": { "line1": "Singapore Changi Airport. 2nd flr", "line2": "", "line3": "", "city": "Downtown Core", "state": "Central Indiana America", "zip": "039393", "country": "SG", "first_name": "박성준", "last_name": "박성준" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "shipping": { "address": { "line1": "Singapore Changi Airport. 2nd flr", "line2": "", "line3": "", "city": "Downtown Core", "state": "Central Indiana America", "zip": "039393", "country": "SG", "first_name": "박성준", "last_name": "박성준" }, "phone": { "number": "8056594427", "country_code": "+91" } } } ``` response ``` {"payment_id":"pay_6U7z9JffFphSvaHOa82X","merchant_id":"merchant_1754307959","status":"processing","amount":100,"net_amount":100,"shipping_cost":null,"amount_capturable":0,"amount_received":null,"connector":"worldpayvantiv","client_secret":"pay_6U7z9JffFphSvaHOa82X_secret_lrLWdp5mBXe337IX33p6","created":"2025-08-05T09:10:50.360Z","currency":"USD","customer_id":"aaaa","customer":{"id":"aaaa","name":null,"email":null,"phone":null,"phone_country_code":null},"description":null,"refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":null,"off_session":null,"capture_on":null,"capture_method":"automatic","payment_method":"card","payment_method_data":{"card":{"last4":"0007","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"445700","card_extended_bin":null,"card_exp_month":"01","card_exp_year":"50","card_holder_name":null,"payment_checks":{"avs_result":"00","advanced_a_v_s_result":null,"authentication_result":null,"card_validation_result":"U"},"authentication_data":null},"billing":null},"payment_token":null,"shipping":{"address":{"city":"Downtown Core","country":"SG","line1":"Singapore Changi Airport. 2nd flr","line2":"","line3":"","zip":"039393","state":"Central Indiana America","first_name":"박성준","last_name":"박성준"},"phone":{"number":"8056594427","country_code":"+91"},"email":null},"billing":{"address":{"city":"Downtown Core","country":"SG","line1":"Singapore Changi Airport. 2nd flr","line2":"","line3":"","zip":"039393","state":"Central Indiana America","first_name":"박성준","last_name":"박성준"},"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":{"customer_id":"aaaa","created_at":1754385050,"expires":1754388650,"secret":"epk_e68679fd37f84775b725fa5a8058abb9"},"manual_retry_allowed":false,"connector_transaction_id":"83997345492141650","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"pay_6U7z9JffFphSvaHOa82X_1","payment_link":null,"profile_id":"pro_39QoIo9WbzDFwm4iqtRI","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_8Skj4ar2yQ9GBKIGCdAZ","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-08-05T09:25:50.360Z","fingerprint":null,"browser_info":null,"payment_channel":null,"payment_method_id":null,"payment_method_status":null,"updated":"2025-08-05T09:10:54.164Z","split_payments":null,"frm_metadata":null,"extended_authorization_applied":null,"capture_before":null,"merchant_order_reference_id":null,"order_tax_amount":null,"connector_mandate_id":null,"card_discovery":"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. Do psync ``` curl --location 'http://localhost:8080/payments/pay_6U7z9JffFphSvaHOa82X?force_sync=true' \ --header 'Accept: application/json' \ --header 'api-key: dev_X4UzFm38nxtfI8vV2m1hPnJlW4AKkxYfjr4z9tNRjnxxIbLNok5xyLKKsIBoxaSQ' ``` Response ``` { "payment_id": "pay_6U7z9JffFphSvaHOa82X", "merchant_id": "merchant_1754307959", "status": "succeeded", "amount": 100, "net_amount": 100, "shipping_cost": null, "amount_capturable": 0, "amount_received": 100, "connector": "worldpayvantiv", "client_secret": "pay_6U7z9JffFphSvaHOa82X_secret_lrLWdp5mBXe337IX33p6", "created": "2025-08-05T09:10:50.360Z", "currency": "USD", "customer_id": "aaaa", "customer": { "id": "aaaa", "name": null, "email": null, "phone": null, "phone_country_code": null }, "description": null, "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "0007", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "445700", "card_extended_bin": null, "card_exp_month": "01", "card_exp_year": "50", "card_holder_name": null, "payment_checks": { "avs_result": "00", "advanced_a_v_s_result": null, "authentication_result": null, "card_validation_result": "U" }, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": { "address": { "city": "Downtown Core", "country": "SG", "line1": "Singapore Changi Airport. 2nd flr", "line2": "", "line3": "", "zip": "039393", "state": "Central Indiana America", "first_name": "박성준", "last_name": "박성준" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "billing": { "address": { "city": "Downtown Core", "country": "SG", "line1": "Singapore Changi Airport. 2nd flr", "line2": "", "line3": "", "zip": "039393", "state": "Central Indiana America", "first_name": "박성준", "last_name": "박성준" }, "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": "83997345492141650", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "pay_6U7z9JffFphSvaHOa82X_1", "payment_link": null, "profile_id": "pro_39QoIo9WbzDFwm4iqtRI", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_8Skj4ar2yQ9GBKIGCdAZ", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-08-05T09:25:50.360Z", "fingerprint": null, "browser_info": null, "payment_channel": null, "payment_method_id": null, "payment_method_status": null, "updated": "2025-08-05T09:12:15.057Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null } ``` 3. We will do cancel_post_capture ``` curl --location 'http://localhost:8080/payments/pay_6U7z9JffFphSvaHOa82X/cancel_post_capture' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_X4UzFm38nxtfI8vV2m1hPnJlW4AKkxYfjr4z9tNRjnxxIbLNok5xyLKKsIBoxaSQ' \ --data '{ "cancellation_reason": "requested_by_customer" }' ``` Response ``` { "payment_id": "pay_6U7z9JffFphSvaHOa82X", "merchant_id": "merchant_1754307959", "status": "processing", "amount": 100, "net_amount": 100, "shipping_cost": null, "amount_capturable": 0, "amount_received": 100, "connector": "worldpayvantiv", "client_secret": "pay_6U7z9JffFphSvaHOa82X_secret_lrLWdp5mBXe337IX33p6", "created": "2025-08-05T09:10:50.360Z", "currency": "USD", "customer_id": null, "customer": null, "description": null, "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "0007", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "445700", "card_extended_bin": null, "card_exp_month": "01", "card_exp_year": "50", "card_holder_name": null, "payment_checks": { "avs_result": "00", "advanced_a_v_s_result": null, "authentication_result": null, "card_validation_result": "U" }, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": { "address": { "city": "Downtown Core", "country": "SG", "line1": "Singapore Changi Airport. 2nd flr", "line2": "", "line3": "", "zip": "039393", "state": "Central Indiana America", "first_name": "박성준", "last_name": "박성준" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "billing": { "address": { "city": "Downtown Core", "country": "SG", "line1": "Singapore Changi Airport. 2nd flr", "line2": "", "line3": "", "zip": "039393", "state": "Central Indiana America", "first_name": "박성준", "last_name": "박성준" }, "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": "requested_by_customer", "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": null, "manual_retry_allowed": false, "connector_transaction_id": "84085305358301450", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "pay_6U7z9JffFphSvaHOa82X_1", "payment_link": null, "profile_id": "pro_39QoIo9WbzDFwm4iqtRI", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_8Skj4ar2yQ9GBKIGCdAZ", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-08-05T09:25:50.360Z", "fingerprint": null, "browser_info": null, "payment_channel": null, "payment_method_id": null, "payment_method_status": null, "updated": "2025-08-05T09:13:07.054Z", "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 } ``` 4. Do sync to check the status ``` curl --location 'http://localhost:8080/payments/pay_6U7z9JffFphSvaHOa82X?force_sync=true' \ --header 'Accept: application/json' \ --header 'api-key: dev_X4UzFm38nxtfI8vV2m1hPnJlW4AKkxYfjr4z9tNRjnxxIbLNok5xyLKKsIBoxaSQ' ``` Response - Status will be `cancelled_post_capture` ``` { "payment_id": "pay_6U7z9JffFphSvaHOa82X", "merchant_id": "merchant_1754307959", "status": "cancelled_post_capture", "amount": 100, "net_amount": 100, "shipping_cost": null, "amount_capturable": 0, "amount_received": 100, "connector": "worldpayvantiv", "client_secret": "pay_6U7z9JffFphSvaHOa82X_secret_lrLWdp5mBXe337IX33p6", "created": "2025-08-05T09:10:50.360Z", "currency": "USD", "customer_id": "aaaa", "customer": { "id": "aaaa", "name": null, "email": null, "phone": null, "phone_country_code": null }, "description": null, "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "0007", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "445700", "card_extended_bin": null, "card_exp_month": "01", "card_exp_year": "50", "card_holder_name": null, "payment_checks": { "avs_result": "00", "advanced_a_v_s_result": null, "authentication_result": null, "card_validation_result": "U" }, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": { "address": { "city": "Downtown Core", "country": "SG", "line1": "Singapore Changi Airport. 2nd flr", "line2": "", "line3": "", "zip": "039393", "state": "Central Indiana America", "first_name": "박성준", "last_name": "박성준" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "billing": { "address": { "city": "Downtown Core", "country": "SG", "line1": "Singapore Changi Airport. 2nd flr", "line2": "", "line3": "", "zip": "039393", "state": "Central Indiana America", "first_name": "박성준", "last_name": "박성준" }, "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": "requested_by_customer", "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": null, "manual_retry_allowed": false, "connector_transaction_id": "84085305358301450", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "pay_6U7z9JffFphSvaHOa82X_1", "payment_link": null, "profile_id": "pro_39QoIo9WbzDFwm4iqtRI", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_8Skj4ar2yQ9GBKIGCdAZ", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-08-05T09:25:50.360Z", "fingerprint": null, "browser_info": null, "payment_channel": null, "payment_method_id": null, "payment_method_status": null, "updated": "2025-08-05T09:14:14.704Z", "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 } ``` If we hit our \cancel (Void ) after a succeeded status, that will give error ``` { "error": { "type": "invalid_request", "message": "You cannot cancel this payment because it has status succeeded", "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/events/payment.rs` - `crates/api_models/src/open_router.rs` - `crates/api_models/src/payments.rs` **2. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/router_data.rs` - `crates/hyperswitch_domain_models/src/router_flow_types/payments.rs` - `crates/hyperswitch_domain_models/src/router_request_types.rs` - ... and 1 more files **3. Core Business Logic** - `crates/router/src/core/payments.rs` - `crates/router/src/core/payments/flows.rs` - `crates/router/src/core/payments/flows/cancel_post_capture_flow.rs` - ... and 16 more files **4. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/chargebee/transformers.rs` - `crates/hyperswitch_connectors/src/connectors/paypal/transformers.rs` - `crates/hyperswitch_connectors/src/connectors/recurly/transformers.rs` - ... and 6 more files **5. Type Definitions** - `crates/hyperswitch_interfaces/src/types.rs` - `crates/router/src/compatibility/stripe/payment_intents/types.rs` - `crates/router/src/compatibility/stripe/setup_intents/types.rs` - ... and 5 more files **6. Utils** - `crates/router/src/routes/lock_utils.rs` **7. Other** - `api-reference/docs.json` - `api-reference/v1/openapi_spec_v1.json` - `api-reference/v1/payments/payments--cancel-post-capture.mdx` - ... and 14 more files **Code Patterns Applied:** - Define new data structures (6 changes) - Implement new functions (30 changes) - Extend existing types with new fields (224 changes) - Add conditional logic for feature flags or filtering (1 changes) - Modify database queries (1 changes) **Detailed Identifier Changes:** Commit 57e92c9f: Files to modify: **crates/api_models/src/events/payment.rs** Add: - function: private::get_api_event_type - impl: impl ApiEventMetric for PaymentsCancelPostCaptureRequest **crates/api_models/src/open_router.rs** Modify existing code **crates/api_models/src/payments.rs** Add: - struct: pub::PaymentsCancelPostCaptureRequest **crates/common_enums/src/enums.rs** Modify existing code **crates/common_enums/src/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/chargebee/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/paypal/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/recurly/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/worldpayvantiv.rs** Add: - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::get_request_body - function: private::build_request - function: private::handle_response - function: private::get_error_response - impl: impl api::PaymentPostCaptureVoid for Worldpayvantiv - impl: impl ConnectorIntegration<PostCaptureVoid, PaymentsCancelPostCaptureData, PaymentsResponseData> for Worldpayvantiv **crates/hyperswitch_connectors/src/connectors/worldpayvantiv/transformers.rs** Add: - function: private::try_from - struct: pub::Void - struct: pub::VoidResponse - impl: impl TryFrom< ResponseRouterData< F, CnpOnlineResponse, PaymentsCancelPostCaptureData, PaymentsResponseData, >, > for RouterData<F, PaymentsCancelPostCaptureData, PaymentsResponseData> **crates/hyperswitch_connectors/src/default_implementations.rs** Add: - impl: impl PaymentPostCaptureVoid for connectors::DummyConnector<T> - impl: impl ConnectorIntegration<PostCaptureVoid, PaymentsCancelPostCaptureData, PaymentsResponseData> for connectors::DummyConnector<T> **crates/hyperswitch_connectors/src/default_implementations_v2.rs** Add: - impl: impl PaymentPostCaptureVoidV2 for $connector **crates/hyperswitch_connectors/src/utils.rs** Modify existing code **crates/hyperswitch_domain_models/src/router_data.rs** Modify existing code **crates/hyperswitch_domain_models/src/router_flow_types/payments.rs** Add: - struct: pub::PostCaptureVoid **crates/hyperswitch_domain_models/src/router_request_types.rs** Add: - struct: pub::PaymentsCancelPostCaptureData **crates/hyperswitch_domain_models/src/types.rs** Modify existing code **crates/hyperswitch_interfaces/src/api/payments.rs** Add: - trait: private::PaymentPostCaptureVoid **crates/hyperswitch_interfaces/src/api/payments_v2.rs** Add: - trait: pub::PaymentPostCaptureVoidV2 **crates/hyperswitch_interfaces/src/types.rs** Modify existing code **crates/openapi/src/openapi.rs** Modify existing code **crates/openapi/src/routes/payments.rs** Add: - function: pub::payments_cancel_post_capture **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/compatibility/stripe/webhooks.rs** Modify existing code **crates/router/src/connector/utils.rs** Modify existing code **crates/router/src/core/payments.rs** Modify existing code **crates/router/src/core/payments/flows.rs** Add: - mod: pub::cancel_post_capture_flow **crates/router/src/core/payments/flows/cancel_post_capture_flow.rs** Add: - function: private::construct_router_data - function: private::construct_router_data - function: private::decide_flows - function: private::add_access_token - function: private::build_flow_specific_connector_request - impl: impl ConstructFlowSpecificData< api::PostCaptureVoid, types::PaymentsCancelPostCaptureData, types::PaymentsResponseData, > for PaymentData<api::PostCaptureVoid> - impl: impl Feature<api::PostCaptureVoid, types::PaymentsCancelPostCaptureData> for types::RouterData< api::PostCaptureVoid, types::PaymentsCancelPostCaptureData, types::PaymentsResponseData, > **crates/router/src/core/payments/helpers.rs** Modify existing code **crates/router/src/core/payments/operations.rs** Add: - mod: pub::payment_cancel_post_capture **crates/router/src/core/payments/operations/payment_attempt_record.rs** Modify existing code **crates/router/src/core/payments/operations/payment_cancel_post_capture.rs** Add: - function: private::get_trackers - function: private::get_or_create_customer_details - function: private::make_pm_data - function: private::get_connector - function: private::guard_payment_against_blocklist - function: private::update_trackers - function: private::validate_request - struct: pub::PaymentCancelPostCapture - impl: impl GetTracker<F, PaymentData<F>, api::PaymentsCancelPostCaptureRequest> for PaymentCancelPostCapture - impl: impl Domain<F, api::PaymentsCancelPostCaptureRequest, PaymentData<F>> for PaymentCancelPostCapture - impl: impl UpdateTracker<F, PaymentData<F>, api::PaymentsCancelPostCaptureRequest> for PaymentCancelPostCapture - impl: impl ValidateRequest<F, api::PaymentsCancelPostCaptureRequest, PaymentData<F>> for PaymentCancelPostCapture **crates/router/src/core/payments/operations/payment_capture_v2.rs** Modify existing code **crates/router/src/core/payments/operations/payment_confirm_intent.rs** Modify existing code **crates/router/src/core/payments/operations/payment_get.rs** Modify existing code **crates/router/src/core/payments/operations/payment_response.rs** Add: - function: private::update_tracker - impl: impl PostUpdateTracker<F, PaymentData<F>, types::PaymentsCancelPostCaptureData> for PaymentResponse **crates/router/src/core/payments/operations/payment_session_intent.rs** Modify existing code **crates/router/src/core/payments/operations/payment_update_intent.rs** Modify existing code **crates/router/src/core/payments/operations/proxy_payments_intent.rs** Modify existing code **crates/router/src/core/payments/payment_methods.rs** Modify existing code **crates/router/src/core/payments/retry.rs** Modify existing code **crates/router/src/core/payments/transformers.rs** Add: - function: private::try_from - function: private::try_from - impl: impl TryFrom<PaymentAdditionalData<'_, F>> for types::PaymentsCancelPostCaptureData - impl: impl TryFrom<PaymentAdditionalData<'_, F>> for types::PaymentsCancelPostCaptureData **crates/router/src/core/revenue_recovery/transformers.rs** Modify existing code **crates/router/src/core/routing/helpers.rs** Modify existing code **crates/router/src/routes/app.rs** Modify existing code **crates/router/src/routes/lock_utils.rs** Modify existing code **crates/router/src/routes/payments.rs** Add: - function: pub::payments_cancel_post_capture - function: private::get_locking_input - impl: impl GetLockingInput for payment_types::PaymentsCancelPostCaptureRequest **crates/router/src/services/api.rs** Add: - impl: impl Authenticate for api_models::payments::PaymentsCancelPostCaptureRequest **crates/router/src/types.rs** Modify existing code **crates/router/src/types/api/payments.rs** Modify existing code **crates/router/src/types/api/payments_v2.rs** Modify existing code **crates/router/src/types/transformers.rs** Modify existing code **crates/router_derive/src/macros/operation.rs** Modify existing code **crates/router_env/src/logger/types.rs** Modify existing code
{"pr_number": 8839, "pr_title": "feat(core): Add support for Void after Capture", "merged_at": "2025-08-06T08:04:14Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/events/payment.rs", "crates/api_models/src/open_router.rs", "crates/api_models/src/payments.rs"], "domain": ["crates/hyperswitch_domain_models/src/router_data.rs", "crates/hyperswitch_domain_models/src/router_flow_types/payments.rs", "crates/hyperswitch_domain_models/src/router_request_types.rs", "crates/hyperswitch_domain_models/src/types.rs"], "core_business": ["crates/router/src/core/payments.rs", "crates/router/src/core/payments/flows.rs", "crates/router/src/core/payments/flows/cancel_post_capture_flow.rs", "crates/router/src/core/payments/helpers.rs", "crates/router/src/core/payments/operations.rs", "crates/router/src/core/payments/operations/payment_attempt_record.rs", "crates/router/src/core/payments/operations/payment_cancel_post_capture.rs", "crates/router/src/core/payments/operations/payment_capture_v2.rs", "crates/router/src/core/payments/operations/payment_confirm_intent.rs", "crates/router/src/core/payments/operations/payment_get.rs", "crates/router/src/core/payments/operations/payment_response.rs", "crates/router/src/core/payments/operations/payment_session_intent.rs", "crates/router/src/core/payments/operations/payment_update_intent.rs", "crates/router/src/core/payments/operations/proxy_payments_intent.rs", "crates/router/src/core/payments/payment_methods.rs", "crates/router/src/core/payments/retry.rs", "crates/router/src/core/payments/transformers.rs", "crates/router/src/core/revenue_recovery/transformers.rs", "crates/router/src/core/routing/helpers.rs"], "connectors": ["crates/hyperswitch_connectors/src/connectors/chargebee/transformers.rs", "crates/hyperswitch_connectors/src/connectors/paypal/transformers.rs", "crates/hyperswitch_connectors/src/connectors/recurly/transformers.rs", "crates/hyperswitch_connectors/src/connectors/worldpayvantiv.rs", "crates/hyperswitch_connectors/src/connectors/worldpayvantiv/transformers.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/utils.rs"], "types": ["crates/hyperswitch_interfaces/src/types.rs", "crates/router/src/compatibility/stripe/payment_intents/types.rs", "crates/router/src/compatibility/stripe/setup_intents/types.rs", "crates/router/src/types.rs", "crates/router/src/types/api/payments.rs", "crates/router/src/types/api/payments_v2.rs", "crates/router/src/types/transformers.rs", "crates/router_env/src/logger/types.rs"], "utils": ["crates/router/src/routes/lock_utils.rs"], "other": ["api-reference/docs.json", "api-reference/v1/openapi_spec_v1.json", "api-reference/v1/payments/payments--cancel-post-capture.mdx", "api-reference/v2/openapi_spec_v2.json", "crates/common_enums/src/enums.rs", "crates/common_enums/src/transformers.rs", "crates/hyperswitch_interfaces/src/api/payments.rs", "crates/hyperswitch_interfaces/src/api/payments_v2.rs", "crates/openapi/src/openapi.rs", "crates/openapi/src/routes/payments.rs", "crates/router/src/compatibility/stripe/webhooks.rs", "crates/router/src/routes/app.rs", "crates/router/src/routes/payments.rs", "crates/router/src/services/api.rs", "crates/router_derive/src/macros/operation.rs", "migrations/2025-08-04-143048_add-VoidedPostCharge/down.sql", "migrations/2025-08-04-143048_add-VoidedPostCharge/up.sql"]}, "change_types": {"structs_added": 6, "functions_added": 30, "fields_added": 224, "imports_added": 12, "conditionals_added": 1, "database_queries": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(connectors): [Nexixpay] fix for failing MITs ## 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 --> Stop sending back mandate reference from connector response in case of non-CIT payments to avoid making connector mandate details entry in payment_methods table. This should only be done in case of CIT payments to store correct PSP token which will be used in MIT payments. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> **Step 1:** Do an on_session payment with certain customer and card details with customer acceptance. **Step 2:** Use same customer and card details and do an off_session payment (CIT creation). **Step 3:** Do a MIT payment. In this case MIT should not fail. <details> <summary>1. Do an on_session payment with certain customer and card details with customer acceptance</summary> ### cURL Request ```bash curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_n5vnntb0V5gRjNMdwTnPXweumExJV6vYon3lVNzW2BoA3F4S4V0PXDHK3lW7gWHh' \ --data-raw '{ "amount": 545, "currency": "EUR", "profile_id": "pro_QEwjCvFhpcLC2azRNZEf", "return_url": "https://google.com", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4111 1111 1111 1111", "card_exp_month": "03", "card_exp_year": "30", "card_cvc": "737" } }, "confirm": true, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "authentication_type": "three_ds", "setup_future_usage": "on_session", "customer": { "id": "customerssh", "name": "John Doe", "email": "customerssh@gmail.com", "phone": "9999999999", "phone_country_code": "+1" }, "phone_country_code": "+1", "description": "Its my first payment request", "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "country": "BR", "zip": "94122", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "guest@example.com" }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "BR", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "guest@example.com" }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "order_details": [ { "product_name": "Apple iphone 15", "quantity": 1, "amount": 3545, "account_name": "transaction_processing" } ], "browser_info": { "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "language": "nl-NL", "color_depth": 24, "screen_height": 723, "screen_width": 1536, "time_zone": 0, "java_enabled": true, "java_script_enabled": true, "ip_address": "128.0.0.1" }, "customer_acceptance": { "acceptance_type": "online", "accepted_at": "1963-05-03T04:07:52.723Z", "online": { "ip_address": "127.0.0.1", "user_agent": "amet irure esse" } }, "connector_metadata": { "noon": { "order_category": "pay" } }, "payment_link": false, "payment_link_config": { "theme": "", "logo": "", "seller_name": "", "sdk_layout": "", "display_sdk_only": false, "enabled_saved_payment_method": false }, "payment_type": "normal", "request_incremental_authorization": false, "merchant_order_reference_id": "test_ord", "session_expiry": 900 }' ``` ### Response ```json { "payment_id": "pay_UJeFlJM9WMIeBvNEVd0O", "merchant_id": "merchant_1759144749", "status": "requires_customer_action", "amount": 545, "net_amount": 545, "shipping_cost": null, "amount_capturable": 545, "amount_received": null, "connector": "nexixpay", "client_secret": "pay_UJeFlJM9WMIeBvNEVd0O_secret_xWU3ewN9pUcuqFAMbm9Q", "created": "2025-09-30T09:53:19.420Z", "currency": "EUR", "customer_id": "customerssh", "customer": { "id": "customerssh", "name": "John Doe", "email": "customerssh@gmail.com", "phone": "9999999999", "phone_country_code": "+1" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "on_session", "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "1111", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "411111", "card_extended_bin": null, "card_exp_month": "03", "card_exp_year": "30", "card_holder_name": null, "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": "token_EJFI1EooKy0qnkpjqk05", "next_action": { "type": "redirect_to_url", "redirect_to_url": "http://localhost:8080/payments/redirect/pay_UJeFlJM9WMIeBvNEVd0O/merchant_1759144749/pay_UJeFlJM9WMIeBvNEVd0O_1" } } ``` Open and complete 3DS payment ### cURL (Payments Retrieve) ```bash curl --location 'http://localhost:8080/payments/pay_UJeFlJM9WMIeBvNEVd0O?force_sync=true&expand_captures=true&expand_attempts=true' \ --header 'Accept: application/json' \ --header 'api-key: dev_n5vnntb0V5gRjNMdwTnPXweumExJV6vYon3lVNzW2BoA3F4S4V0PXDHK3lW7gWHh' ``` ### Response ```json { "payment_id": "pay_UJeFlJM9WMIeBvNEVd0O", "merchant_id": "merchant_1759144749", "status": "succeeded", "amount": 545, "net_amount": 545, "shipping_cost": null, "amount_capturable": 0, "amount_received": 545, "connector": "nexixpay", "client_secret": "pay_UJeFlJM9WMIeBvNEVd0O_secret_xWU3ewN9pUcuqFAMbm9Q", "created": "2025-09-30T09:53:19.420Z", "currency": "EUR", "customer_id": "customerssh", "customer": { "id": "customerssh", "name": "John Doe", "email": "customerssh@gmail.com", "phone": "9999999999", "phone_country_code": "+1" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "attempts": [ { "attempt_id": "pay_UJeFlJM9WMIeBvNEVd0O_1", "status": "charged", "amount": 545, "order_tax_amount": null, "currency": "EUR", "connector": "nexixpay", "error_message": null, "payment_method": "card", "connector_transaction_id": "Sk6LXorxafrWXJ4eyr", "capture_method": "automatic", "authentication_type": "three_ds", "created_at": "2025-09-30T09:53:19.420Z", "modified_at": "2025-09-30T09:57:43.778Z", "cancellation_reason": null, "mandate_id": null, "error_code": null, "payment_token": "token_EJFI1EooKy0qnkpjqk05", "connector_metadata": { "psyncFlow": "Authorize", "cancelOperationId": null, "threeDSAuthResult": { "authenticationValue": "AJkBAiFGcAAAAAIhl4JzdQAAAAA=" }, "captureOperationId": "622504582202352739", "threeDSAuthResponse": "notneeded", "authorizationOperationId": "622504582202352739" }, "payment_experience": null, "payment_method_type": "credit", "reference_id": "Sk6LXorxafrWXJ4eyr", "unified_code": null, "unified_message": null, "client_source": null, "client_version": null } ], "payment_method_id": "pm_QfbMOx8yXdpxfniJwh53" } ``` ### Database Query Do a DB query: ```sql SELECT * FROM payment_methods WHERE payment_method_id = 'pm_QfbMOx8yXdpxfniJwh53'; ``` **Expected Result:** `connector_mandate_details` should be null in this case. </details> <details> <summary>2. Use same customer and card details and do an off_session payment (CIT creation)</summary> ### cURL Request ```bash curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_n5vnntb0V5gRjNMdwTnPXweumExJV6vYon3lVNzW2BoA3F4S4V0PXDHK3lW7gWHh' \ --data-raw '{ "amount": 545, "currency": "EUR", "profile_id": "pro_QEwjCvFhpcLC2azRNZEf", "return_url": "https://google.com", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4111 1111 1111 1111", "card_exp_month": "03", "card_exp_year": "30", "card_cvc": "737" } }, "confirm": true, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "authentication_type": "three_ds", "setup_future_usage": "off_session", "customer": { "id": "customerssh", "name": "John Doe", "email": "customerssh@gmail.com", "phone": "9999999999", "phone_country_code": "+1" }, "phone_country_code": "+1", "description": "Its my first payment request", "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "country": "BR", "zip": "94122", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "guest@example.com" }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "BR", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "guest@example.com" }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "order_details": [ { "product_name": "Apple iphone 15", "quantity": 1, "amount": 3545, "account_name": "transaction_processing" } ], "browser_info": { "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "language": "nl-NL", "color_depth": 24, "screen_height": 723, "screen_width": 1536, "time_zone": 0, "java_enabled": true, "java_script_enabled": true, "ip_address": "128.0.0.1" }, "customer_acceptance": { "acceptance_type": "online", "accepted_at": "1963-05-03T04:07:52.723Z", "online": { "ip_address": "127.0.0.1", "user_agent": "amet irure esse" } }, "connector_metadata": { "noon": { "order_category": "pay" } }, "payment_link": false, "payment_link_config": { "theme": "", "logo": "", "seller_name": "", "sdk_layout": "", "display_sdk_only": false, "enabled_saved_payment_method": false }, "payment_type": "normal", "request_incremental_authorization": false, "merchant_order_reference_id": "test_ord", "session_expiry": 900 }' ``` ### Response (Payments - Retrieve) ```json { "payment_id": "pay_13wFZiDN7ZUJtSx87U8Z", "merchant_id": "merchant_1759144749", "status": "succeeded", "amount": 545, "net_amount": 545, "shipping_cost": null, "amount_capturable": 0, "amount_received": 545, "connector": "nexixpay", "client_secret": "pay_13wFZiDN7ZUJtSx87U8Z_secret_JyWk0LkWu6tOa7mnLXUG", "created": "2025-09-30T10:01:01.076Z", "currency": "EUR", "customer_id": "customerssh", "customer": { "id": "customerssh", "name": "John Doe", "email": "customerssh@gmail.com", "phone": "9999999999", "phone_country_code": "+1" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "attempts": [ { "attempt_id": "pay_13wFZiDN7ZUJtSx87U8Z_1", "status": "charged", "amount": 545, "order_tax_amount": null, "currency": "EUR", "connector": "nexixpay", "error_message": null, "payment_method": "card", "connector_transaction_id": "9dHJb42gtTkDntQ7xY", "capture_method": "automatic", "authentication_type": "three_ds", "created_at": "2025-09-30T10:01:01.077Z", "modified_at": "2025-09-30T10:01:29.144Z", "cancellation_reason": null, "mandate_id": null, "error_code": null, "payment_token": "token_Ro6vBjhJSWBxtCDUjDTw", "connector_metadata": { "psyncFlow": "Authorize", "cancelOperationId": null, "threeDSAuthResult": { "authenticationValue": "AAkBBgmCIQAAAAIhl4JzdQAAAAA=" }, "captureOperationId": "501653294486252739", "threeDSAuthResponse": "notneeded", "authorizationOperationId": "501653294486252739" }, "payment_experience": null, "payment_method_type": "credit", "reference_id": "9dHJb42gtTkDntQ7xY", "unified_code": null, "unified_message": null, "client_source": null, "client_version": null } ], "payment_method_id": "pm_ZNF2NslDvKAFvlUG5HwO" } ``` </details> <details> <summary>3. Do a MIT payment</summary> ### cURL Request ```bash curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_n5vnntb0V5gRjNMdwTnPXweumExJV6vYon3lVNzW2BoA3F4S4V0PXDHK3lW7gWHh' \ --data '{ "amount": 3545, "currency": "EUR", "confirm": true, "customer_id": "customerssh", "recurring_details": { "type": "payment_method_id", "data": "pm_ZNF2NslDvKAFvlUG5HwO" }, "off_session": true }' ``` ### Response ```json { "payment_id": "pay_ZmNL5MZQmRC6YpbLcXWk", "merchant_id": "merchant_1759144749", "status": "succeeded", "amount": 3545, "net_amount": 3545, "shipping_cost": null, "amount_capturable": 0, "amount_received": 3545, "connector": "nexixpay", "client_secret": "pay_ZmNL5MZQmRC6YpbLcXWk_secret_24nJQzb7Fls1clDFoMyv", "created": "2025-09-30T10:02:54.008Z", "currency": "EUR", "customer_id": "customerssh", "customer": { "id": "customerssh", "name": "John Doe", "email": "customerssh@gmail.com", "phone": "9999999999", "phone_country_code": "+1" }, "description": null, "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": true, "capture_on": null, "capture_method": 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": "30", "card_holder_name": "joseph Doe", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": null, "order_details": null, "email": "customerssh@gmail.com", "name": "John Doe", "phone": "9999999999", "return_url": null, "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "customerssh", "created_at": 1759226573, "expires": 1759230173, "secret": "epk_4296651e27474ad2b0a0c3cd27f2748b" }, "manual_retry_allowed": null, "connector_transaction_id": "mhgsAykYdVmEKMSzIL", "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": "mhgsAykYdVmEKMSzIL", "payment_link": null, "profile_id": "pro_QEwjCvFhpcLC2azRNZEf", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_lJPT4aN2CbXmgSAFDmCT", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-30T10:17:54.008Z", "fingerprint": null, "browser_info": null, "payment_channel": null, "payment_method_id": "pm_ZNF2NslDvKAFvlUG5HwO", "network_transaction_id": null, "payment_method_status": "active", "updated": "2025-09-30T10:02:56.107Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "request_extended_authorization": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": "yjYPw5r6T7d2VgSbRf", "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 } ``` </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. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/nexixpay/transformers.rs` **Code Patterns Applied:** - Extend existing types with new fields (12 changes) **Detailed Identifier Changes:** Commit c2a35606: Files to modify: **crates/hyperswitch_connectors/src/connectors/nexixpay/transformers.rs** Modify existing code
{"pr_number": 9614, "pr_title": "fix(connectors): [Nexixpay] fix for failing MITs", "merged_at": "2025-09-30T14:08:59Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/nexixpay/transformers.rs"]}, "change_types": {"fields_added": 12}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(core): Add L2_L3 Data Support ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Database Changes Payment Intent: Added tax_status, discount_amount, shipping_amount_tax, duty_amount, customer_order_date Customer: Added tax_registration_id for tax information Address: Added origin_zip API Models Extended OrderDetailsWithAmount with SKU, UPC, commodity codes, unit prices Configuration: Added l2_l3_data_config.enabled setting WorldpayVantiv Integration: Added L2_L3 Support ### Additional Changes - [x] This PR modifies the API contract - [x] This PR modifies the database schema - [x] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Request ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key:' \ --data-raw '{ "amount": 10000, "currency": "USD", "tax_status": "exempt", "duty_amount": 400, "shipping_cost": 431, "discount_amount": 500, "shipping_amount_tax": 50, "customer_order_date": "2024-01-15T10:30:00Z", "confirm": true, "customer": { "id":"2343", "name": "John Doe", "email": "john@example.com", "tax_registration_id": "TAX123456789" }, "payment_method": "card", "payment_method_data": { "card": { "card_number": "4457030000000007", "card_exp_month": "09", "card_exp_year": "25", "card_holder_name": "John Doe", "card_cvc": "123" } }, "shipping": { "address": { "line1": "123 Main St", "city": "New York", "state": "NY", "zip": "10001", "country": "US", "origin_zip": "90210" } }, "billing": { "address": { "line1": "123 Main St", "city": "New York", "state": "NY", "zip": "10001", "country": "US", "origin_zip": "90210" } }, "order_details": [ { "product_name": "Laptop", "quantity": 1, "amount": 8000, "description": "Business laptop 23214324", "sku": "LAP-001", "upc": "123456789012", "commodity_code": "8471", "unit_of_measure": "EA", "unit_price": 8000, "unit_discount_amount": 200, "tax_rate": 0.08, "total_tax_amount": 640 }, { "product_name": "Mouse", "quantity": 2, "amount": 2000, "description": "Wireless office mouse", "sku": "MOU-001", "upc": "123456789013", "commodity_code": "8471", "unit_of_measure": "EA", "unit_price": 1000, "unit_discount_amount": 50, "tax_rate": 0.08, "total_tax_amount": 160 } ] }' ``` Response: ``` { "payment_id": "pay_OUsTMMm2dd7CIf3UPuyy", "merchant_id": "merchant_1754249521", "status": "processing", "amount": 10000, "net_amount": 10431, "shipping_cost": 431, "amount_capturable": 0, "amount_received": null, "connector": "worldpayvantiv", "client_secret": "", "created": "2025-08-04T10:18:14.351Z", "currency": "USD", "customer_id": "2343", "customer": { "id": "2343", "name": "John Doe", "email": "john@example.com", "phone": null, "phone_country_code": null }, "description": null, "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": null, "payment_method": "card", "payment_method_data": { "card": { "last4": "0007", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "445703", "card_extended_bin": null, "card_exp_month": "09", "card_exp_year": "25", "card_holder_name": "John Doe", "payment_checks": { "avs_result": "00", "advanced_a_v_s_result": null, "authentication_result": null, "card_validation_result": "M" }, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": { "address": { "city": "New York", "country": "US", "line1": "123 Main St", "line2": null, "line3": null, "zip": "10001", "state": "NY", "first_name": null, "last_name": null, "origin_zip": "90210" }, "phone": null, "email": null }, "billing": { "address": { "city": "New York", "country": "US", "line1": "123 Main St", "line2": null, "line3": null, "zip": "10001", "state": "NY", "first_name": null, "last_name": null, "origin_zip": "90210" }, "phone": null, "email": null }, "order_details": [ { "sku": "LAP-001", "upc": "123456789012", "brand": null, "amount": 8000, "category": null, "quantity": 1, "tax_rate": 0.08, "product_id": null, "unit_price": 8000, "description": "Business laptop 23214324", "product_name": "Laptop", "product_type": null, "sub_category": null, "commodity_code": "8471", "unit_of_measure": "EA", "product_img_link": null, "product_tax_code": null, "total_tax_amount": 640, "requires_shipping": null, "unit_discount_amount": 200 }, { "sku": "MOU-001", "upc": "123456789013", "brand": null, "amount": 2000, "category": null, "quantity": 2, "tax_rate": 0.08, "product_id": null, "unit_price": 1000, "description": "Wireless office mouse", "product_name": "Mouse", "product_type": null, "sub_category": null, "commodity_code": "8471", "unit_of_measure": "EA", "product_img_link": null, "product_tax_code": null, "total_tax_amount": 160, "requires_shipping": null, "unit_discount_amount": 50 } ], "email": "john@example.com", "name": "John Doe", "phone": null, "return_url": null, "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": null, "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "2343", "created_at": 1754302694, "expires": 1754306294, "secret": "epk_c1c74aaad371471a8aa95750d22a1437" }, "manual_retry_allowed": false, "connector_transaction_id": "83997340604909649", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "pay_OUsTMMm2dd7CIf3UPuyy_1", "payment_link": null, "profile_id": "pro_HDJ0f3KXb6AiA39FvRoP", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_pAOUAoDGtatNRAKxM0YQ", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-08-04T10:33:14.351Z", "fingerprint": null, "browser_info": null, "payment_channel": null, "payment_method_id": null, "payment_method_status": null, "updated": "2025-08-04T10:18:16.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": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null } ``` <img width="1496" height="967" alt="Screenshot 2025-08-04 at 3 50 03 PM" src="https://github.com/user-attachments/assets/7926e59b-012a-4099-b02e-725cefe080ef" /> <img width="1490" height="184" alt="Screenshot 2025-08-04 at 3 50 28 PM" src="https://github.com/user-attachments/assets/aad61b13-b93c-4e52-a6b5-3e25f40c318d" /> ## Checklist <!-- Put 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/customers.rs` - `crates/api_models/src/payment_methods.rs` - `crates/api_models/src/payments.rs` **2. Database Layer (Queries & Schema)** - `crates/diesel_models/src/address.rs` - `crates/diesel_models/src/customers.rs` - `crates/diesel_models/src/payment_intent.rs` - ... and 3 more files **3. 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/customer.rs` - ... and 6 more files **4. Core Business Logic** - `crates/router/src/core/authentication/transformers.rs` - `crates/router/src/core/customers.rs` - `crates/router/src/core/files.rs` - ... and 23 more files **5. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/chargebee/transformers.rs` - `crates/hyperswitch_connectors/src/connectors/recurly/transformers.rs` - `crates/hyperswitch_connectors/src/connectors/stripebilling/transformers.rs` - ... and 10 more files **6. Type Definitions** - `crates/router/src/compatibility/stripe/customers/types.rs` - `crates/router/src/compatibility/stripe/payment_intents/types.rs` - `crates/router/src/types.rs` - ... and 3 more files **7. Utils** - `crates/router/src/utils.rs` - `crates/router/src/utils/user/sample_data.rs` **8. Tests** - `cypress-tests/cypress/fixtures/confirm-body.json` - `cypress-tests/cypress/fixtures/create-customer-body.json` **9. Configuration Files** - `config/deployments/production.toml` - `config/deployments/sandbox.toml` - `config/development.toml` - ... and 2 more files **10. Other** - `api-reference/v1/openapi_spec_v1.json` - `api-reference/v2/openapi_spec_v2.json` - `crates/common_enums/src/enums.rs` - ... and 10 more files **Code Patterns Applied:** - Define new data structures (5 changes) - Implement new functions (2 changes) - Extend existing types with new fields (542 changes) - Add conditional logic for feature flags or filtering (1 changes) **Detailed Identifier Changes:** Commit 58a9c9f0: Files to modify: **crates/api_models/src/customers.rs** Modify existing code **crates/api_models/src/payment_methods.rs** Modify existing code **crates/api_models/src/payments.rs** Modify existing code **crates/common_enums/src/enums.rs** Add: - enum: pub::TaxStatus **crates/diesel_models/src/address.rs** Modify existing code **crates/diesel_models/src/customers.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/types.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/chargebee/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/recurly/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/stripebilling/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/worldpayvantiv/transformers.rs** Add: - function: private::get_enhanced_data - struct: pub::EnhancedData - struct: pub::DetailTax - struct: pub::LineItemData **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/customer.rs** Modify existing code **crates/hyperswitch_domain_models/src/lib.rs** Modify existing code **crates/hyperswitch_domain_models/src/payment_methods.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_data.rs** Add: - struct: pub::L2L3Data **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.rs** Modify existing code **crates/openapi/src/openapi_v2.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/configs/secrets_transformers.rs** Modify existing code **crates/router/src/configs/settings.rs** Add: - struct: pub::L2L3DataConfig **crates/router/src/core/authentication/transformers.rs** Modify existing code **crates/router/src/core/customers.rs** Modify existing code **crates/router/src/core/files.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/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/payments/helpers.rs** Modify existing code **crates/router/src/core/payments/operations/payment_complete_authorize.rs** Modify existing code **crates/router/src/core/payments/operations/payment_confirm.rs** Modify existing code **crates/router/src/core/payments/operations/payment_create.rs** Modify existing code **crates/router/src/core/payments/operations/payment_session.rs** Modify existing code **crates/router/src/core/payments/operations/payment_update.rs** Modify existing code **crates/router/src/core/payments/transformers.rs** Modify existing code **crates/router/src/core/payouts.rs** Modify existing code **crates/router/src/core/payouts/helpers.rs** Modify existing code **crates/router/src/core/refunds_v2.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/db/address.rs** Modify existing code **crates/router/src/types.rs** Modify existing code **crates/router/src/types/api/customers.rs** Modify existing code **crates/router/src/types/api/verify_connector.rs** Modify existing code **crates/router/src/types/domain/address.rs** Modify existing code **crates/router/src/types/transformers.rs** Modify existing code **crates/router/src/utils.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/adyen.rs** Modify existing code **crates/router/tests/connectors/dlocal.rs** Modify existing code **crates/router/tests/connectors/multisafepay.rs** Modify existing code **crates/router/tests/connectors/payme.rs** Modify existing code **crates/router/tests/connectors/utils.rs** Modify existing code **crates/router/tests/connectors/zen.rs** Modify existing code
{"pr_number": 8828, "pr_title": "feat(core): Add L2_L3 Data Support ", "merged_at": "2025-08-05T13:22:10Z", "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/payment_methods.rs", "crates/api_models/src/payments.rs"], "database": ["crates/diesel_models/src/address.rs", "crates/diesel_models/src/customers.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/types.rs"], "domain": ["crates/hyperswitch_domain_models/src/address.rs", "crates/hyperswitch_domain_models/src/bulk_tokenization.rs", "crates/hyperswitch_domain_models/src/customer.rs", "crates/hyperswitch_domain_models/src/lib.rs", "crates/hyperswitch_domain_models/src/payment_methods.rs", "crates/hyperswitch_domain_models/src/payments.rs", "crates/hyperswitch_domain_models/src/payments/payment_intent.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/customers.rs", "crates/router/src/core/files.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/payment_methods/tokenize/card_executor.rs", "crates/router/src/core/payment_methods/tokenize/payment_method_executor.rs", "crates/router/src/core/payments/helpers.rs", "crates/router/src/core/payments/operations/payment_complete_authorize.rs", "crates/router/src/core/payments/operations/payment_confirm.rs", "crates/router/src/core/payments/operations/payment_create.rs", "crates/router/src/core/payments/operations/payment_session.rs", "crates/router/src/core/payments/operations/payment_update.rs", "crates/router/src/core/payments/transformers.rs", "crates/router/src/core/payouts.rs", "crates/router/src/core/payouts/helpers.rs", "crates/router/src/core/refunds_v2.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/chargebee/transformers.rs", "crates/hyperswitch_connectors/src/connectors/recurly/transformers.rs", "crates/hyperswitch_connectors/src/connectors/stripebilling/transformers.rs", "crates/hyperswitch_connectors/src/connectors/worldpayvantiv/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/dlocal.rs", "crates/router/tests/connectors/multisafepay.rs", "crates/router/tests/connectors/payme.rs", "crates/router/tests/connectors/utils.rs", "crates/router/tests/connectors/zen.rs"], "types": ["crates/router/src/compatibility/stripe/customers/types.rs", "crates/router/src/compatibility/stripe/payment_intents/types.rs", "crates/router/src/types.rs", "crates/router/src/types/api/customers.rs", "crates/router/src/types/domain/address.rs", "crates/router/src/types/transformers.rs"], "utils": ["crates/router/src/utils.rs", "crates/router/src/utils/user/sample_data.rs"], "tests": ["cypress-tests/cypress/fixtures/confirm-body.json", "cypress-tests/cypress/fixtures/create-customer-body.json"], "config": ["config/deployments/production.toml", "config/deployments/sandbox.toml", "config/development.toml", "crates/router/src/configs/secrets_transformers.rs", "crates/router/src/configs/settings.rs"], "other": ["api-reference/v1/openapi_spec_v1.json", "api-reference/v2/openapi_spec_v2.json", "crates/common_enums/src/enums.rs", "crates/hyperswitch_interfaces/src/conversion_impls.rs", "crates/openapi/src/openapi.rs", "crates/openapi/src/openapi_v2.rs", "crates/router/src/db/address.rs", "migrations/2025-07-31-181024_add_l2_l3_fields_to_payment_intent/down.sql", "migrations/2025-07-31-181024_add_l2_l3_fields_to_payment_intent/up.sql", "migrations/2025-07-31-193521_add_tax_registration_id_to_customer/down.sql", "migrations/2025-07-31-193521_add_tax_registration_id_to_customer/up.sql", "migrations/2025-08-01-050109_add_origin_zip_to_address/down.sql", "migrations/2025-08-01-050109_add_origin_zip_to_address/up.sql"]}, "change_types": {"structs_added": 5, "functions_added": 2, "enums_added": 1, "fields_added": 542, "imports_added": 1, "conditionals_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(core): Adding integration for webhooks through UCS ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Added webhooks integration support in hyperswitch so that for webhooks hyperswitch can call UCS and get the response. Closes #8880 ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with 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? ``` curl --location 'http://localhost:8080/webhooks/merchant_1753974582/mca_lwqSM0js79MQm1DGwYRj' \ --header 'Content-Type: application/json' \ --header 'X-ANET-Signature: sha512=38b0bc1ea66b14793e39cd58e93d37b799a507442d0dd8d37443fa95dec58e57da6db4742636fea31201c48e57a66e73a308a2e5a5c6bb831e4e39fe2227c00f' \ --header 'api-key: dev_gkgtNkEyXov857WXSuWWiduf9a2PnTLd78j7ZVUheZ86M7nroCye8G3BEgqcL5SH' \ --data '{ "notificationId": "550e8400-e29b-41d4-a716-446655440000", "eventType": "net.authorize.payment.authorization.created", "eventDate": "2023-12-01T12:00:00Z", "webhookId": "webhook_123", "payload": { "responseCode": 1, "entityName": "transaction", "id": "120068558980", "authAmount": 6540, "merchantReferenceId": "REF123", "authCode": "ABC123", "messageText": "This transaction has been approved.", "avsResponse": "Y", "cvvResponse": "M" } }' ``` ## 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 img of hyperswitch <img width="1727" height="1045" alt="Screenshot 2025-08-07 at 9 32 55 AM" src="https://github.com/user-attachments/assets/b22707ae-027c-4f5f-8552-1a82372d8bed" /> img of UCS <img width="1728" height="1044" alt="Screenshot 2025-08-07 at 9 30 58 AM" src="https://github.com/user-attachments/assets/e5324ec7-0228-4963-ba24-dac2238c4068" /> Steps to test webhooks ✅ 1. Create a Sandbox Account on Authorize.Net Go to: https://developer.authorize.net/hello_world/sandbox/ Sign up for a sandbox account. After registration, note your: API Login ID Transaction Key (Optional: Public Client Key if needed) ✅ 2. Generate the Signature Key Log in to the Authorize.Net Sandbox Navigate to: Account → Settings → API Credentials & Keys Under Signature Key, click New Signature Key → click Submit Copy and save the Signature Key safely — you’ll use it to verify webhooks. ✅ 3. Enable Webhooks in Authorize.Net In your sandbox account, go to: Account → Settings → Webhooks Click Add Endpoint Endpoint URL: https://f9475498739857e.ngrok-free.app/webhooks/merchant_id/mca_of_merchant Event Types: Select the events you want (e.g., net.authorize.payment.authcapture.created) Save the webhook. ✅ 4. Configure Hyperswitch Merchant with Signature & Credentials While creating a merchant in Hyperswitch, add the following: authentication creds BodyKey api_key = API Login ID (from step 1) key1 = Transaction Key and below you file find a field named merchant secret where you will put the signature Signature Key (from step 2) This allows Hyperswitch to authenticate with Authorize.Net and validate incoming webhooks. ✅ 5. Trigger a Payment to Receive Webhooks Use Hyperswitch to make a test payment through the merchant you configured. If everything is set up: Authorize.Net will send a webhook to your endpoint (ngrok URL). Your backend should receive and verify the webhook using the signature key. ✅ Optional: Use ngrok to Test Webhooks Locally If running locally: `ngrok http 8080` Use the https://xxxx.ngrok-free.app URL as the webhook URL in step 3.
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/unified_connector_service.rs` - `crates/router/src/core/unified_connector_service/transformers.rs` - ... and 1 more files **2. External Connector Integration** - `crates/external_services/src/grpc_client/unified_connector_service.rs` **Code Patterns Applied:** - Define new data structures (2 changes) - Implement new functions (15 changes) - Extend existing types with new fields (87 changes) - Add conditional logic for feature flags or filtering (9 changes) - Modify database queries (1 changes) **Detailed Identifier Changes:** Commit a6624699: Files to modify: **crates/external_services/src/grpc_client/unified_connector_service.rs** Modify existing code **crates/router/src/core/payments/helpers.rs** Add: - function: pub::get_webhook_details **crates/router/src/core/unified_connector_service.rs** Remove: - mod: private::transformers Add: - function: pub::should_call_unified_connector_service_for_webhooks - function: pub::build_webhook_secrets_from_merchant_connector_account - function: pub::call_unified_connector_service_for_webhook - function: pub::extract_webhook_content_from_ucs_response - mod: pub::transformers **crates/router/src/core/unified_connector_service/transformers.rs** Add: - function: private::foreign_try_from - function: pub::transform_ucs_webhook_response - function: pub::build_webhook_transform_request - struct: pub::WebhookTransformData - impl: impl ForeignTryFrom<&hyperswitch_interfaces::webhooks::IncomingWebhookRequestDetails<'_>> for payments_grpc::RequestDetails **crates/router/src/core/webhooks/incoming.rs** Add: - function: private::process_ucs_webhook_transform - function: private::extract_webhook_event_object - struct: pub::WebhookProcessingResult Commit 06dc66c6: Files to modify: **crates/external_services/src/grpc_client/unified_connector_service.rs** Modify existing code **crates/router/src/core/payments/helpers.rs** Add: - function: pub::get_webhook_details **crates/router/src/core/unified_connector_service.rs** Remove: - mod: private::transformers Add: - function: pub::should_call_unified_connector_service_for_webhooks - function: pub::build_webhook_secrets_from_merchant_connector_account - function: pub::call_unified_connector_service_for_webhook - function: pub::extract_webhook_content_from_ucs_response - mod: pub::transformers **crates/router/src/core/unified_connector_service/transformers.rs** Add: - function: private::foreign_try_from - function: pub::transform_ucs_webhook_response - function: pub::build_webhook_transform_request - struct: pub::WebhookTransformData - impl: impl ForeignTryFrom<&hyperswitch_interfaces::webhooks::IncomingWebhookRequestDetails<'_>> for payments_grpc::RequestDetails **crates/router/src/core/webhooks/incoming.rs** Add: - function: private::process_ucs_webhook_transform - function: private::extract_webhook_event_object - struct: pub::WebhookProcessingResult
{"pr_number": 8814, "pr_title": "feat(core): Adding integration for webhooks through UCS", "merged_at": "2025-08-08T14:35:40Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "merchant", "user"]}, "hierarchy": {"core_business": ["crates/router/src/core/payments/helpers.rs", "crates/router/src/core/unified_connector_service.rs", "crates/router/src/core/unified_connector_service/transformers.rs", "crates/router/src/core/webhooks/incoming.rs"], "connectors": ["crates/external_services/src/grpc_client/unified_connector_service.rs"]}, "change_types": {"structs_added": 2, "functions_added": 15, "fields_added": 87, "imports_added": 3, "conditionals_added": 9, "database_queries": 1}, "has_identifier_data": true, "commits_matched": 2, "match_method": "pr_number"}
chore: address Rust 1.83.0 clippy lints and enable more clippy lints ## 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 addresses clippy lints stabilized / enabled in Rust 1.83.0. The major warnings being thrown due to the version bump were [`empty_line_after_doc_comments`](https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments) and [`empty_line_after_outer_attr`](https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_outer_attr), and very few were from [`needless_lifetimes`](https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes). Consequently, addressing these involved removing some blank lines after doc comments and attributes, and removing the unnecessary lifetime annotations. In addition, this PR enables and addresses the following lints: - [`cloned_instead_of_copied`](https://rust-lang.github.io/rust-clippy/master/index.html#cloned_instead_of_copied): Checks for usage of `cloned()` on an `Iterator` or `Option` where `copied()` could be used instead. - [`dbg_macro`](https://rust-lang.github.io/rust-clippy/master/index.html#dbg_macro): Checks for usage of the `dbg!` macro. - [`fn_params_excessive_bools`](https://rust-lang.github.io/rust-clippy/master/index.html#fn_params_excessive_bools): Checks for excessive use of bools in function definitions, suggests two-variant enums instead. The maximum number of boolean params allowed by default is 3. - There's also [`struct_excessive_bools`](https://rust-lang.github.io/rust-clippy/master/index.html#struct_excessive_bools) which warns about excessive usage of bools in structs, which I did NOT enable, since some of the fields in say business profile are bools, which toggle specific features of behavior and may not be easily replaceable with enums. - [`mod_module_files`](https://rust-lang.github.io/rust-clippy/master/index.html#mod_module_files): Warns if `mod.rs` files are included in the module structure. - [`unnecessary_self_imports`](https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_self_imports): Checks for imports ending in `::{self}`. - [`wildcard_dependencies`](https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_dependencies): Checks for wildcard dependencies in the `Cargo.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). --> Resolves #6704. As for the new lints enabled, they should help ensure better consistency throughout the codebase and help enforce certain practices. ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> From what I'd expect, none of the existing behavior should be affected due to these changes. Our Postman and Cypress tests running on CI should pass, 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` - [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/analytics.rs` - `crates/api_models/src/api_keys.rs` - ... and 7 more files **2. Database Layer (Queries & Schema)** - `crates/diesel_models/src/configs.rs` - `crates/diesel_models/src/lib.rs` - `crates/diesel_models/src/organization.rs` - ... and 3 more files **3. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/merchant_account.rs` - `crates/hyperswitch_domain_models/src/payment_method_data.rs` **4. Core Business Logic** - `crates/external_services/src/hashicorp_vault/core.rs` - `crates/router/src/core/admin.rs` - `crates/router/src/core/payment_methods/cards.rs` - ... and 8 more files **5. External Connector Integration** - `crates/connector_configs/src/common_config.rs` - `crates/connector_configs/src/connector.rs` - `crates/hyperswitch_connectors/src/connectors/multisafepay/transformers.rs` - ... and 17 more files **6. Type Definitions** - `crates/common_utils/src/types.rs` - `crates/common_utils/src/types/keymanager.rs` - `crates/euclid/src/dssa/types.rs` - ... and 5 more files **7. Utils** - `crates/common_utils/src/crypto.rs` - `crates/common_utils/src/custom_serde.rs` - `crates/common_utils/src/errors.rs` - ... and 4 more files **8. Tests** - `crates/router_env/tests/logger.rs` - `crates/router_env/tests/test_module/some_module.rs` - `crates/router_env/tests/test_module/mod.rs` **9. Configuration Files** - `.clippy.toml` - `Cargo.toml` - `crates/router_env/src/logger/config.rs` **10. Other** - `api-reference-v2/openapi_spec.json` - `api-reference/openapi_spec.json` - `crates/analytics/src/disputes/metrics/sessionized_metrics/mod.rs` - ... and 66 more files **Code Patterns Applied:** - Implement new functions (2 changes) - Extend existing types with new fields (9 changes) **Detailed Identifier Changes:** Commit 9a59d0a5: Files to modify: **crates/api_models/src/admin.rs** Modify existing code **crates/api_models/src/analytics.rs** Modify existing code **crates/api_models/src/api_keys.rs** Remove: - impl: impl serde::de::Visitor<'de> for NeverVisitor Add: - impl: impl serde::de::Visitor<'_> for NeverVisitor **crates/api_models/src/conditional_configs.rs** Modify existing code **crates/api_models/src/enums.rs** Modify existing code **crates/api_models/src/payments.rs** Modify existing code **crates/api_models/src/pm_auth.rs** Modify existing code **crates/api_models/src/routing.rs** Modify existing code **crates/api_models/src/user/sample_data.rs** Modify existing code **crates/cards/src/validate.rs** Modify existing code **crates/common_enums/src/transformers.rs** Modify existing code **crates/common_utils/src/crypto.rs** Modify existing code **crates/common_utils/src/custom_serde.rs** Modify existing code **crates/common_utils/src/errors.rs** Modify existing code **crates/common_utils/src/ext_traits.rs** Modify existing code **crates/common_utils/src/pii.rs** Modify existing code **crates/common_utils/src/signals.rs** Modify existing code **crates/common_utils/src/types.rs** Remove: - impl: impl Visitor<'de> for ClientSecretVisitor Add: - impl: impl Visitor<'_> for ClientSecretVisitor **crates/common_utils/src/types/keymanager.rs** Modify existing code **crates/connector_configs/src/common_config.rs** Modify existing code **crates/connector_configs/src/connector.rs** Modify existing code **crates/diesel_models/src/configs.rs** Modify existing code **crates/diesel_models/src/lib.rs** Modify existing code **crates/diesel_models/src/organization.rs** Modify existing code **crates/diesel_models/src/payment_attempt.rs** Modify existing code **crates/diesel_models/src/reverse_lookup.rs** Modify existing code **crates/diesel_models/src/services/logger.rs** Modify existing code **crates/drainer/src/services.rs** Modify existing code **crates/euclid/src/dssa/analyzer.rs** Modify existing code **crates/euclid/src/dssa/graph.rs** Modify existing code **crates/euclid/src/dssa/types.rs** Remove: - impl: impl CtxValueKind<'a> Add: - impl: impl CtxValueKind<'_> **crates/euclid/src/frontend/ast.rs** Modify existing code **crates/euclid/src/frontend/ast/lowering.rs** Modify existing code **crates/euclid/src/frontend/ast/parser.rs** Modify existing code **crates/events/src/lib.rs** Modify existing code **crates/external_services/src/file_storage.rs** Modify existing code **crates/external_services/src/file_storage/file_system.rs** Modify existing code **crates/external_services/src/hashicorp_vault/core.rs** Modify existing code **crates/external_services/src/managers/encryption_management.rs** Modify existing code **crates/external_services/src/managers/secrets_management.rs** Modify existing code **crates/external_services/src/no_encryption.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/multisafepay/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/nexinets/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/novalnet/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/razorpay/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/tsys/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/worldpay.rs** Modify existing code **crates/hyperswitch_connectors/src/utils.rs** Modify existing code **crates/hyperswitch_constraint_graph/src/graph.rs** Modify existing code **crates/hyperswitch_domain_models/src/merchant_account.rs** Modify existing code **crates/hyperswitch_domain_models/src/payment_method_data.rs** Modify existing code **crates/hyperswitch_interfaces/src/secrets_interface.rs** Modify existing code **crates/hyperswitch_interfaces/src/secrets_interface/secret_state.rs** Modify existing code **crates/kgraph_utils/src/types.rs** Modify existing code **crates/masking/src/abs.rs** Modify existing code **crates/masking/src/boxed.rs** Modify existing code **crates/masking/src/diesel.rs** Remove: - impl: impl AsExpression<T> for &'expr Secret<S, I> Add: - impl: impl AsExpression<T> for &Secret<S, I> **crates/masking/src/lib.rs** Modify existing code **crates/masking/src/maskable.rs** Modify existing code **crates/masking/src/secret.rs** Modify existing code **crates/masking/src/serde.rs** Modify existing code **crates/masking/src/string.rs** Modify existing code **crates/masking/src/strong_secret.rs** Modify existing code **crates/masking/src/vec.rs** Modify existing code **crates/openapi/src/routes/payments.rs** Modify existing code **crates/openapi/src/routes/routing.rs** Modify existing code **crates/pm_auth/src/connector/plaid/transformers.rs** Modify existing code **crates/redis_interface/src/commands.rs** Modify existing code **crates/redis_interface/src/errors.rs** Modify existing code **crates/redis_interface/src/types.rs** Modify existing code **crates/router/src/connector/adyen/transformers.rs** Remove: - impl: impl TryFrom<(&domain::BankDebitData, &types::PaymentsAuthorizeRouterData)> for AdyenPaymentMethod<'a> - impl: impl TryFrom<(&domain::VoucherData, &types::PaymentsAuthorizeRouterData)> for AdyenPaymentMethod<'a> - impl: impl TryFrom<(&domain::WalletData, &types::PaymentsAuthorizeRouterData)> for AdyenPaymentMethod<'a> Add: - impl: impl TryFrom<(&domain::BankDebitData, &types::PaymentsAuthorizeRouterData)> for AdyenPaymentMethod<'_> - impl: impl TryFrom<(&domain::VoucherData, &types::PaymentsAuthorizeRouterData)> for AdyenPaymentMethod<'_> **crates/router/src/connector/braintree/transformers.rs** Modify existing code **crates/router/src/connector/datatrans.rs** Modify existing code **crates/router/src/connector/globalpay/requests.rs** Modify existing code **crates/router/src/connector/paypal/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/utils.rs** Modify existing code **crates/router/src/connector/wellsfargopayout.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/payment_methods/utils.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/pm_auth/transformers.rs** Modify existing code **crates/router/src/core/refunds.rs** Modify existing code **crates/router/src/core/routing/helpers.rs** Remove: - impl: impl RoutingAlgorithmHelpers<'h> Add: - impl: impl RoutingAlgorithmHelpers<'_> **crates/router/src/core/user.rs** Modify existing code **crates/router/src/core/user_role/role.rs** Modify existing code **crates/router/src/db/user_authentication_method.rs** Modify existing code **crates/router/src/routes/payment_link.rs** Modify existing code **crates/router/src/routes/payments.rs** Modify existing code **crates/router/src/services/api/client.rs** Modify existing code **crates/router/src/services/authentication/decision.rs** Modify existing code **crates/router/src/services/kafka.rs** Modify existing code **crates/router/src/services/kafka/authentication.rs** Remove: - impl: impl super::KafkaMessage for KafkaAuthentication<'a> Add: - impl: impl super::KafkaMessage for KafkaAuthentication<'_> **crates/router/src/services/kafka/authentication_event.rs** Remove: - impl: impl super::KafkaMessage for KafkaAuthenticationEvent<'a> Add: - impl: impl super::KafkaMessage for KafkaAuthenticationEvent<'_> **crates/router/src/services/kafka/dispute.rs** Remove: - impl: impl super::KafkaMessage for KafkaDispute<'a> Add: - impl: impl super::KafkaMessage for KafkaDispute<'_> **crates/router/src/services/kafka/dispute_event.rs** Remove: - impl: impl super::KafkaMessage for KafkaDisputeEvent<'a> Add: - impl: impl super::KafkaMessage for KafkaDisputeEvent<'_> **crates/router/src/services/kafka/fraud_check.rs** Remove: - impl: impl super::KafkaMessage for KafkaFraudCheck<'a> Add: - impl: impl super::KafkaMessage for KafkaFraudCheck<'_> **crates/router/src/services/kafka/fraud_check_event.rs** Remove: - impl: impl super::KafkaMessage for KafkaFraudCheckEvent<'a> Add: - impl: impl super::KafkaMessage for KafkaFraudCheckEvent<'_> **crates/router/src/services/kafka/payment_attempt.rs** Remove: - impl: impl super::KafkaMessage for KafkaPaymentAttempt<'a> Add: - impl: impl super::KafkaMessage for KafkaPaymentAttempt<'_> **crates/router/src/services/kafka/payment_attempt_event.rs** Remove: - impl: impl super::KafkaMessage for KafkaPaymentAttemptEvent<'a> Add: - impl: impl super::KafkaMessage for KafkaPaymentAttemptEvent<'_> **crates/router/src/services/kafka/payment_intent.rs** Remove: - impl: impl super::KafkaMessage for KafkaPaymentIntent<'a> Add: - impl: impl super::KafkaMessage for KafkaPaymentIntent<'_> **crates/router/src/services/kafka/payment_intent_event.rs** Remove: - impl: impl super::KafkaMessage for KafkaPaymentIntentEvent<'a> Add: - impl: impl super::KafkaMessage for KafkaPaymentIntentEvent<'_> **crates/router/src/services/kafka/payout.rs** Remove: - impl: impl super::KafkaMessage for KafkaPayout<'a> Add: - impl: impl super::KafkaMessage for KafkaPayout<'_> **crates/router/src/services/kafka/refund.rs** Remove: - impl: impl super::KafkaMessage for KafkaRefund<'a> Add: - impl: impl super::KafkaMessage for KafkaRefund<'_> **crates/router/src/services/kafka/refund_event.rs** Remove: - impl: impl super::KafkaMessage for KafkaRefundEvent<'a> Add: - impl: impl super::KafkaMessage for KafkaRefundEvent<'_> **crates/router/src/services/logger.rs** Modify existing code **crates/router/src/types/storage/payment_link.rs** Modify existing code **crates/router/src/types/transformers.rs** Modify existing code **crates/router/src/utils/user_role.rs** Modify existing code **crates/router/src/workflows/payment_sync.rs** Modify existing code **crates/router/tests/connectors/aci.rs** Modify existing code **crates/router_derive/src/lib.rs** Modify existing code **crates/router_derive/src/macros/operation.rs** Modify existing code **crates/router_env/src/lib.rs** Modify existing code **crates/router_env/src/logger/config.rs** Modify existing code **crates/router_env/src/logger/formatter.rs** Modify existing code **crates/router_env/src/logger/setup.rs** Modify existing code **crates/router_env/src/logger/storage.rs** Modify existing code **crates/router_env/src/logger/types.rs** Modify existing code **crates/router_env/tests/logger.rs** Modify existing code **crates/router_env/tests/test_module/mod.rs** Remove: - mod: pub::some_module **crates/storage_impl/src/mock_db.rs** Modify existing code **crates/storage_impl/src/redis/cache.rs** Remove: - impl: impl TryFrom<RedisValue> for CacheRedact<'a> Add: - impl: impl TryFrom<RedisValue> for CacheRedact<'_> **crates/storage_impl/src/redis/kv_store.rs** Modify existing code
{"pr_number": 6705, "pr_title": "chore: address Rust 1.83.0 clippy lints and enable more clippy lints", "merged_at": "2024-12-02T14:57:14Z", "intent": {"feature_type": "payment", "action": "add_feature", "entities": ["card"]}, "hierarchy": {"api_models": ["crates/api_models/src/admin.rs", "crates/api_models/src/analytics.rs", "crates/api_models/src/api_keys.rs", "crates/api_models/src/conditional_configs.rs", "crates/api_models/src/enums.rs", "crates/api_models/src/errors/mod.rs", "crates/api_models/src/payments.rs", "crates/api_models/src/pm_auth.rs", "crates/api_models/src/routing.rs", "crates/api_models/src/user/sample_data.rs"], "database": ["crates/diesel_models/src/configs.rs", "crates/diesel_models/src/lib.rs", "crates/diesel_models/src/organization.rs", "crates/diesel_models/src/payment_attempt.rs", "crates/diesel_models/src/reverse_lookup.rs", "crates/diesel_models/src/services/logger.rs"], "domain": ["crates/hyperswitch_domain_models/src/merchant_account.rs", "crates/hyperswitch_domain_models/src/payment_method_data.rs"], "core_business": ["crates/external_services/src/hashicorp_vault/core.rs", "crates/router/src/core/admin.rs", "crates/router/src/core/payment_methods/cards.rs", "crates/router/src/core/payment_methods/utils.rs", "crates/router/src/core/payments.rs", "crates/router/src/core/payments/helpers.rs", "crates/router/src/core/pm_auth/transformers.rs", "crates/router/src/core/refunds.rs", "crates/router/src/core/routing/helpers.rs", "crates/router/src/core/user.rs", "crates/router/src/core/user_role/role.rs"], "connectors": ["crates/connector_configs/src/common_config.rs", "crates/connector_configs/src/connector.rs", "crates/hyperswitch_connectors/src/connectors/multisafepay/transformers.rs", "crates/hyperswitch_connectors/src/connectors/nexinets/transformers.rs", "crates/hyperswitch_connectors/src/connectors/novalnet/transformers.rs", "crates/hyperswitch_connectors/src/connectors/razorpay/transformers.rs", "crates/hyperswitch_connectors/src/connectors/tsys/transformers.rs", "crates/hyperswitch_connectors/src/connectors/worldpay.rs", "crates/hyperswitch_connectors/src/utils.rs", "crates/pm_auth/src/connector/plaid/transformers.rs", "crates/router/src/connector/adyen/transformers.rs", "crates/router/src/connector/braintree/transformers.rs", "crates/router/src/connector/datatrans.rs", "crates/router/src/connector/globalpay/requests.rs", "crates/router/src/connector/paypal/transformers.rs", "crates/router/src/connector/riskified/transformers/api.rs", "crates/router/src/connector/signifyd/transformers/api.rs", "crates/router/src/connector/utils.rs", "crates/router/src/connector/wellsfargopayout.rs", "crates/router/tests/connectors/aci.rs"], "types": ["crates/common_utils/src/types.rs", "crates/common_utils/src/types/keymanager.rs", "crates/euclid/src/dssa/types.rs", "crates/kgraph_utils/src/types.rs", "crates/redis_interface/src/types.rs", "crates/router/src/types/storage/payment_link.rs", "crates/router/src/types/transformers.rs", "crates/router_env/src/logger/types.rs"], "utils": ["crates/common_utils/src/crypto.rs", "crates/common_utils/src/custom_serde.rs", "crates/common_utils/src/errors.rs", "crates/common_utils/src/ext_traits.rs", "crates/common_utils/src/pii.rs", "crates/common_utils/src/signals.rs", "crates/router/src/utils/user_role.rs"], "tests": ["crates/router_env/tests/logger.rs", "crates/router_env/tests/test_module/some_module.rs", "crates/router_env/tests/test_module/mod.rs"], "config": [".clippy.toml", "Cargo.toml", "crates/router_env/src/logger/config.rs"], "other": ["api-reference-v2/openapi_spec.json", "api-reference/openapi_spec.json", "crates/analytics/src/disputes/metrics/sessionized_metrics/mod.rs", "crates/analytics/src/payment_intents/metrics/sessionized_metrics/mod.rs", "crates/analytics/src/payments/metrics/sessionized_metrics/mod.rs", "crates/analytics/src/refunds/metrics/sessionized_metrics/mod.rs", "crates/cards/src/validate.rs", "crates/common_enums/src/transformers.rs", "crates/drainer/src/services.rs", "crates/euclid/src/dssa/analyzer.rs", "crates/euclid/src/dssa/graph.rs", "crates/euclid/src/frontend/ast.rs", "crates/euclid/src/frontend/ast/lowering.rs", "crates/euclid/src/frontend/ast/parser.rs", "crates/events/src/lib.rs", "crates/external_services/src/file_storage.rs", "crates/external_services/src/file_storage/file_system.rs", "crates/external_services/src/managers/encryption_management.rs", "crates/external_services/src/managers/secrets_management.rs", "crates/external_services/src/no_encryption.rs", "crates/hyperswitch_constraint_graph/src/graph.rs", "crates/hyperswitch_interfaces/src/secrets_interface.rs", "crates/hyperswitch_interfaces/src/secrets_interface/secret_state.rs", "crates/masking/src/abs.rs", "crates/masking/src/boxed.rs", "crates/masking/src/diesel.rs", "crates/masking/src/lib.rs", "crates/masking/src/maskable.rs", "crates/masking/src/secret.rs", "crates/masking/src/serde.rs", "crates/masking/src/string.rs", "crates/masking/src/strong_secret.rs", "crates/masking/src/vec.rs", "crates/openapi/src/routes/payments.rs", "crates/openapi/src/routes/routing.rs", "crates/redis_interface/src/commands.rs", "crates/redis_interface/src/errors.rs", "crates/router/src/db/user_authentication_method.rs", "crates/router/src/routes/payment_link.rs", "crates/router/src/routes/payments.rs", "crates/router/src/services/api/client.rs", "crates/router/src/services/authentication/decision.rs", "crates/router/src/services/kafka.rs", "crates/router/src/services/kafka/authentication.rs", "crates/router/src/services/kafka/authentication_event.rs", "crates/router/src/services/kafka/dispute.rs", "crates/router/src/services/kafka/dispute_event.rs", "crates/router/src/services/kafka/fraud_check.rs", "crates/router/src/services/kafka/fraud_check_event.rs", "crates/router/src/services/kafka/payment_attempt.rs", "crates/router/src/services/kafka/payment_attempt_event.rs", "crates/router/src/services/kafka/payment_intent.rs", "crates/router/src/services/kafka/payment_intent_event.rs", "crates/router/src/services/kafka/payout.rs", "crates/router/src/services/kafka/refund.rs", "crates/router/src/services/kafka/refund_event.rs", "crates/router/src/services/logger.rs", "crates/router/src/workflows/payment_sync.rs", "crates/router_derive/src/lib.rs", "crates/router_derive/src/macros/operation.rs", "crates/router_env/src/lib.rs", "crates/router_env/src/logger/mod.rs", "crates/router_env/src/logger/formatter.rs", "crates/router_env/src/logger/setup.rs", "crates/router_env/src/logger/storage.rs", "crates/scheduler/src/db/mod.rs", "crates/storage_impl/src/mock_db.rs", "crates/storage_impl/src/redis/cache.rs", "crates/storage_impl/src/redis/kv_store.rs"]}, "change_types": {"functions_added": 2, "fields_added": 9, "imports_added": 13}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix: script for one click docker setup ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [X] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Added the script for showing output of ```docker compose up -d``` command, along with links to access individual components. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with 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 #7761 ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Attached SS from testing in local. <img width="708" alt="Screenshot 2025-04-13 at 11 06 39 PM" src="https://github.com/user-attachments/assets/31b2d7cb-2071-40ec-a74e-e48ba3e844a3" /> ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Other** - `README.md` - `scripts/docker_output.sh` **Code Patterns Applied:** - Add conditional logic for feature flags or filtering (1 changes)
{"pr_number": 7806, "pr_title": "fix: script for one click docker setup", "merged_at": "2025-04-13T18:11:03Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user"]}, "hierarchy": {"other": ["README.md", "scripts/docker_output.sh"]}, "change_types": {"conditionals_added": 1}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
fix(payment_methods_v2): update fingerprint implementation in 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 --> fix fingerprint implementation in v2. Earlier, Card number is sent as the key to generate fingerprint, which restricted us to add same card for different customer and different merchant. this pr fix the above by sending customer id as key while generation of fingerprint, which allows us to add same payment method for different customer. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with 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- same card can be added for different customers. ``` curl --location 'http://localhost:8080/v2/payment-methods' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'X-Profile-Id: pro_nZPdPtZmxxlxBQxxDsTM' \ --header 'api-key: dev_UblADk7XfAj2jCugEm86wsb84vmJWIYjm7TAQ6OgsQnYLpdKIywodo8BMPbP7hIP' \ --data '{ "customer_id": "12345_cus_019503c1a84975f1aabe5c71981158c1", "payment_method_type": "card", "payment_method_subtype": "credit", "payment_method_data": { "card": { "card_number": "card_number", "card_exp_month": "12", "card_exp_year": "2026", "card_holder_name": "joseph Doe" } } }' ``` response - ``` { "id": "12345_pm_01951d84344c7731a0a8805aa993256", "merchant_id": "cloth_seller_TWLZ5PYK9pFQ2gQ8g0Pr", "customer_id": "12345_cus_01951d4d9b2370a2bd661b6c07f096d5", "payment_method_type": "card", "payment_method_subtype": "credit", "recurring_enabled": false, "created": "2025-02-19T09:22:38.284Z", "last_used_at": "2025-02-19T09:22:38.284Z", "payment_method_data": { "card": { "issuer_country": null, "last4_digits": "0093", "expiry_month": "12", "expiry_year": "2026", "card_holder_name": "joseph Doe", "card_fingerprint": null, "nick_name": null, "card_network": null, "card_isin": null, "card_issuer": null, "card_type": null, "saved_to_locker": true } } } ``` ```{ "id": "12345_pm_01951d84d26876518c3f1b6c3c73ffac", "merchant_id": "cloth_seller_TWLZ57PXGpf9C2gQ8g0Pr", "customer_id": "12345_cus_01951d84a09071c0bce22d74a345d3e4", "payment_method_type": "card", "payment_method_subtype": "credit", "recurring_enabled": false, "created": "2025-02-19T09:23:18.761Z", "last_used_at": "2025-02-19T09:23:18.761Z", "payment_method_data": { "card": { "issuer_country": null, "last4_digits": "0093", "expiry_month": "12", "expiry_year": "2026", "card_holder_name": "joseph Doe", "card_fingerprint": null, "nick_name": null, "card_network": null, "card_isin": null, "card_issuer": null, "card_type": null, "saved_to_locker": true } } } ``` ## Checklist <!-- Put 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/payment_methods/vault.rs` **Code Patterns Applied:** - Extend existing types with new fields (2 changes) **Detailed Identifier Changes:** Commit e475f639: Files to modify: **crates/router/src/core/payment_methods.rs** Modify existing code **crates/router/src/core/payment_methods/vault.rs** Modify existing code
{"pr_number": 7270, "pr_title": "fix(payment_methods_v2): update fingerprint implementation in v2", "merged_at": "2025-02-20T13:53:58Z", "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/payment_methods/vault.rs"]}, "change_types": {"fields_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat: Implement subscriptions workflow and incoming webhook support ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This pr adds support for the invoice-generated event type for the incoming webhook for Chargebee and creates a process tracker entry that will trigger a S2S call and invoice sync. ### 1. __Invoice Generated Webhook Support__ - Implements handling for Chargebee's `invoice_generated` webhook event - Creates process tracker entries for subscription workflow management - Added SubscriptionId to ObjectReferenceId for subscription webhook - Created a get_mca_from_subscription_id function to fetch the MerchantConnectorAccount from the SubscriptionId ### 2. __Subscription Workflow Integration__ - Adds subscription workflow tracking data - Implements process tracker integration for subscription events ### 3. __Database Changes__ - Insert details into the invoice 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? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Insert into subscription table ``` INSERT INTO public.subscription ( id, status, billing_processor, payment_method_id, merchant_connector_id, client_secret, connector_subscription_id, merchant_id, customer_id, metadata, created_at, modified_at, profile_id, merchant_reference_id ) VALUES ( '169vD0Uxi8JB746e', 'active', 'chargebee', 'pm_98765', 'mca_YH3XxYGMv6IbKD0icBie', 'secret_subs_1231abcd', '169vD0Uxi8JB746e', 'merchant_1758710612', 'gaurav_test', '{"plan":"basic","trial":true}', NOW(), NOW(), 'pro_RkLiGcSuaRjmxA5suSfV', 'ref_subs_1231abcd' ); ``` incoming webhook for chargebee ``` curl --location 'http://localhost:8080/webhooks/merchant_1758710612/mca_YH3XxYGMv6IbKD0icBie' \ --header 'api-key: dev_5LNrrMNqyyFle8hvMssLob9pFq6OIEh0Vl3DqZttFXiDe7wrrScUePEYrIiYfSKT' \ --header 'Content-Type: application/json' \ --header 'authorization: Basic aHlwZXJzd2l0Y2g6aHlwZXJzd2l0Y2g=' \ --data-raw '{ "api_version": "v2", "content": { "invoice": { "adjustment_credit_notes": [], "amount_adjusted": 0, "amount_due": 14100, "amount_paid": 0, "amount_to_collect": 14100, "applied_credits": [], "base_currency_code": "INR", "channel": "web", "credits_applied": 0, "currency_code": "INR", "customer_id": "gaurav_test", "date": 1758711043, "deleted": false, "due_date": 1758711043, "dunning_attempts": [], "exchange_rate": 1.0, "first_invoice": false, "generated_at": 1758711043, "has_advance_charges": false, "id": "3", "is_gifted": false, "issued_credit_notes": [], "line_items": [ { "amount": 14100, "customer_id": "gaurav_test", "date_from": 1758711043, "date_to": 1761303043, "description": "Enterprise Suite Monthly", "discount_amount": 0, "entity_id": "cbdemo_enterprise-suite-monthly", "entity_type": "plan_item_price", "id": "li_169vD0Uxi8JBp46g", "is_taxed": false, "item_level_discount_amount": 0, "object": "line_item", "pricing_model": "flat_fee", "quantity": 1, "subscription_id": "169vD0Uxi8JB746e", "tax_amount": 0, "tax_exempt_reason": "tax_not_configured", "unit_amount": 14100 } ], "linked_orders": [], "linked_payments": [], "net_term_days": 0, "new_sales_amount": 14100, "object": "invoice", "price_type": "tax_exclusive", "recurring": true, "reference_transactions": [], "resource_version": 1758711043846, "round_off_amount": 0, "site_details_at_creation": { "timezone": "Asia/Calcutta" }, "status": "payment_due", "sub_total": 14100, "subscription_id": "169vD0Uxi8JB746e", "tax": 0, "term_finalized": true, "total": 14100, "updated_at": 1758711043, "write_off_amount": 0 } }, "event_type": "invoice_generated", "id": "ev_169vD0Uxi8JDf46i", "object": "event", "occurred_at": 1758711043, "source": "admin_console", "user": "ankit.gupta.001@juspay.in", "webhook_status": "scheduled", "webhooks": [ { "id": "whv2_169mYOUxi3nvkZ8v", "object": "webhook", "webhook_status": "scheduled" } ] }' ``` response 200 ok <img width="2551" height="555" alt="image" src="https://github.com/user-attachments/assets/29c9f075-cbb6-4a3d-ace0-cee8a884644a" /> db entry into invoice table <img width="578" height="449" alt="image" src="https://github.com/user-attachments/assets/23614dcf-70fc-480b-9922-0d5645e1d333" /> ## Checklist <!-- Put 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/webhooks.rs` **2. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/router_flow_types/subscriptions.rs` - `crates/hyperswitch_domain_models/src/router_response_types/subscriptions.rs` **3. Core Business Logic** - `crates/router/src/core/subscription.rs` - `crates/router/src/core/subscription/subscription_handler.rs` - `crates/router/src/core/webhooks/incoming.rs` - ... and 1 more files **4. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/chargebee.rs` - `crates/hyperswitch_connectors/src/connectors/chargebee/transformers.rs` - `crates/hyperswitch_interfaces/src/connector_integration_interface.rs` **5. Utils** - `crates/router/src/utils.rs` **6. Other** - `crates/hyperswitch_interfaces/src/webhooks.rs` **Code Patterns Applied:** - Define new data structures (2 changes) - Implement new functions (9 changes) - Extend existing types with new fields (56 changes) - Add conditional logic for feature flags or filtering (3 changes) **Detailed Identifier Changes:** Commit 32dd9e10: Files to modify: **crates/api_models/src/webhooks.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/chargebee.rs** Add: - function: private::get_subscription_mit_payment_data **crates/hyperswitch_connectors/src/connectors/chargebee/transformers.rs** Add: - function: private::try_from - struct: pub::ChargebeeMitPaymentData - impl: impl TryFrom<ChargebeeInvoiceBody> for ChargebeeMitPaymentData **crates/hyperswitch_domain_models/src/router_flow_types/subscriptions.rs** Add: - struct: pub::SubscriptionMitPaymentData **crates/hyperswitch_domain_models/src/router_response_types/subscriptions.rs** Modify existing code **crates/hyperswitch_interfaces/src/connector_integration_interface.rs** Add: - function: private::get_subscription_mit_payment_data **crates/hyperswitch_interfaces/src/webhooks.rs** Add: - function: private::get_subscription_mit_payment_data **crates/router/src/core/subscription.rs** Modify existing code **crates/router/src/core/subscription/subscription_handler.rs** Add: - function: pub::new - function: pub::get_invoice_handler **crates/router/src/core/webhooks/incoming.rs** Modify existing code **crates/router/src/core/webhooks/recovery_incoming.rs** Modify existing code **crates/router/src/utils.rs** Modify existing code
{"pr_number": 9400, "pr_title": "feat: Implement subscriptions workflow and incoming webhook support", "merged_at": "2025-10-03T16:39:11Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/webhooks.rs"], "domain": ["crates/hyperswitch_domain_models/src/router_flow_types/subscriptions.rs", "crates/hyperswitch_domain_models/src/router_response_types/subscriptions.rs"], "core_business": ["crates/router/src/core/subscription.rs", "crates/router/src/core/subscription/subscription_handler.rs", "crates/router/src/core/webhooks/incoming.rs", "crates/router/src/core/webhooks/recovery_incoming.rs"], "connectors": ["crates/hyperswitch_connectors/src/connectors/chargebee.rs", "crates/hyperswitch_connectors/src/connectors/chargebee/transformers.rs", "crates/hyperswitch_interfaces/src/connector_integration_interface.rs"], "utils": ["crates/router/src/utils.rs"], "other": ["crates/hyperswitch_interfaces/src/webhooks.rs"]}, "change_types": {"structs_added": 2, "functions_added": 9, "fields_added": 56, "imports_added": 4, "conditionals_added": 3}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(cypress): add cypress test-cases for manual retry ## 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 happy cases + variation cases for manual retry feature ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with 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="658" height="707" alt="image" src="https://github.com/user-attachments/assets/7d0f00b9-d2ee-4161-92e9-a0b1d5b06468" /> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Tests** - `cypress-tests/cypress/e2e/configs/Payment/Commons.js` - `cypress-tests/cypress/e2e/configs/Payment/Cybersource.js` - `cypress-tests/cypress/e2e/configs/Payment/Utils.js` - ... and 1 more files **Code Patterns Applied:** - Extend existing types with new fields (166 changes) - Add conditional logic for feature flags or filtering (15 changes)
{"pr_number": 9505, "pr_title": "feat(cypress): add cypress test-cases for manual retry", "merged_at": "2025-09-26T09:01:20Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user"]}, "hierarchy": {"tests": ["cypress-tests/cypress/e2e/configs/Payment/Commons.js", "cypress-tests/cypress/e2e/configs/Payment/Cybersource.js", "cypress-tests/cypress/e2e/configs/Payment/Utils.js", "cypress-tests/cypress/e2e/spec/Payment/00032-ManualRetry.cy.js"]}, "change_types": {"fields_added": 166, "conditionals_added": 15}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
fix(user_roles): migrations for backfilling user_roles entity_id ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This PR ensures that the entity_id is backfilled in the user_roles table, preventing issues for V1 users when switching organizations and logging in. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> Main pr #6837 Closes #6843 ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Using local dashboard - Login to V1 account - invite the user to that same account - Try to switch organizations and merchant ## Checklist <!-- Put an `x` in the boxes that apply --> - [X] I formatted the code `cargo +nightly fmt --all` - [X] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Other** - `migrations/2024-12-02-110129_update-user-role-entity-type/down.sql` - `migrations/2024-12-02-110129_update-user-role-entity-type/up.sql` - `migrations/2024-12-13-080558_entity-id-backfill-for-user-roles/down.sql` - ... and 1 more files **Code Patterns Applied:** - Modify database queries (5 changes)
{"pr_number": 6847, "pr_title": "fix(user_roles): migrations for backfilling user_roles entity_id", "merged_at": "2024-12-16T13:36:14Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["merchant", "user"]}, "hierarchy": {"other": ["migrations/2024-12-02-110129_update-user-role-entity-type/down.sql", "migrations/2024-12-02-110129_update-user-role-entity-type/up.sql", "migrations/2024-12-13-080558_entity-id-backfill-for-user-roles/down.sql", "migrations/2024-12-13-080558_entity-id-backfill-for-user-roles/up.sql"]}, "change_types": {"database_queries": 5}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
feat(core): add webhook setup event handler ## 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 --> - when webhook url is configured in psp's dashboard, some psp send a sample webhook for acknowledgement. - this feature helps in bypassing business logic in case of an setup webhook and send 200 ok status - the setup webhook is triggered if the IncomingWebhookEvent type is SetupWebhook (which is dependent on each psp's integration ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test 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: - Add webhook secret in MCA (Wise): - Setup webhook Url in Wise Dashboard: - Create a payout ``` curl --location '{{baseUrl}}/payouts/create' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key:{{api_key}}' \ --data-raw '{ "amount": 4500, "currency": "EUR", "customer_id": "cust_hyperswitch_generated_id", "email": "john.doe@example.com", "name": "John Doe", "phone": "712345678", "phone_country_code": "+254", "description": "Payout for request 1234-5678-9012-3456", "payout_type": "bank", "payout_method_data": { "bank": { "iban": "NL46TEST0136169112", "bic": "ABNANL2A", "bank_name": "Test Bank", "bank_country_code": "NL", "bank_city": "Amsterdam" } }, "billing": { "address": { "line1": "123 Main Street", "line2": "Apt 4B", "line3": "", "city": "Nairobi", "state": "Nai", "zip": "00100", "country": "KE", "first_name": "John", "last_name": "Doe" }, "phone": { "number": "712345678", "country_code": "+254" } }, "entity_type": "Individual", "recurring": false, "confirm": true, "auto_fulfill": true }' ``` - Should receive a webhook status update on merchant's end ``` { "merchant_id": "merchant_1758183323", "event_id": "evt_01995c0ee9e27d90b097e108c185dbaa", "event_type": "payout_initiated", "content": { "type": "payout_details", "object": { "payout_id": "payout_MyYdQh3HKXsTcV5ZfZeA", "merchant_id": "merchant_1758183323", "merchant_order_reference_id": null, "amount": 4500, "currency": "EUR", "connector": "wise", "payout_type": "bank", "payout_method_data": { "bank": { "iban": "NL46T********69112", "bank_name": "Test Bank", "bank_country_code": "NL", "bank_city": "Amsterdam", "bic": "ABN**L2A" } }, "billing": { "address": { "city": "Nairobi", "country": "KE", "line1": "123 Main Street", "line2": "Apt 4B", "line3": "", "zip": "00100", "state": "Nai", "first_name": "John", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "712345678", "country_code": "+254" }, "email": null }, "auto_fulfill": true, "customer_id": "cust_hyperswitch_generated_id", "customer": { "id": "cust_hyperswitch_generated_id", "name": "John Doe", "email": "john.doe@example.com", "phone": "712345678", "phone_country_code": "+254" }, "client_secret": "payout_payout_MyYdQh3HKXsTcV5ZfZeA_secret_6K6uus6xpHPHubVGBvDZ", "return_url": null, "business_country": null, "business_label": null, "description": "Payout for request 1234-5678-9012-3456", "entity_type": "Individual", "recurring": false, "metadata": { "payout_request_id": "1234-5678-9012-3456", "fineract_transfer_code": "TRF-ABC123" }, "merchant_connector_id": "mca_aDJ58oaCGF2dXAuyTr5p", "status": "initiated", "error_message": null, "error_code": null, "profile_id": "pro_GIQqSv0MCWtL5qGziwh4", "created": "2025-09-18T09:01:39.500Z", "connector_transaction_id": "55451262", "priority": null, "payout_link": null, "email": "john.doe@example.com", "name": "John Doe", "phone": "712345678", "phone_country_code": "+254", "unified_code": null, "unified_message": null, "payout_method_id": null } }, "timestamp": "2025-09-18T09:01:45.314Z" } ``` ## Checklist <!-- Put 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/webhooks.rs` **2. Core Business Logic** - `crates/router/src/core/webhooks/incoming.rs` - `crates/router/src/core/webhooks/incoming_v2.rs` - `crates/router/src/core/webhooks/recovery_incoming.rs` **3. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/wise.rs` **Code Patterns Applied:** - Implement new functions (1 changes) - Add conditional logic for feature flags or filtering (3 changes) **Detailed Identifier Changes:** Commit 740f3af6: Files to modify: **crates/api_models/src/webhooks.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/wise.rs** Add: - function: private::is_setup_webhook_event **crates/router/src/core/webhooks/incoming.rs** Modify existing code **crates/router/src/core/webhooks/incoming_v2.rs** Modify existing code **crates/router/src/core/webhooks/recovery_incoming.rs** Modify existing code
{"pr_number": 9420, "pr_title": "feat(core): add webhook setup event handler", "merged_at": "2025-09-22T07:58:41Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "merchant", "order"]}, "hierarchy": {"api_models": ["crates/api_models/src/webhooks.rs"], "core_business": ["crates/router/src/core/webhooks/incoming.rs", "crates/router/src/core/webhooks/incoming_v2.rs", "crates/router/src/core/webhooks/recovery_incoming.rs"], "connectors": ["crates/hyperswitch_connectors/src/connectors/wise.rs"]}, "change_types": {"functions_added": 1, "conditionals_added": 3}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
ci(cypress): Add Tests for Customer Deletion and Psync flows ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [x] CI/CD ## Description Added Tests for Customer Deletion and Psync 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 Enhancement of test cases ## How did you test it? Cypress <img width="646" alt="image" src="https://github.com/user-attachments/assets/e684cfc6-1822-4743-84d9-aa1c236324d3" /> - stripe <img width="712" alt="image" src="https://github.com/user-attachments/assets/76a294fe-4e4e-4624-b73e-31c804c5d922" /> - paypal <img width="848" alt="image" src="https://github.com/user-attachments/assets/32681be2-fa73-4b79-bde3-b5abe3fd7128" /> - nmi <img width="848" alt="image" src="https://github.com/user-attachments/assets/f67052b6-440f-4d01-9386-9a8db208d150" /> <img width="989" alt="image" src="https://github.com/user-attachments/assets/e02fd470-9c74-4e40-b8d3-b1d113f82c40" /> ## 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/spec/Payment/00026-DeletedCustomerPsyncFlow.cy.js` - `cypress-tests/cypress/e2e/spec/Payment/00026-BusinessProfileConfigs.cy.js` - `cypress-tests/cypress/e2e/spec/Payment/00027-DynamicFields.cy.js` - ... and 2 more files **Code Patterns Applied:** - Add conditional logic for feature flags or filtering (18 changes)
{"pr_number": 7158, "pr_title": "ci(cypress): Add Tests for Customer Deletion and Psync flows", "merged_at": "2025-02-07T07:45:21Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "user"]}, "hierarchy": {"tests": ["cypress-tests/cypress/e2e/spec/Payment/00026-DeletedCustomerPsyncFlow.cy.js", "cypress-tests/cypress/e2e/spec/Payment/00026-BusinessProfileConfigs.cy.js", "cypress-tests/cypress/e2e/spec/Payment/00027-DynamicFields.cy.js", "cypress-tests/cypress/e2e/spec/Payment/00028-IncrementalAuth.cy.js", "cypress-tests/cypress/support/commands.js"]}, "change_types": {"conditionals_added": 18}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
feat(revenue_recovery): add support for updating additional card info data from csv to redis ## 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 --> The format of csv:- <img width="1720" height="33" alt="Screenshot 2025-09-02 at 13 57 36" src="https://github.com/user-attachments/assets/d8e57dc8-1707-49b2-a27f-79888ee5a8b9" /> <img width="1711" height="32" alt="Screenshot 2025-09-02 at 13 57 54" src="https://github.com/user-attachments/assets/222bbb5a-0c0a-4920-ad8e-d6d931be86ad" /> <img width="1644" height="28" alt="Screenshot 2025-09-02 at 13 58 07" src="https://github.com/user-attachments/assets/5e86aa7b-e34e-40fb-bbff-742d7316d8d5" /> here `CustomerReq_ID` is the customer token and `Token` is the payment token which is used as an identifier in Redis for tokens, ("customer:{}:tokens", customer_id) is used to get token and `Token` is used to find the field which we need to update. So, we are parsing the csv and getting the valid records and building a request per record `RevenueRecoveryBackfillRequest`, from this request we are fetching the data like expiry month, year, card type, card issuer, card network, any of these fields are `null`, we are updating them from the request. Complexity:- for each valid record we are doing two Redis call, one for get and another for set. ### 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). --> For Revenue recovery service, we are storing data in Redis with format ``` HGETALL customer:fake_customer123:tokens 1) "fake_token123" 2) "{\"payment_processor_token_details\":{\"payment_processor_token\":\"fake_token123\",\"expiry_month\":\"08\",\"expiry_year\":\"26\",\"card_issuer\":\"Green Dot Bank Dba Bonneville Bank\",\"last_four_digits\":null,\"card_network\":\"Visa\",\"card_type\":\"debit\"},\"inserted_by_attempt_id\":\"12345_att_fake_entry123\",\"error_code\":\"insufficient_funds\",\"daily_retry_history\":{\"2024-05-29\":1},\"scheduled_at\":null}" ``` in last data migration `card_type` was populated as `null`, but for `Smart` retry logic we need fields like `card_type`, `card_issuer`, `card_network`. So, inorder to work with `Smart` retry we need to backfill `card_type` data from merchant csv. ## How did you test 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:- ``` curl --location 'http://localhost:8080/recovery/data-backfill' \ --header 'Authorization: api_key =' \ --header 'x-profile-id: pro_PljcGfk8IckJFT1WdFsn' \ --header 'api-key:' \ --form 'file=@"/Users/aditya.c/Downloads/_first_100_rows.csv"' ``` Router log:- <img width="1064" height="747" alt="Screenshot 2025-09-02 at 13 47 22" src="https://github.com/user-attachments/assets/723b12f4-15bf-43ea-807b-968d5e40370a" /> cURL with query param for updating scheduled at time ``` curl --location 'http://localhost:8080/v2/recovery/data-backfill?cutoff_time=2025-09-17T10%3A30%3A00' \ --header 'Authorization: admin-api-key=test_admin' \ --header 'x-profile-id: pro_4xOQlxvKwZbLUx8ThJXJ' \ --form 'file=@"/Users/aditya.c/Downloads/sample_merged_data (1).csv"' ``` Router log:- <img width="1044" height="369" alt="Screenshot 2025-09-17 at 17 06 56" src="https://github.com/user-attachments/assets/8f31960e-b560-4a4b-a651-831899500971" /> Redis-cli log(updating scheduledat to null if cut-off time is greater than scheduled at time):- <img width="1040" height="160" alt="Screenshot 2025-09-17 at 17 10 31" src="https://github.com/user-attachments/assets/f144357b-e693-4686-8df4-6b28b06208eb" /> ## Checklist <!-- Put 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/Cargo.toml` - `crates/api_models/src/lib.rs` - `crates/api_models/src/revenue_recovery_data_backfill.rs` **2. Core Business Logic** - `crates/router/src/core.rs` - `crates/router/src/core/revenue_recovery/types.rs` - `crates/router/src/core/revenue_recovery_data_backfill.rs` **3. Type Definitions** - `crates/router/src/types/storage/revenue_recovery_redis_operation.rs` - `crates/router_env/src/logger/types.rs` **4. Utils** - `crates/router/src/routes/lock_utils.rs` **5. Other** - `Cargo.lock` - `crates/router/src/lib.rs` - `crates/router/src/routes.rs` - ... and 2 more files **Code Patterns Applied:** - Define new data structures (8 changes) - Implement new functions (15 changes) - Extend existing types with new fields (50 changes) - Add conditional logic for feature flags or filtering (2 changes) - Modify database queries (3 changes) **Detailed Identifier Changes:** Commit d98ffdfb: Files to modify: **crates/api_models/src/lib.rs** Add: - mod: pub::revenue_recovery_data_backfill **crates/api_models/src/revenue_recovery_data_backfill.rs** Add: - function: private::get_api_event_type - function: private::get_api_event_type - function: private::get_api_event_type - function: private::fmt - function: private::error_response - function: pub::validate_and_get_records_with_errors - struct: pub::RevenueRecoveryBackfillRequest - struct: pub::RevenueRecoveryDataBackfillResponse - struct: pub::CsvParsingResult - struct: pub::CsvParsingError - struct: pub::ComprehensiveCardData - struct: pub::BackfillQuery - struct: pub::RevenueRecoveryDataBackfillForm - enum: pub::BackfillError - impl: impl ApiEventMetric for RevenueRecoveryDataBackfillResponse - impl: impl ApiEventMetric for CsvParsingResult - impl: impl ApiEventMetric for CsvParsingError - impl: impl std::fmt::Display for BackfillError - impl: impl std::error::Error for BackfillError - impl: impl ResponseError for BackfillError - impl: impl RevenueRecoveryDataBackfillForm **crates/router/src/core.rs** Add: - mod: pub::revenue_recovery_data_backfill **crates/router/src/core/revenue_recovery/types.rs** Remove: - function: private::create_calculate_workflow_tracking_data **crates/router/src/core/revenue_recovery_data_backfill.rs** Add: - function: pub::revenue_recovery_data_backfill - function: private::process_payment_method_record - function: private::parse_daily_retry_history - function: private::build_comprehensive_card_data - function: private::determine_card_type - function: private::parse_expiration_date **crates/router/src/lib.rs** Modify existing code **crates/router/src/routes.rs** Add: - mod: pub::revenue_recovery_data_backfill **crates/router/src/routes/app.rs** Add: - function: pub::server - struct: pub::RecoveryDataBackfill - impl: impl RecoveryDataBackfill **crates/router/src/routes/lock_utils.rs** Modify existing code **crates/router/src/routes/revenue_recovery_data_backfill.rs** Add: - function: pub::revenue_recovery_data_backfill **crates/router/src/types/storage/revenue_recovery_redis_operation.rs** Add: - function: pub::update_redis_token_with_comprehensive_card_data **crates/router_env/src/logger/types.rs** Modify existing code
{"pr_number": 9233, "pr_title": "feat(revenue_recovery): add support for updating additional card info data from csv to redis", "merged_at": "2025-09-18T11:31:08Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/Cargo.toml", "crates/api_models/src/lib.rs", "crates/api_models/src/revenue_recovery_data_backfill.rs"], "core_business": ["crates/router/src/core.rs", "crates/router/src/core/revenue_recovery/types.rs", "crates/router/src/core/revenue_recovery_data_backfill.rs"], "types": ["crates/router/src/types/storage/revenue_recovery_redis_operation.rs", "crates/router_env/src/logger/types.rs"], "utils": ["crates/router/src/routes/lock_utils.rs"], "other": ["Cargo.lock", "crates/router/src/lib.rs", "crates/router/src/routes.rs", "crates/router/src/routes/app.rs", "crates/router/src/routes/revenue_recovery_data_backfill.rs"]}, "change_types": {"structs_added": 8, "functions_added": 15, "enums_added": 1, "fields_added": 50, "imports_added": 24, "conditionals_added": 2, "database_queries": 3}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(authentication): fixed notification_url and updated authentication bug ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix ## Description <!-- Describe your changes in detail --> fixed notification_url and updated authentication bug ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Do Authentication create ``` curl --location 'localhost:8080/authentication' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_0NG9Fnn4XGvH2Q0MDxoRzB4o9q2uy7x5dgqiXYzoc08osUXbzh6z2Lzew0j28hgD' \ --data '{ "amount": 10, "currency": "USD", "acquirer_details": { "acquirer_merchant_id": "12134", "acquirer_bin": "438309", "merchant_country_code": "004" }, "authentication_connector":"juspaythreedsserver" }' ``` Do eligibility call ```shell curl --location 'localhost:8080/authentication/authn_O4hug1u4X0yddHYmFQxl/eligibility' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_0NG9Fnn4XGvH2Q0MDxoRzB4o9q2uy7x5dgqiXYzoc08osUXbzh6z2Lzew0j28hgD' \ --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": "sahkalplanet@gmail.com", "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" }, "profile_acquirer_id": "pro_acq_AiKYTHTtgcUeVZDvSQl3" }' ``` do authenticate ```shell curl --location 'localhost:8080/authentication/authn_O4hug1u4X0yddHYmFQxl/authenticate' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_0NG9Fnn4XGvH2Q0MDxoRzB4o9q2uy7x5dgqiXYzoc08osUXbzh6z2Lzew0j28hgD' \ --data '{ "device_channel": "BRW", "threeds_method_comp_ind": "Y" } ' ``` ```shell curl --location 'https://mock-three-ds-server-frosty-paper-8641.fly.dev/processor/mock/acs/trigger-otp?redirectUrl=http%3A%2F%2Flocalhost%3A8080%2Fauthentication%2Fsahkal11%2Fauthn_O4hug1u4X0yddHYmFQxl%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":"db9cb0d5-d38b-4c15-a7a1-c2f7d41e6056","acsTransID":"fd5aa71e-6125-4de7-8382-0ad24a5fd8d8","challengeWindowSize":"01","messageVersion":"2.2.0"}' ``` Then do sync ```shell curl --location 'localhost:8080/authentication/sahkal11/authn_O4hug1u4X0yddHYmFQxl/sync' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_0NG9Fnn4XGvH2Q0MDxoRzB4o9q2uy7x5dgqiXYzoc08osUXbzh6z2Lzew0j28hgD' \ --data '{ }' ``` Should provide terminal state in 1st call itself ## Checklist <!-- Put 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` **Code Patterns Applied:** - Extend existing types with new fields (29 changes) - Add conditional logic for feature flags or filtering (1 changes) **Detailed Identifier Changes:** Commit be4b43fa: Files to modify: **crates/router/src/core/unified_authentication_service.rs** Modify existing code
{"pr_number": 8843, "pr_title": "fix(authentication): fixed notification_url and updated authentication bug", "merged_at": "2025-08-08T10:06:35Z", "intent": {"feature_type": "payment", "action": "add_feature", "entities": ["payment", "merchant", "user"]}, "hierarchy": {"core_business": ["crates/router/src/core/unified_authentication_service.rs"]}, "change_types": {"fields_added": 29, "conditionals_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor(router): decrypt the wallet token before the debit routing call ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> In the debit routing call we require the card number or the network token bin to perform the lookup to get the co-badged networks associated with the card. Currently the wallet decryption happens in the call connector service which will be called in the confirm call. In wallets as the as the network token can be obtained only after decrypting the wallet token, the decryption call has moved in such a way that the decryption happens before the debit routing call. The `get_decrypted_wallet_payment_method_token` performs decryption only in the confirm call. `WalletFlow` is the trait that contains two methods 1. `decide_wallet_flow` -> contains the logic that will decide what is the wallet flow (in this case it is decryption or skip decryption) 2. `decrypt_wallet_token` -> contains the logic to decrypt the respective wallet token Once it is decrypted the data will be stored in `payment_method_token` of payment_data ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with 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 Wallets #### Paze payment ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_V4XGZPCiN420Hgbs1wZsd3KwVyzlwKgzEzpX6WVmNp4lZQjmwTHp0K026R1TsSPb' \ --data-raw '{ "amount": 6500, "currency": "USD", "confirm": true, "business_country": "US", "business_label": "default", "amount_to_capture": 6500, "customer_id": "custhype1232", "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "authentication_type": "three_ds", "return_url": "https://google.com", "email": "something@gmail.com", "name": "Joseph Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment request", "statement_descriptor_name": "Juspay", "statement_descriptor_suffix": "Router", "payment_method": "wallet", "payment_method_type": "paze", "browser_info": { "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "language": "nl-NL", "color_depth": 24, "screen_height": 723, "screen_width": 1536, "time_zone": 0, "java_enabled": true, "java_script_enabled": true, "ip_address": "13.232.74.226" }, "payment_method_data": { "wallet": { "paze": { "complete_response": "eyJhdWQiOiJodHRwczovL2Rldi5oeXBlcnN3aXRjaC5pbyIsImtpZCI6IjgzNjI4NjZkLWQ4MTYtNGI4Yy1hZGQzLTJkMTA5NDY0Nzg1YyIsImlzcyI6Imh0dHBzOi8vY2hlY2tvdXQud2FsbGV0LmNhdC5lYXJseXdhcm5pbmcuaW8iLCJ0eXAiOiJKV1QiLCJleHAiOjE3MzA5NzgwODMsImlhdCI6MTczMDgwNTI4MywiYWxnIjoiUlMyNTYiLCJqdGkiOiI1Qzg1RjU3RkQwMDAzZDllN2M5Zi03ZDY1LWQxMjAtYWZlNy0xMTc2ZjdkYzFiMDIifQ.eyJwYXlsb2FkSWQiOiI1Qzg1RjU3RkQwMDAzZDllN2M5Zi03ZDY1LWQxMjAtYWZlNy0xMTc2ZjdkYzFiMDIiLCJzZXNzaW9uSWQiOiJwYXlfaURiakYxYmlCMXNwYUFLdnVHVHIiLCJzZWN1cmVkUGF5bG9hZCI6ImV5SmhkV1FpT2lKb2RIUndjem92TDJSbGRpNW9lWEJsY25OM2FYUmphQzVwYnlJc0ltdHBaQ0k2SWtwMWMzQmhlVk5DV0VObGNuUWlMQ0pwYzNNaU9pSm9kSFJ3Y3pvdkwyTm9aV05yYjNWMExuZGhiR3hsZEM1allYUXVaV0Z5YkhsM1lYSnVhVzVuTG1sdklpd2lZM1I1SWpvaVNsZFVJaXdpZEhsd0lqb2lTbGRVSWl3aVpXNWpJam9pUVRJMU5rZERUU0lzSW1WNGNDSTZNVGN6TURrM09EQTRNeXdpYVdGMElqb3hOek13T0RBMU1qZ3pMQ0poYkdjaU9pSlNVMEV0VDBGRlVDMHlOVFlpTENKcWRHa2lPaUl6WkRsbE4yTTVaaTAzWkRZMUxXUXhNakF0WVdabE55MHhNVGMyWmpka1l6RmlNRElpZlEuWFh5cUFqQ0F3WnhxTXNNdWFnVW51WU5GaEUwRjdqTm5Pc3ZCYnctaXAxaFA3RE9xM2JTX0pwdFVtTU5ZeVZFZUhxTmhrb2plQnlFRUFseGZYMmRDQmxtRVJVWGpLdkR5Y1A2bkNNZE1CRUVuTFNnczhwaDJFNWVyQWo5MDRsYXZyY01jdjRNNW9CNy1iTE14ekhfRmJkZVU2VzJKcy05dzFfQ2ZFR0tzR0ZLeDEtU1Q1TlprUVdrd0VYSEYxcEI2UzdYODVkUVN3OS01MjZDMlNFQ0JCZXBSemd2NERFVDN6eHR0QzJGM1pnZkNhTFJYYmpyamhYV1RNV1BqamY0N0FEV0R3SkdqbUdBTGZxNmxQQnpWdEhyd2x6NFY5ckx1emR5c3BPaW5yZ1pmQzZ4ZVdBeXF4bkRSVHdQMld1RE1fWG41em01QnZBMGszaDhIUkIzRkNnLnM0ZDVZcWFlWjR6M3dUMmYuQkVrX1J0elV2aERtSmR6UFBuLWdUdmhKRVI1TlpMbi1uNXltOFYwUUEwYjlKbS10R1ZQNGtKQjEzWUxZd2tFSVVrNUJEU0x4RHl5d2lhUUpvVHVtSEswbW9aRng5MVd3MTdNSHEtRGx1VDFTU1FKcWZGRnpBN2JnZzZDZXNQblNid3VITmpBcXN6SlE2c01oSERVN1Jqai1ERzRjajQ3NHlTUzlsOEFodW5peTZBU0ZKWWlXMThVbFp0REdPdWxaRG96MU5JZ3J3MjRkZ091OUJvTDFvajZXMXdUSVB2VUx0R2FVYkY5VWtxV2VXUWIzanJvdGFxYjFSdlplaklDbGhqRGRjcUQyakZJRncwcUxHNnlCelhCQjNEb1hCVnJJQ3pTaWcyVF8zOWRQYU8taEJKVjlvcjM0cVQ2aW9JTi1hRTlIVFR5Yml0dVZQc0t0Z1I0Y3VCam5mZTBQNEVlU1c0dXhuQVJfTWZxRGdxRjVoTFJSOExIbjJrbWlrcFJVMjJ0b1RpYUpYV1JWSG5vRVpFUFVSeV9vUlBkVXoxeGxldDRDay1ocnF4WjN4a09vNTJUR3Z5UExsNUVWWTFReGFBeUd4a21HQm8xUnRpdTVxV3pxVGtSd0cwc1BaZ2FMWV95RU5oSnRPblFKeW1VTFcyX28tZUxGMjdTUHE0Tk9jODE3TW9WaldaUGhQNXIxWDI4QjJmU0x5NWNZMmRZV0R1aGpLVGdKYXhQLVRJVURGeVlnTVFsWnFhX2pDVjhDNVpmdGRoRlFseGtQOHk1ak9YVDdqanRHX1dMRVN0aE5BV0NfX2N1MGFxM1BmanZUc09sSTRtQ3VYdUVkVnJuZzZSQlFRY2F4eWpnSEtSSEM5bjhuYUw3ZUNpV0ZkQmtDR0tYZXBRa1JRd3Y1OUJsVnJNWXBYYlE1aWRVSlFzejBDbHVpYlQ3bmxQN0d2R25SUXRCcUdQbGtFX3lsa0NOYTMxWTNZdk43MGpVUWptT2dJZVdTWHRjbV9zQUVtYThjR0xUTVRYQ3M5SGdXU2w1SlJRM0tvcThYNUgtVUY3LTYyV3loaGNyUUQ5cjBkeEJtQ2pJdVMzVUhuV2lxbmRtR1ZxcU94d0NzdDhySk5OVzlpWEppU1JBYzBKektWZmRQUzZvc0pSTE1oVTVZMFhBd0ZkSVdoQnNVNExISmI5TDloSGZzMXE0MzBvSVd4RjlYclJyMVFSUEVXNWRURGR2akttdjRKMHoxWU96a0ZtZWZfSmNyRVdVaDBHYXU5RXFSZXpjQzZBWkg1NnZLUk9FbzdvT0QyV2pTQndETElQVVdYa1VEZGZoNWNlNjZIalBLeTlUMnJ2aEpOOE9ocWdrSVFzcks4U0pRcmpIT0x4RXVoeGdsSEE0NnpmOVFtSzdNVTNGVHppZlJBcUdPTlJpZGVJX1RlQ2tVbVJuNm1FRm5QWG00NmpqSHZIMC1FeHhwcHF4am11a1llaWI0dHREOWR3eURJMWxXRW1QRE9PU1V4QWRKZ2oxZ1NKVDdudTdMclpuRnh1NGN6ZWlEVE9nNW1HeHZWMUMxd25mbEhwNjAtUTNvTHdibGN4MFRtY1dNNHdOZ3p3ckZHeldid3pFOXdsVmM4S2ZWSlBuZ01peHkweXhOVFNmb2lEYm1RQ2VmYWt2b1Nub2Z3dEZycDdIZVlkLWdEMmlRNjNyRjFEUi1pWWdRcHFXTnRVLUpBdW10QU81LUIzQzZaYm8zRTdRUi0tVzJwc1N6cXN5ZHc3cUVmZzFKUUFudk9BQVFZVVlwVHZPazM5TGlZbG5NVjUxNUxrUnlJOUtIRTBCaTZrOENOLWVFWGZ2MVFySS1pb3NKUU05T1o1YlhrbWtfX2tUWko2R2prSk1QSi1lS2FGTTQxNjgzSnI5UEtPUDVUanZfMm80eGlVLWJtTHE3c0Y0MzFUbjlqR3NYTkpCU29OTmNhZzl2Mk1tNHJxVEstcDdsN29Bam85am1BaS1pRm5wR1hsVU9oa3dWUFVBZFAxa25aUUFCSVZVX3NYQ0lLRXBMSUpvVG1hX1hDNHFOQ2JIYmpZMUUxTGJKOGtXSWZ3blA3TjVsSlIxcmM4MmMyVHpmckl2N0RjS0F6MG9LMjZkS1lTU29jVDVDS2Q5RFkxRC1ZalNVT0hHSjJVRlRjU0lEcjE3MEZ6RDVlTEZkT011YTRMM0RzdHUxZGZjeGJRbUxseUlqZlhubDhTM2cyS1MwdXk3VGtTQjNYeFRQYl84RjNVZ2E3YTRHLVRwRWpDZ2hfNUd1QVZOdnUzNUpiVjRGUmhBdXEwYkszeXdJUkRyRm5fVC1DZkh5SENRTXRMZ01qSkNqMVdoYmc4QTNfZnJQX0lBNDdJdnZobDNKTzdUVU1fZ2d1WVUySXBIYWlQLS1mSjJxZXhWanJIR2hqaVRHSWZPVk11TmtaaG4yNHFGRmtNa1c1WWE4enFpU3F1RXJVTWxRQ1AyRlNGdHp4ZV9xQndGdnkwNHRTZmFwU1phdTVpd2dPdjlaRkNSLU44WnV3QjZ0Z2FuSTF3WHhUT1BOMllVdnRhOWtnRVRZOE8zTk1SUjJZUm9jX2hWQzZ0VXhDNDI5STJDTFA4Z2tXdXl1MGJTTnhBejZuRmt2TlJUUzB1c1FMclZsQUxqLVoyeXpZRDg1bTBNVTZSbXZ6cGNMcTBCa1UyOGpUWk8xbDhtUXJHd1VGb3dMVFBqRDg2OFNTX1N4ckVWeGlLUEx5UlhYNlJDWGVuOV9RNUlHLXZDUUpjNHRpSmZoMGRsclN4bkJTNTB0dUFzdTlkNUhUZkkyVThJVllqTjNRNkVnTG9yaWpCRDVVRktPQ0oxUzQ0b3BDLXpHc0ZoUjB3Mk1yUjJDdW41Rl9CMlNTTUJlLk9WdjFiTE1PX1c0cElkaTZnQ3A5a3cifQ.cptiJroPYDMixVTEZkZJSaRKAspd12pMh2y8HHc-ziXfv-W10q7NQEYtZNUuSy0_33SNxqEci_CVnBrcyDXQDGTY_0-2kunS6B68ReMBXbAMWqFxn7kB8B1l9MJBV78guOZplv1l_Eq34GH6J-zIifBOrT0_DjWgOAv2iAwU1OE7XXoruwz54gZWKzsBExBFXhgGufCcoIA00ubt0dUORbhFy4x0pLxd5E7N71_R3pB0nnRS0BaOgGTve7PPZJXRowEw2QFgmxloJ_SYBwEHW9lK9wId2GUGu2rJJdosx7XwEZniA0g5HAZ4xH3owp0cwa1d9BcvCn1umDYpFeVKTg" } } } }' ``` ``` { "payment_id": "pay_W1ya4hTSxEwzdtikv80C", "merchant_id": "merchant_1752575648", "status": "failed", "amount": 6500, "net_amount": 6500, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": "adyen", "client_secret": "pay_W1ya4hTSxEwzdtikv80C_secret_8uANRo4ilAEZbuejrfA5", "created": "2025-07-15T10:37:54.439Z", "currency": "USD", "customer_id": "custhype1232", "customer": { "id": "custhype1232", "name": "Joseph Doe", "email": "something@gmail.com", "phone": "999999999", "phone_country_code": "+65" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "wallet", "payment_method_data": { "wallet": {}, "billing": null }, "payment_token": null, "shipping": null, "billing": null, "order_details": null, "email": "something@gmail.com", "name": "Joseph Doe", "phone": "999999999", "return_url": "https://google.com/", "authentication_type": "three_ds", "statement_descriptor_name": "Juspay", "statement_descriptor_suffix": "Router", "next_action": null, "cancellation_reason": null, "error_code": "2", "error_message": "Refused", "unified_code": "UE_9000", "unified_message": "Something went wrong", "payment_experience": null, "payment_method_type": "paze", "connector_label": "adyen_US_default", "business_country": "US", "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "custhype1232", "created_at": 1752575874, "expires": 1752579474, "secret": "epk_2298d4560dcd4146a2f7ddcffefc586d" }, "manual_retry_allowed": true, "connector_transaction_id": "SP7JJK673CTVLD75", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": null, "payment_link": null, "profile_id": "pro_VkFlBTR2jzBuDMtJ1EBH", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_ix8D5IwVzqWWLT9akfbM", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-07-15T10:52:54.439Z", "fingerprint": null, "browser_info": { "language": "nl-NL", "time_zone": 0, "ip_address": "13.232.74.226", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "color_depth": 24, "java_enabled": true, "screen_width": 1536, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 723, "java_script_enabled": true }, "payment_method_id": null, "payment_method_status": null, "updated": "2025-07-15T10:37:56.119Z", "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": "This is not a testCard", "is_iframe_redirection_enabled": null, "whole_connector_response": null } ``` #### Apple pay payment -> Connector decryption flow ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: ' \ --data-raw '{ "amount": 1, "currency": "EUR", "confirm": true, "business_country": "US", "business_label": "default", "amount_to_capture": 1, "customer_id": "cu_1752576206", "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "setup_future_usage": "off_session", "authentication_type": "no_three_ds", "return_url": "https://google.com", "email": "something@gmail.com", "name": "Joseph Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment request", "statement_descriptor_name": "Juspay", "statement_descriptor_suffix": "Router", "payment_method": "wallet", "payment_method_type": "apple_pay", "billing": { "address": { "line1": "1467", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "customer_acceptance": { "acceptance_type": "offline", "accepted_at": "1963-05-03T04:07:52.723Z", "online": { "ip_address": "in sit", "user_agent": "amet irure esse" } }, "payment_method_data": { "wallet": { "apple_pay": { "payment_data": "eyJkYXRhIjoiK3NLL0trRWMvRXlFb203N2FJenFYMkNyNG1ldFlranRla1h3eEIyQTJYRzA4ekMwMFJwdFowU0xlSExabnRvZTZpeVNnbzFNVmUyWWVCRVk2b2VteUpwU053TE5PQVU0K3M2eU9zSXNJQ0VITTlMa3FjZGoyc0IwU2RzUHAyUklHVGp3TWozVGtsTFhQV295NlJ0NlZyVVFQemxldlRobE9OZ3piR2psd0I1OVlxN3J0VHFHN0h5eFd3WTJLaDBzcytySWpDbHdnQkRzSzNXMVJ2bzB2NVlDVEdFYWhHRUQxMlN1RTYxbzVOU1NmUjBGUHlDbWtEaTBBYm1XbXBHN0ZmSGMxTkY2MDRkMUtTcmlMclpUU2hYYnhxZVFGdjlxZXpibUVOck1CZXpsLzdFU2NvMU5GMFpyZ1h1Z29oa3JkQkpPeXlJc0I4Qmw5QTl1emFJL2RoU3dpYTFMWGw0Zml0Q3p6U1diUDhBUDV2UkN3TEhMT3M5eTFKNmpYMDJJamtDSlBybU5KYmVTeUE9PSIsInNpZ25hdHVyZSI6Ik1JQUdDU3FHU0liM0RRRUhBcUNBTUlBQ0FRRXhEVEFMQmdsZ2hrZ0JaUU1FQWdFd2dBWUpLb1pJaHZjTkFRY0JBQUNnZ0RDQ0ErUXdnZ09Mb0FNQ0FRSUNDRm5Zb2J5cTlPUE5NQW9HQ0NxR1NNNDlCQU1DTUhveExqQXNCZ05WQkFNTUpVRndjR3hsSUVGd2NHeHBZMkYwYVc5dUlFbHVkR1ZuY21GMGFXOXVJRU5CSUMwZ1J6TXhKakFrQmdOVkJBc01IVUZ3Y0d4bElFTmxjblJwWm1sallYUnBiMjRnUVhWMGFHOXlhWFI1TVJNd0VRWURWUVFLREFwQmNIQnNaU0JKYm1NdU1Rc3dDUVlEVlFRR0V3SlZVekFlRncweU1UQTBNakF4T1RNM01EQmFGdzB5TmpBME1Ua3hPVE0yTlRsYU1HSXhLREFtQmdOVkJBTU1IMlZqWXkxemJYQXRZbkp2YTJWeUxYTnBaMjVmVlVNMExWTkJUa1JDVDFneEZEQVNCZ05WQkFzTUMybFBVeUJUZVhOMFpXMXpNUk13RVFZRFZRUUtEQXBCY0hCc1pTQkpibU11TVFzd0NRWURWUVFHRXdKVlV6QlpNQk1HQnlxR1NNNDlBZ0VHQ0NxR1NNNDlBd0VIQTBJQUJJSXcvYXZEblBkZUlDeFEyWnRGRXVZMzRxa0IzV3l6NExITlMxSm5tUGpQVHIzb0dpV293aDVNTTkzT2ppcVd3dmF2b1pNRFJjVG9la1FtenBVYkVwV2pnZ0lSTUlJQ0RUQU1CZ05WSFJNQkFmOEVBakFBTUI4R0ExVWRJd1FZTUJhQUZDUHlTY1JQaytUdkorYkU5aWhzUDZLNy9TNUxNRVVHQ0NzR0FRVUZCd0VCQkRrd056QTFCZ2dyQmdFRkJRY3dBWVlwYUhSMGNEb3ZMMjlqYzNBdVlYQndiR1V1WTI5dEwyOWpjM0F3TkMxaGNIQnNaV0ZwWTJFek1ESXdnZ0VkQmdOVkhTQUVnZ0VVTUlJQkVEQ0NBUXdHQ1NxR1NJYjNZMlFGQVRDQi9qQ0J3d1lJS3dZQkJRVUhBZ0l3Z2JZTWdiTlNaV3hwWVc1alpTQnZiaUIwYUdseklHTmxjblJwWm1sallYUmxJR0o1SUdGdWVTQndZWEowZVNCaGMzTjFiV1Z6SUdGalkyVndkR0Z1WTJVZ2IyWWdkR2hsSUhSb1pXNGdZWEJ3YkdsallXSnNaU0J6ZEdGdVpHRnlaQ0IwWlhKdGN5QmhibVFnWTI5dVpHbDBhVzl1Y3lCdlppQjFjMlVzSUdObGNuUnBabWxqWVhSbElIQnZiR2xqZVNCaGJtUWdZMlZ5ZEdsbWFXTmhkR2x2YmlCd2NtRmpkR2xqWlNCemRHRjBaVzFsYm5SekxqQTJCZ2dyQmdFRkJRY0NBUllxYUhSMGNEb3ZMM2QzZHk1aGNIQnNaUzVqYjIwdlkyVnlkR2xtYVdOaGRHVmhkWFJvYjNKcGRIa3ZNRFFHQTFVZEh3UXRNQ3N3S2FBbm9DV0dJMmgwZEhBNkx5OWpjbXd1WVhCd2JHVXVZMjl0TDJGd2NHeGxZV2xqWVRNdVkzSnNNQjBHQTFVZERnUVdCQlFDSkRBTG11N3RSakdYcEtaYUtaNUNjWUljUlRBT0JnTlZIUThCQWY4RUJBTUNCNEF3RHdZSktvWklodmRqWkFZZEJBSUZBREFLQmdncWhrak9QUVFEQWdOSEFEQkVBaUIwb2JNazIwSkpRdzNUSjB4UWRNU0FqWm9mU0E0NmhjWEJOaVZtTWwrOG93SWdhVGFRVTZ2MUMxcFMrZllBVGNXS3JXeFFwOVlJYURlUTRLYzYwQjVLMllFd2dnTHVNSUlDZGFBREFnRUNBZ2hKYlMrL09wamFsekFLQmdncWhrak9QUVFEQWpCbk1Sc3dHUVlEVlFRRERCSkJjSEJzWlNCU2IyOTBJRU5CSUMwZ1J6TXhKakFrQmdOVkJBc01IVUZ3Y0d4bElFTmxjblJwWm1sallYUnBiMjRnUVhWMGFHOXlhWFI1TVJNd0VRWURWUVFLREFwQmNIQnNaU0JKYm1NdU1Rc3dDUVlEVlFRR0V3SlZVekFlRncweE5EQTFNRFl5TXpRMk16QmFGdzB5T1RBMU1EWXlNelEyTXpCYU1Ib3hMakFzQmdOVkJBTU1KVUZ3Y0d4bElFRndjR3hwWTJGMGFXOXVJRWx1ZEdWbmNtRjBhVzl1SUVOQklDMGdSek14SmpBa0JnTlZCQXNNSFVGd2NHeGxJRU5sY25ScFptbGpZWFJwYjI0Z1FYVjBhRzl5YVhSNU1STXdFUVlEVlFRS0RBcEJjSEJzWlNCSmJtTXVNUXN3Q1FZRFZRUUdFd0pWVXpCWk1CTUdCeXFHU000OUFnRUdDQ3FHU000OUF3RUhBMElBQlBBWEVZUVoxMlNGMVJwZUpZRUhkdWlBb3UvZWU2NU40STM4UzVQaE0xYlZabHMxcmlMUWwzWU5JazU3dWdqOWRoZk9pTXQydTJad3Zzam9LWVQvVkVXamdmY3dnZlF3UmdZSUt3WUJCUVVIQVFFRU9qQTRNRFlHQ0NzR0FRVUZCekFCaGlwb2RIUndPaTh2YjJOemNDNWhjSEJzWlM1amIyMHZiMk56Y0RBMExXRndjR3hsY205dmRHTmhaek13SFFZRFZSME9CQllFRkNQeVNjUlBrK1R2SitiRTlpaHNQNks3L1M1TE1BOEdBMVVkRXdFQi93UUZNQU1CQWY4d0h3WURWUjBqQkJnd0ZvQVV1N0Rlb1ZnemlKcWtpcG5ldnIzcnI5ckxKS3N3TndZRFZSMGZCREF3TGpBc29DcWdLSVltYUhSMGNEb3ZMMk55YkM1aGNIQnNaUzVqYjIwdllYQndiR1Z5YjI5MFkyRm5NeTVqY213d0RnWURWUjBQQVFIL0JBUURBZ0VHTUJBR0NpcUdTSWIzWTJRR0FnNEVBZ1VBTUFvR0NDcUdTTTQ5QkFNQ0EyY0FNR1FDTURyUGNvTlJGcG14aHZzMXcxYktZci8wRiszWkQzVk5vbzYrOFp5QlhrSzNpZmlZOTV0Wm41alZRUTJQbmVuQy9nSXdNaTNWUkNHd293VjNiRjN6T0R1UVovMFhmQ3doYlpaUHhuSnBnaEp2VlBoNmZSdVp5NXNKaVNGaEJwa1BDWklkQUFBeGdnR0hNSUlCZ3dJQkFUQ0JoakI2TVM0d0xBWURWUVFERENWQmNIQnNaU0JCY0hCc2FXTmhkR2x2YmlCSmJuUmxaM0poZEdsdmJpQkRRU0F0SUVjek1TWXdKQVlEVlFRTERCMUJjSEJzWlNCRFpYSjBhV1pwWTJGMGFXOXVJRUYxZEdodmNtbDBlVEVUTUJFR0ExVUVDZ3dLUVhCd2JHVWdTVzVqTGpFTE1Ba0dBMVVFQmhNQ1ZWTUNDRm5Zb2J5cTlPUE5NQXNHQ1dDR1NBRmxBd1FDQWFDQmt6QVlCZ2txaGtpRzl3MEJDUU14Q3dZSktvWklodmNOQVFjQk1Cd0dDU3FHU0liM0RRRUpCVEVQRncweU5UQTNNVFV3TXpNMU16UmFNQ2dHQ1NxR1NJYjNEUUVKTkRFYk1Ca3dDd1lKWUlaSUFXVURCQUlCb1FvR0NDcUdTTTQ5QkFNQ01DOEdDU3FHU0liM0RRRUpCREVpQkNBZ0VKd0VMWm1LQ3Y4SFUraEhQVVAwdnNNdFB6UjI4UzJVNzFvVEdRMURvakFLQmdncWhrak9QUVFEQWdSR01FUUNJRE5JZnNod1lQYWFXd1prYWtmSWZtcVJNZVc5eE96S1RCZmY4MDIrVWF1MkFpQVltb2FnbVJMSFNzUjk0Z1IxMHlvKzBrL1ZRVlFvNUhRRllEUjEyWkg2d0FBQUFBQUFBQT09IiwiaGVhZGVyIjp7InB1YmxpY0tleUhhc2giOiJFYzRPbEFveXRpNFpyZ1lCclRMZzZMQ1NVSzdCdHBQekozblpQeC9Sd3RBPSIsImVwaGVtZXJhbFB1YmxpY0tleSI6Ik1Ga3dFd1lIS29aSXpqMENBUVlJS29aSXpqMERBUWNEUWdBRXZ0QlVudThhS244alBNQzM4SFdnQ00zeVRTT3ZiaDFsakRtWFVsZzJUUExtYWhwTS9RcEtqRkdYeVEyY2JKWW5aeU1HVjRzR2w1T0NWcFR2eld0cjBBPT0iLCJ0cmFuc2FjdGlvbklkIjoiNzI5NWY3NTc4ZGM4ODI2OWE5ZGY0MWU0YzgxZjQ2ODE2NWYzMmE3NjFjMTA5MGIzNDhlMjAxYzk1YmI0ZmUxMyJ9LCJ2ZXJzaW9uIjoiRUNfdjEifQ==", "payment_method": { "display_name": "Discover 9319", "network": "Discover", "type": "credit" }, "transaction_identifier": "c635c5b3af900d7bd81fecd7028f1262f9d030754ee65ec7afd988a678194751" } } } }' ``` ``` { "payment_id": "pay_6v5Hs5ZqtOt75fJnBShX", "merchant_id": "merchant_1752575648", "status": "succeeded", "amount": 1, "net_amount": 1, "shipping_cost": null, "amount_capturable": 0, "amount_received": 1, "connector": "adyen", "client_secret": "pay_6v5Hs5ZqtOt75fJnBShX_secret_NbSXocovIghIyj7lzkIi", "created": "2025-07-15T10:42:48.603Z", "currency": "EUR", "customer_id": "cu_1752576169", "customer": { "id": "cu_1752576169", "name": "Joseph Doe", "email": "something@gmail.com", "phone": "999999999", "phone_country_code": "+65" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "off_session", "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "wallet", "payment_method_data": { "wallet": { "apple_pay": { "last4": "9319", "card_network": "Discover", "type": "credit" } }, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": null, "line3": null, "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "order_details": null, "email": "something@gmail.com", "name": "Joseph Doe", "phone": "999999999", "return_url": "https://google.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": "Juspay", "statement_descriptor_suffix": "Router", "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "apple_pay", "connector_label": "adyen_US_default", "business_country": "US", "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "cu_1752576169", "created_at": 1752576168, "expires": 1752579768, "secret": "epk_84d862629a8b402cbc20dd1bf7e42bca" }, "manual_retry_allowed": false, "connector_transaction_id": "R786467XJCFW9575", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "pay_6v5Hs5ZqtOt75fJnBShX_1", "payment_link": null, "profile_id": "pro_VkFlBTR2jzBuDMtJ1EBH", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_ix8D5IwVzqWWLT9akfbM", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-07-15T10:57:48.603Z", "fingerprint": null, "browser_info": null, "payment_method_id": "pm_SM3PsEXxo7u5PJ4dgVOV", "payment_method_status": "active", "updated": "2025-07-15T10:42:49.321Z", "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": "D3ZGDNMLX6C68775", "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 } ``` -> Hyperswitch decryption flow ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: ' \ --data-raw '{ "amount": 650, "currency": "USD", "confirm": true, "business_country": "US", "business_label": "default", "amount_to_capture": 650, "customer_id": "cu_1752576971", "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "setup_future_usage": "off_session", "authentication_type": "no_three_ds", "return_url": "https://google.com", "email": "something@gmail.com", "name": "Joseph Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment request", "statement_descriptor_name": "Juspay", "statement_descriptor_suffix": "Router", "payment_method": "wallet", "payment_method_type": "apple_pay", "billing": { "address": { "line1": "1467", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "customer_acceptance": { "acceptance_type": "offline", "accepted_at": "1963-05-03T04:07:52.723Z", "online": { "ip_address": "in sit", "user_agent": "amet irure esse" } }, "payment_method_data": { "wallet": { "apple_pay": { "payment_data": "eyJkYXRhIjogInR1OHlCcFY3MHJ5WFpSTUJqaEt3T2VtTGhrbHlPREIzNVVLdnpNUDVFRk50eW9OMUdtK2pRRkZnaTF1T0t3WmJQZUUwdmxVUnJIeU5vQkhLOUZSY1pmYzJVL2cydytHbExweWxVcEQwc2VXdU9rRTZYb1E1SHFsZ085bFZRclZacHZsNmFndHdVYU5Cc2pqWTB0Q1F1SHRMRHQzQWI4c2pJdWhpL1g1cFNYakM0ak5PdUoxRkdJKy9CS016OHBNdUZGMkUvbmJWenhNQjhoT1lDWjlUVGdFZlN3Z3VwbE9SaFY5dFV1by9VVFhFUG40cGljNVpPYUR6WnB6Z1BuK0d1V2JVVExuL0h5Rk9MQW5xc3pNZzFkdklHcjd3c0pWRE1LUzJIdHZ5VzA2QXUzNGVSZGxkaEVWbFhnYWNDcWFualVwZlJBcVhod2VtQjNwd2p4bFBUMkxrcUE3VzJwWnNLNkF1Z0lwUi9tMTUwazFRRjl3d1AwVTF6YkpBbGc5bE9VL1IyRlVZR1BKRUZ4ay92SWowL3ZiYnkvcE96L0RBY1ZRd3NGek9UbUk9IiwKICAgICAgInNpZ25hdHVyZSI6ICJNSUFHQ1NxR1NJYjNEUUVIQXFDQU1JQUNBUUV4RFRBTEJnbGdoa2dCWlFNRUFnRXdnQVlKS29aSWh2Y05BUWNCQUFDZ2dEQ0NBK1F3Z2dPTG9BTUNBUUlDQ0ZuWW9ieXE5T1BOTUFvR0NDcUdTTTQ5QkFNQ01Ib3hMakFzQmdOVkJBTU1KVUZ3Y0d4bElFRndjR3hwWTJGMGFXOXVJRWx1ZEdWbmNtRjBhVzl1SUVOQklDMGdSek14SmpBa0JnTlZCQXNNSFVGd2NHeGxJRU5sY25ScFptbGpZWFJwYjI0Z1FYVjBhRzl5YVhSNU1STXdFUVlEVlFRS0RBcEJjSEJzWlNCSmJtTXVNUXN3Q1FZRFZRUUdFd0pWVXpBZUZ3MHlNVEEwTWpBeE9UTTNNREJhRncweU5qQTBNVGt4T1RNMk5UbGFNR0l4S0RBbUJnTlZCQU1NSDJWall5MXpiWEF0WW5KdmEyVnlMWE5wWjI1ZlZVTTBMVk5CVGtSQ1QxZ3hGREFTQmdOVkJBc01DMmxQVXlCVGVYTjBaVzF6TVJNd0VRWURWUVFLREFwQmNIQnNaU0JKYm1NdU1Rc3dDUVlEVlFRR0V3SlZVekJaTUJNR0J5cUdTTTQ5QWdFR0NDcUdTTTQ5QXdFSEEwSUFCSUl3L2F2RG5QZGVJQ3hRMlp0RkV1WTM0cWtCM1d5ejRMSE5TMUpubVBqUFRyM29HaVdvd2g1TU05M09qaXFXd3Zhdm9aTURSY1RvZWtRbXpwVWJFcFdqZ2dJUk1JSUNEVEFNQmdOVkhSTUJBZjhFQWpBQU1COEdBMVVkSXdRWU1CYUFGQ1B5U2NSUGsrVHZKK2JFOWloc1A2SzcvUzVMTUVVR0NDc0dBUVVGQndFQkJEa3dOekExQmdnckJnRUZCUWN3QVlZcGFIUjBjRG92TDI5amMzQXVZWEJ3YkdVdVkyOXRMMjlqYzNBd05DMWhjSEJzWldGcFkyRXpNREl3Z2dFZEJnTlZIU0FFZ2dFVU1JSUJFRENDQVF3R0NTcUdTSWIzWTJRRkFUQ0IvakNCd3dZSUt3WUJCUVVIQWdJd2diWU1nYk5TWld4cFlXNWpaU0J2YmlCMGFHbHpJR05sY25ScFptbGpZWFJsSUdKNUlHRnVlU0J3WVhKMGVTQmhjM04xYldWeklHRmpZMlZ3ZEdGdVkyVWdiMllnZEdobElIUm9aVzRnWVhCd2JHbGpZV0pzWlNCemRHRnVaR0Z5WkNCMFpYSnRjeUJoYm1RZ1kyOXVaR2wwYVc5dWN5QnZaaUIxYzJVc0lHTmxjblJwWm1sallYUmxJSEJ2YkdsamVTQmhibVFnWTJWeWRHbG1hV05oZEdsdmJpQndjbUZqZEdsalpTQnpkR0YwWlcxbGJuUnpMakEyQmdnckJnRUZCUWNDQVJZcWFIUjBjRG92TDNkM2R5NWhjSEJzWlM1amIyMHZZMlZ5ZEdsbWFXTmhkR1ZoZFhSb2IzSnBkSGt2TURRR0ExVWRId1F0TUNzd0thQW5vQ1dHSTJoMGRIQTZMeTlqY213dVlYQndiR1V1WTI5dEwyRndjR3hsWVdsallUTXVZM0pzTUIwR0ExVWREZ1FXQkJRQ0pEQUxtdTd0UmpHWHBLWmFLWjVDY1lJY1JUQU9CZ05WSFE4QkFmOEVCQU1DQjRBd0R3WUpLb1pJaHZkalpBWWRCQUlGQURBS0JnZ3Foa2pPUFFRREFnTkhBREJFQWlCMG9iTWsyMEpKUXczVEoweFFkTVNBalpvZlNBNDZoY1hCTmlWbU1sKzhvd0lnYVRhUVU2djFDMXBTK2ZZQVRjV0tyV3hRcDlZSWFEZVE0S2M2MEI1SzJZRXdnZ0x1TUlJQ2RhQURBZ0VDQWdoSmJTKy9PcGphbHpBS0JnZ3Foa2pPUFFRREFqQm5NUnN3R1FZRFZRUUREQkpCY0hCc1pTQlNiMjkwSUVOQklDMGdSek14SmpBa0JnTlZCQXNNSFVGd2NHeGxJRU5sY25ScFptbGpZWFJwYjI0Z1FYVjBhRzl5YVhSNU1STXdFUVlEVlFRS0RBcEJjSEJzWlNCSmJtTXVNUXN3Q1FZRFZRUUdFd0pWVXpBZUZ3MHhOREExTURZeU16UTJNekJhRncweU9UQTFNRFl5TXpRMk16QmFNSG94TGpBc0JnTlZCQU1NSlVGd2NHeGxJRUZ3Y0d4cFkyRjBhVzl1SUVsdWRHVm5jbUYwYVc5dUlFTkJJQzBnUnpNeEpqQWtCZ05WQkFzTUhVRndjR3hsSUVObGNuUnBabWxqWVhScGIyNGdRWFYwYUc5eWFYUjVNUk13RVFZRFZRUUtEQXBCY0hCc1pTQkpibU11TVFzd0NRWURWUVFHRXdKVlV6QlpNQk1HQnlxR1NNNDlBZ0VHQ0NxR1NNNDlBd0VIQTBJQUJQQVhFWVFaMTJTRjFScGVKWUVIZHVpQW91L2VlNjVONEkzOFM1UGhNMWJWWmxzMXJpTFFsM1lOSWs1N3VnajlkaGZPaU10MnUyWnd2c2pvS1lUL1ZFV2pnZmN3Z2ZRd1JnWUlLd1lCQlFVSEFRRUVPakE0TURZR0NDc0dBUVVGQnpBQmhpcG9kSFJ3T2k4dmIyTnpjQzVoY0hCc1pTNWpiMjB2YjJOemNEQTBMV0Z3Y0d4bGNtOXZkR05oWnpNd0hRWURWUjBPQkJZRUZDUHlTY1JQaytUdkorYkU5aWhzUDZLNy9TNUxNQThHQTFVZEV3RUIvd1FGTUFNQkFmOHdId1lEVlIwakJCZ3dGb0FVdTdEZW9WZ3ppSnFraXBuZXZyM3JyOXJMSktzd053WURWUjBmQkRBd0xqQXNvQ3FnS0lZbWFIUjBjRG92TDJOeWJDNWhjSEJzWlM1amIyMHZZWEJ3YkdWeWIyOTBZMkZuTXk1amNtd3dEZ1lEVlIwUEFRSC9CQVFEQWdFR01CQUdDaXFHU0liM1kyUUdBZzRFQWdVQU1Bb0dDQ3FHU000OUJBTUNBMmNBTUdRQ01EclBjb05SRnBteGh2czF3MWJLWXIvMEYrM1pEM1ZOb282KzhaeUJYa0szaWZpWTk1dFpuNWpWUVEyUG5lbkMvZ0l3TWkzVlJDR3dvd1YzYkYzek9EdVFaLzBYZkN3aGJaWlB4bkpwZ2hKdlZQaDZmUnVaeTVzSmlTRmhCcGtQQ1pJZEFBQXhnZ0dITUlJQmd3SUJBVENCaGpCNk1TNHdMQVlEVlFRRERDVkJjSEJzWlNCQmNIQnNhV05oZEdsdmJpQkpiblJsWjNKaGRHbHZiaUJEUVNBdElFY3pNU1l3SkFZRFZRUUxEQjFCY0hCc1pTQkRaWEowYVdacFkyRjBhVzl1SUVGMWRHaHZjbWwwZVRFVE1CRUdBMVVFQ2d3S1FYQndiR1VnU1c1akxqRUxNQWtHQTFVRUJoTUNWVk1DQ0ZuWW9ieXE5T1BOTUFzR0NXQ0dTQUZsQXdRQ0FhQ0JrekFZQmdrcWhraUc5dzBCQ1FNeEN3WUpLb1pJaHZjTkFRY0JNQndHQ1NxR1NJYjNEUUVKQlRFUEZ3MHlOREV5TVRJd09ESTFNalphTUNnR0NTcUdTSWIzRFFFSk5ERWJNQmt3Q3dZSllJWklBV1VEQkFJQm9Rb0dDQ3FHU000OUJBTUNNQzhHQ1NxR1NJYjNEUUVKQkRFaUJDQmZHSHBFQ2RnOWQ0YWl0VTlDRndSTGVEYXNZSDRMdUNuQjIvZHd2VFE2SWpBS0JnZ3Foa2pPUFFRREFnUkdNRVFDSUhnK3dKd25RdlJuZEdIN1UrL1hVb094c21VRVI2a2RqQ0RQNStTajF4eXpBaUJydEdIUGtWUXB1VEFHeDQ5SllEUFl5MzdhUDhoeGxtK1VjRThzVWFFa0V3QUFBQUFBQUE9PSIsCiAgICAgICJoZWFkZXIiOiB7CiAgICAgICAgInB1YmxpY0tleUhhc2giOiAiMkNnWTU3TERJVFVEMHFSN0R3eUhsdVRtMTIyQnowOXNhczJCVVorRUU5VT0iLAogICAgICAgICJlcGhlbWVyYWxQdWJsaWNLZXkiOiAiTUZrd0V3WUhLb1pJemowQ0FRWUlLb1pJemowREFRY0RRZ0FFQmN1VGNHRGl0V1B3UVE5SFZ0d1dEZmRkZDlhelJ3VFJlL00zVUNSb3NHaEhhUklQUnNoZWp2ZWpaL0Z4MlFiamVYRmNRSnVra0creUdYUmlnTDR2MUE9PSIsCiAgICAgICAgInRyYW5zYWN0aW9uSWQiOiAiNzAwOTVhMWFjMTZkNGQ4NzAyODQ0ZDdjZDJhZGVkZWMxZmQyMzA0YTFkNmU3OTBhZWVmOWJjYzA5MmZkYjk2MSIKICAgICAgfSwKICAgICAgInZlcnNpb24iOiAiRUNfdjEifQ==", "payment_method": { "display_name": "Discover 9319", "network": "Discover", "type": "credit" }, "transaction_identifier": "c635c5b3af900d7bd81fecd7028f1262f9d030754ee65ec7afd988a678194751" } } } }' ``` ``` { "payment_id": "pay_0CICTszP7isObUpgRVEm", "merchant_id": "merchant_1752576519", "status": "succeeded", "amount": 650, "net_amount": 650, "shipping_cost": null, "amount_capturable": 0, "amount_received": 650, "connector": "adyen", "client_secret": "pay_0CICTszP7isObUpgRVEm_secret_qaOrWbaIq4kyShArVbwh", "created": "2025-07-15T10:56:05.940Z", "currency": "USD", "customer_id": "cu_1752576966", "customer": { "id": "cu_1752576966", "name": "Joseph Doe", "email": "something@gmail.com", "phone": "999999999", "phone_country_code": "+65" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "off_session", "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "wallet", "payment_method_data": { "wallet": { "apple_pay": { "last4": "9319", "card_network": "Discover", "type": "credit" } }, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": null, "line3": null, "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "order_details": null, "email": "something@gmail.com", "name": "Joseph Doe", "phone": "999999999", "return_url": "https://google.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": "Juspay", "statement_descriptor_suffix": "Router", "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "apple_pay", "connector_label": "adyen_US_default", "business_country": "US", "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "cu_1752576966", "created_at": 1752576965, "expires": 1752580565, "secret": "epk_ddc06bea1a634fb19ff6330b398db480" }, "manual_retry_allowed": false, "connector_transaction_id": "FMWWWSXDM6STT475", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "pay_0CICTszP7isObUpgRVEm_1", "payment_link": null, "profile_id": "pro_cddwMJhlkinqMlexbhUY", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_tWLdHmOngetHdfiasDn5", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-07-15T11:11:05.940Z", "fingerprint": null, "browser_info": null, "payment_method_id": "pm_vBuH6lWBBiI6sjhbhEEe", "payment_method_status": "active", "updated": "2025-07-15T10:56:07.076Z", "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": "ZRRKH4XNR2LMSR65", "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 } ``` -> Apple pay payment with connector tokenization flow ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_ayHU4gvKq3kLqIoYlEei1B5BvzusUjbnYl0aT7TQnaXc42P39EMAoYWSgyBVqu2x' \ --data-raw '{ "amount": 650, "currency": "USD", "confirm": true, "business_country": "US", "business_label": "default", "amount_to_capture": 650, "customer_id": "cu_1752577154", "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "setup_future_usage": "off_session", "authentication_type": "no_three_ds", "return_url": "https://google.com", "email": "something@gmail.com", "name": "Joseph Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment request", "statement_descriptor_name": "Juspay", "statement_descriptor_suffix": "Router", "payment_method": "wallet", "payment_method_type": "apple_pay", "billing": { "address": { "line1": "1467", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "customer_acceptance": { "acceptance_type": "offline", "accepted_at": "1963-05-03T04:07:52.723Z", "online": { "ip_address": "in sit", "user_agent": "amet irure esse" } }, "payment_method_data": { "wallet": { "apple_pay": { "payment_data": "eyJkYXRhIjogInR1OHlCcFY3MHJ5WFpSTUJqaEt3T2VtTGhrbHlPREIzNVVLdnpNUDVFRk50eW9OMUdtK2pRRkZnaTF1T0t3WmJQZUUwdmxVUnJIeU5vQkhLOUZSY1pmYzJVL2cydytHbExweWxVcEQwc2VXdU9rRTZYb1E1SHFsZ085bFZRclZacHZsNmFndHdVYU5Cc2pqWTB0Q1F1SHRMRHQzQWI4c2pJdWhpL1g1cFNYakM0ak5PdUoxRkdJKy9CS016OHBNdUZGMkUvbmJWenhNQjhoT1lDWjlUVGdFZlN3Z3VwbE9SaFY5dFV1by9VVFhFUG40cGljNVpPYUR6WnB6Z1BuK0d1V2JVVExuL0h5Rk9MQW5xc3pNZzFkdklHcjd3c0pWRE1LUzJIdHZ5VzA2QXUzNGVSZGxkaEVWbFhnYWNDcWFualVwZlJBcVhod2VtQjNwd2p4bFBUMkxrcUE3VzJwWnNLNkF1Z0lwUi9tMTUwazFRRjl3d1AwVTF6YkpBbGc5bE9VL1IyRlVZR1BKRUZ4ay92SWowL3ZiYnkvcE96L0RBY1ZRd3NGek9UbUk9IiwKICAgICAgInNpZ25hdHVyZSI6ICJNSUFHQ1NxR1NJYjNEUUVIQXFDQU1JQUNBUUV4RFRBTEJnbGdoa2dCWlFNRUFnRXdnQVlKS29aSWh2Y05BUWNCQUFDZ2dEQ0NBK1F3Z2dPTG9BTUNBUUlDQ0ZuWW9ieXE5T1BOTUFvR0NDcUdTTTQ5QkFNQ01Ib3hMakFzQmdOVkJBTU1KVUZ3Y0d4bElFRndjR3hwWTJGMGFXOXVJRWx1ZEdWbmNtRjBhVzl1SUVOQklDMGdSek14SmpBa0JnTlZCQXNNSFVGd2NHeGxJRU5sY25ScFptbGpZWFJwYjI0Z1FYVjBhRzl5YVhSNU1STXdFUVlEVlFRS0RBcEJjSEJzWlNCSmJtTXVNUXN3Q1FZRFZRUUdFd0pWVXpBZUZ3MHlNVEEwTWpBeE9UTTNNREJhRncweU5qQTBNVGt4T1RNMk5UbGFNR0l4S0RBbUJnTlZCQU1NSDJWall5MXpiWEF0WW5KdmEyVnlMWE5wWjI1ZlZVTTBMVk5CVGtSQ1QxZ3hGREFTQmdOVkJBc01DMmxQVXlCVGVYTjBaVzF6TVJNd0VRWURWUVFLREFwQmNIQnNaU0JKYm1NdU1Rc3dDUVlEVlFRR0V3SlZVekJaTUJNR0J5cUdTTTQ5QWdFR0NDcUdTTTQ5QXdFSEEwSUFCSUl3L2F2RG5QZGVJQ3hRMlp0RkV1WTM0cWtCM1d5ejRMSE5TMUpubVBqUFRyM29HaVdvd2g1TU05M09qaXFXd3Zhdm9aTURSY1RvZWtRbXpwVWJFcFdqZ2dJUk1JSUNEVEFNQmdOVkhSTUJBZjhFQWpBQU1COEdBMVVkSXdRWU1CYUFGQ1B5U2NSUGsrVHZKK2JFOWloc1A2SzcvUzVMTUVVR0NDc0dBUVVGQndFQkJEa3dOekExQmdnckJnRUZCUWN3QVlZcGFIUjBjRG92TDI5amMzQXVZWEJ3YkdVdVkyOXRMMjlqYzNBd05DMWhjSEJzWldGcFkyRXpNREl3Z2dFZEJnTlZIU0FFZ2dFVU1JSUJFRENDQVF3R0NTcUdTSWIzWTJRRkFUQ0IvakNCd3dZSUt3WUJCUVVIQWdJd2diWU1nYk5TWld4cFlXNWpaU0J2YmlCMGFHbHpJR05sY25ScFptbGpZWFJsSUdKNUlHRnVlU0J3WVhKMGVTQmhjM04xYldWeklHRmpZMlZ3ZEdGdVkyVWdiMllnZEdobElIUm9aVzRnWVhCd2JHbGpZV0pzWlNCemRHRnVaR0Z5WkNCMFpYSnRjeUJoYm1RZ1kyOXVaR2wwYVc5dWN5QnZaaUIxYzJVc0lHTmxjblJwWm1sallYUmxJSEJ2YkdsamVTQmhibVFnWTJWeWRHbG1hV05oZEdsdmJpQndjbUZqZEdsalpTQnpkR0YwWlcxbGJuUnpMakEyQmdnckJnRUZCUWNDQVJZcWFIUjBjRG92TDNkM2R5NWhjSEJzWlM1amIyMHZZMlZ5ZEdsbWFXTmhkR1ZoZFhSb2IzSnBkSGt2TURRR0ExVWRId1F0TUNzd0thQW5vQ1dHSTJoMGRIQTZMeTlqY213dVlYQndiR1V1WTI5dEwyRndjR3hsWVdsallUTXVZM0pzTUIwR0ExVWREZ1FXQkJRQ0pEQUxtdTd0UmpHWHBLWmFLWjVDY1lJY1JUQU9CZ05WSFE4QkFmOEVCQU1DQjRBd0R3WUpLb1pJaHZkalpBWWRCQUlGQURBS0JnZ3Foa2pPUFFRREFnTkhBREJFQWlCMG9iTWsyMEpKUXczVEoweFFkTVNBalpvZlNBNDZoY1hCTmlWbU1sKzhvd0lnYVRhUVU2djFDMXBTK2ZZQVRjV0tyV3hRcDlZSWFEZVE0S2M2MEI1SzJZRXdnZ0x1TUlJQ2RhQURBZ0VDQWdoSmJTKy9PcGphbHpBS0JnZ3Foa2pPUFFRREFqQm5NUnN3R1FZRFZRUUREQkpCY0hCc1pTQlNiMjkwSUVOQklDMGdSek14SmpBa0JnTlZCQXNNSFVGd2NHeGxJRU5sY25ScFptbGpZWFJwYjI0Z1FYVjBhRzl5YVhSNU1STXdFUVlEVlFRS0RBcEJjSEJzWlNCSmJtTXVNUXN3Q1FZRFZRUUdFd0pWVXpBZUZ3MHhOREExTURZeU16UTJNekJhRncweU9UQTFNRFl5TXpRMk16QmFNSG94TGpBc0JnTlZCQU1NSlVGd2NHeGxJRUZ3Y0d4cFkyRjBhVzl1SUVsdWRHVm5jbUYwYVc5dUlFTkJJQzBnUnpNeEpqQWtCZ05WQkFzTUhVRndjR3hsSUVObGNuUnBabWxqWVhScGIyNGdRWFYwYUc5eWFYUjVNUk13RVFZRFZRUUtEQXBCY0hCc1pTQkpibU11TVFzd0NRWURWUVFHRXdKVlV6QlpNQk1HQnlxR1NNNDlBZ0VHQ0NxR1NNNDlBd0VIQTBJQUJQQVhFWVFaMTJTRjFScGVKWUVIZHVpQW91L2VlNjVONEkzOFM1UGhNMWJWWmxzMXJpTFFsM1lOSWs1N3VnajlkaGZPaU10MnUyWnd2c2pvS1lUL1ZFV2pnZmN3Z2ZRd1JnWUlLd1lCQlFVSEFRRUVPakE0TURZR0NDc0dBUVVGQnpBQmhpcG9kSFJ3T2k4dmIyTnpjQzVoY0hCc1pTNWpiMjB2YjJOemNEQTBMV0Z3Y0d4bGNtOXZkR05oWnpNd0hRWURWUjBPQkJZRUZDUHlTY1JQaytUdkorYkU5aWhzUDZLNy9TNUxNQThHQTFVZEV3RUIvd1FGTUFNQkFmOHdId1lEVlIwakJCZ3dGb0FVdTdEZW9WZ3ppSnFraXBuZXZyM3JyOXJMSktzd053WURWUjBmQkRBd0xqQXNvQ3FnS0lZbWFIUjBjRG92TDJOeWJDNWhjSEJzWlM1amIyMHZZWEJ3YkdWeWIyOTBZMkZuTXk1amNtd3dEZ1lEVlIwUEFRSC9CQVFEQWdFR01CQUdDaXFHU0liM1kyUUdBZzRFQWdVQU1Bb0dDQ3FHU000OUJBTUNBMmNBTUdRQ01EclBjb05SRnBteGh2czF3MWJLWXIvMEYrM1pEM1ZOb282KzhaeUJYa0szaWZpWTk1dFpuNWpWUVEyUG5lbkMvZ0l3TWkzVlJDR3dvd1YzYkYzek9EdVFaLzBYZkN3aGJaWlB4bkpwZ2hKdlZQaDZmUnVaeTVzSmlTRmhCcGtQQ1pJZEFBQXhnZ0dITUlJQmd3SUJBVENCaGpCNk1TNHdMQVlEVlFRRERDVkJjSEJzWlNCQmNIQnNhV05oZEdsdmJpQkpiblJsWjNKaGRHbHZiaUJEUVNBdElFY3pNU1l3SkFZRFZRUUxEQjFCY0hCc1pTQkRaWEowYVdacFkyRjBhVzl1SUVGMWRHaHZjbWwwZVRFVE1CRUdBMVVFQ2d3S1FYQndiR1VnU1c1akxqRUxNQWtHQTFVRUJoTUNWVk1DQ0ZuWW9ieXE5T1BOTUFzR0NXQ0dTQUZsQXdRQ0FhQ0JrekFZQmdrcWhraUc5dzBCQ1FNeEN3WUpLb1pJaHZjTkFRY0JNQndHQ1NxR1NJYjNEUUVKQlRFUEZ3MHlOREV5TVRJd09ESTFNalphTUNnR0NTcUdTSWIzRFFFSk5ERWJNQmt3Q3dZSllJWklBV1VEQkFJQm9Rb0dDQ3FHU000OUJBTUNNQzhHQ1NxR1NJYjNEUUVKQkRFaUJDQmZHSHBFQ2RnOWQ0YWl0VTlDRndSTGVEYXNZSDRMdUNuQjIvZHd2VFE2SWpBS0JnZ3Foa2pPUFFRREFnUkdNRVFDSUhnK3dKd25RdlJuZEdIN1UrL1hVb094c21VRVI2a2RqQ0RQNStTajF4eXpBaUJydEdIUGtWUXB1VEFHeDQ5SllEUFl5MzdhUDhoeGxtK1VjRThzVWFFa0V3QUFBQUFBQUE9PSIsCiAgICAgICJoZWFkZXIiOiB7CiAgICAgICAgInB1YmxpY0tleUhhc2giOiAiMkNnWTU3TERJVFVEMHFSN0R3eUhsdVRtMTIyQnowOXNhczJCVVorRUU5VT0iLAogICAgICAgICJlcGhlbWVyYWxQdWJsaWNLZXkiOiAiTUZrd0V3WUhLb1pJemowQ0FRWUlLb1pJemowREFRY0RRZ0FFQmN1VGNHRGl0V1B3UVE5SFZ0d1dEZmRkZDlhelJ3VFJlL00zVUNSb3NHaEhhUklQUnNoZWp2ZWpaL0Z4MlFiamVYRmNRSnVra0creUdYUmlnTDR2MUE9PSIsCiAgICAgICAgInRyYW5zYWN0aW9uSWQiOiAiNzAwOTVhMWFjMTZkNGQ4NzAyODQ0ZDdjZDJhZGVkZWMxZmQyMzA0YTFkNmU3OTBhZWVmOWJjYzA5MmZkYjk2MSIKICAgICAgfSwKICAgICAgInZlcnNpb24iOiAiRUNfdjEifQ==", "payment_method": { "display_name": "Discover 9319", "network": "Discover", "type": "credit" }, "transaction_identifier": "c635c5b3af900d7bd81fecd7028f1262f9d030754ee65ec7afd988a678194751" } } } }' ``` ``` { "payment_id": "pay_zHEJNe94jgZvNLjybL4r", "merchant_id": "merchant_1752577076", "status": "succeeded", "amount": 650, "net_amount": 650, "shipping_cost": null, "amount_capturable": 0, "amount_received": 650, "connector": "stripe", "client_secret": "pay_zHEJNe94jgZvNLjybL4r_secret_QYfBwixCCLKgKfLHx3NH", "created": "2025-07-15T10:58:36.211Z", "currency": "USD", "customer_id": "cu_1752577116", "customer": { "id": "cu_1752577116", "name": "Joseph Doe", "email": "something@gmail.com", "phone": "999999999", "phone_country_code": "+65" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "off_session", "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "wallet", "payment_method_data": { "wallet": { "apple_pay": { "last4": "9319", "card_network": "Discover", "type": "credit" } }, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": null, "line3": null, "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "order_details": null, "email": "something@gmail.com", "name": "Joseph Doe", "phone": "999999999", "return_url": "https://google.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": "Juspay", "statement_descriptor_suffix": "Router", "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "apple_pay", "connector_label": "stripe_US_default", "business_country": "US", "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "cu_1752577116", "created_at": 1752577116, "expires": 1752580716, "secret": "epk_90c104e906684b768b038bd0e5f1251f" }, "manual_retry_allowed": false, "connector_transaction_id": "pi_3Rl6ZFEOqOywnAIx1Lz0WPO4", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "pi_3Rl6ZFEOqOywnAIx1Lz0WPO4", "payment_link": null, "profile_id": "pro_pOr7Y8R0wjOBtzo8EWtU", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_freytfbGrs39Bc0xhPTq", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-07-15T11:13:36.211Z", "fingerprint": null, "browser_info": null, "payment_method_id": "pm_JAfMGw9HHOIHC4yVIdZD", "payment_method_status": "active", "updated": "2025-07-15T10:58:38.702Z", "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_1Rl6ZFEOqOywnAIxZcpZLINW", "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 } ``` ### Test Google pay -> Decryption ``` curl --location 'http://localhost:8080/payments/pay_Plg99nldaMquJXyiN0fT/confirm' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: pk_dev_899a9a6593944d9b92e1b87960fae713' \ --data '{ "client_secret": "pay_Plg99nldaMquJXyiN0fT_secret_9InvCGRWChCwA92vtpRg", "browser_info": { "user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36", "accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8", "language": "nl-NL", "color_depth": 24, "screen_height": 723, "screen_width": 1536, "time_zone": 0, "java_enabled": true, "java_script_enabled": true, "ip_address": "125.0.0.1" }, "payment_method": "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": "{\"signature\":\"MEUCIDzTs3gr03+Rw11LlFAgjX+payfnfq2EOJAKDgwv\/Ie9AiEAlHsbF1H1mKP88eANBsWvMRqC+njHQGf4eroQEmjoCyI=\",\"intermediateSigningKey\":{\"signedKey\":\"{\\\"keyValue\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE2hqwaUvNedHwYeSu10wterZXhqCW5udiq7YrVD5bJvmycwscfb2JJZPskZ\/olLYYSd2kpi\/hOYWvbltnUKlqpA\\u003d\\u003d\\\",\\\"keyExpiration\\\":\\\"1753349848389\\\"}\",\"signatures\":[\"MEQCIASVTYCZbpAgNiKFmPZy7r9HpMQdlWjXtY22b+N24kKnAiBbuK8jJ4QddX+IQniebUB7W3HaZaHY6lhL87SyzkqlhQ==\"]},\"protocolVersion\":\"ECv2\",\"signedMessage\":\"{\\\"encryptedMessage\\\":\\\"U8asRTW+3XHx01OKEXHJCTKpMVKjQOSopXICOjn3IUhX2elMcE1MCXkGJiA58SVMByQDKipJYMM9nUuDYe9tQbPtd\/CzR6y\/AlFanmmj09UGKcJY+YWg1FU8nqZY4dt3hBrJ86F4t2FGtZJSa9F31f2FNL4pR9\/atyn8MYxRvq0nysj0W0vNwogjlMU14kW9OXWdNgsfuRhpKp\/HYCugbxQZfppzyVjjXmoTMcj9dHG4a4co5je4tISd312fV3AivhLLgh7eK9Rf+BAusMdeifoxYUXpicSMmdnrADdSqtUZ3kdaAnu2yJZzp5Ii5I4Ftz9qfy3DHiMz1C9v3oQdj2qNSwOw2q+IW1rZBaKhDi9jixz\/2Cos79WzrdInHA6I58Wf6zaXkAwAMmGN9bYBR+EeWx\/QQqM\\u003d\\\",\\\"ephemeralPublicKey\\\":\\\"BB1PLkL1uEt7Y48k0fcDD+pK6AG3HucDfWKT2B6AyrP+hQffawYl80yHUtRSQ914CPlwTJGrZuiCalTF2hBV01Q\\u003d\\\",\\\"tag\\\":\\\"H+5OX2DMePbvFq8ZIjVHuf\/KiZLvHrujjK\/FyWh2YKo\\u003d\\\"}\"}" } } } }, "setup_future_usage": "on_session" }' ``` ``` { "payment_id": "pay_Plg99nldaMquJXyiN0fT", "merchant_id": "merchant_1752665435", "status": "succeeded", "amount": 650, "net_amount": 650, "shipping_cost": null, "amount_capturable": 0, "amount_received": 650, "connector": "cybersource", "client_secret": "pay_Plg99nldaMquJXyiN0fT_secret_9InvCGRWChCwA92vtpRg", "created": "2025-07-16T11:49:20.619Z", "currency": "USD", "customer_id": "cu_1752666561", "customer": { "id": "cu_1752666561", "name": "Joseph Doe", "email": "something@gmail.com", "phone": "999999999", "phone_country_code": "+65" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "on_session", "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "wallet", "payment_method_data": { "wallet": { "google_pay": { "last4": "1000", "card_network": "VISA", "type": "CARD" } }, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": null, "line3": null, "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "order_details": null, "email": "something@gmail.com", "name": "Joseph Doe", "phone": "999999999", "return_url": "https://google.com/", "authentication_type": "three_ds", "statement_descriptor_name": "Juspay", "statement_descriptor_suffix": "Router", "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "google_pay", "connector_label": "cybersource_US_default_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": "7526668695686908504807", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "pay_Plg99nldaMquJXyiN0fT_1", "payment_link": null, "profile_id": "pro_wTfZlHaRGH0l2U4vjzr0", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_UOoyUIRkUDr3cYLiAHUj", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-07-16T12:04:20.619Z", "fingerprint": null, "browser_info": { "os_type": null, "language": "nl-NL", "time_zone": 0, "ip_address": "125.0.0.1", "os_version": null, "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "color_depth": 24, "device_model": null, "java_enabled": true, "screen_width": 1536, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 723, "accept_language": "en", "java_script_enabled": true }, "payment_method_id": null, "payment_method_status": null, "updated": "2025-07-16T11:54:29.968Z", "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 } ``` -> Connector decryption flow ``` curl --location 'http://localhost:8080/payments/pay_SxnimcFUwHSp1tYgJPmJ/confirm' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: pk_dev_f579815423e945e0813d86e75dd53a66' \ --data '{ "client_secret": "pay_SxnimcFUwHSp1tYgJPmJ_secret_lfqFEE68OlHGD1Yf0KJ0", "browser_info": { "user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36", "accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8", "language": "nl-NL", "color_depth": 24, "screen_height": 723, "screen_width": 1536, "time_zone": 0, "java_enabled": true, "java_script_enabled": true, "ip_address": "125.0.0.1" }, "payment_method": "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": "PAYMENT_GATEWAY", "token": "{\"signature\":\"MEUCIA7wNgtW9C3sye0QqD6MlIeRoY0Glc5eq2lVVT3F+vyGAiEA5Pgq9tpF09vrgNlQo7anCDk9unVzLRiDIWEseTtGQHY\\u003d\",\"protocolVersion\":\"ECv1\",\"signedMessage\":\"{\\\"encryptedMessage\\\":\\\"7Xi/XdYu7tOPlea4jiauIj830R2Ryxp1NInwe03YPP/14dBL2uQxcbWqpbqYI3GpaFfbME6DJOrCiWaZHeCaYplRHIdBmU47tOufm7hJ0dKHu3+ZQL/SH1NIwciHGafoP6OU8nLIgHWRy3QmAJwsdG/P8DAjdTJFfWKvSo3snUzg5eKQUIIdHVWH8df4Qw2aCsHzFy0nd5F1E5JGeIlLALluGifb2ModsQTth4eJGR/lMPu/r9aIB5kCVAiQLo1VMv+No6gt6ls64lGgagJDIXKUQk0V7oi1iVRhGA6PgDKOu8Tl+9iPydieGkoTlWY+H0MAtjMU8OCoeL1PRVWqlSRYSkJ1TGF8eoSub794nMsVOTvyu3DGcQ1PLqQLAxzd6moaki4eA84vixZugbzCeF2Fieku8WRVbfccrTBTIcg\\\\u003d\\\",\\\"ephemeralPublicKey\\\":\\\"BA7G9SbX7H1uj0EJIh8+AQF7luqEwIktsbubyOvH6B3uVvWpC5PDTdwRqg/6b/5EsOBF+AHsz0rXWQM60IAZOGw\\\\u003d\\\",\\\"tag\\\":\\\"13Uuf7VJufw72SZT85GQBy1LVDoXUmqEr2XKt4g/sMY\\\\u003d\\\"}\"}" } } } }, "setup_future_usage": "on_session" }' ``` ``` { "payment_id": "pay_SxnimcFUwHSp1tYgJPmJ", "merchant_id": "merchant_1752667012", "status": "succeeded", "amount": 650, "net_amount": 650, "shipping_cost": null, "amount_capturable": 0, "amount_received": 650, "connector": "cybersource", "client_secret": "pay_SxnimcFUwHSp1tYgJPmJ_secret_lfqFEE68OlHGD1Yf0KJ0", "created": "2025-07-16T13:50:52.398Z", "currency": "USD", "customer_id": "cu_1752673852", "customer": { "id": "cu_1752673852", "name": "Joseph Doe", "email": "something@gmail.com", "phone": "999999999", "phone_country_code": "+65" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "on_session", "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "wallet", "payment_method_data": { "wallet": { "google_pay": { "last4": "1000", "card_network": "VISA", "type": "CARD" } }, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": null, "line3": null, "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "order_details": null, "email": "something@gmail.com", "name": "Joseph Doe", "phone": "999999999", "return_url": "https://google.com/", "authentication_type": "three_ds", "statement_descriptor_name": "Juspay", "statement_descriptor_suffix": "Router", "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "google_pay", "connector_label": "cybersource_US_default_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": "7526738836626381604807", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "pay_SxnimcFUwHSp1tYgJPmJ_1", "payment_link": null, "profile_id": "pro_gg9evsdFroAbgEAhvHfH", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_9zyvkVYFDEoUGUf7iq54", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-07-16T14:05:52.398Z", "fingerprint": null, "browser_info": { "os_type": null, "language": "nl-NL", "time_zone": 0, "ip_address": "125.0.0.1", "os_version": null, "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "color_depth": 24, "device_model": null, "java_enabled": true, "screen_width": 1536, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 723, "accept_language": "en", "java_script_enabled": true }, "payment_method_id": null, "payment_method_status": null, "updated": "2025-07-16T13:51:24.245Z", "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 } ``` ## Checklist <!-- Put 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/payment_method_data.rs` **2. Core Business Logic** - `crates/router/src/core/payments.rs` - `crates/router/src/core/payments/operations/payment_approve.rs` - `crates/router/src/core/payments/operations/payment_cancel.rs` - ... and 14 more files **Code Patterns Applied:** - Define new data structures (3 changes) - Implement new functions (42 changes) - Extend existing types with new fields (60 changes) - Add conditional logic for feature flags or filtering (9 changes) **Detailed Identifier Changes:** Commit bf8dc495: Files to modify: **crates/hyperswitch_domain_models/src/payment_method_data.rs** Add: - function: pub::get_wallet_data - function: pub::get_paze_wallet_data - function: pub::get_apple_pay_wallet_data - function: pub::get_google_pay_wallet_data - impl: impl WalletData **crates/router/src/core/payments.rs** Add: - function: pub::get_decrypted_wallet_payment_method_token - function: pub::get_merchant_connector_account_for_wallet_decryption_flow - function: private::decide_wallet_flow - function: private::decrypt_wallet_token - function: private::decide_wallet_flow - function: private::decrypt_wallet_token - function: private::decide_wallet_flow - function: private::decrypt_wallet_token - struct: private::ApplePayWallet - struct: private::PazeWallet - struct: private::GooglePayWallet - enum: pub::DecideWalletFlow - impl: impl WalletFlow<F, D> for PazeWallet - impl: impl WalletFlow<F, D> for ApplePayWallet - impl: impl WalletFlow<F, D> for GooglePayWallet **crates/router/src/core/payments/operations/payment_approve.rs** Modify existing code **crates/router/src/core/payments/operations/payment_cancel.rs** Modify existing code **crates/router/src/core/payments/operations/payment_capture.rs** Modify existing code **crates/router/src/core/payments/operations/payment_complete_authorize.rs** Modify existing code **crates/router/src/core/payments/operations/payment_confirm.rs** Modify existing code **crates/router/src/core/payments/operations/payment_create.rs** Modify existing code **crates/router/src/core/payments/operations/payment_post_session_tokens.rs** Modify existing code **crates/router/src/core/payments/operations/payment_reject.rs** Modify existing code **crates/router/src/core/payments/operations/payment_session.rs** Modify existing code **crates/router/src/core/payments/operations/payment_start.rs** Modify existing code **crates/router/src/core/payments/operations/payment_status.rs** Modify existing code **crates/router/src/core/payments/operations/payment_update.rs** Modify existing code **crates/router/src/core/payments/operations/payment_update_metadata.rs** Modify existing code **crates/router/src/core/payments/operations/payments_incremental_authorization.rs** Modify existing code **crates/router/src/core/payments/operations/tax_calculation.rs** Modify existing code **crates/router/src/core/payments/tokenization.rs** Modify existing code
{"pr_number": 8598, "pr_title": "refactor(router): decrypt the wallet token before the debit routing call", "merged_at": "2025-07-18T12:55:27Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"domain": ["crates/hyperswitch_domain_models/src/payment_method_data.rs"], "core_business": ["crates/router/src/core/payments.rs", "crates/router/src/core/payments/operations/payment_approve.rs", "crates/router/src/core/payments/operations/payment_cancel.rs", "crates/router/src/core/payments/operations/payment_capture.rs", "crates/router/src/core/payments/operations/payment_complete_authorize.rs", "crates/router/src/core/payments/operations/payment_confirm.rs", "crates/router/src/core/payments/operations/payment_create.rs", "crates/router/src/core/payments/operations/payment_post_session_tokens.rs", "crates/router/src/core/payments/operations/payment_reject.rs", "crates/router/src/core/payments/operations/payment_session.rs", "crates/router/src/core/payments/operations/payment_start.rs", "crates/router/src/core/payments/operations/payment_status.rs", "crates/router/src/core/payments/operations/payment_update.rs", "crates/router/src/core/payments/operations/payment_update_metadata.rs", "crates/router/src/core/payments/operations/payments_incremental_authorization.rs", "crates/router/src/core/payments/operations/tax_calculation.rs", "crates/router/src/core/payments/tokenization.rs"]}, "change_types": {"structs_added": 3, "functions_added": 42, "enums_added": 1, "fields_added": 60, "conditionals_added": 9}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor(utils): use to_state_code of hyperswitch_connectors in router ## 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 --> to_state_code method of router is not updated so the implementation from hyperswitch_connectors needs to be used and the one from router is depreciated. Note: Contains remaning European countries for ISO conversion ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Sanity External 3DS payment, by sending billing_address in payment_method_data for Poland country address CURL ``` curl --location 'localhost:8080/payments/pay_MRVy1jlxGGGZafdE7xsJ/3ds/authentication' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: pk_dev_d3a60dc7950549aa954219ca29746442' \ --data '{ "client_secret": "pay_MRVy1jlxGGGZafdE7xsJ_secret_at05FqOzGfMCtJ3bRw4Y", "device_channel": "BRW", "threeds_method_comp_ind": "Y" }' ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/hyperswitch_connectors/src/utils.rs` - `crates/router/src/connector/netcetera/netcetera_types.rs` - `crates/router/src/connector/threedsecureio/transformers.rs` - ... and 1 more files **2. Configuration Files** - `.typos.toml` **3. Other** - `crates/common_enums/src/enums.rs` **Code Patterns Applied:** - Implement new functions (9 changes) - Extend existing types with new fields (9 changes) **Detailed Identifier Changes:** Commit 3d3bed38: Files to modify: **crates/common_enums/src/enums.rs** Add: - enum: pub::BelgiumStatesAbbreviation - enum: pub::LuxembourgStatesAbbreviation - enum: pub::RussiaStatesAbbreviation - enum: pub::SanMarinoStatesAbbreviation - enum: pub::SerbiaStatesAbbreviation - enum: pub::SlovakiaStatesAbbreviation - enum: pub::SloveniaStatesAbbreviation - enum: pub::SwedenStatesAbbreviation - enum: pub::UkraineStatesAbbreviation **crates/hyperswitch_connectors/src/utils.rs** Modify existing code **crates/router/src/connector/netcetera/netcetera_types.rs** Modify existing code **crates/router/src/connector/threedsecureio/transformers.rs** Modify existing code **crates/router/src/connector/utils.rs** Remove: - function: private::to_state_code - function: private::to_state_code_as_optional
{"pr_number": 7287, "pr_title": "refactor(utils): use to_state_code of hyperswitch_connectors in router", "merged_at": "2025-02-17T13:28:13Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "connector"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/utils.rs", "crates/router/src/connector/netcetera/netcetera_types.rs", "crates/router/src/connector/threedsecureio/transformers.rs", "crates/router/src/connector/utils.rs"], "config": [".typos.toml"], "other": ["crates/common_enums/src/enums.rs"]}, "change_types": {"functions_added": 9, "enums_added": 9, "fields_added": 9, "imports_added": 3}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
chore: resolve v2 warnings in diesel_models ## 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 resolves the v2 warnings generated in diesel_models. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ## Checklist <!-- Put 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/merchant_connector_account.rs` - `crates/diesel_models/src/payment_attempt.rs` - `crates/diesel_models/src/query/merchant_account.rs` - ... and 4 more files **Code Patterns Applied:** - Implement new functions (2 changes) **Detailed Identifier Changes:** Commit 212ac270: Files to modify: **crates/diesel_models/src/merchant_connector_account.rs** Modify existing code **crates/diesel_models/src/payment_attempt.rs** Modify existing code **crates/diesel_models/src/query/merchant_account.rs** Modify existing code **crates/diesel_models/src/query/payment_attempt.rs** Modify existing code **crates/diesel_models/src/query/payment_method.rs** Modify existing code **crates/diesel_models/src/query/user/sample_data.rs** Modify existing code **crates/diesel_models/src/user/sample_data.rs** Modify existing code
{"pr_number": 7359, "pr_title": "chore: resolve v2 warnings in diesel_models", "merged_at": "2025-04-29T10:25:05Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"database": ["crates/diesel_models/src/merchant_connector_account.rs", "crates/diesel_models/src/payment_attempt.rs", "crates/diesel_models/src/query/merchant_account.rs", "crates/diesel_models/src/query/payment_attempt.rs", "crates/diesel_models/src/query/payment_method.rs", "crates/diesel_models/src/query/user/sample_data.rs", "crates/diesel_models/src/user/sample_data.rs"]}, "change_types": {"functions_added": 2, "imports_added": 7}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(postman): update expected status from `processing` to `requires_capture` in payment confirmation tests ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [x] CI/CD ## Description <!-- Describe your changes in detail --> ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> The Postman Testcases for `nmi` connector was failing in case of Manual Capture ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> _**Before**_ <img width="500" alt="image" src="https://github.com/user-attachments/assets/b22d850f-ad64-4fce-a7c2-26a946db3c52" /> <details> <summary>Changes</summary> - Previously the manually captured payments through `nmi` connector stayed in `processing` state after confirming the payment. But now, it goes to `requires_capture` state. So, making the necessary changes. </details> _**After**_ <img width="500" alt="image" src="https://github.com/user-attachments/assets/e31e373a-158c-42e3-a324-e5f55827300a" /> ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Tests** - `postman/collection-dir/nmi/Flow Testcases/Happy Cases/Scenario12-Save card payment with manual capture/Save card payments - Confirm/event.test.js` - `postman/collection-dir/nmi/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture/Payments - Create/event.test.js` - `postman/collection-dir/nmi/Flow Testcases/Happy Cases/Scenario5-Void the payment/Payments - Create/event.test.js` - ... and 2 more files
{"pr_number": 7458, "pr_title": "fix(postman): update expected status from `processing` to `requires_capture` in payment confirmation tests", "merged_at": "2025-03-11T11:00:10Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "user", "connector"]}, "hierarchy": {"tests": ["postman/collection-dir/nmi/Flow Testcases/Happy Cases/Scenario12-Save card payment with manual capture/Save card payments - Confirm/event.test.js", "postman/collection-dir/nmi/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture/Payments - Create/event.test.js", "postman/collection-dir/nmi/Flow Testcases/Happy Cases/Scenario5-Void the payment/Payments - Create/event.test.js", "postman/collection-dir/nmi/Flow Testcases/Happy Cases/Scenario9a-Update amount with manual capture/Payments - Confirm/event.test.js", "postman/collection-dir/nmi/Flow Testcases/Variation Cases/Scenario3-Capture greater amount/Payments - Create/event.test.js"]}, "change_types": {}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
chore: make v1 merchant account forward compatible ## 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 --> made changes to populate id column in merchant account while creating a new merchant_account record in v1. So that the merchant account created in v1 can be read from 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)? --> Made sure that `id` column is being populated with `merchant_id` when creating a new `merchant account` 1. create merchant account in v1 application. ``` 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_1741338438", "locker_id": "m0010", "merchant_name": "NewAge Retailer", "merchant_details": { "primary_contact_person": "John Test", "primary_email": "JohnTest@test.com", "primary_phone": "sunt laborum", "secondary_contact_person": "John Test2", "secondary_email": "JohnTest2@test.com", "secondary_phone": "cillum do dolor id", "website": "www.example.com", "about_business": "Online Retail with a wide selection of organic products for North America", "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US" } }, "return_url": "https://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": "default" } ] }' ``` ![image](https://github.com/user-attachments/assets/b9538652-a6da-442e-9c1f-9199be6432d4) 2. fetch the merchant account in v2 application. ``` curl --location 'http://localhost:8080/v2/merchant-accounts/merchant_1741338105' \ --header 'api-key: test_admin' ``` Response: ``` { "id": "merchant_1741338105", "merchant_name": "NewAge Retailer", "merchant_details": { "primary_contact_person": "John Test", "primary_phone": "sunt laborum", "primary_email": "JohnTest@test.com", "secondary_contact_person": "John Test2", "secondary_phone": "cillum do dolor id", "secondary_email": "JohnTest2@test.com", "website": "www.example.com", "about_business": "Online Retail with a wide selection of organic products for North America", "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": null, "last_name": null } }, "publishable_key": "pk_dev_2d588a75c92b402caf7f9794bf50b3a5", "metadata": { "city": "NY", "unit": "245", "compatible_connector": null }, "organization_id": "org_A62v8pidYbQaGZevTQhP", "recon_status": "not_requested" } ``` ## Checklist <!-- Put 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/query/merchant_account.rs` **3. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/merchant_account.rs` **4. Core Business Logic** - `crates/router/src/core/admin.rs` **5. Type Definitions** - `crates/router/src/types/api/admin.rs` - `crates/router/src/types/domain/user.rs` **6. Utils** - `crates/router/src/utils/user.rs` **7. Other** - `crates/router/src/routes/admin.rs` **Code Patterns Applied:** - Implement new functions (9 changes) - Extend existing types with new fields (36 changes) - Modify database queries (11 changes) **Detailed Identifier Changes:** Commit b63439a0: Files to modify: **crates/api_models/src/admin.rs** Modify existing code **crates/diesel_models/src/query/merchant_account.rs** Add: - function: pub::find_by_merchant_id - function: pub::find_by_publishable_key - function: pub::list_by_organization_id - function: pub::list_multiple_merchant_accounts - function: pub::list_all_merchant_accounts - function: pub::update_all_merchant_accounts - function: pub::update - function: pub::update_with_specific_fields **crates/hyperswitch_domain_models/src/merchant_account.rs** Modify existing code **crates/router/src/core/admin.rs** Modify existing code **crates/router/src/routes/admin.rs** Modify existing code **crates/router/src/types/api/admin.rs** Modify existing code **crates/router/src/types/domain/user.rs** Modify existing code **crates/router/src/utils/user.rs** Modify existing code
{"pr_number": 7426, "pr_title": "chore: make v1 merchant account forward compatible", "merged_at": "2025-03-07T11:44:45Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "merchant", "user"]}, "hierarchy": {"api_models": ["crates/api_models/src/admin.rs"], "database": ["crates/diesel_models/src/query/merchant_account.rs"], "domain": ["crates/hyperswitch_domain_models/src/merchant_account.rs"], "core_business": ["crates/router/src/core/admin.rs"], "types": ["crates/router/src/types/api/admin.rs", "crates/router/src/types/domain/user.rs"], "utils": ["crates/router/src/utils/user.rs"], "other": ["crates/router/src/routes/admin.rs"]}, "change_types": {"functions_added": 9, "fields_added": 36, "imports_added": 2, "database_queries": 11}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(connector): [Cryptopay] fix amount_captured population logic in response handling ## 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 --> - Modified response handling logic to only populate `amount_captured` in router_data when payment status is `Charged`. - Removed the integrity check error that was preventing overpaid payments from being processed correctly. - The `PaymentsSyncData::get_captured_amount` method was ignoring the `amount_captured` parameter and only consulting stored payment data and getting total_amount. To fix this added `.or(amount_captured.map(MinorUnit::new))` to the chain in `PaymentsSyncData::get_captured_amount`, ensuring the method prioritizes amount_captured from router_data similar to PaymentsAuthorizeData before consulting payment_data for total_amount. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context - Previously, `amount_captured` was being set from the `price_amount` field for all payment statuses, including incomplete payments like `requires_customer_action` - Cryptopay allows customers to overpay, but the integrity check was throwing errors when `captured_amount > total_capturable_amount` and `is_overcapture_enabled` was false <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> <details> <summary>Create Payment</summary> ```json { "amount": 15, "currency": "USD", "confirm": true, "email": "guest@example.com", "return_url": "https://google.com", "payment_method": "crypto", "payment_method_type": "crypto_currency", "payment_experience": "redirect_to_url", "capture_method": "automatic", "payment_method_data": { "crypto": { "pay_currency": "LTC" } } } ``` Response ```json { "payment_id": "pay_nmtnfFNgKIwgtmwwwfeZ", "merchant_id": "merchant_1759732916", "status": "requires_customer_action", "amount": 15, "net_amount": 15, "shipping_cost": null, "amount_capturable": 15, "amount_received": null, "connector": "cryptopay", "client_secret": "pay_nmtnfFNgKIwgtmwwwfeZ_secret_6Ga6ekLlDTUcJVKLE9xd", "created": "2025-10-06T06:46:16.209Z", "currency": "USD", "customer_id": null, "customer": { "id": null, "name": null, "email": "guest@example.com", "phone": null, "phone_country_code": null }, "description": null, "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "crypto", "payment_method_data": { "crypto": { "pay_currency": "LTC", "network": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": null, "order_details": null, "email": null, "name": null, "phone": null, "return_url": "https://google.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": { "type": "redirect_to_url", "redirect_to_url": "http://localhost:8080/payments/redirect/pay_nmtnfFNgKIwgtmwwwfeZ/merchant_1759732916/pay_nmtnfFNgKIwgtmwwwfeZ_1" }, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": "redirect_to_url", "payment_method_type": "crypto_currency", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": null, "manual_retry_allowed": null, "connector_transaction_id": "782f2938-c41d-4be2-b93e-c22709654054", "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_nmtnfFNgKIwgtmwwwfeZ_1", "payment_link": null, "profile_id": "pro_idiFBCtfW7ACI2qZSLdk", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_LB9MXkHZW8HRFzhiyJvY", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-10-06T07:01:16.209Z", "fingerprint": null, "browser_info": null, "payment_channel": null, "payment_method_id": null, "network_transaction_id": null, "payment_method_status": null, "updated": "2025-10-06T06:46:16.598Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "request_extended_authorization": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": null, "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null, "enable_partial_authorization": null, "enable_overcapture": null, "is_overcapture_enabled": null, "network_details": null, "is_stored_credential": null, "mit_category": null } ``` </details> <details> <summary>Underpaid Payment Sync</summary> Response ```json { "payment_id": "pay_AQ3kBO4NEV65g4nzsI5H", "merchant_id": "merchant_1759732916", "status": "partially_captured", "amount": 15, "net_amount": 15, "shipping_cost": null, "amount_capturable": 0, "amount_received": 12, "connector": "cryptopay", "client_secret": "pay_AQ3kBO4NEV65g4nzsI5H_secret_ogakUxfaNRXMgwTm2Cx2", "created": "2025-10-06T10:31:46.564Z", "currency": "USD", "customer_id": null, "customer": { "id": null, "name": null, "email": "guest@example.com", "phone": null, "phone_country_code": null }, "description": null, "refunds": null, "disputes": null, "attempts": [ { "attempt_id": "pay_AQ3kBO4NEV65g4nzsI5H_1", "status": "partial_charged", "amount": 15, "order_tax_amount": null, "currency": "USD", "connector": "cryptopay", "error_message": null, "payment_method": "crypto", "connector_transaction_id": "8157c59c-7ef1-4520-adc0-ff505d67c4c2", "capture_method": "automatic", "authentication_type": "no_three_ds", "created_at": "2025-10-06T10:31:46.567Z", "modified_at": "2025-10-06T10:41:51.594Z", "cancellation_reason": null, "mandate_id": null, "error_code": null, "payment_token": null, "connector_metadata": null, "payment_experience": "redirect_to_url", "payment_method_type": "crypto_currency", "reference_id": "pay_AQ3kBO4NEV65g4nzsI5H_1", "unified_code": null, "unified_message": null, "client_source": null, "client_version": null } ], "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "crypto", "payment_method_data": { "crypto": { "pay_currency": "LTC", "network": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": null, "order_details": null, "email": null, "name": null, "phone": null, "return_url": "https://google.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": "redirect_to_url", "payment_method_type": "crypto_currency", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": null, "manual_retry_allowed": null, "connector_transaction_id": "8157c59c-7ef1-4520-adc0-ff505d67c4c2", "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_AQ3kBO4NEV65g4nzsI5H_1", "payment_link": null, "profile_id": "pro_idiFBCtfW7ACI2qZSLdk", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_LB9MXkHZW8HRFzhiyJvY", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-10-06T10:46:46.564Z", "fingerprint": null, "browser_info": null, "payment_channel": null, "payment_method_id": null, "network_transaction_id": null, "payment_method_status": null, "updated": "2025-10-06T10:41:51.594Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "request_extended_authorization": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": null, "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null, "enable_partial_authorization": null, "enable_overcapture": null, "is_overcapture_enabled": null, "network_details": null, "is_stored_credential": null, "mit_category": null } ``` </details> <details> <summary>Overpaid Payment sync</summary> Response ```json { "payment_id": "pay_GDtiguqwSEiybP9S2Pgc", "merchant_id": "merchant_1759732916", "status": "succeeded", "amount": 15, "net_amount": 15, "shipping_cost": null, "amount_capturable": 0, "amount_received": 17, "connector": "cryptopay", "client_secret": "pay_GDtiguqwSEiybP9S2Pgc_secret_yVeHrITuZPa434ZYDMN4", "created": "2025-10-06T06:42:08.937Z", "currency": "USD", "customer_id": null, "customer": { "id": null, "name": null, "email": "guest@example.com", "phone": null, "phone_country_code": null }, "description": null, "refunds": null, "disputes": null, "attempts": [ { "attempt_id": "pay_GDtiguqwSEiybP9S2Pgc_1", "status": "charged", "amount": 15, "order_tax_amount": null, "currency": "USD", "connector": "cryptopay", "error_message": null, "payment_method": "crypto", "connector_transaction_id": "98c30587-0544-4c2f-949e-923965773a87", "capture_method": "automatic", "authentication_type": "no_three_ds", "created_at": "2025-10-06T06:42:08.940Z", "modified_at": "2025-10-06T06:45:42.581Z", "cancellation_reason": null, "mandate_id": null, "error_code": null, "payment_token": null, "connector_metadata": null, "payment_experience": "redirect_to_url", "payment_method_type": "crypto_currency", "reference_id": "pay_GDtiguqwSEiybP9S2Pgc_1", "unified_code": null, "unified_message": null, "client_source": null, "client_version": null } ], "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "crypto", "payment_method_data": { "crypto": { "pay_currency": "LTC", "network": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": null, "order_details": null, "email": null, "name": null, "phone": null, "return_url": "https://google.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": "redirect_to_url", "payment_method_type": "crypto_currency", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": null, "manual_retry_allowed": null, "connector_transaction_id": "98c30587-0544-4c2f-949e-923965773a87", "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_GDtiguqwSEiybP9S2Pgc_1", "payment_link": null, "profile_id": "pro_idiFBCtfW7ACI2qZSLdk", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_LB9MXkHZW8HRFzhiyJvY", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-10-06T06:57:08.936Z", "fingerprint": null, "browser_info": null, "payment_channel": null, "payment_method_id": null, "network_transaction_id": null, "payment_method_status": null, "updated": "2025-10-06T06:45:42.581Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "request_extended_authorization": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": null, "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null, "enable_partial_authorization": null, "enable_overcapture": null, "is_overcapture_enabled": null, "network_details": null, "is_stored_credential": null, "mit_category": null } ``` </details> <details> <summary>Exact amount paid Payment Sync</summary> Response ```json { "payment_id": "pay_0yVxECTGSurN7u9hMe1j", "merchant_id": "merchant_1759732916", "status": "succeeded", "amount": 15, "net_amount": 15, "shipping_cost": null, "amount_capturable": 0, "amount_received": 15, "connector": "cryptopay", "client_secret": "pay_0yVxECTGSurN7u9hMe1j_secret_i3GfK1Km0iitrQx66IgF", "created": "2025-10-10T07:49:43.268Z", "currency": "USD", "customer_id": null, "customer": { "id": null, "name": null, "email": "guest@example.com", "phone": null, "phone_country_code": null }, "description": null, "refunds": null, "disputes": null, "attempts": [ { "attempt_id": "pay_0yVxECTGSurN7u9hMe1j_1", "status": "charged", "amount": 15, "order_tax_amount": null, "currency": "USD", "connector": "cryptopay", "error_message": null, "payment_method": "crypto", "connector_transaction_id": "af24ef5c-f51c-43de-9c73-732ac3c4857d", "capture_method": "automatic", "authentication_type": "no_three_ds", "created_at": "2025-10-10T07:49:43.275Z", "modified_at": "2025-10-10T07:55:00.411Z", "cancellation_reason": null, "mandate_id": null, "error_code": null, "payment_token": null, "connector_metadata": null, "payment_experience": "redirect_to_url", "payment_method_type": "crypto_currency", "reference_id": "pay_0yVxECTGSurN7u9hMe1j_1", "unified_code": null, "unified_message": null, "client_source": null, "client_version": null } ], "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "crypto", "payment_method_data": { "crypto": { "pay_currency": "LTC", "network": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": null, "order_details": null, "email": null, "name": null, "phone": null, "return_url": "https://google.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": "redirect_to_url", "payment_method_type": "crypto_currency", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": null, "manual_retry_allowed": null, "connector_transaction_id": "af24ef5c-f51c-43de-9c73-732ac3c4857d", "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_0yVxECTGSurN7u9hMe1j_1", "payment_link": null, "profile_id": "pro_idiFBCtfW7ACI2qZSLdk", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_LB9MXkHZW8HRFzhiyJvY", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-10-10T08:04:43.267Z", "fingerprint": null, "browser_info": null, "payment_channel": null, "payment_method_id": null, "network_transaction_id": null, "payment_method_status": null, "updated": "2025-10-10T07:55:00.412Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "request_extended_authorization": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": null, "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null, "enable_partial_authorization": null, "enable_overcapture": null, "is_overcapture_enabled": null, "network_details": null, "is_stored_credential": null, "mit_category": null } ``` </details> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/cryptopay/transformers.rs` - `crates/router/src/connector/utils.rs` **2. Type Definitions** - `crates/router/src/types.rs` **Code Patterns Applied:** - Extend existing types with new fields (1 changes) **Detailed Identifier Changes:** Commit a4bf608b: Files to modify: **crates/hyperswitch_connectors/src/connectors/cryptopay/transformers.rs** Modify existing code **crates/router/src/connector/utils.rs** Modify existing code **crates/router/src/types.rs** Modify existing code
{"pr_number": 9674, "pr_title": "fix(connector): [Cryptopay] fix amount_captured population logic in response handling", "merged_at": "2025-10-10T08:50:42Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/cryptopay/transformers.rs", "crates/router/src/connector/utils.rs"], "types": ["crates/router/src/types.rs"]}, "change_types": {"fields_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(core): Implement 3ds decision manger 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 - Implement 3ds decision manger for V2 - Merchant can configure different 3ds rule for each profile. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with 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. Organization Create ``` curl --location 'http://localhost:8080/v2/organization' \ --header 'Content-Type: application/json' \ --header 'api-key: test_admin' \ --data '{ "organization_name": "random_org_1736926299" }' ``` 2. Merchant Account Create ``` curl --location 'http://localhost:8080/v2/merchant-accounts' \ --header 'x-organization-id: org_ojPeFJQSwbmYHFykF4Md' \ --header 'Content-Type: application/json' \ --header 'api-key: test_admin' \ --data '{ "merchant_name": "cloth_seller" }' ``` 3. Business Profile Create ``` curl --location 'http://localhost:8080/v2/profiles' \ --header 'x-merchant-id: cloth_seller_PXTsb0I3Zu2n8E5xWRUD' \ --header 'Content-Type: application/json' \ --header 'api-key: test_admin' \ --data-raw '{ "profile_name": "business", "return_url": "https://google.com/success", "enable_payment_response_hash": true, "redirect_to_merchant_with_http_post": false, "webhook_details": { "webhook_version": "1.0.1", "webhook_username": "ekart_retail", "webhook_password": "password_ekart@123", "webhook_url": "https://webhook.site", "payment_created_enabled": true, "payment_succeeded_enabled": true, "payment_failed_enabled": true }, "metadata": null, "order_fulfillment_time": 900, "order_fulfillment_time_origin": "create", "applepay_verified_domains": null, "session_expiry": 900, "payment_link_config": null, "authentication_connector_details": null, "use_billing_as_payment_method_billing": true, "collect_shipping_details_from_wallet_connector_if_required": false, "collect_billing_details_from_wallet_connector_if_required": false, "always_collect_shipping_details_from_wallet_connector": false, "always_collect_billing_details_from_wallet_connector": false, "is_connector_agnostic_mit_enabled": false, "payout_link_config": null, "outgoing_webhook_custom_http_headers": null }' ``` 4. Configure 3ds Rule to that Profile ``` curl --location --request PUT 'http://localhost:8080/v2/profiles/pro_RuygLuNPMy2PCqcEW96n/decision' \ --header 'x-merchant-id: cloth_seller_PXTsb0I3Zu2n8E5xWRUD' \ --header 'X-Profile-Id: pro_RuygLuNPMy2PCqcEW96n' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_1rmHYg4vdeMtrq77KiCel53UBBoLzvKEfPQfWNQ4lTXTCm4S6Q3OP1uF9uiudmXZ' \ --data '{ "name": "3DS Rule-2025-01-08", "program": { "defaultSelection": { "override_3ds": null }, "rules": [ { "name": "rule_1", "connectorSelection": { "override_3ds": "three_ds" }, "statements": [ { "condition": [ { "lhs": "amount", "comparison": "equal", "value": { "type": "number", "value": 32 }, "metadata": {} }, { "lhs": "currency", "comparison": "equal", "value": { "type": "enum_variant", "value": "AMD" }, "metadata": {} } ] } ] } ], "metadata": {} } }' ``` Response ``` { "name": "3DS Rule-2025-01-08", "program": { "defaultSelection": { "override_3ds": null }, "rules": [ { "name": "rule_1", "connectorSelection": { "override_3ds": "three_ds" }, "statements": [ { "condition": [ { "lhs": "amount", "comparison": "equal", "value": { "type": "number", "value": 32 }, "metadata": {} }, { "lhs": "currency", "comparison": "equal", "value": { "type": "enum_variant", "value": "AMD" }, "metadata": {} } ], "nested": null } ] } ], "metadata": {} }, "created_at": 1736926264 } ``` 5. Retrive Business Profile ``` curl --location 'http://localhost:8080/v2/profiles/pro_RuygLuNPMy2PCqcEW96n/decision' \ --header 'x-merchant-id: cloth_seller_PXTsb0I3Zu2n8E5xWRUD' \ --header 'X-Profile-Id: pro_RuygLuNPMy2PCqcEW96n' \ --header 'api-key: dev_1rmHYg4vdeMtrq77KiCel53UBBoLzvKEfPQfWNQ4lTXTCm4S6Q3OP1uF9uiudmXZ' ``` Response ``` { "name": "3DS Rule-2025-01-08", "program": { "defaultSelection": { "override_3ds": null }, "rules": [ { "name": "rule_1", "connectorSelection": { "override_3ds": "three_ds" }, "statements": [ { "condition": [ { "lhs": "amount", "comparison": "equal", "value": { "type": "number", "value": 32 }, "metadata": {} }, { "lhs": "currency", "comparison": "equal", "value": { "type": "enum_variant", "value": "AMD" }, "metadata": {} } ], "nested": null } ] } ], "metadata": {} }, "created_at": 1736926264 } ``` ## Checklist <!-- Put 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/conditional_configs.rs` **2. Database Layer (Queries & Schema)** - `crates/diesel_models/src/business_profile.rs` - `crates/diesel_models/src/schema_v2.rs` **3. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/business_profile.rs` **4. Core Business Logic** - `crates/router/src/core/admin.rs` - `crates/router/src/core/conditional_config.rs` - `crates/router/src/core/payments.rs` - ... and 3 more files **5. Type Definitions** - `crates/common_types/Cargo.toml` - `crates/common_types/src/payments.rs` - `crates/euclid/src/dssa/types.rs` **6. Configuration Files** - `crates/euclid_wasm/Cargo.toml` - `v2_migrations/2025-01-13-181842_add_three_ds_decision_manager_config_in_profile/down.sql` - `v2_migrations/2025-01-13-181842_add_three_ds_decision_manager_config_in_profile/up.sql` **7. Other** - `.github/CODEOWNERS` - `Cargo.lock` - `crates/euclid_wasm/src/lib.rs` - ... and 3 more files **Code Patterns Applied:** - Define new data structures (4 changes) - Implement new functions (7 changes) - Extend existing types with new fields (92 changes) **Detailed Identifier Changes:** Commit b8c47cdf: Files to modify: **crates/api_models/src/conditional_configs.rs** Remove: - function: pub::to_dir_value - function: private::get_dir_value_for_analysis - struct: pub::ConditionalConfigs - enum: pub::AuthenticationType - impl: impl AuthenticationType - impl: impl EuclidAnalysable for AuthenticationType - impl: impl EuclidDirFilter for ConditionalConfigs Add: - function: private::get_api_event_type - struct: pub::DecisionManagerRequest - impl: impl events::ApiEventMetric for DecisionManagerRequest **crates/common_types/src/payments.rs** Remove: - struct: pub::AuthenticationConnectorAccountMap Add: - function: pub::get_click_to_pay_connector_account_id - struct: pub::AuthenticationConnectorAccountMap - struct: pub::ConditionalConfigs - struct: pub::DecisionManagerRecord - impl: impl AuthenticationConnectorAccountMap - impl: impl EuclidDirFilter for ConditionalConfigs **crates/diesel_models/src/business_profile.rs** Modify existing code **crates/diesel_models/src/schema_v2.rs** Modify existing code **crates/euclid/src/dssa/types.rs** Add: - function: private::get_dir_value_for_analysis - impl: impl EuclidAnalysable for common_enums::AuthenticationType **crates/euclid_wasm/src/lib.rs** Modify existing code **crates/hyperswitch_domain_models/src/business_profile.rs** Modify existing code **crates/router/src/core/admin.rs** Modify existing code **crates/router/src/core/conditional_config.rs** Add: - function: pub::retrieve_conditional_config **crates/router/src/core/payments.rs** Modify existing code **crates/router/src/core/payments/conditional_configs.rs** Remove: - mod: private::transformers **crates/router/src/core/payments/conditional_configs/transformers.rs** Remove: - function: private::foreign_from - function: private::foreign_from - impl: impl ForeignFrom<dsl_enums::AuthenticationType> for conditional_configs::AuthenticationType - impl: impl ForeignFrom<conditional_configs::AuthenticationType> for storage_enums::AuthenticationType **crates/router/src/core/routing/helpers.rs** Remove: - function: pub::update_merchant_active_algorithm_ref **crates/router/src/routes/app.rs** Modify existing code **crates/router/src/routes/routing.rs** Add: - function: pub::upsert_decision_manager_config - function: pub::retrieve_decision_manager_config **crates/router/src/services/authorization/permissions.rs** Modify existing code Commit 19009597: Files to modify: **crates/api_models/src/conditional_configs.rs** Remove: - function: pub::to_dir_value - function: private::get_dir_value_for_analysis - struct: pub::ConditionalConfigs - enum: pub::AuthenticationType - impl: impl AuthenticationType - impl: impl EuclidAnalysable for AuthenticationType - impl: impl EuclidDirFilter for ConditionalConfigs Add: - function: private::get_api_event_type - struct: pub::DecisionManagerRequest - impl: impl events::ApiEventMetric for DecisionManagerRequest **crates/common_types/src/payments.rs** Remove: - struct: pub::AuthenticationConnectorAccountMap Add: - function: pub::get_click_to_pay_connector_account_id - struct: pub::AuthenticationConnectorAccountMap - struct: pub::ConditionalConfigs - struct: pub::DecisionManagerRecord - impl: impl AuthenticationConnectorAccountMap - impl: impl EuclidDirFilter for ConditionalConfigs **crates/diesel_models/src/business_profile.rs** Modify existing code **crates/diesel_models/src/schema_v2.rs** Modify existing code **crates/euclid/src/dssa/types.rs** Add: - function: private::get_dir_value_for_analysis - impl: impl EuclidAnalysable for common_enums::AuthenticationType **crates/euclid_wasm/src/lib.rs** Modify existing code **crates/hyperswitch_domain_models/src/business_profile.rs** Modify existing code **crates/router/src/core/admin.rs** Modify existing code **crates/router/src/core/conditional_config.rs** Add: - function: pub::retrieve_conditional_config **crates/router/src/core/payments.rs** Modify existing code **crates/router/src/core/payments/conditional_configs.rs** Remove: - mod: private::transformers **crates/router/src/core/payments/conditional_configs/transformers.rs** Remove: - function: private::foreign_from - function: private::foreign_from - impl: impl ForeignFrom<dsl_enums::AuthenticationType> for conditional_configs::AuthenticationType - impl: impl ForeignFrom<conditional_configs::AuthenticationType> for storage_enums::AuthenticationType **crates/router/src/core/routing/helpers.rs** Remove: - function: pub::update_merchant_active_algorithm_ref **crates/router/src/routes/app.rs** Modify existing code **crates/router/src/routes/routing.rs** Add: - function: pub::upsert_decision_manager_config - function: pub::retrieve_decision_manager_config **crates/router/src/services/authorization/permissions.rs** Modify existing code
{"pr_number": 7022, "pr_title": "feat(core): Implement 3ds decision manger for V2", "merged_at": "2025-02-05T14:59:36Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "merchant", "user"]}, "hierarchy": {"api_models": ["crates/api_models/src/conditional_configs.rs"], "database": ["crates/diesel_models/src/business_profile.rs", "crates/diesel_models/src/schema_v2.rs"], "domain": ["crates/hyperswitch_domain_models/src/business_profile.rs"], "core_business": ["crates/router/src/core/admin.rs", "crates/router/src/core/conditional_config.rs", "crates/router/src/core/payments.rs", "crates/router/src/core/payments/conditional_configs.rs", "crates/router/src/core/payments/conditional_configs/transformers.rs", "crates/router/src/core/routing/helpers.rs"], "types": ["crates/common_types/Cargo.toml", "crates/common_types/src/payments.rs", "crates/euclid/src/dssa/types.rs"], "config": ["crates/euclid_wasm/Cargo.toml", "v2_migrations/2025-01-13-181842_add_three_ds_decision_manager_config_in_profile/down.sql", "v2_migrations/2025-01-13-181842_add_three_ds_decision_manager_config_in_profile/up.sql"], "other": [".github/CODEOWNERS", "Cargo.lock", "crates/euclid_wasm/src/lib.rs", "crates/router/src/routes/app.rs", "crates/router/src/routes/routing.rs", "crates/router/src/services/authorization/permissions.rs"]}, "change_types": {"structs_added": 4, "functions_added": 7, "fields_added": 92, "imports_added": 8}, "has_identifier_data": true, "commits_matched": 2, "match_method": "pr_number"}
refactor(authentication): modify auth for profiles and mca routes to `ApiKeyAuthWithMerchantIdFromRoute` ## 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 --> Hotfix PR Original PR: [https://github.com/juspay/hyperswitch/pull/7656](https://github.com/juspay/hyperswitch/pull/7656) ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with 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. Tests** - `cypress-tests-v2/cypress/support/commands.js` - `cypress-tests/cypress/support/commands.js` **2. Other** - `crates/router/src/routes/admin.rs` - `crates/router/src/routes/profiles.rs` - `crates/router/src/services/authentication.rs` **Code Patterns Applied:** - Define new data structures (1 changes) - Implement new functions (2 changes) - Extend existing types with new fields (7 changes) - Add conditional logic for feature flags or filtering (3 changes) **Detailed Identifier Changes:** Commit ac7696d0: Files to modify: **crates/router/src/routes/admin.rs** Modify existing code **crates/router/src/routes/profiles.rs** Modify existing code **crates/router/src/services/authentication.rs** Add: - function: private::get_auth_type - function: private::authenticate_and_fetch - struct: pub::ApiKeyAuthWithMerchantIdFromRoute - impl: impl GetAuthType for ApiKeyAuthWithMerchantIdFromRoute - impl: impl AuthenticateAndFetch<AuthenticationData, A> for ApiKeyAuthWithMerchantIdFromRoute
{"pr_number": 7663, "pr_title": "refactor(authentication): modify auth for profiles and mca routes to `ApiKeyAuthWithMerchantIdFromRoute`", "merged_at": "2025-03-28T09:29:21Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"tests": ["cypress-tests-v2/cypress/support/commands.js", "cypress-tests/cypress/support/commands.js"], "other": ["crates/router/src/routes/admin.rs", "crates/router/src/routes/profiles.rs", "crates/router/src/services/authentication.rs"]}, "change_types": {"structs_added": 1, "functions_added": 2, "fields_added": 7, "conditionals_added": 3}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): Add recovery support for recurly [v2] ## 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 --> Context: In case of some billing connectors we don't get the enough data in the webhook itself to support creation of payment intent and payment attempt in our system. So previously we derived a flow named "BillingConnectorPaymentSync" in this PR:https://github.com/juspay/hyperswitch/pull/7461. This flow is used to fetch payment details of the invoices from the billing connectors using an API call to that billing connector. In this pr we are calling the flow and getting the details which are needed to create payment intent and attempt in our system. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ### Create a Merchant connector account with Connector type as billing_processor ### curl ``` curl --location 'http://localhost:8080/v2/connector-accounts' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'x-merchant-id: cloth_seller_PUlybbrtfmjJY3ZTzN2e' \ --header 'x-profile-id: pro_TxUPpBV1iEb8lpjqJVtT' \ --header 'Authorization: admin-api-key=test_admin' \ --header 'api-key: test_admin' \ --data '{ "connector_type": "billing_processor", "connector_name": "recurly", "connector_account_details": { "auth_type": "HeaderKey", "api_key": "get_api_key_from_recurly_website" }, "payment_methods_enabled": [ { "payment_method_type": "card", "payment_method_subtypes": [ { "payment_method_subtype": "credit", "payment_experience": null, "card_networks": [ "Visa", "Mastercard" ], "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_subtype": "debit", "payment_experience": null, "card_networks": [ "Visa", "Mastercard" ], "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true } ] } ], "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" }, "frm_configs": null, "connector_webhook_details": { "merchant_secret": "get_this_from_recurly_webhook_secret_key" }, "profile_id": "pro_TxUPpBV1iEb8lpjqJVtT" }' ``` ### Webhook ### curl ``` curl --location 'http://localhost:8080/v2/webhooks/cloth_seller_risyD1Sgloon6kD70ce4/pro_dAJLvpViOYTBQow1K2H8/mca_yLD1RtIJz5CNVvbmhtjA' \ --header 'accept-encoding: gzip' \ --header 'recurly-signature: 1741198133561,3aebbaa13293399921bc1d674f06ad630505912acf048a80c3fc24e88cd82b39' \ --header 'recurly-notification-id: 4280786644291699338' \ --header 'content-type: application/json; charset=utf-8' \ --header 'authorization: Basic YW5pa2V0LmJ1cm1hbkBqdXNwYXkuaW46QW5pa2V0anVzcGF5QDE2' \ --header 'accept: */*' \ --header 'content-length: 173' \ --header 'user-agent: Recurly Webhooks/2.0 (+https://docs.recurly.com/push-notifications)' \ --header 'host: webhook.site' \ --header 'php-auth-user: aniket.burman@juspay.in' \ --header 'php-auth-pw: Aniketjuspay@16' \ --header 'api-key: dev_igX4NC3iElYuX8E34hLOXE54PQY4CjoyFIWzQxPRK66wLp2BaePA2Z1MVEdYGrSg' \ --data '{"id":"wiuc1bhw7v0g","object_type":"payment","site_id":"w7x47013cfon","event_type":"succeeded","event_time":"2025-03-04T08:38:54Z","uuid":"76cf1a16ee3c82670f277e47039fc7b3"}' ``` ### Output (Payment intent and attempt got created) <img width="1728" alt="Screenshot 2025-03-18 at 5 39 37 PM" src="https://github.com/user-attachments/assets/aea87eff-5437-4dfa-90c3-691aca9b40ae" /> <img width="1728" alt="Screenshot 2025-03-18 at 5 39 44 PM" src="https://github.com/user-attachments/assets/46540e4c-f126-4c58-853a-c89721139dd3" /> <img width="1728" alt="Screenshot 2025-03-18 at 5 40 01 PM" src="https://github.com/user-attachments/assets/f5b49bd6-6c10-475c-a293-908edb833854" /> <img width="1728" alt="Screenshot 2025-03-18 at 5 40 08 PM" src="https://github.com/user-attachments/assets/84b21a93-6884-443e-89d1-f8177522dbc4" /> <img width="1728" alt="Screenshot 2025-03-18 at 5 40 18 PM" src="https://github.com/user-attachments/assets/787b8f81-5597-4b99-b708-28c8e5e4780a" /> <img width="1728" alt="Screenshot 2025-03-18 at 5 40 36 PM" src="https://github.com/user-attachments/assets/d7cb5629-2281-43ae-9a64-f99f3fe5f97c" /> ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/recurly.rs` - `crates/hyperswitch_connectors/src/connectors/recurly/transformers.rs` - `crates/hyperswitch_connectors/src/connectors/stripebilling/transformers.rs` - ... and 1 more files **2. Tests** - `config/deployments/integration_test.toml` - `loadtest/config/development.toml` **3. Configuration Files** - `config/config.example.toml` - `config/deployments/production.toml` - `config/deployments/sandbox.toml` - ... and 2 more files **Code Patterns Applied:** - Define new data structures (6 changes) - Implement new functions (10 changes) - Extend existing types with new fields (48 changes) **Detailed Identifier Changes:** Commit 68e22eef: Files to modify: **crates/hyperswitch_connectors/src/connectors/recurly.rs** Add: - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::build_request - function: private::handle_response - function: private::get_error_response - impl: impl api::revenue_recovery::BillingConnectorPaymentsSyncIntegration for Recurly - impl: impl ConnectorIntegration< recovery_router_flows::BillingConnectorPaymentsSync, recovery_request_types::BillingConnectorPaymentsSyncRequest, recovery_response_types::BillingConnectorPaymentsSyncResponse, > for Recurly **crates/hyperswitch_connectors/src/connectors/recurly/transformers.rs** Add: - function: private::try_from - function: private::from - function: private::from - function: private::from - struct: pub::RecurlyRecoveryDetailsData - struct: pub::PaymentMethod - struct: pub::Invoice - struct: pub::Account - struct: pub::PaymentGateway - enum: pub::RecurlyChargeStatus - enum: pub::RecurlyFundingTypes - enum: pub::RecurlyPaymentObject - impl: impl TryFrom< ResponseRouterData< recovery_router_flows::BillingConnectorPaymentsSync, RecurlyRecoveryDetailsData, recovery_request_types::BillingConnectorPaymentsSyncRequest, recovery_response_types::BillingConnectorPaymentsSyncResponse, >, > for recovery_router_data_types::BillingConnectorPaymentsSyncRouterData - impl: impl From<RecurlyChargeStatus> for enums::AttemptStatus - impl: impl From<RecurlyFundingTypes> for common_enums::PaymentMethodType - impl: impl From<RecurlyPaymentObject> for common_enums::PaymentMethod **crates/hyperswitch_connectors/src/connectors/stripebilling/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/default_implementations.rs** Modify existing code
{"pr_number": 7497, "pr_title": "feat(connector): Add recovery support for recurly [v2]", "merged_at": "2025-04-08T10:46:18Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "merchant", "user"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/recurly.rs", "crates/hyperswitch_connectors/src/connectors/recurly/transformers.rs", "crates/hyperswitch_connectors/src/connectors/stripebilling/transformers.rs", "crates/hyperswitch_connectors/src/default_implementations.rs"], "tests": ["config/deployments/integration_test.toml", "loadtest/config/development.toml"], "config": ["config/config.example.toml", "config/deployments/production.toml", "config/deployments/sandbox.toml", "config/development.toml", "config/docker_compose.toml"]}, "change_types": {"structs_added": 6, "functions_added": 10, "enums_added": 3, "fields_added": 48, "imports_added": 9}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor(success_based): add support for exploration ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This pull request introduces a new feature to support an "exploration percentage" parameter in success-based routing configurations and adds a "RoutingApproach" enum to define routing strategies. These changes span multiple files, including API specifications, Rust models, and protocol buffer definitions, ensuring end-to-end support for the new functionality. ### New Feature: Exploration Percentage in Routing Configurations * Added `exploration_percent` parameter to the `SuccessBasedRoutingConfig` struct in Rust models (`crates/api_models/src/routing.rs`) and updated its default implementation. [[1]](diffhunk://#diff-6eb6e93a94555e904f304999acc96ab6125769971da9ec3dcbb30d5912b4fc45R963) [[2]](diffhunk://#diff-6eb6e93a94555e904f304999acc96ab6125769971da9ec3dcbb30d5912b4fc45R992) * Modified the `update` method in `SuccessBasedRoutingConfigBody` to handle updates to the `exploration_percent` field. * Updated the gRPC client (`crates/external_services/src/grpc_client/dynamic_routing/success_rate_client.rs`) to include the `exploration_percent` field in the `CalSuccessRateConfig` mapping. * Enhanced the protocol buffer definition (`proto/success_rate.proto`) to include `exploration_percent` as an optional field in the `CalSuccessRateConfig` message. ### New Enum: Routing Approach * Introduced a `RoutingApproach` enum with values `EXPLORATION` and `EXPLOITATION` in the protocol buffer definition (`proto/success_rate.proto`) and added it to the `CalSuccessRateResponse` message. * Updated the OpenAPI specification (`api-reference/hyperswitch_intelligent_router_open_api_spec.yml`) to include the `RoutingApproach` type and its usage in API responses. ### API Specification Enhancements * Added `exploration_percent` to the API's routing configuration schema in the OpenAPI spec. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> 1. Toggle success based routing for a profile, Check the business profile table in DB, get the routing_algorithm_id active for that profile and check in routing_algorithm table. it should have exploration set to 20.0 ``` curl --location --request POST 'http://localhost:8080/account/merchant_1747851996/business_profile/pro_Rbh3PEV8EITILLoKDC6N/dynamic_routing/success_based/toggle?enable=dynamic_connector_selection' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: xyz' \ --data '' ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/open_router.rs` - `crates/api_models/src/routing.rs` **2. Core Business Logic** - `crates/router/src/core/payments/routing.rs` **3. Tests** - `cypress-tests/cypress/e2e/configs/Payment/Worldpayxml.js` **4. Configuration Files** - `api-reference/hyperswitch_intelligent_router_open_api_spec.yml` **5. Other** - `api-reference-v2/openapi_spec.json` - `api-reference/openapi_spec.json` - `crates/external_services/src/grpc_client/dynamic_routing/success_rate_client.rs` - ... and 1 more files **Code Patterns Applied:** - Extend existing types with new fields (12 changes) - Add conditional logic for feature flags or filtering (1 changes) **Detailed Identifier Changes:** Commit 3eb94d9a: Files to modify: **crates/api_models/src/open_router.rs** Modify existing code **crates/api_models/src/routing.rs** Modify existing code **crates/external_services/src/grpc_client/dynamic_routing/success_rate_client.rs** Modify existing code **crates/router/src/core/payments/routing.rs** Modify existing code Commit 06435bbe: Files to modify: **crates/api_models/src/open_router.rs** Modify existing code **crates/api_models/src/routing.rs** Modify existing code **crates/external_services/src/grpc_client/dynamic_routing/success_rate_client.rs** Modify existing code **crates/router/src/core/payments/routing.rs** Modify existing code
{"pr_number": 8158, "pr_title": "refactor(success_based): add support for exploration", "merged_at": "2025-05-27T17:51:02Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["merchant", "connector"]}, "hierarchy": {"api_models": ["crates/api_models/src/open_router.rs", "crates/api_models/src/routing.rs"], "core_business": ["crates/router/src/core/payments/routing.rs"], "tests": ["cypress-tests/cypress/e2e/configs/Payment/Worldpayxml.js"], "config": ["api-reference/hyperswitch_intelligent_router_open_api_spec.yml"], "other": ["api-reference-v2/openapi_spec.json", "api-reference/openapi_spec.json", "crates/external_services/src/grpc_client/dynamic_routing/success_rate_client.rs", "proto/success_rate.proto"]}, "change_types": {"enums_added": 1, "fields_added": 12, "conditionals_added": 1}, "has_identifier_data": true, "commits_matched": 2, "match_method": "pr_number"}
refactor: [Netcetera] Handle response deserialization error ## 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/8988 fix message extension , change type of data from string to json ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with 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/router_request_types/authentication.rs` **2. Core Business Logic** - `crates/router/src/core/payments.rs` - `crates/router/src/core/payments/routing.rs` **3. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/netcetera/transformers.rs` **Code Patterns Applied:** - Extend existing types with new fields (2 changes) **Detailed Identifier Changes:** Commit 560d4da1: Files to modify: **crates/hyperswitch_connectors/src/connectors/netcetera/transformers.rs** Add: - enum: pub::ThreedsRequestorChallengeInd **crates/hyperswitch_domain_models/src/router_request_types/authentication.rs** Modify existing code **crates/router/src/core/payments.rs** Modify existing code **crates/router/src/core/payments/routing.rs** Modify existing code
{"pr_number": 8975, "pr_title": "refactor: [Netcetera] Handle response deserialization error ", "merged_at": "2025-08-20T07:30:02Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"domain": ["crates/hyperswitch_domain_models/src/router_request_types/authentication.rs"], "core_business": ["crates/router/src/core/payments.rs", "crates/router/src/core/payments/routing.rs"], "connectors": ["crates/hyperswitch_connectors/src/connectors/netcetera/transformers.rs"]}, "change_types": {"enums_added": 1, "fields_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(connector): [Tokenex] fix tokenize flow response handling for tokenex ## 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 --> data in tokenize flow for tokenex accepts only length of 13-19 chars, we are sending complete card data. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with 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)? --> Please refer to this pr - https://github.com/juspay/hyperswitch/pull/9274 on how to enable external vault for profile - create tokenex mca ``` curl --location 'http://localhost:8080/account/merchant_1758632854/connectors' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: api-key' \ --data '{ "connector_type": "vault_processor", "connector_name": "tokenex", "connector_account_details": { "auth_type": "BodyKey", "api_key": "api_key", "key1": "key1" }, "test_mode": true, "disabled": false, "business_country": "US", "business_label": "default", "payment_methods_enabled": [ ], "metadata": { "endpoint_prefix": "ghjg", "google_pay": { "allowed_payment_methods": [ { "type": "CARD", "parameters": { "allowed_auth_methods": [ "PAN_ONLY", "CRYPTOGRAM_3DS" ], "allowed_card_networks": [ "AMEX", "DISCOVER", "INTERAC", "JCB", "MASTERCARD", "VISA" ] }, "tokenization_specification": { "type": "PAYMENT_GATEWAY" } } ], "merchant_info": { "merchant_name": "Narayan Bhat" } } }, "connector_webhook_details": { "merchant_secret": "7091687210DF6DCA38B2E670B3D68EB53516A26CA85590E29024FFBD7CD23980" }, "profile_id":"pro_KH7MujUjH2miLhfzGlAB" }' ``` - enable external vault for profile - make a payment with customer acceptance and setup_future_usage - on_session/off_session <img width="1055" height="941" alt="Screenshot 2025-09-24 at 10 48 05 AM" src="https://github.com/user-attachments/assets/46c43aed-022d-4cad-8204-912357f1a298" /> <img width="1059" height="947" alt="Screenshot 2025-09-24 at 12 48 36 PM" src="https://github.com/user-attachments/assets/31cf863a-a126-4ac2-bd76-1d08950dae10" /> request - ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_jN7RVfxJgyz3GB7OASKFved09yY2lA17xEJSBbj47tBN03inP9rCADUooCF5Ozz6' \ --data-raw ' { "amount": 1000, "currency": "USD", "confirm": true, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "customer_id":"cu_1758488194", "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment request", "authentication_type": "no_three_ds", "return_url": "https://google.com", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4111111111111111", "card_exp_month": "03", "card_exp_year": "2030", "card_holder_name": "joseph Doe", "card_cvc": "737" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "PiX", "last_name": "ss" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "John", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "browser_info": { "user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36", "accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8", "language": "nl-NL", "color_depth": 24, "screen_height": 723, "screen_width": 1536, "time_zone": 0, "java_enabled": true, "java_script_enabled": true, "ip_address": "125.0.0.1" }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": {}, "order_details": [ { "product_name": "Apple iphone 15", "quantity": 1, "amount": 0, "account_name": "transaction_processing" } ], "profile_id": "pro_KH7MujUjH2miLhfzGlAB" }' ``` response- ``` { "payment_id": "pay_yx1fFGndifp7EQB3opNZ", "merchant_id": "merchant_1758632854", "status": "succeeded", "amount": 1000, "net_amount": 1000, "shipping_cost": null, "amount_capturable": 0, "amount_received": 1000, "connector": "adyen", "client_secret": "pay_yx1fFGndifp7EQB3opNZ_secret_0RiRDFg3M0R56irWcNPa", "created": "2025-09-24T05:13:52.934Z", "currency": "USD", "customer_id": "cu_1758488194", "customer": { "id": "cu_1758488194", "name": "John Doe", "email": "guest@example.com", "phone": "999999999", "phone_country_code": "+65" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "on_session", "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "1111", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "411111", "card_extended_bin": null, "card_exp_month": "03", "card_exp_year": "2030", "card_holder_name": "joseph Doe", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "John", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "PiX", "last_name": "ss", "origin_zip": null }, "phone": null, "email": null }, "order_details": [ { "sku": null, "upc": null, "brand": null, "amount": 0, "category": null, "quantity": 1, "tax_rate": null, "product_id": null, "description": null, "product_name": "Apple iphone 15", "product_type": null, "sub_category": null, "total_amount": null, "commodity_code": null, "unit_of_measure": null, "product_img_link": null, "product_tax_code": null, "total_tax_amount": null, "requires_shipping": null, "unit_discount_amount": null } ], "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "return_url": "https://google.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "cu_1758488194", "created_at": 1758690832, "expires": 1758694432, "secret": "epk_5ee608c074874637922ff9a945f075d9" }, "manual_retry_allowed": null, "connector_transaction_id": "TLVXXSHZFB55CG75", "frm_message": null, "metadata": {}, "connector_metadata": null, "feature_metadata": { "redirect_response": null, "search_tags": null, "apple_pay_recurring_details": null, "gateway_system": "direct" }, "reference_id": "pay_yx1fFGndifp7EQB3opNZ_1", "payment_link": null, "profile_id": "pro_KH7MujUjH2miLhfzGlAB", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_K1J4djESc692nk5upGnL", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-24T05:28:52.934Z", "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_channel": null, "payment_method_id": null, "network_transaction_id": "043891143898481", "payment_method_status": null, "updated": "2025-09-24T05:13:55.173Z", "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 } ``` - payment method entry will be created. <img width="1728" height="624" alt="Screenshot 2025-09-24 at 10 47 48 AM" src="https://github.com/user-attachments/assets/56a4f33e-ac42-4763-8ba5-cafa37581fc9" /> - raw connector request & response of tokenex <img width="1714" height="475" alt="Screenshot 2025-09-24 at 10 46 20 AM" src="https://github.com/user-attachments/assets/51704ea6-0846-4fee-8b69-77f0d4310eb4" /> ![Screenshot 2025-09-25 at 1 10 38 PM](https://github.com/user-attachments/assets/09b7a3e7-733c-4482-bb2a-2e43e33455e3) <img width="1004" height="960" alt="Screenshot 2025-09-25 at 1 12 28 PM" src="https://github.com/user-attachments/assets/2b074348-d4f0-4317-bcfe-fcb708670727" /> ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/payment_method_data.rs` - `crates/hyperswitch_domain_models/src/vault.rs` **2. Core Business Logic** - `crates/router/src/core/payment_methods.rs` - `crates/router/src/core/payment_methods/vault.rs` - `crates/router/src/core/payments/helpers.rs` **3. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/tokenex.rs` - `crates/hyperswitch_connectors/src/connectors/tokenex/transformers.rs` **Code Patterns Applied:** - Implement new functions (2 changes) - Extend existing types with new fields (64 changes) - Add conditional logic for feature flags or filtering (2 changes) **Detailed Identifier Changes:** Commit 84f3013c: Files to modify: **crates/hyperswitch_connectors/src/connectors/tokenex.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/tokenex/transformers.rs** Modify existing code **crates/hyperswitch_domain_models/src/payment_method_data.rs** Add: - function: pub::get_card_details - function: private::try_from - impl: impl TryFrom<( cards::CardNumber, Option<&CardToken>, Option<payment_methods::CoBadgedCardData>, CardDetailsPaymentMethod, )> for Card **crates/hyperswitch_domain_models/src/vault.rs** Modify existing code **crates/router/src/core/payment_methods.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
{"pr_number": 9528, "pr_title": "fix(connector): [Tokenex] fix tokenize flow response handling for tokenex", "merged_at": "2025-09-25T16:22:29Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"domain": ["crates/hyperswitch_domain_models/src/payment_method_data.rs", "crates/hyperswitch_domain_models/src/vault.rs"], "core_business": ["crates/router/src/core/payment_methods.rs", "crates/router/src/core/payment_methods/vault.rs", "crates/router/src/core/payments/helpers.rs"], "connectors": ["crates/hyperswitch_connectors/src/connectors/tokenex.rs", "crates/hyperswitch_connectors/src/connectors/tokenex/transformers.rs"]}, "change_types": {"functions_added": 2, "fields_added": 64, "imports_added": 3, "conditionals_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
ci(cypress): verify if card fields are populated on updating card info ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [x] CI/CD ## Description <!-- Describe your changes in detail --> This PR adds Cypress tests for validating the existence of card fields are updating the card info in the save card flow. We cannot directly verify what has been updated in list customer payment method call since only the `globalState` is passed into the command. So, in order to maintain back wards compatibility, we're just validating that they're not empty. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> https://github.com/juspay/hyperswitch/pull/5019 Resolves: https://github.com/juspay/hyperswitch/issues/5018 ## How did you test 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. <img width="389" alt="image" src="https://github.com/user-attachments/assets/5f05e5c0-f4c8-4023-8ce1-40ca80ada94c" /> with ui: <img width="397" alt="image" src="https://github.com/user-attachments/assets/0bef4068-3eb5-4701-87cb-5d93c2e00850" /> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `npm run format` - [x] I addressed lints thrown by `npm run lint` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Utils** - `cypress-tests/cypress/utils/RequestBodyUtils.js` **2. Tests** - `cypress-tests/cypress/e2e/spec/Payment/00014-SaveCardFlow.cy.js` - `cypress-tests/cypress/support/commands.js` **Code Patterns Applied:** - Extend existing types with new fields (5 changes) - Add conditional logic for feature flags or filtering (4 changes)
{"pr_number": 7743, "pr_title": "ci(cypress): verify if card fields are populated on updating card info", "merged_at": "2025-04-11T07:52:48Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "user"]}, "hierarchy": {"utils": ["cypress-tests/cypress/utils/RequestBodyUtils.js"], "tests": ["cypress-tests/cypress/e2e/spec/Payment/00014-SaveCardFlow.cy.js", "cypress-tests/cypress/support/commands.js"]}, "change_types": {"fields_added": 5, "conditionals_added": 4}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
chore(payments): filter NO_ERROR_CODE and NO_ERROR_MESSAGE from payments API response ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description This PR filters the `error_code` and `error_message` in Payments API response to ensure HyperSwitch does not send back any 'invented' codes or messages. This is achieved by filtering such error codes and error messages are not sent back in the API response. Details in ticket - https://github.com/juspay/hyperswitch/issues/7794 (point # 1) ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding 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 ensures HyperSwitch does not invent any new error codes or messages and send it back in the Payments API response. In case error codes and messages are not present, it will send back null in the response ## How did you test it? <details> <summary>1. Create card payment via Nexixpay (failed card txn)</summary> cURL curl --location --request POST 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_ddmeaxUlgRPHkcqtmZZm5nGMRhejMxXijYCnsp070Oqn2y4lrfUNBCb9UmedwgMt' \ --data-raw '{"amount":3000,"currency":"EUR","confirm":true,"profile_id":"pro_510ieWUUX4pc0bUWmBW3","capture_method":"automatic","capture_on":"2022-09-10T10:11:12Z","authentication_type":"three_ds","connector":["nexixpay"],"email":"abc@example.com","return_url":"https://google.com","payment_method":"card","payment_method_data":{"card":{"card_number":"4349940199997007","card_exp_month":"12","card_exp_year":"28","card_holder_name":"joseph Doe","card_cvc":"829"}},"billing":{"address":{"line1":"1467","line2":"Harrison Street","line3":"Harrison Street","city":"San Fransico","state":"California","zip":"94122","country":"IT","first_name":"joseph","last_name":"Doe"},"phone":{"number":"8056594427","country_code":"+91"},"email":"guest@example.com"},"browser_info":{"user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36","accept_header":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8","language":"en-US","color_depth":30,"screen_height":1117,"screen_width":1728,"time_zone":-330,"java_enabled":true,"java_script_enabled":true,"ip_address":"127.0.0.1"},"connector_metadata":{"noon":{"order_category":"pay"}},"session_expiry":60}' Response {"payment_id":"pay_CLMzDJcQecFlM3bTdeZQ","merchant_id":"merchant_1744368926","status":"requires_customer_action","amount":3000,"net_amount":3000,"shipping_cost":null,"amount_capturable":3000,"amount_received":null,"connector":"nexixpay","client_secret":"pay_CLMzDJcQecFlM3bTdeZQ_secret_WtxTUTQUXoYjF4Gt6f7a","created":"2025-04-11T14:28:21.682Z","currency":"EUR","customer_id":null,"customer":{"id":null,"name":null,"email":"abc@example.com","phone":null,"phone_country_code":null},"description":null,"refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":null,"off_session":null,"capture_on":null,"capture_method":"automatic","payment_method":"card","payment_method_data":{"card":{"last4":"7007","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"434994","card_extended_bin":null,"card_exp_month":"12","card_exp_year":"28","card_holder_name":"joseph Doe","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":"token_KyWCvOf88BnnPydHsewF","shipping":null,"billing":{"address":{"city":"San Fransico","country":"IT","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"California","first_name":"joseph","last_name":"Doe"},"phone":{"number":"8056594427","country_code":"+91"},"email":"guest@example.com"},"order_details":null,"email":null,"name":null,"phone":null,"return_url":"https://google.com/","authentication_type":"three_ds","statement_descriptor_name":null,"statement_descriptor_suffix":null,"next_action":{"type":"redirect_to_url","redirect_to_url":"https://tame-bird-39.telebit.io/payments/redirect/pay_CLMzDJcQecFlM3bTdeZQ/merchant_1744368926/pay_CLMzDJcQecFlM3bTdeZQ_1"},"cancellation_reason":null,"error_code":null,"error_message":null,"unified_code":null,"unified_message":null,"payment_experience":null,"payment_method_type":null,"connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":null,"manual_retry_allowed":null,"connector_transaction_id":"pay_CLMzDJcQecFlM3bTdeZQ_1","frm_message":null,"metadata":null,"connector_metadata":{"apple_pay":null,"airwallex":null,"noon":{"order_category":"pay"},"braintree":null},"feature_metadata":null,"reference_id":"pay_CLMzDJcQecFlM3bTdeZQ_1","payment_link":null,"profile_id":"pro_510ieWUUX4pc0bUWmBW3","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_d4eEG4Vgv2liRzTtsWKM","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-04-11T14:29:21.682Z","fingerprint":null,"browser_info":{"language":"en-US","time_zone":-330,"ip_address":"127.0.0.1","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36","color_depth":30,"java_enabled":true,"screen_width":1728,"accept_header":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8","screen_height":1117,"java_script_enabled":true},"payment_method_id":null,"payment_method_status":null,"updated":"2025-04-11T14:28:22.739Z","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} Open the link and complete the payment </details> <details> <summary>2. Retrieve the payment</summary> cURL curl --location --request GET 'http://localhost:8080/payments/pay_CLMzDJcQecFlM3bTdeZQ?force_sync=true' \ --header 'Accept: application/json' \ --header 'api-key: dev_ddmeaxUlgRPHkcqtmZZm5nGMRhejMxXijYCnsp070Oqn2y4lrfUNBCb9UmedwgMt' Response {"payment_id":"pay_CLMzDJcQecFlM3bTdeZQ","merchant_id":"merchant_1744368926","status":"failed","amount":3000,"net_amount":3000,"shipping_cost":null,"amount_capturable":0,"amount_received":null,"connector":"nexixpay","client_secret":"pay_CLMzDJcQecFlM3bTdeZQ_secret_WtxTUTQUXoYjF4Gt6f7a","created":"2025-04-11T14:28:21.682Z","currency":"EUR","customer_id":null,"customer":{"id":null,"name":null,"email":"abc@example.com","phone":null,"phone_country_code":null},"description":null,"refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":null,"off_session":null,"capture_on":null,"capture_method":"automatic","payment_method":"card","payment_method_data":{"card":{"last4":"7007","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"434994","card_extended_bin":null,"card_exp_month":"12","card_exp_year":"28","card_holder_name":"joseph Doe","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":"token_KyWCvOf88BnnPydHsewF","shipping":null,"billing":{"address":{"city":"San Fransico","country":"IT","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"California","first_name":"joseph","last_name":"Doe"},"phone":{"number":"8056594427","country_code":"+91"},"email":"guest@example.com"},"order_details":null,"email":null,"name":null,"phone":null,"return_url":"https://google.com/","authentication_type":"three_ds","statement_descriptor_name":null,"statement_descriptor_suffix":null,"next_action":null,"cancellation_reason":null,"error_code":null,"error_message":"Declined","unified_code":"UE_9000","unified_message":"Something went wrong","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":true,"connector_transaction_id":"pay_CLMzDJcQecFlM3bTdeZQ_1","frm_message":null,"metadata":null,"connector_metadata":{"apple_pay":null,"airwallex":null,"noon":{"order_category":"pay"},"braintree":null},"feature_metadata":null,"reference_id":"pay_CLMzDJcQecFlM3bTdeZQ_1","payment_link":null,"profile_id":"pro_510ieWUUX4pc0bUWmBW3","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_d4eEG4Vgv2liRzTtsWKM","incremental_authorization_allowed":false,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-04-11T14:29:21.682Z","fingerprint":null,"browser_info":{"language":"en-US","time_zone":-330,"ip_address":"127.0.0.1","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36","color_depth":30,"java_enabled":true,"screen_width":1728,"accept_header":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8","screen_height":1117,"java_script_enabled":true},"payment_method_id":null,"payment_method_status":null,"updated":"2025-04-11T14:28:32.770Z","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} Things to verify 1. Error code must be null for this scenario 2. Error code in DB must be `No error code` <img width="413" alt="Screenshot 2025-04-11 at 9 52 43 PM" src="https://github.com/user-attachments/assets/f756f6e3-77f7-4e0a-9a78-c97f686b7b30" /> </details> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Core Business Logic** - `crates/router/src/core/payments/transformers.rs` **2. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/fiuu/transformers.rs` **Code Patterns Applied:** - Extend existing types with new fields (5 changes) - Modify database queries (2 changes) **Detailed Identifier Changes:** Commit 7b3c33c8: Files to modify: **crates/hyperswitch_connectors/src/connectors/fiuu/transformers.rs** Modify existing code **crates/router/src/core/payments/transformers.rs** Modify existing code
{"pr_number": 7801, "pr_title": "chore(payments): filter NO_ERROR_CODE and NO_ERROR_MESSAGE from payments API response", "merged_at": "2025-04-22T17:58:10Z", "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/fiuu/transformers.rs"]}, "change_types": {"fields_added": 5, "imports_added": 1, "database_queries": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(refunds_v2): Add Refunds Retrieve and Refunds Sync Core flow ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This PR introduces support for Refunds Retrieve flow and Refunds Sync flow (Rsync) in V2 apis. ### Additional Changes - [x] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> Upon merging this PR, users can be able to fetch a particular refund. Whether to check its status or fetch it from the gateway using force_sync query parameter. ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> - Create Payment Intent API call ``` curl --location 'http://localhost:8080/v2/payments/create-intent' \ --header 'api-key: dev_Oce2SOCaD6B7eTuE6o7fAoS0dJIOucG97Y1sS0O94JCzHg1Qh1emDSasTiFvVkIp' \ --header 'Content-Type: application/json' \ --header 'x-profile-id: pro_OIQz3QuZDrhyUteOS41r' \ --header 'Authorization: api-key=dev_Oce2SOCaD6B7eTuE6o7fAoS0dJIOucG97Y1sS0O94JCzHg1Qh1emDSasTiFvVkIp' \ --data-raw '{ "amount_details": { "order_amount": 100, "currency": "USD" }, "capture_method":"automatic", "authentication_type": "no_three_ds", "billing": { "address": { "first_name": "John", "last_name": "Dough" }, "email": "example@example.com" }, "shipping": { "address": { "first_name": "John", "last_name": "Dough", "city": "Karwar", "zip": "581301", "state": "Karnataka" }, "email": "example@example.com" } }' ``` - Response from the above call ``` { "id":"12345_pay_019642a2b1bb7653ae08d3a9c5559177", "status":"requires_payment_method", "amount_details":{ "order_amount":100, "currency":"USD", "shipping_cost":null, "order_tax_amount":null, "external_tax_calculation":"skip", "surcharge_calculation":"skip", "surcharge_amount":null, "tax_on_surcharge":null }, "client_secret":"cs_019642a2b25a7301962eaf25dbdb22fd", "profile_id":"pro_OIQz3QuZDrhyUteOS41r", "merchant_reference_id":null, "routing_algorithm_id":null, "capture_method":"automatic", "authentication_type":"no_three_ds", "billing":{ "address":{ "city":null, "country":null, "line1":null, "line2":null, "line3":null, "zip":null, "state":null, "first_name":"John", "last_name":"Dough" }, "phone":null, "email":"example@example.com" }, "shipping":{ "address":{ "city":"Karwar", "country":null, "line1":null, "line2":null, "line3":null, "zip":"581301", "state":"Karnataka", "first_name":"John", "last_name":"Dough" }, "phone":null, "email":"example@example.com" }, "customer_id":null, "customer_present":"present", "description":null, "return_url":null, "setup_future_usage":"on_session", "apply_mit_exemption":"Skip", "statement_descriptor":null, "order_details":null, "allowed_payment_method_types":null, "metadata":null, "connector_metadata":null, "feature_metadata":null, "payment_link_enabled":"Skip", "payment_link_config":null, "request_incremental_authorization":"default", "expires_on":"2025-04-17T07:39:40.883Z", "frm_metadata":null, "request_external_three_ds_authentication":"Skip" } ``` - Confirm Intent API Call ``` curl --location 'http://localhost:8080/v2/payments/12345_pay_019642a2b1bb7653ae08d3a9c5559177/confirm-intent' \ --header 'x-client-secret: cs_019642a2b25a7301962eaf25dbdb22fd' \ --header 'x-profile-id: pro_OIQz3QuZDrhyUteOS41r' \ --header 'Content-Type: application/json' \ --header 'Authorization: publishable-key=pk_dev_ed28381f289249908a9fc946f11bf871,client-secret=cs_01963eaad7087700a02f86c215139747' \ --data '{ "payment_method_data": { "card": { "card_number": "4242424242424242", "card_exp_month": "05", "card_exp_year": "25", "card_holder_name": "John Doe", "card_cvc": "100" } }, "payment_method_type": "card", "payment_method_subtype": "credit", "browser_info": { "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "language": "nl-NL", "color_depth": 24, "screen_height": 723, "screen_width": 1536, "time_zone": 0, "java_enabled": true, "java_script_enabled": true, "ip_address": "1x.x.x.31" } }' ``` - Response from the above call ``` { "id":"12345_pay_019642a2b1bb7653ae08d3a9c5559177", "status":"succeeded", "amount":{ "order_amount":100, "currency":"USD", "shipping_cost":null, "order_tax_amount":null, "external_tax_calculation":"skip", "surcharge_calculation":"skip", "surcharge_amount":null, "tax_on_surcharge":null, "net_amount":100, "amount_to_capture":null, "amount_capturable":0, "amount_captured":100 }, "customer_id":null, "connector":"stripe", "created":"2025-04-17T07:24:40.884Z", "payment_method_data":{ "billing":null }, "payment_method_type":"card", "payment_method_subtype":"credit", "connector_transaction_id":"pi_3REmpOD5R7gDAGff0MLPnmeN", "connector_reference_id":null, "merchant_connector_id":"mca_sank3uwIE62b8Fzr90a6", "browser_info":null, "error":null, "shipping":null, "billing":null, "attempts":null, "connector_token_details":{ "token":"pm_1REmpOD5R7gDAGffAT3f1rIN", "connector_token_request_reference_id":"Ow8Jd6RrV0u6t2qyST" }, "payment_method_id":null, "next_action":null, "return_url":"https://google.com/success", "authentication_type":"no_three_ds", "authentication_type_applied":"no_three_ds" } ``` - Refunds Create API call ``` curl --location 'http://localhost:8080/v2/refunds' \ --header 'X-Profile-Id: pro_OIQz3QuZDrhyUteOS41r' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_Oce2SOCaD6B7eTuE6o7fAoS0dJIOucG97Y1sS0O94JCzHg1Qh1emDSasTiFvVkIp' \ --data '{ "payment_id":"12345_pay_019642a2b1bb7653ae08d3a9c5559177", "merchant_reference_id":"1744874778", "reason":"Paid by mistake", "metadata":{ "foo":"bar" } }' ``` - Response from the above call ``` { "id": "12345_ref_019642a487767f20bb8fa4a34d70da4a", "payment_id": "12345_pay_019642a2b1bb7653ae08d3a9c5559177", "merchant_reference_id": "1744874801", "amount": 100, "currency": "USD", "status": "succeeded", "reason": "Paid by mistake", "metadata": { "foo": "bar" }, "error_details": { "code": "", "message": "" }, "created_at": "2025-04-17T07:26:41.030Z", "updated_at": "2025-04-17T07:26:42.057Z", "connector": "stripe", "profile_id": "pro_OIQz3QuZDrhyUteOS41r", "merchant_connector_id": "mca_sank3uwIE62b8Fzr90a6", "connector_refund_reference_id": null } ``` - Refunds Retrieve API call ``` curl --location 'http://localhost:8080/v2/refunds/12345_ref_019642a487767f20bb8fa4a34d70da4a' \ --header 'x-profile-id: pro_OIQz3QuZDrhyUteOS41r' \ --header 'api-key: dev_Oce2SOCaD6B7eTuE6o7fAoS0dJIOucG97Y1sS0O94JCzHg1Qh1emDSasTiFvVkIp' ``` - Response from the above call ``` { "id": "12345_ref_019642a487767f20bb8fa4a34d70da4a", "payment_id": "12345_pay_019642a2b1bb7653ae08d3a9c5559177", "merchant_reference_id": "1744874801", "amount": 100, "currency": "USD", "status": "succeeded", "reason": "Paid by mistake", "metadata": { "foo": "bar" }, "error_details": { "code": "", "message": "" }, "created_at": "2025-04-17T07:26:41.030Z", "updated_at": "2025-04-17T07:26:42.057Z", "connector": "stripe", "profile_id": "pro_OIQz3QuZDrhyUteOS41r", "merchant_connector_id": "mca_sank3uwIE62b8Fzr90a6", "connector_refund_reference_id": null } ``` - Refunds Retrieve api call with `force_sync=True` in query ``` curl --location 'http://localhost:8080/v2/refunds/12345_ref_019642a487767f20bb8fa4a34d70da4a?force_sync=true' \ --header 'x-profile-id: pro_OIQz3QuZDrhyUteOS41r' \ --header 'api-key: dev_Oce2SOCaD6B7eTuE6o7fAoS0dJIOucG97Y1sS0O94JCzHg1Qh1emDSasTiFvVkIp' \ --data '' ``` - Response from the above call ``` { "id": "12345_ref_019642a487767f20bb8fa4a34d70da4a", "payment_id": "12345_pay_019642a2b1bb7653ae08d3a9c5559177", "merchant_reference_id": "1744874801", "amount": 100, "currency": "USD", "status": "succeeded", "reason": "Paid by mistake", "metadata": { "foo": "bar" }, "error_details": { "code": "", "message": "" }, "created_at": "2025-04-17T07:26:41.030Z", "updated_at": "2025-04-17T08:38:46.639Z", "connector": "stripe", "profile_id": "pro_OIQz3QuZDrhyUteOS41r", "merchant_connector_id": "mca_sank3uwIE62b8Fzr90a6", "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/events/refund.rs` - `crates/api_models/src/refunds.rs` **2. Database Layer (Queries & Schema)** - `crates/diesel_models/src/refund.rs` **3. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/payments.rs` **4. Core Business Logic** - `crates/router/src/core/refunds_v2.rs` - `crates/router/src/core/utils.rs` **5. Type Definitions** - `crates/router/src/types/api/refunds.rs` **6. 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 (12 changes) - Extend existing types with new fields (44 changes) **Detailed Identifier Changes:** Commit a289f19c: Files to modify: **crates/api_models/src/events/refund.rs** Add: - function: private::get_api_event_type - impl: impl ApiEventMetric for refunds::RefundsRetrieveRequest **crates/api_models/src/refunds.rs** Add: - struct: pub::RefundsRetrieveBody - struct: pub::RefundsRetrieveRequest **crates/diesel_models/src/refund.rs** Add: - function: pub::build_error_update_for_refund_failure **crates/hyperswitch_domain_models/src/payments.rs** Add: - function: pub::get_currency **crates/openapi/src/openapi_v2.rs** Modify existing code **crates/openapi/src/routes/refunds.rs** Add: - function: pub::refunds_retrieve **crates/router/src/core/refunds_v2.rs** Add: - function: pub::refund_retrieve_core_with_refund_id - function: pub::refund_retrieve_core - function: private::should_call_refund - function: pub::sync_refund_with_gateway - function: pub::build_refund_update_for_rsync **crates/router/src/core/utils.rs** Modify existing code **crates/router/src/routes/app.rs** Modify existing code **crates/router/src/routes/refunds.rs** Add: - function: pub::refunds_retrieve **crates/router/src/types/api/refunds.rs** Modify existing code
{"pr_number": 7835, "pr_title": "feat(refunds_v2): Add Refunds Retrieve and Refunds Sync Core flow", "merged_at": "2025-05-07T07:05:31Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/events/refund.rs", "crates/api_models/src/refunds.rs"], "database": ["crates/diesel_models/src/refund.rs"], "domain": ["crates/hyperswitch_domain_models/src/payments.rs"], "core_business": ["crates/router/src/core/refunds_v2.rs", "crates/router/src/core/utils.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": 12, "fields_added": 44, "imports_added": 3}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(payments): [Payment links] Add support for traditional chinese locale for payment links ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Add support for traditional chinese locale for payment links SDK PR https://github.com/juspay/hyperswitch-web/pull/822 ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with 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)? --> (Need to run both hyperswitch-web and hyperswitch locally to test) <details> <summary>1. Update `allowed_domains` in business profile (Expand to see details)</summary> ``` curl --location 'http://localhost:8080/account/merchant_1733317126/business_profile/pro_I5CYJ8tVS6OHA1GMcXaW' \ --header 'Content-Type: application/json' \ --header 'api-key: test_admin' \ --data '{ "payment_link_config": { "allowed_domains": [ "*" ], "enabled_saved_payment_method": true, "hide_card_nickname_field" : true } }' ``` </details> <details> <summary>2. Create a payment link with Accept-Language header as "zh-Hant" </summary> cURL `curl --location --request POST 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_9ujhlj2TyCy27k37JtCmZZMbTLKVVebPRTtPcWE1okFjsngoqlZEaw4nQtX1zClT' \ --header 'Accept-Language: zh-Hant' \ --data-raw '{ "amount": 100, "currency": "USD", "payment_link": true, "connector": [ "novalnet" ], "session_expiry": 1000000, "return_url": "http://127.0.0.1:5500/src/pl_iframe.html", "payment_link_config": { "theme": "#14356f", "logo": "https://logosandtypes.com/wp-content/uploads/2020/08/zurich.svg", "seller_name": "Zurich Inc.", "show_card_form_by_default": false } }'` Response of /payments ``` { "payment_id": "pay_rlQ6zFFw7dlEd87TcGlY", "merchant_id": "merchant_1733317126", "status": "requires_payment_method", "amount": 100, "net_amount": 100, "shipping_cost": null, "amount_capturable": 100, "amount_received": null, "connector": null, "client_secret": "pay_rlQ6zFFw7dlEd87TcGlY_secret_l4amc98ygqRSMdN5bmQQ", "created": "2024-12-04T13:35:45.977Z", "currency": "USD", "customer_id": null, "customer": null, "description": null, "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": null, "payment_method": null, "payment_method_data": null, "payment_token": null, "shipping": null, "billing": null, "order_details": null, "email": null, "name": null, "phone": null, "return_url": "http://127.0.0.1:5500/src/pl_iframe.html", "authentication_type": null, "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": null, "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": null, "manual_retry_allowed": null, "connector_transaction_id": null, "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": null, "payment_link": { "link": "http://localhost:8080/payment_link/merchant_1733317126/pay_rlQ6zFFw7dlEd87TcGlY?locale=zh-Hant", "secure_link": "http://localhost:8080/payment_link/s/merchant_1733317126/pay_rlQ6zFFw7dlEd87TcGlY?locale=zh-Hant", "payment_link_id": "plink_ALMUnvEV9mgsuHTex9UQ" }, "profile_id": "pro_I5CYJ8tVS6OHA1GMcXaW", "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-16T03:22:25.579Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2024-12-04T13:35:47.150Z", "charges": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null } ``` </details> <details><summary>3. Screenshots (Expand to see details)</summary> Open the secure payment link (`secure_link` in API response) in an iframe for validating the functionality. For checking payment_link simply click on the payment_link (`payment_link` in API response) **Screenshot for payment link** <img width="1094" alt="Screenshot 2024-12-04 at 19 06 44" src="https://github.com/user-attachments/assets/6f68b8ae-df65-424e-8473-3668ba03a9f2"> **Screenshot for secured payment link** <img width="1182" alt="Screenshot 2024-12-04 at 19 07 32" src="https://github.com/user-attachments/assets/657b4ba2-ec83-4c82-be84-feb06655c182"> ## Checklist <!-- Put 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/locale.js` **Code Patterns Applied:** - Extend existing types with new fields (30 changes)
{"pr_number": 6745, "pr_title": "feat(payments): [Payment links] Add support for traditional chinese locale for payment links", "merged_at": "2024-12-05T13:37:28Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"core_business": ["crates/router/src/core/payment_link/locale.js"]}, "change_types": {"fields_added": 30}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
refactor: check allowed payment method types in enabled options ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Using values in allowed_payment_method_types that were not configured during the creation of the connector results in breaking the SDK flow which shows something went wrong, as the PML call returned an empty payment method list. We need to apply this check during intent creation call. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with 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 by hitting payments create api. Test cases- 1. allowed_payment_method_types have only those PMT which are not enabled for connector. This will return error in payments create API. 2. allowed_payment_method_types also have those PMT which are enabled for connector. This should be the successful payments flow. ### Curl: ``` curl --location 'localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_bA6dXFz2dKBE4zqZKCpZBoE26BpZgCZpzfF9LKOHhCP0W7WZ0NyeIjpzfHAOw3tc' \ --data-raw '{ "amount": 10000, "currency": "EUR", "allowed_payment_method_types": ["online_banking_czech_republic","multibanco"], "confirm": true, "payment_link": false, "capture_method": "manual", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 10000, "customer_id": "StripeCustomer", "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+1", "description": "Its my first payment request", "authentication_type": "three_ds", "return_url": "https://google.com", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4000 0000 0000 1091", "card_exp_month": "12", "card_exp_year": "2026", "card_holder_name": "Max Mustermann", "card_cvc": "000" } }, "billing": { "address": { "line1": "1467", "line2": "CA", "line3": "CA", "city": "Musterhausen", "state": "California", "zip": "12345", "country": "DE", "first_name": "Max", "last_name": "Mustermann" }, "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, "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" } }' ``` ## Checklist <!-- Put 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/helpers.rs` - `crates/router/src/core/payments/operations/payment_create.rs` **2. Other** - `crates/router/src/routes/metrics.rs` **Code Patterns Applied:** - Implement new functions (1 changes) - Extend existing types with new fields (5 changes) - Add conditional logic for feature flags or filtering (2 changes) - Modify database queries (2 changes) **Detailed Identifier Changes:** Commit 0eca55f7: Files to modify: **crates/router/src/core/payments/helpers.rs** Add: - function: pub::validate_allowed_payment_method_types_request **crates/router/src/core/payments/operations/payment_create.rs** Modify existing code **crates/router/src/routes/metrics.rs** Modify existing code
{"pr_number": 7019, "pr_title": "refactor: check allowed payment method types in enabled options", "merged_at": "2025-01-21T10:22:05Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "user"]}, "hierarchy": {"core_business": ["crates/router/src/core/payments/helpers.rs", "crates/router/src/core/payments/operations/payment_create.rs"], "other": ["crates/router/src/routes/metrics.rs"]}, "change_types": {"functions_added": 1, "fields_added": 5, "imports_added": 1, "conditionals_added": 2, "database_queries": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): [ADYEN ]: send execute_three_d in no3ds adyen ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> We need to start sending execute_three_d as false in adyen no3ds payments request to skip 3ds auth at adyen ends. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_**' \ --data-raw '{ "amount": 600, "currency": "USD", "connector": [ "adyen" ], "customer_id": "cus_CDei4NEhboFFubgAxsy8", "profile_id": "pro_kl4dSq0FXRc2PC6oZYic", "confirm": true, "payment_link": false, "capture_method": "automatic", "capture_on": "2029-09-10T10:11:12Z", "amount_to_capture": 600, "name": "John Doe", "email": "dg@example.com", "phone": "999999999", "phone_country_code": "+1", "description": "Its my first payment request", "return_url": "https://google.com", "payment_method_data": { "card": { "card_number": "3714 4963 5398 431", "card_exp_month": "03", "card_exp_year": "2030", "card_holder_name": "joseph Doe", "card_cvc": "7373" }, "billing": { "address": { "line1": "1467", "line2": "CA", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US" } } }, "payment_method": "card", "payment_method_type": "credit", "browser_info": { "color_depth": 24, "java_enabled": true, "java_script_enabled": true, "language": "en-GB", "screen_height": 720, "screen_width": 1280, "time_zone": -330, "ip_address": "208.127.127.193", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0" }, "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" }, "order_details": [ { "product_name": "Tea", "quantity": 1, "amount": 110, "product_img_link": "https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg" }, { "product_name": "Tea", "quantity": 1, "amount": 110, "product_img_link": "https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg" }, { "product_name": "Tea", "quantity": 1, "amount": 110, "product_img_link": "https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg" } ] }' ``` Response: ``` {"payment_id":"pay_i1WPa87SrXPwwNVQmvWi","merchant_id":"merchant_1757416130","status":"succeeded","amount":600,"net_amount":600,"shipping_cost":null,"amount_capturable":0,"amount_received":600,"connector":"adyen","client_secret":"pay_1","created":"2025-09-09T13:40:59.979Z","currency":"USD","customer_id":"cus_CDei4NEhboFFubgAxsy8","customer":{"id":"cus_CDei4NEhboFFubgAxsy8","name":"John Doe","email":"dg@example.com","phone":"999999999","phone_country_code":"+1"},"description":"Its my first payment request","refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":null,"off_session":null,"capture_on":null,"capture_method":"automatic","payment_method":"card","payment_method_data":{"card":{"last4":"8431","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"371449","card_extended_bin":null,"card_exp_month":"03","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":"CA","line3":null,"zip":"94122","state":"California","first_name":null,"last_name":null,"origin_zip":null},"phone":null,"email":null}},"payment_token":null,"shipping":null,"billing":null,"order_details":[{"sku":null,"upc":null,"brand":null,"amount":110,"category":null,"quantity":1,"tax_rate":null,"product_id":null,"description":null,"product_name":"Tea","product_type":null,"sub_category":null,"total_amount":null,"commodity_code":null,"unit_of_measure":null,"product_img_link":"https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg","product_tax_code":null,"total_tax_amount":null,"requires_shipping":null,"unit_discount_amount":null},{"sku":null,"upc":null,"brand":null,"amount":110,"category":null,"quantity":1,"tax_rate":null,"product_id":null,"description":null,"product_name":"Tea","product_type":null,"sub_category":null,"total_amount":null,"commodity_code":null,"unit_of_measure":null,"product_img_link":"https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg","product_tax_code":null,"total_tax_amount":null,"requires_shipping":null,"unit_discount_amount":null},{"sku":null,"upc":null,"brand":null,"amount":110,"category":null,"quantity":1,"tax_rate":null,"product_id":null,"description":null,"product_name":"Tea","product_type":null,"sub_category":null,"total_amount":null,"commodity_code":null,"unit_of_measure":null,"product_img_link":"https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg","product_tax_code":null,"total_tax_amount":null,"requires_shipping":null,"unit_discount_amount":null}],"email":"dg@example.com","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":"cus_CDei4NEhboFFubgAxsy8","created_at":1757425259,"expires":1757428859,"secret":"epk_c68ada5037fa41c2baf2979129cafaad"},"manual_retry_allowed":false,"connector_transaction_id":"GRVGDV9XKZZBDR75","frm_message":null,"metadata":{"udf1":"value1","login_date":"2019-09-10T10:11:12Z","new_customer":"true"},"connector_metadata":null,"feature_metadata":{"redirect_response":null,"search_tags":null,"apple_pay_recurring_details":null,"gateway_system":"direct"},"reference_id":"pay_i1WPa87SrXPwwNVQmvWi_1","payment_link":null,"profile_id":"pro_kl4dSq0FXRc2PC6oZYic","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_SWDhbvMuWt3v5vlL6MNT","incremental_authorization_allowed":false,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-09-09T13:55:59.979Z","fingerprint":null,"browser_info":{"language":"en-GB","time_zone":-330,"ip_address":"208.127.127.193","user_agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0","color_depth":24,"java_enabled":true,"screen_width":1280,"accept_header":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8","screen_height":720,"java_script_enabled":true},"payment_channel":null,"payment_method_id":null,"network_transaction_id":"439956500571320","payment_method_status":null,"updated":"2025-09-09T13:41:03.043Z","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} ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs` **Code Patterns Applied:** - Extend existing types with new fields (4 changes) **Detailed Identifier Changes:** Commit d477f3c6: Files to modify: **crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs** Modify existing code
{"pr_number": 9339, "pr_title": "feat(connector): [ADYEN ]: send execute_three_d in no3ds adyen", "merged_at": "2025-09-23T14:51:38Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs"]}, "change_types": {"fields_added": 4}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(router): Add v2 payment cancellation flow ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Add V2 payments_cancel flow by endpoint `{{baseUrl}}/v2/payments/:payment_id/cancel`.A payment can be cancelled when the status is RequiresCapture, PartiallyAuthorizedAndRequiresCapture, or PartiallyCapturedAndCapturable. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with 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/payments/12345_pay_0199568c7d307cb093a2f9d517fec5cc/cancel' \ --header 'X-Profile-Id: pro_ICrZFKL8QL6GlxNOuGiT' \ --header 'Authorization: api-key=dev_lLeDL7DZk8Vf8vF7PTd53ces09iGYEerHYDBQzle5s1N1QPpzj3pKViOnv7VsQd5' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_lLeDL7DZk8Vf8vF7PTd53ces09iGYEerHYDBQzle5s1N1QPpzj3pKViOnv7VsQd5' \ --data '{ "cancellation_reason": "Requested by Merchant" }' ``` Response: ``` { "id": "12345_pay_019956bfbb0472f28d713b8190b897b7", "status": "cancelled", "cancellation_reason": "Requested by Merchant", "amount": { "order_amount": 100, "currency": "USD", "shipping_cost": null, "order_tax_amount": null, "external_tax_calculation": "skip", "surcharge_calculation": "skip", "surcharge_amount": null, "tax_on_surcharge": null, "net_amount": 100, "amount_to_capture": null, "amount_capturable": 100, "amount_captured": 0 }, "customer_id": "12345_cus_0199568c731e77d2960fde597ad801ac", "connector": "authorizedotnet", "created": "2025-09-17T08:17:09.937Z", "payment_method_type": "card", "payment_method_subtype": "credit", "attempts": null, "return_url": null } ``` <img width="1314" height="1037" alt="image" src="https://github.com/user-attachments/assets/3e72e0fe-b0a5-46d8-9102-d8431518773d" /> <img width="3600" height="2508" alt="image" src="https://github.com/user-attachments/assets/fe1e4fbe-454a-4684-b009-820c9281b1b1" /> <img width="1228" height="426" alt="image" src="https://github.com/user-attachments/assets/73117c2d-600a-4ee4-bcbd-a43c5b7c55cd" /> closes #9082 ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/events/payment.rs` - `crates/api_models/src/payments.rs` **2. Database Layer (Queries & Schema)** - `crates/diesel_models/src/payment_attempt.rs` **3. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/payments.rs` - `crates/hyperswitch_domain_models/src/payments/payment_attempt.rs` - `crates/hyperswitch_domain_models/src/payments/payment_intent.rs` - ... and 1 more files **4. Core Business Logic** - `crates/router/src/core/payments.rs` - `crates/router/src/core/payments/flows/cancel_flow.rs` - `crates/router/src/core/payments/operations.rs` - ... and 3 more files **5. Other** - `api-reference/v2/openapi_spec_v2.json` - `crates/hyperswitch_interfaces/src/conversion_impls.rs` - `crates/router/src/routes/app.rs` - ... and 1 more files **Code Patterns Applied:** - Define new data structures (4 changes) - Implement new functions (101 changes) - Extend existing types with new fields (266 changes) **Detailed Identifier Changes:** Commit 617b3faa: Files to modify: **crates/api_models/src/events/payment.rs** Add: - function: private::get_api_event_type - function: private::get_api_event_type - impl: impl ApiEventMetric for payments::PaymentsCancelRequest - impl: impl ApiEventMetric for payments::PaymentsCancelResponse **crates/api_models/src/payments.rs** Add: - struct: pub::PaymentsCancelRequest - struct: pub::PaymentsCancelResponse **crates/diesel_models/src/payment_attempt.rs** Modify existing code **crates/hyperswitch_domain_models/src/payments.rs** Add: - struct: pub::PaymentCancelData **crates/hyperswitch_domain_models/src/payments/payment_attempt.rs** Modify existing code **crates/hyperswitch_domain_models/src/payments/payment_intent.rs** Modify existing code **crates/hyperswitch_domain_models/src/router_data.rs** Add: - function: private::get_payment_intent_update - function: private::get_payment_attempt_update - function: private::get_amount_capturable - function: private::get_captured_amount - function: private::get_attempt_status_for_db_update - impl: impl TrackerPostUpdateObjects< router_flow_types::Void, router_request_types::PaymentsCancelData, payments::PaymentCancelData<router_flow_types::Void>, > for RouterData< router_flow_types::Void, router_request_types::PaymentsCancelData, router_response_types::PaymentsResponseData, > **crates/hyperswitch_interfaces/src/conversion_impls.rs** Modify existing code **crates/router/src/core/payments.rs** Add: - function: private::set_cancellation_reason - function: private::set_cancellation_reason - function: private::set_cancellation_reason - function: private::set_cancellation_reason - function: private::get_payment_attempt - function: private::list_payments_attempts - function: private::get_client_secret - function: private::get_payment_intent - function: private::get_merchant_connector_details - function: private::get_payment_method_info - function: private::get_payment_method_token - function: private::get_mandate_id - function: private::get_address - function: private::get_creds_identifier - function: private::get_token - function: private::get_multiple_capture_data - function: private::get_payment_link_data - function: private::get_ephemeral_key - function: private::get_setup_mandate - function: private::get_poll_config - function: private::get_authentication - function: private::get_frm_message - function: private::get_refunds - function: private::get_disputes - function: private::get_authorizations - function: private::get_attempts - function: private::get_recurring_details - function: private::get_payment_intent_profile_id - function: private::get_currency - function: private::get_amount - function: private::get_payment_attempt_connector - function: private::get_merchant_connector_id_in_attempt - function: private::get_connector_customer_id - function: private::get_billing_address - function: private::get_payment_method_data - function: private::get_sessions_token - function: private::get_token_data - function: private::get_mandate_connector - function: private::get_force_sync - function: private::get_capture_method - function: private::get_optional_payment_attempt - function: private::get_pre_routing_result - function: private::get_optional_external_vault_session_details - function: private::set_payment_intent - function: private::set_client_secret - function: private::set_payment_attempt - function: private::set_payment_method_data - function: private::set_payment_method_token - function: private::set_email_if_not_present - function: private::set_payment_method_id_in_attempt - function: private::set_pm_token - function: private::set_connector_customer_id - function: private::push_sessions_token - function: private::set_surcharge_details - function: private::set_merchant_connector_id_in_attempt - function: private::set_card_network - function: private::set_co_badged_card_data - function: private::set_frm_message - function: private::set_payment_intent_status - function: private::set_authentication_type_in_attempt - function: private::set_recurring_mandate_payment_data - function: private::set_mandate_id - function: private::set_setup_future_usage_in_payment_intent - function: private::set_prerouting_algorithm_in_payment_intent - function: private::set_connector_in_payment_attempt - function: private::set_connector_request_reference_id - function: private::set_connector_response_reference_id - function: private::set_vault_session_details - function: private::set_routing_approach_in_attempt - function: private::set_connector_request_reference_id_in_payment_attempt - function: private::set_cancellation_reason - impl: impl OperationSessionGetters<F> for PaymentCancelData<F> - impl: impl OperationSessionSetters<F> for PaymentCancelData<F> **crates/router/src/core/payments/flows/cancel_flow.rs** Remove: - function: private::construct_router_data Add: - function: private::construct_router_data - impl: impl ConstructFlowSpecificData<api::Void, types::PaymentsCancelData, types::PaymentsResponseData> for hyperswitch_domain_models::payments::PaymentCancelData<api::Void> **crates/router/src/core/payments/operations.rs** Add: - mod: pub::payment_cancel_v2 **crates/router/src/core/payments/operations/payment_cancel_v2.rs** Add: - function: private::to_validate_request - function: private::to_get_tracker - function: private::to_domain - function: private::to_update_tracker - function: private::to_validate_request - function: private::to_get_tracker - function: private::to_domain - function: private::to_update_tracker - function: private::validate_request - function: private::get_trackers - function: private::update_trackers - function: private::get_customer_details - function: private::make_pm_data - function: private::perform_routing - function: private::validate_status_for_operation - struct: pub::PaymentsCancel - impl: impl Operation<F, api::PaymentsCancelRequest> for &PaymentsCancel - impl: impl Operation<F, api::PaymentsCancelRequest> for PaymentsCancel - impl: impl ValidateRequest< F, api::PaymentsCancelRequest, hyperswitch_domain_models::payments::PaymentCancelData<F>, > for PaymentsCancel - impl: impl GetTracker< F, hyperswitch_domain_models::payments::PaymentCancelData<F>, api::PaymentsCancelRequest, > for PaymentsCancel - impl: impl UpdateTracker< F, hyperswitch_domain_models::payments::PaymentCancelData<F>, api::PaymentsCancelRequest, > for PaymentsCancel - impl: impl Domain<F, api::PaymentsCancelRequest, hyperswitch_domain_models::payments::PaymentCancelData<F>> for PaymentsCancel - impl: impl ValidateStatusForOperation for PaymentsCancel **crates/router/src/core/payments/operations/payment_response.rs** Add: - function: private::to_post_update_tracker - function: private::update_tracker - impl: impl Operation<F, types::PaymentsCancelData> for PaymentResponse - impl: impl PostUpdateTracker< F, hyperswitch_domain_models::payments::PaymentCancelData<F>, types::PaymentsCancelData, > for PaymentResponse **crates/router/src/core/payments/transformers.rs** Add: - function: pub::construct_cancel_router_data_v2 - function: pub::construct_router_data_for_cancel - function: private::generate_response - impl: impl GenerateResponse<api_models::payments::PaymentsCancelResponse> for hyperswitch_domain_models::payments::PaymentCancelData<F> **crates/router/src/routes/app.rs** Modify existing code **crates/router/src/routes/payments.rs** Add: - function: pub::payments_cancel
{"pr_number": 9083, "pr_title": "feat(router): Add v2 payment cancellation flow", "merged_at": "2025-09-22T18:39:33Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/events/payment.rs", "crates/api_models/src/payments.rs"], "database": ["crates/diesel_models/src/payment_attempt.rs"], "domain": ["crates/hyperswitch_domain_models/src/payments.rs", "crates/hyperswitch_domain_models/src/payments/payment_attempt.rs", "crates/hyperswitch_domain_models/src/payments/payment_intent.rs", "crates/hyperswitch_domain_models/src/router_data.rs"], "core_business": ["crates/router/src/core/payments.rs", "crates/router/src/core/payments/flows/cancel_flow.rs", "crates/router/src/core/payments/operations.rs", "crates/router/src/core/payments/operations/payment_cancel_v2.rs", "crates/router/src/core/payments/operations/payment_response.rs", "crates/router/src/core/payments/transformers.rs"], "other": ["api-reference/v2/openapi_spec_v2.json", "crates/hyperswitch_interfaces/src/conversion_impls.rs", "crates/router/src/routes/app.rs", "crates/router/src/routes/payments.rs"]}, "change_types": {"structs_added": 4, "functions_added": 101, "fields_added": 266, "imports_added": 14}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(core): fix redirection for Worldpay for specific payment IDs ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description This PR updates the regex used for forming the CompleteAuthorize URL for Worldpay post DDC submission. Change made - the regex is updated to match any character except `/` for matching the query parameters. Earlier `/w` was being used which matched only the alphanumeric characters and underscore. Defined in https://github.com/juspay/hyperswitch/issues/8025 ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context Fixes the 3DS flows for Worldpay connector where consumers send the payment IDs (which may include non alphanumeric characters) ## How did you test it? Steps for testing - <details> <summary>1. Create a payment with non alphanumeric characters in payment ID</summary> cURL curl --location --request POST 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_TnDKeLU9mvDKwpEbzt1wd69xKW9drPRLLSjrsd9lnrF9WlaYI9Fxb38mBT9lGgF1' \ --data-raw '{"amount":10000,"payment_id":"pay-93bd1c5d-daad-4b28-9968-a3312fe6a83d","currency":"EUR","confirm":true,"profile_id":"pro_4VVXVGE88DgoRaP6ynQI","capture_method":"automatic","capture_on":"2022-09-10T10:11:12Z","authentication_type":"three_ds","customer_id":"cus_Wz8ND2QMGUTQCZBgO4Jx","email":"abc@example.com","return_url":"https://google.com","payment_method":"card","payment_method_type":"debit","payment_method_data":{"card":{"card_number":"4000000000002503","card_exp_month":"12","card_exp_year":"2028","card_holder_name":"John Doe","card_cvc":"829"}},"metadata":{"Force-PSP":"Adyen","udf1":"value1","new_customer":"true","login_date":"2019-09-10T10:11:12Z"},"browser_info":{"user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36","accept_header":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8","language":"en-US","color_depth":32,"screen_height":1117,"screen_width":1728,"time_zone":-330,"java_enabled":true,"java_script_enabled":true,"ip_address":"127.0.0.1"},"customer_acceptance":{"acceptance_type":"online","accepted_at":"1963-05-03T04:07:52.723Z","online":{"ip_address":"127.0.0.1","user_agent":"amet irure esse"}},"connector_metadata":{"adyen":{"testing":{}}},"session_expiry":60}' Response {"payment_id":"pay-70b37ad5-dff2-447f-aa35-3638ee8f49a2","merchant_id":"merchant_1747207118","status":"requires_customer_action","amount":10000,"net_amount":10000,"shipping_cost":null,"amount_capturable":10000,"amount_received":null,"connector":"worldpay","client_secret":"pay-70b37ad5-dff2-447f-aa35-3638ee8f49a2_secret_yHFganGnHhl61BLGOu7t","created":"2025-05-14T10:46:44.551Z","currency":"EUR","customer_id":"cus_Wz8ND2QMGUTQCZBgO4Jx","customer":{"id":"cus_Wz8ND2QMGUTQCZBgO4Jx","name":null,"email":"abc@example.com","phone":null,"phone_country_code":null},"description":null,"refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":null,"off_session":null,"capture_on":null,"capture_method":"automatic","payment_method":"card","payment_method_data":{"card":{"last4":"2503","card_type":"CREDIT","card_network":"Visa","card_issuer":"INTL HDQTRS-CENTER OWNED","card_issuing_country":"UNITEDSTATES","card_isin":"400000","card_extended_bin":null,"card_exp_month":"12","card_exp_year":"2028","card_holder_name":"John Doe","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":null,"billing":null,"order_details":null,"email":"abc@example.com","name":null,"phone":null,"return_url":"https://google.com/","authentication_type":"three_ds","statement_descriptor_name":null,"statement_descriptor_suffix":null,"next_action":{"type":"redirect_to_url","redirect_to_url":"http://localhost:8080/payments/redirect/pay-70b37ad5-dff2-447f-aa35-3638ee8f49a2/merchant_1747207118/pay-70b37ad5-dff2-447f-aa35-3638ee8f49a2_1"},"cancellation_reason":null,"error_code":null,"error_message":null,"unified_code":null,"unified_message":null,"payment_experience":null,"payment_method_type":"credit","connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":{"customer_id":"cus_Wz8ND2QMGUTQCZBgO4Jx","created_at":1747219604,"expires":1747223204,"secret":"epk_87fd2e1ca6d4420cb2d9b1be49aac61c"},"manual_retry_allowed":null,"connector_transaction_id":"eyJrIjoxLCJkIjoidjh4TDNMbk9jNGJyeVhHeVJlRVN6TXV6VDl2SlBrRzBSSE9VZ09JVWxjNFB4MFNVUVlGVEpHS1ZPTGZnaXZnK0M2QUZSRzROQnJmZU12dXl6T3ZqOWc9PSJ9_1","frm_message":null,"metadata":{"udf1":"value1","Force-PSP":"Adyen","login_date":"2019-09-10T10:11:12Z","new_customer":"true"},"connector_metadata":{"apple_pay":null,"airwallex":null,"noon":null,"braintree":null,"adyen":{"testing":{"holder_name":null}}},"feature_metadata":null,"reference_id":"47d77e52-3bf1-457d-b32f-2b64671269b3","payment_link":null,"profile_id":"pro_4VVXVGE88DgoRaP6ynQI","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_R9QZT88xlIImFvkbzRjS","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-05-14T10:47:44.551Z","fingerprint":null,"browser_info":{"language":"en-US","time_zone":-330,"ip_address":"127.0.0.1","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36","color_depth":32,"java_enabled":true,"screen_width":1728,"accept_header":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8","screen_height":1117,"java_script_enabled":true},"payment_method_id":null,"payment_method_status":null,"updated":"2025-05-14T10:46:45.055Z","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> 2. Proceed with the payment <details> <summary>3. Retrieve the payment</summary> cURL curl --location --request GET 'http://localhost:8080/payments/pay-70b37ad5-dff2-447f-aa35-3638ee8f49a2?force_sync=true' \ --header 'Accept: application/json' \ --header 'api-key: snd_TyCUg91YvGEf7k0FZjoyx3rIiH8RuP3H051L38LFsaBOyFC2DzoV112sVcLcOIju' Response {"payment_id":"pay_rXpDVF7rBTlK81BLCk78","merchant_id":"merchant_1681193734270","status":"succeeded","amount":1000,"net_amount":1000,"shipping_cost":null,"amount_capturable":0,"amount_received":1000,"connector":"novalnet","client_secret":"pay_rXpDVF7rBTlK81BLCk78_secret_jYyGNnraiAbHZflZ1cUe","created":"2025-05-14T08:30:16.439Z","currency":"EUR","customer_id":"cus_zBM97pQlSjmFTtTZlXnn","customer":{"id":"cus_zBM97pQlSjmFTtTZlXnn","name":"John Nether","email":"abc@example.com","phone":"6168205362","phone_country_code":"+1"},"description":null,"refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":"off_session","off_session":null,"capture_on":null,"capture_method":null,"payment_method":"wallet","payment_method_data":{"wallet":{},"billing":null},"payment_token":null,"shipping":null,"billing":{"address":null,"phone":null,"email":"random@juspay.in"},"order_details":null,"email":"abc@example.com","name":"John Nether","phone":"6168205362","return_url":"https://www.example.com/","authentication_type":"three_ds","statement_descriptor_name":null,"statement_descriptor_suffix":null,"next_action":null,"cancellation_reason":null,"error_code":null,"error_message":null,"unified_code":null,"unified_message":null,"payment_experience":"redirect_to_url","payment_method_type":"paypal","connector_label":null,"business_country":null,"business_label":null,"business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":null,"manual_retry_allowed":false,"connector_transaction_id":"15185400044502956","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"15185400044502956","payment_link":{"link":"https://gdpp-dev.zurich.com/payment_link/merchant_1681193734270/pay_rXpDVF7rBTlK81BLCk78?locale=en","secure_link":"https://gdpp-dev.zurich.com/payment_link/s/merchant_1681193734270/pay_rXpDVF7rBTlK81BLCk78?locale=en","payment_link_id":"plink_Rth6buCuxL0WM34L3ZgE"},"profile_id":"pro_E7pM8kGERopEKEhqwfWQ","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_76uMkQC2ErtAXZ3zTMXT","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-05-14T08:45:16.436Z","fingerprint":null,"browser_info":{"os_type":"macOS","language":"en-US","time_zone":-330,"ip_address":"122.172.83.222","os_version":"10.15.7","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.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","java_script_enabled":true},"payment_method_id":"pm_EHYfLI1wWenwsVsIC5P3","payment_method_status":"active","updated":"2025-05-14T08:30:45.990Z","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> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Other** - `crates/router/src/services/api.rs` **Detailed Identifier Changes:** Commit a2d64127: Files to modify: **crates/router/src/services/api.rs** Modify existing code
{"pr_number": 8027, "pr_title": "fix(core): fix redirection for Worldpay for specific payment IDs", "merged_at": "2025-05-15T12:40:13Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"other": ["crates/router/src/services/api.rs"]}, "change_types": {}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(coingate): Add Payment webhooks ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Added Payment Webhooks for Coingate ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> **Payment Create** ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_htJGtinBYdZSRlmPWYuWrUidn7bURKvvJyonLRjipwjSdrtXZNA6CAF4pf7mVoUR' \ --data-raw '{ "amount": 300, "currency": "EUR", "confirm": true, "email": "guest@example.com", "return_url": "https://google.com", "payment_method": "crypto", "payment_method_type": "crypto_currency", "payment_experience": "redirect_to_url", "payment_method_data": { "crypto": { } } }' ``` Response ``` { "payment_id": "pay_LJzHbDcrRN4sJz5Z0TOE", "merchant_id": "postman_merchant_GHAction_e407c442-cb8f-487f-b3a1-97c65ceaf771", "status": "requires_customer_action", "amount": 300, "net_amount": 300, "shipping_cost": null, "amount_capturable": 300, "amount_received": null, "connector": "coingate", "client_secret": "pay_LJzHbDcrRN4sJz5Z0TOE_secret_pmlUK9sVTNOmDq3Y7aAM", "created": "2025-03-12T05:05:33.837Z", "currency": "EUR", "customer_id": null, "customer": { "id": null, "name": null, "email": "guest@example.com", "phone": null, "phone_country_code": null }, "description": null, "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": null, "payment_method": "crypto", "payment_method_data": { "crypto": { "pay_currency": null, "network": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": null, "order_details": null, "email": null, "name": null, "phone": null, "return_url": "https://google.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": { "type": "redirect_to_url", "redirect_to_url": "http://localhost:8080/payments/redirect/pay_LJzHbDcrRN4sJz5Z0TOE/postman_merchant_GHAction_e407c442-cb8f-487f-b3a1-97c65ceaf771/pay_LJzHbDcrRN4sJz5Z0TOE_1" }, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": "redirect_to_url", "payment_method_type": "crypto_currency", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": null, "manual_retry_allowed": null, "connector_transaction_id": "217423", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "", "payment_link": null, "profile_id": "pro_fpjZpIX1wOB7jxvKU7Pr", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_kc7B39m3TmtvvlWtyvmV", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-03-12T05:20:33.837Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2025-03-12T05:05:34.751Z", "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 } ``` <img width="950" alt="Screenshot 2025-03-12 at 10 36 48 AM" src="https://github.com/user-attachments/assets/3b258cc3-1708-41e9-afe7-fc484aae48e7" /> ng…] <img width="895" alt="Screenshot 2025-03-12 at 10 36 40 AM" src="https://github.com/user-attachments/assets/71894eb2-acc0-4d9f-981d-10db85e927aa" /> <img width="907" alt="Screenshot 2025-03-12 at 10 35 08 AM" src="https://github.com/user-attachments/assets/ef844f5c-bc37-4db8-a461-a3b0e0c8384a" /> <img width="907" alt="Screenshot 2025-03-12 at 10 34 48 AM" src="https://github.com/user-attachments/assets/7ad5dfc6-60a4-49fa-a588-a8640bca251a" /> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/connector_configs/toml/development.toml` - `crates/connector_configs/toml/production.toml` - `crates/connector_configs/toml/sandbox.toml` - ... and 2 more files **Code Patterns Applied:** - Define new data structures (2 changes) - Implement new functions (5 changes) - Extend existing types with new fields (37 changes) **Detailed Identifier Changes:** Commit fb8cba07: Files to modify: **crates/hyperswitch_connectors/src/connectors/coingate.rs** Add: - function: private::get_webhook_source_verification_algorithm - function: private::get_webhook_source_verification_message **crates/hyperswitch_connectors/src/connectors/coingate/transformers.rs** Add: - function: private::try_from - struct: pub::CoingateSyncResponse - impl: impl TryFrom<PaymentsSyncResponseRouterData<CoingateSyncResponse>> for PaymentsSyncRouterData
{"pr_number": 7489, "pr_title": "feat(coingate): Add Payment webhooks", "merged_at": "2025-03-21T12:57:19Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/connector_configs/toml/development.toml", "crates/connector_configs/toml/production.toml", "crates/connector_configs/toml/sandbox.toml", "crates/hyperswitch_connectors/src/connectors/coingate.rs", "crates/hyperswitch_connectors/src/connectors/coingate/transformers.rs"]}, "change_types": {"structs_added": 2, "functions_added": 5, "fields_added": 37, "imports_added": 4}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): [BANKOFAMERICA] Implement Samsung Pay ## 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 --> Implemented Payment Method Samsung Pay for connector Bankofamerica ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with 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 configuration with merhcant account ``` curl --location 'http://localhost:8080/account/merchant_1734596148/connectors' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: test_admin' \ --data '{ "connector_type": "payment_processor", "connector_name": "bankofamerica", "connector_account_details": { "auth_type": "SignatureKey", "api_secret": API_SECRET_HERE, "key1": KEY_1 here, "api_key": API_KEY here }, "test_mode": true, "disabled": false, "payment_methods_enabled": [ { "payment_method": "wallet", "payment_method_types": [ { "payment_method_type": "samsung_pay", "payment_experience": "invoke_sdk_client", "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true } ] } ], "connector_wallets_details": WALLET_DETAILS_HERE, "metadata": { "city": "NY", "unit": "245" }, "connector_webhook_details": { "merchant_secret": "merchant_secret" } }' ``` Response: ``` { "connector_type": "payment_processor", "connector_name": "bankofamerica", "connector_label": "bankofamerica_US_default", "merchant_connector_id": "mca_tcLF8eNc3wyJyNa02NAY", "profile_id": "pro_PS3TEgINEPhzeeAjNjKV", "connector_account_details": { "auth_type": "SignatureKey", "api_key": "d0********************************4c", "key1": "ju*************ox", "api_secret": "rK****************************************k=" }, "payment_methods_enabled": [ { "payment_method": "wallet", "payment_method_types": [ { "payment_method_type": "samsung_pay", "payment_experience": "invoke_sdk_client", "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true } ] } ], "connector_webhook_details": { "merchant_secret": "merchant_secret", "additional_secret": null }, "connector_wallets_details": WALLET_DETAILS_HERE, "metadata": { "city": "NY", "unit": "245" }, "test_mode": true, "disabled": false, "frm_configs": null, "business_country": null, "business_label": null, "business_sub_label": null, "applepay_verified_domains": null, "pm_auth_config": null, "status": "active", "additional_merchant_data": null, } ``` 2. Create Payment ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_eJeiVMcAVr5URnyfwyv3LHLrSkfpwR44liTgmY3szossAbomjLpgsSmvN2H1ELMm' \ --data '{ "amount": 6540, "currency": "USD", "capture_method": "automatic", "authentication_type": "no_three_ds", "confirm": false, "customer_id": "cu_1726743607", "metadata": { "city": "NY", "unit": "245" } }' ``` Response: ``` { "payment_id": "pay_pUtMw6BcmjjRLpP6lS9J", "merchant_id": "merchant_1734693841", "status": "requires_payment_method", "amount": 6540, "net_amount": 6540, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": null, "client_secret": "pay_pUtMw6BcmjjRLpP6lS9J_secret_GD5uPWJmbU3YQiIcgoiN", "created": "2024-12-20T11:34:14.762Z", "currency": "USD", "customer_id": "cu_1726743607", "customer": { "id": "cu_1726743607", "name": null, "email": null, "phone": null, "phone_country_code": null }, "description": null, "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": null, "payment_method_data": null, "payment_token": null, "shipping": null, "billing": null, "order_details": null, "email": null, "name": null, "phone": null, "return_url": null, "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": null, "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "cu_1726743607", "created_at": 1734694454, "expires": 1734698054, "secret": "epk_5d8ae327451c498182e4bb121edf3e81" }, "manual_retry_allowed": null, "connector_transaction_id": null, "frm_message": null, "metadata": { "city": "NY", "unit": "245" }, "connector_metadata": null, "feature_metadata": null, "reference_id": null, "payment_link": null, "profile_id": "pro_mGLf47yYw0B9WO6PxMrD", "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-20T11:49:14.762Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2024-12-20T11:34:14.811Z", "split_payments": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null } ``` 3. Session-token ``` curl --location 'http://localhost:8080/payments/session_tokens' \ --header 'Content-Type: application/json' \ --header 'api-key: pk_dev_42fcfebecc5247588101551310c2a586' \ --data '{ "payment_id": "pay_pUtMw6BcmjjRLpP6lS9J", "wallets": [], "client_secret": "pay_pUtMw6BcmjjRLpP6lS9J_secret_GD5uPWJmbU3YQiIcgoiN" }' ``` Response: ``` { "payment_id": "pay_WuoNKWqCMOQjFtcFP10z", "client_secret": "pay_WuoNKWqCMOQjFtcFP10z_secret_j1WL1mhlMmiO1Dr4Trr1", "session_token": [ { "wallet_name": "samsung_pay", "version": "2", "service_id": SERVICE_ID HERE, "order_number": "pay-WuoNKWqCMOQjFtcFP10z", "merchant": { "name": "Hyperswitch", "url": null, "country_code": "IN" }, "amount": { "option": "FORMAT_TOTAL_PRICE_ONLY", "currency_code": "USD", "total": "65.40" }, "protocol": "PROTOCOL3DS", "allowed_brands": [ "visa", "masterCard", "amex", "discover" ] } ] } ``` 4. Confirm payment ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_AZns1EDM3pjsdDnWLh8fYVrLoDrmRqVLXADWgYhrTnecV5LT6I8hfLcQGsZsMadN' \ --data-raw '{ "amount": 6540, "currency": "USD", "confirm": true, "business_country": "US", "business_label": "default", "amount_to_capture": 6540, "customer_id": "custhype123", "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "return_url": "https://google.com", "email": "something@gmail.com", "name": "Joseph Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment request", "statement_descriptor_name": "Juspay", "statement_descriptor_suffix": "Router", "payment_method": "wallet", "payment_method_type": "samsung_pay", "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "payment_method_data": { "wallet": { "samsung_pay": { "payment_credential": { "card_brand": "visa", "recurring_payment": false, "card_last4digits": "1661", "method": "3DS", "3_d_s": { "type": "S", "version": "100", "data": "encrypted samsung pay data" } } } } } }' ``` Response: ``` { "payment_id": "pay_FnYdRGNWyk5ivPntRVK7", "merchant_id": "merchant_1742560204", "status": "succeeded", "amount": 6540, "net_amount": 6540, "shipping_cost": null, "amount_capturable": 0, "amount_received": 6540, "connector": "bankofamerica", "client_secret": "pay_FnYdRGNWyk5ivPntRVK7_secret_pFhbPDe5XdIIEoKe0KYg", "created": "2025-03-21T12:30:26.829Z", "currency": "USD", "customer_id": "custhype123", "customer": { "id": "custhype123", "name": "Joseph Doe", "email": "something@gmail.com", "phone": "999999999", "phone_country_code": "+65" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "wallet", "payment_method_data": { "wallet": { "samsung_pay": { "last4": "1661", "card_network": "Visa", "type": null } }, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "order_details": null, "email": "something@gmail.com", "name": "Joseph Doe", "phone": "999999999", "return_url": "https://google.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": "Juspay", "statement_descriptor_suffix": "Router", "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "samsung_pay", "connector_label": "bankofamerica_US_default", "business_country": "US", "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "custhype123", "created_at": 1742560226, "expires": 1742563826, "secret": "epk_d436e8803b7d40938ea22e261a545d7a" }, "manual_retry_allowed": false, "connector_transaction_id": "7425602271606029804806", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "pay_FnYdRGNWyk5ivPntRVK7_1", "payment_link": null, "profile_id": "pro_gnArRjiKOTQDn7X5QQee", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_IZ7c613FVN3IZpnVootz", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-03-21T12:45:26.829Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2025-03-21T12:30:28.689Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": null, "issuer_error_code": null, "issuer_error_message": null } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/bankofamerica/transformers.rs` **Code Patterns Applied:** - Define new data structures (3 changes) - Implement new functions (2 changes) - Extend existing types with new fields (19 changes) **Detailed Identifier Changes:** Commit 4c72a122: Files to modify: **crates/hyperswitch_connectors/src/connectors/bankofamerica/transformers.rs** Add: - function: private::try_from - impl: impl TryFrom<( &BankOfAmericaRouterData<&PaymentsAuthorizeRouterData>, Box<SamsungPayWalletData>, )> for BankOfAmericaPaymentsRequest
{"pr_number": 6888, "pr_title": "feat(connector): [BANKOFAMERICA] Implement Samsung Pay", "merged_at": "2025-03-25T07:43:43Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/bankofamerica/transformers.rs"]}, "change_types": {"structs_added": 3, "functions_added": 2, "fields_added": 19, "imports_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): [DWOLLA] Connector integration ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Integrate Dwolla connector Added ACH bank debit flow. <details> <summary> Flow </summary> - Customer Creation - We create a customer using their email ID and receive the customer ID in the response headers. - Payment Method Token (PMT) - We use the customer ID and bank account details to create a funding source.Receive the funding source ID in the response headers. Handling Duplicate PMT Errors - When a subsequent request is made with the same bank account details, the connector returns a 4xx error along with the existing funding source ID in the error response. To handle this scenario: - A new connector_metadata field is added to the ErrorResponse. - This field is populated with the funding source ID from the error. - If connector_metadata is present in the response, the error is treated as a successful (2xx) response, and the flow continues using the provided funding source ID. - Payments Flow - Use the customer funding source ID (from step 2 or retrieved from connector_metadata in case of a duplicate). - Use the merchant funding source ID (provided by the merchant and stored in metadata in MCA call). - Initiate the payment request. - The transaction ID is received in the response headers. - Refunds Flow Since the connector does not support native refunds, we reverse the direction of payment to simulate a refund. - Use the merchant funding source ID (provided by the merchant and stored in metadata in MCA call) as the source account. - Use the customer funding ID, which we store in connector_metadata during the payments call as destination account. Note : In the Dwolla Sandbox environment, payment (transfer) statuses do not automatically change to "success" (or "processed") for bank-sourced transfers. By default, these transfers will remain in the "pending" state indefinitely, as the Sandbox does not replicate real ACH processing. </details> ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Payments Create <details> <summary> Request </summary> ``` { "amount": 100, "currency": "USD", "confirm": true, "capture_method": "automatic", "authentication_type": "no_three_ds", "customer": { "id": "johndoe", "name": "John Doe", "email": "johndoe@example.com", "phone": "9999999999", "phone_country_code": "+1" }, "phone_country_code": "+1", "description": "Its my first payment request", "return_url": "https://google.com", "payment_method": "bank_debit", "payment_method_type": "ach", "payment_method_data": { "bank_debit": { "ach_bank_debit" : { "routing_number": "222222226", "account_number": "1134511289", "bank_type": "checking", "bank_account_holder_name": "Test Checking Account2" } } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "john", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "johndoe@example.com" }, "statement_descriptor_name": "john", "statement_descriptor_suffix": "JS", "browser_info": { "user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36", "accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8", "language": "nl-NL", "color_depth": 24, "screen_height": 723, "screen_width": 1536, "time_zone": 0, "java_enabled": true, "java_script_enabled": true, "ip_address": "128.0.0.1" }, "customer_acceptance": { "acceptance_type": "offline", "accepted_at": "1963-05-03T04:07:52.723Z", "online": { "ip_address": "125.0.0.1", "user_agent": "amet irure esse" } }, "payment_type": "normal", "request_incremental_authorization": false, "merchant_order_reference_id": "test_ord", "session_expiry": 900 } ``` </details> <details> <summary> Response </summary> ``` { "payment_id": "pay_XjFcIk2szvriZS6pZrJI", "merchant_id": "merchant_1752988771", "status": "processing", "amount": 100, "net_amount": 100, "shipping_cost": null, "amount_capturable": 0, "amount_received": 100, "connector": "dwolla", "client_secret": "pay_XjFcIk2szvriZS6pZrJI_secret_uwziPWt9SvlZsamn8Uzz", "created": "2025-07-20T09:15:07.176Z", "currency": "USD", "customer_id": "johndoe", "customer": { "id": "johndoe", "name": "John Doe", "email": "johndoe@example.com", "phone": "9999999999", "phone_country_code": "+1" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "bank_debit", "payment_method_data": { "bank_debit": { "ach": { "account_number": "******1289", "routing_number": "222***226", "card_holder_name": null, "bank_account_holder_name": "Test Checking Account2", "bank_name": null, "bank_type": "checking", "bank_holder_type": 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": "johndoe@example.com" }, "order_details": null, "email": "johndoe@example.com", "name": "John Doe", "phone": "9999999999", "return_url": "https://google.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": "john", "statement_descriptor_suffix": "JS", "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "ach", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "johndoe", "created_at": 1753002907, "expires": 1753006507, "secret": "epk_8f8858f7fa59443492d6b9c60b02f617" }, "manual_retry_allowed": false, "connector_transaction_id": "7079e507-4a65-f011-acd5-02ab38c54207", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "7079e507-4a65-f011-acd5-02ab38c54207", "payment_link": null, "profile_id": "pro_D326wda9tOqvrMVckzSq", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_VkSGTWb4x9wiBWKDt3PU", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-07-20T09:30:07.176Z", "fingerprint": null, "browser_info": { "language": "nl-NL", "time_zone": 0, "ip_address": "128.0.0.1", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "color_depth": 24, "java_enabled": true, "screen_width": 1536, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 723, "java_script_enabled": true }, "payment_method_id": null, "payment_method_status": null, "updated": "2025-07-20T09:15:11.005Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": "test_ord", "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": null, "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": "" } ``` </details> PSync <details> <summary>Response</summary> ``` { "payment_id": "pay_XjFcIk2szvriZS6pZrJI", "merchant_id": "merchant_1752988771", "status": "processing", "amount": 100, ... } ``` </details> --- <details> <summary>Webhook</summary> <img width="1097" height="128" alt="Screenshot 2025-07-23 at 3 23 23 PM" src="https://github.com/user-attachments/assets/b7100996-7ed7-4f72-922a-a1da8b6cf6ed" /> </details> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/enums.rs` **2. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/errors/api_error_response.rs` - `crates/hyperswitch_domain_models/src/router_data.rs` **3. Core Business Logic** - `crates/router/src/core/connector_validation.rs` - `crates/router/src/core/payments/access_token.rs` - `crates/router/src/core/payments/tokenization.rs` - ... and 3 more files **4. External Connector Integration** - `crates/common_enums/src/connector_enums.rs` - `crates/connector_configs/src/connector.rs` - `crates/connector_configs/toml/development.toml` - ... and 182 more files **5. Utils** - `crates/router/src/utils.rs` **6. Tests** - `config/deployments/integration_test.toml` - `loadtest/config/development.toml` **7. Configuration Files** - `config/config.example.toml` - `config/deployments/production.toml` - `config/deployments/sandbox.toml` - ... and 2 more files **8. Other** - `api-reference/v1/openapi_spec_v1.json` - `api-reference/v2/openapi_spec_v2.json` - `crates/hyperswitch_interfaces/src/api.rs` - ... and 1 more files **Code Patterns Applied:** - Define new data structures (19 changes) - Implement new functions (34 changes) - Extend existing types with new fields (622 changes) - Add conditional logic for feature flags or filtering (8 changes) **Detailed Identifier Changes:** Commit c09c9366: Files to modify: **crates/api_models/src/enums.rs** Modify existing code **crates/common_enums/src/connector_enums.rs** Modify existing code **crates/connector_configs/src/connector.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/aci.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/adyen.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/adyenplatform.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/affirm.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/airwallex.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/amazonpay.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/archipel.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/archipel/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/authipay/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/authorizedotnet.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/authorizedotnet/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/bambora.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/bamboraapac.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/bamboraapac/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/bankofamerica.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/bankofamerica/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/barclaycard.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/barclaycard/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/billwerk.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/billwerk/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/bitpay.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/blackhawknetwork.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/bluecode.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/bluesnap.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/boku.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/braintree.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/braintree/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/breadpay.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/cashtocode.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/cashtocode/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/celero.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/chargebee.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/checkbook.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/checkout.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/checkout/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/coinbase.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/coingate.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/cryptopay.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/cryptopay/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/custombilling.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/cybersource.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/datatrans.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/datatrans/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/deutschebank.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/deutschebank/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/digitalvirgo.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/dlocal.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/dummyconnector.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/dwolla.rs** Remove: - function: private::get_auth_header - impl: impl ConnectorIntegration<PaymentMethodToken, PaymentMethodTokenizationData, PaymentsResponseData> for Dwolla - impl: impl ConnectorIntegration<AccessTokenAuth, AccessTokenRequestData, AccessToken> for Dwolla - impl: impl ConnectorIntegration<SetupMandate, SetupMandateRequestData, PaymentsResponseData> for Dwolla Add: - function: private::get_url - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_content_type - impl: impl api::ConnectorCustomer for Dwolla - impl: impl ConnectorIntegration<CreateConnectorCustomer, ConnectorCustomerData, PaymentsResponseData> for Dwolla **crates/hyperswitch_connectors/src/connectors/dwolla/transformers.rs** Remove: - function: private::try_from - function: private::try_from - struct: pub::DwollaRouterData - struct: pub::DwollaAuthType - enum: pub::DwollaPaymentStatus Add: - struct: pub::DwollaAuthType **crates/hyperswitch_connectors/src/connectors/ebanx.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/elavon/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/facilitapay/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/fiserv.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/fiservemea.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/fiuu.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/fiuu/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/flexiti.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/forte.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/getnet.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/globalpay.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/globalpay/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/globepay.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/globepay/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/gocardless.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/gpayments.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/helcim.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/hipay.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/hipay/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/hyperswitch_vault.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/hyperwallet.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/iatapay.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/iatapay/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/inespay.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/inespay/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/itaubank.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/jpmorgan.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/juspaythreedsserver.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/katapult.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/klarna.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/mifinity.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/mollie.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/moneris.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/mpgs.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/multisafepay/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/netcetera.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/netcetera/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/nexinets.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/nexixpay.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/nexixpay/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/nmi.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/nmi/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/nomupay.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/noon.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/noon/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/nordea.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/nordea/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/novalnet.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/novalnet/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/nuvei/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/opayo.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/opennode.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/paybox.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/paybox/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/payeezy.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/payload.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/payload/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/payme.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/payme/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/payone.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/paypal.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/paystack.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/paystack/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/paytm.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/payu.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/phonepe.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/placetopay.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/plaid.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/plaid/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/powertranz.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/powertranz/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/prophetpay.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/prophetpay/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/rapyd.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/rapyd/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/razorpay.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/recurly.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/redsys.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/redsys/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/riskified.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/santander.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/shift4.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/sift.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/signifyd.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/silverflow.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/square.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/stax.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/stripe.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/stripe/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/stripebilling.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/taxjar.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/threedsecureio.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/threedsecureio/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/thunes.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/tokenio.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/tokenio/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/trustpay.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/trustpay/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/trustpayments.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/tsys/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/unified_authentication_service.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/unified_authentication_service/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/vgs.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/volt.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/volt/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/wellsfargo.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/wellsfargo/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/wellsfargopayout.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/wise.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/worldpay.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/worldpay/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/worldpayvantiv.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/worldpayvantiv/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/worldpayxml.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/worldpayxml/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/xendit.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/xendit/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/zen.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/zen/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/zsl.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/zsl/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/default_implementations.rs** Modify existing code **crates/hyperswitch_connectors/src/utils.rs** Modify existing code **crates/hyperswitch_domain_models/src/errors/api_error_response.rs** Modify existing code **crates/hyperswitch_domain_models/src/router_data.rs** Modify existing code **crates/hyperswitch_interfaces/src/api.rs** Modify existing code **crates/hyperswitch_interfaces/src/connector_integration_v2.rs** Modify existing code **crates/payment_methods/src/configs/payment_connector_required_fields.rs** Modify existing code **crates/router/src/connector/utils.rs** Modify existing code **crates/router/src/core/connector_validation.rs** Modify existing code **crates/router/src/core/payments/access_token.rs** Modify existing code **crates/router/src/core/payments/tokenization.rs** Add: - function: pub::handle_tokenization_response **crates/router/src/core/payments/transformers.rs** Modify existing code **crates/router/src/core/payouts/access_token.rs** Modify existing code **crates/router/src/core/unified_connector_service/transformers.rs** Modify existing code **crates/router/src/services/api.rs** Modify existing code **crates/router/src/types/api/connector_mapping.rs** Modify existing code **crates/router/src/types/connector_transformers.rs** Modify existing code **crates/router/src/utils.rs** Modify existing code
{"pr_number": 8586, "pr_title": "feat(connector): [DWOLLA] Connector integration", "merged_at": "2025-08-20T08:01:28Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/enums.rs"], "domain": ["crates/hyperswitch_domain_models/src/errors/api_error_response.rs", "crates/hyperswitch_domain_models/src/router_data.rs"], "core_business": ["crates/router/src/core/connector_validation.rs", "crates/router/src/core/payments/access_token.rs", "crates/router/src/core/payments/tokenization.rs", "crates/router/src/core/payments/transformers.rs", "crates/router/src/core/payouts/access_token.rs", "crates/router/src/core/unified_connector_service/transformers.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/aci.rs", "crates/hyperswitch_connectors/src/connectors/adyen.rs", "crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs", "crates/hyperswitch_connectors/src/connectors/adyenplatform.rs", "crates/hyperswitch_connectors/src/connectors/affirm.rs", "crates/hyperswitch_connectors/src/connectors/airwallex.rs", "crates/hyperswitch_connectors/src/connectors/amazonpay.rs", "crates/hyperswitch_connectors/src/connectors/archipel.rs", "crates/hyperswitch_connectors/src/connectors/archipel/transformers.rs", "crates/hyperswitch_connectors/src/connectors/authipay/transformers.rs", "crates/hyperswitch_connectors/src/connectors/authorizedotnet.rs", "crates/hyperswitch_connectors/src/connectors/authorizedotnet/transformers.rs", "crates/hyperswitch_connectors/src/connectors/bambora.rs", "crates/hyperswitch_connectors/src/connectors/bamboraapac.rs", "crates/hyperswitch_connectors/src/connectors/bamboraapac/transformers.rs", "crates/hyperswitch_connectors/src/connectors/bankofamerica.rs", "crates/hyperswitch_connectors/src/connectors/bankofamerica/transformers.rs", "crates/hyperswitch_connectors/src/connectors/barclaycard.rs", "crates/hyperswitch_connectors/src/connectors/barclaycard/transformers.rs", "crates/hyperswitch_connectors/src/connectors/billwerk.rs", "crates/hyperswitch_connectors/src/connectors/billwerk/transformers.rs", "crates/hyperswitch_connectors/src/connectors/bitpay.rs", "crates/hyperswitch_connectors/src/connectors/blackhawknetwork.rs", "crates/hyperswitch_connectors/src/connectors/bluecode.rs", "crates/hyperswitch_connectors/src/connectors/bluesnap.rs", "crates/hyperswitch_connectors/src/connectors/boku.rs", "crates/hyperswitch_connectors/src/connectors/braintree.rs", "crates/hyperswitch_connectors/src/connectors/braintree/transformers.rs", "crates/hyperswitch_connectors/src/connectors/breadpay.rs", "crates/hyperswitch_connectors/src/connectors/cashtocode.rs", "crates/hyperswitch_connectors/src/connectors/cashtocode/transformers.rs", "crates/hyperswitch_connectors/src/connectors/celero.rs", "crates/hyperswitch_connectors/src/connectors/chargebee.rs", "crates/hyperswitch_connectors/src/connectors/checkbook.rs", "crates/hyperswitch_connectors/src/connectors/checkout.rs", "crates/hyperswitch_connectors/src/connectors/checkout/transformers.rs", "crates/hyperswitch_connectors/src/connectors/coinbase.rs", "crates/hyperswitch_connectors/src/connectors/coingate.rs", "crates/hyperswitch_connectors/src/connectors/cryptopay.rs", "crates/hyperswitch_connectors/src/connectors/cryptopay/transformers.rs", "crates/hyperswitch_connectors/src/connectors/custombilling.rs", "crates/hyperswitch_connectors/src/connectors/cybersource.rs", "crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs", "crates/hyperswitch_connectors/src/connectors/datatrans.rs", "crates/hyperswitch_connectors/src/connectors/datatrans/transformers.rs", "crates/hyperswitch_connectors/src/connectors/deutschebank.rs", "crates/hyperswitch_connectors/src/connectors/deutschebank/transformers.rs", "crates/hyperswitch_connectors/src/connectors/digitalvirgo.rs", "crates/hyperswitch_connectors/src/connectors/dlocal.rs", "crates/hyperswitch_connectors/src/connectors/dummyconnector.rs", "crates/hyperswitch_connectors/src/connectors/dwolla.rs", "crates/hyperswitch_connectors/src/connectors/dwolla/transformers.rs", "crates/hyperswitch_connectors/src/connectors/ebanx.rs", "crates/hyperswitch_connectors/src/connectors/elavon/transformers.rs", "crates/hyperswitch_connectors/src/connectors/facilitapay/transformers.rs", "crates/hyperswitch_connectors/src/connectors/fiserv.rs", "crates/hyperswitch_connectors/src/connectors/fiservemea.rs", "crates/hyperswitch_connectors/src/connectors/fiuu.rs", "crates/hyperswitch_connectors/src/connectors/fiuu/transformers.rs", "crates/hyperswitch_connectors/src/connectors/flexiti.rs", "crates/hyperswitch_connectors/src/connectors/forte.rs", "crates/hyperswitch_connectors/src/connectors/getnet.rs", "crates/hyperswitch_connectors/src/connectors/globalpay.rs", "crates/hyperswitch_connectors/src/connectors/globalpay/transformers.rs", "crates/hyperswitch_connectors/src/connectors/globepay.rs", "crates/hyperswitch_connectors/src/connectors/globepay/transformers.rs", "crates/hyperswitch_connectors/src/connectors/gocardless.rs", "crates/hyperswitch_connectors/src/connectors/gpayments.rs", "crates/hyperswitch_connectors/src/connectors/helcim.rs", "crates/hyperswitch_connectors/src/connectors/hipay.rs", "crates/hyperswitch_connectors/src/connectors/hipay/transformers.rs", "crates/hyperswitch_connectors/src/connectors/hyperswitch_vault.rs", "crates/hyperswitch_connectors/src/connectors/hyperwallet.rs", "crates/hyperswitch_connectors/src/connectors/iatapay.rs", "crates/hyperswitch_connectors/src/connectors/iatapay/transformers.rs", "crates/hyperswitch_connectors/src/connectors/inespay.rs", "crates/hyperswitch_connectors/src/connectors/inespay/transformers.rs", "crates/hyperswitch_connectors/src/connectors/itaubank.rs", "crates/hyperswitch_connectors/src/connectors/jpmorgan.rs", "crates/hyperswitch_connectors/src/connectors/juspaythreedsserver.rs", "crates/hyperswitch_connectors/src/connectors/katapult.rs", "crates/hyperswitch_connectors/src/connectors/klarna.rs", "crates/hyperswitch_connectors/src/connectors/mifinity.rs", "crates/hyperswitch_connectors/src/connectors/mollie.rs", "crates/hyperswitch_connectors/src/connectors/moneris.rs", "crates/hyperswitch_connectors/src/connectors/mpgs.rs", "crates/hyperswitch_connectors/src/connectors/multisafepay/transformers.rs", "crates/hyperswitch_connectors/src/connectors/netcetera.rs", "crates/hyperswitch_connectors/src/connectors/netcetera/transformers.rs", "crates/hyperswitch_connectors/src/connectors/nexinets.rs", "crates/hyperswitch_connectors/src/connectors/nexixpay.rs", "crates/hyperswitch_connectors/src/connectors/nexixpay/transformers.rs", "crates/hyperswitch_connectors/src/connectors/nmi.rs", "crates/hyperswitch_connectors/src/connectors/nmi/transformers.rs", "crates/hyperswitch_connectors/src/connectors/nomupay.rs", "crates/hyperswitch_connectors/src/connectors/noon.rs", "crates/hyperswitch_connectors/src/connectors/noon/transformers.rs", "crates/hyperswitch_connectors/src/connectors/nordea.rs", "crates/hyperswitch_connectors/src/connectors/nordea/transformers.rs", "crates/hyperswitch_connectors/src/connectors/novalnet.rs", "crates/hyperswitch_connectors/src/connectors/novalnet/transformers.rs", "crates/hyperswitch_connectors/src/connectors/nuvei/transformers.rs", "crates/hyperswitch_connectors/src/connectors/opayo.rs", "crates/hyperswitch_connectors/src/connectors/opennode.rs", "crates/hyperswitch_connectors/src/connectors/paybox.rs", "crates/hyperswitch_connectors/src/connectors/paybox/transformers.rs", "crates/hyperswitch_connectors/src/connectors/payeezy.rs", "crates/hyperswitch_connectors/src/connectors/payload.rs", "crates/hyperswitch_connectors/src/connectors/payload/transformers.rs", "crates/hyperswitch_connectors/src/connectors/payme.rs", "crates/hyperswitch_connectors/src/connectors/payme/transformers.rs", "crates/hyperswitch_connectors/src/connectors/payone.rs", "crates/hyperswitch_connectors/src/connectors/paypal.rs", "crates/hyperswitch_connectors/src/connectors/paystack.rs", "crates/hyperswitch_connectors/src/connectors/paystack/transformers.rs", "crates/hyperswitch_connectors/src/connectors/paytm.rs", "crates/hyperswitch_connectors/src/connectors/payu.rs", "crates/hyperswitch_connectors/src/connectors/phonepe.rs", "crates/hyperswitch_connectors/src/connectors/placetopay.rs", "crates/hyperswitch_connectors/src/connectors/plaid.rs", "crates/hyperswitch_connectors/src/connectors/plaid/transformers.rs", "crates/hyperswitch_connectors/src/connectors/powertranz.rs", "crates/hyperswitch_connectors/src/connectors/powertranz/transformers.rs", "crates/hyperswitch_connectors/src/connectors/prophetpay.rs", "crates/hyperswitch_connectors/src/connectors/prophetpay/transformers.rs", "crates/hyperswitch_connectors/src/connectors/rapyd.rs", "crates/hyperswitch_connectors/src/connectors/rapyd/transformers.rs", "crates/hyperswitch_connectors/src/connectors/razorpay.rs", "crates/hyperswitch_connectors/src/connectors/recurly.rs", "crates/hyperswitch_connectors/src/connectors/redsys.rs", "crates/hyperswitch_connectors/src/connectors/redsys/transformers.rs", "crates/hyperswitch_connectors/src/connectors/riskified.rs", "crates/hyperswitch_connectors/src/connectors/santander.rs", "crates/hyperswitch_connectors/src/connectors/shift4.rs", "crates/hyperswitch_connectors/src/connectors/sift.rs", "crates/hyperswitch_connectors/src/connectors/signifyd.rs", "crates/hyperswitch_connectors/src/connectors/silverflow.rs", "crates/hyperswitch_connectors/src/connectors/square.rs", "crates/hyperswitch_connectors/src/connectors/stax.rs", "crates/hyperswitch_connectors/src/connectors/stripe.rs", "crates/hyperswitch_connectors/src/connectors/stripe/transformers.rs", "crates/hyperswitch_connectors/src/connectors/stripebilling.rs", "crates/hyperswitch_connectors/src/connectors/taxjar.rs", "crates/hyperswitch_connectors/src/connectors/threedsecureio.rs", "crates/hyperswitch_connectors/src/connectors/threedsecureio/transformers.rs", "crates/hyperswitch_connectors/src/connectors/thunes.rs", "crates/hyperswitch_connectors/src/connectors/tokenio.rs", "crates/hyperswitch_connectors/src/connectors/tokenio/transformers.rs", "crates/hyperswitch_connectors/src/connectors/trustpay.rs", "crates/hyperswitch_connectors/src/connectors/trustpay/transformers.rs", "crates/hyperswitch_connectors/src/connectors/trustpayments.rs", "crates/hyperswitch_connectors/src/connectors/tsys/transformers.rs", "crates/hyperswitch_connectors/src/connectors/unified_authentication_service.rs", "crates/hyperswitch_connectors/src/connectors/unified_authentication_service/transformers.rs", "crates/hyperswitch_connectors/src/connectors/vgs.rs", "crates/hyperswitch_connectors/src/connectors/volt.rs", "crates/hyperswitch_connectors/src/connectors/volt/transformers.rs", "crates/hyperswitch_connectors/src/connectors/wellsfargo.rs", "crates/hyperswitch_connectors/src/connectors/wellsfargo/transformers.rs", "crates/hyperswitch_connectors/src/connectors/wellsfargopayout.rs", "crates/hyperswitch_connectors/src/connectors/wise.rs", "crates/hyperswitch_connectors/src/connectors/worldpay.rs", "crates/hyperswitch_connectors/src/connectors/worldpay/transformers.rs", "crates/hyperswitch_connectors/src/connectors/worldpayvantiv.rs", "crates/hyperswitch_connectors/src/connectors/worldpayvantiv/transformers.rs", "crates/hyperswitch_connectors/src/connectors/worldpayxml.rs", "crates/hyperswitch_connectors/src/connectors/worldpayxml/transformers.rs", "crates/hyperswitch_connectors/src/connectors/xendit.rs", "crates/hyperswitch_connectors/src/connectors/xendit/transformers.rs", "crates/hyperswitch_connectors/src/connectors/zen.rs", "crates/hyperswitch_connectors/src/connectors/zen/transformers.rs", "crates/hyperswitch_connectors/src/connectors/zsl.rs", "crates/hyperswitch_connectors/src/connectors/zsl/transformers.rs", "crates/hyperswitch_connectors/src/default_implementations.rs", "crates/hyperswitch_connectors/src/utils.rs", "crates/hyperswitch_interfaces/src/connector_integration_v2.rs", "crates/payment_methods/src/configs/payment_connector_required_fields.rs", "crates/router/src/connector/utils.rs", "crates/router/src/types/api/connector_mapping.rs", "crates/router/src/types/connector_transformers.rs"], "utils": ["crates/router/src/utils.rs"], "tests": ["config/deployments/integration_test.toml", "loadtest/config/development.toml"], "config": ["config/config.example.toml", "config/deployments/production.toml", "config/deployments/sandbox.toml", "config/development.toml", "config/docker_compose.toml"], "other": ["api-reference/v1/openapi_spec_v1.json", "api-reference/v2/openapi_spec_v2.json", "crates/hyperswitch_interfaces/src/api.rs", "crates/router/src/services/api.rs"]}, "change_types": {"structs_added": 19, "functions_added": 34, "enums_added": 4, "fields_added": 622, "imports_added": 11, "conditionals_added": 8}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(connector): [ARCHIPEL] Change connector fields that are currently implemented as required in the code to optional … implemented as required in the code to optional ## Type of Change <!-- Put an `x` in the boxes that apply --> - [X] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Change connector fields that are currently implemented as required in the code to optional - billing address and card holder name are optional 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` 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)? --> ### After Changes make /payments without optional field billing.address `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" } } }'` <img width="1066" alt="Screenshot 2025-06-13 at 3 28 27 PM" src="https://github.com/user-attachments/assets/bdfd344c-60ee-411c-9c45-d8add742381b" /> ### Before Changes make /payments without optional field billing.address <img width="1066" alt="Screenshot 2025-06-13 at 3 32 54 PM" src="https://github.com/user-attachments/assets/6121dc6d-3dc3-41c0-a478-53e266f252cf" /> ## Checklist <!-- Put 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:** - Implement new functions (3 changes) - Extend existing types with new fields (6 changes) **Detailed Identifier Changes:** Commit cfd0b079: Files to modify: **crates/hyperswitch_connectors/src/connectors/archipel/transformers.rs** Add: - function: private::from
{"pr_number": 8342, "pr_title": "fix(connector): [ARCHIPEL] Change connector fields that are currently implemented as required in the code to optional", "merged_at": "2025-06-13T13:01:53Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "user", "connector"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/archipel/transformers.rs"]}, "change_types": {"functions_added": 3, "fields_added": 6}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat: introduce a framework to fetch configs from superposition ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Adding Superposition as an independent module in External Services to abstract the complexity of integrating it with the core application. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> Updating the config fetch logic from db to superposition may introduce complexity and the need for developers to have context about superposition. This implementation abstracts the complexity and exposes generic methods to fetch configs from superposition. ## How did you test 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. Run `cargo run --features superposition --bin router -- -f ./config/docker_compose.toml` 2. Set `requires_cvv=true` in `superposition` dashboard: <img width="918" height="260" alt="Screenshot 2025-09-09 at 5 01 58 PM" src="https://github.com/user-attachments/assets/8970174b-5a68-4f62-b344-94bc0518cc54" /> 3. Verify if the saved cards are listed in the `checkout page`: <img width="1728" height="1117" alt="Screenshot 2025-09-09 at 5 02 22 PM" src="https://github.com/user-attachments/assets/02845fef-13b2-462d-9dcd-fa28bcfa6baf" /> 4. Change the value in superposition dashboard to `requires_cvv=false`: <img width="880" height="261" alt="Screenshot 2025-09-09 at 5 02 49 PM" src="https://github.com/user-attachments/assets/5264f806-28ff-4ddc-8d84-61acf134d786" /> 5. Verify no saved cards are listed in the `checkout page`: <img width="1728" height="1117" alt="Screenshot 2025-09-09 at 5 02 59 PM" src="https://github.com/user-attachments/assets/2062bbac-12ec-4057-a4ec-4dfc7b280a82" /> ## Checklist <!-- Put 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.rs` - `crates/router/src/core/configs.rs` - `crates/router/src/core/payment_methods/cards.rs` **2. Type Definitions** - `crates/external_services/src/superposition/types.rs` **3. Configuration Files** - `config/config.example.toml` - `config/deployments/env_specific.toml` - `config/development.toml` - ... and 6 more files **4. Other** - `Cargo.lock` - `crates/external_services/src/lib.rs` - `crates/external_services/src/superposition.rs` - ... and 2 more files **Code Patterns Applied:** - Define new data structures (4 changes) - Implement new functions (19 changes) - Extend existing types with new fields (76 changes) - Add conditional logic for feature flags or filtering (1 changes) **Detailed Identifier Changes:** Commit acc1568b: Files to modify: **crates/external_services/src/lib.rs** Remove: - mod: pub::email - mod: pub::hashicorp_vault - mod: pub::no_encryption - mod: pub::crm Add: - mod: pub::crm - mod: pub::email - mod: pub::hashicorp_vault - mod: pub::no_encryption - mod: pub::superposition **crates/external_services/src/superposition.rs** Add: - function: private::convert_open_feature_value - function: pub::new - function: private::build_evaluation_context - function: pub::get_bool_value - function: pub::get_string_value - function: pub::get_int_value - function: pub::get_float_value - function: pub::get_object_value - struct: pub::SuperpositionClient - impl: impl SuperpositionClient - mod: pub::types **crates/external_services/src/superposition/types.rs** Add: - function: pub::into_inner - function: private::try_from - function: private::default - function: pub::validate - function: pub::new - function: pub::with - function: private::convert_to_raw_secret - struct: pub::JsonValue - struct: pub::SuperpositionClientConfig - struct: pub::ConfigContext - enum: pub::SuperpositionError - impl: impl JsonValue - impl: impl TryFrom<open_feature::StructValue> for JsonValue - impl: impl Default for SuperpositionClientConfig - impl: impl SuperpositionClientConfig - impl: impl ConfigContext - impl: impl hyperswitch_interfaces::secrets_interface::secret_handler::SecretsHandler for SuperpositionClientConfig **crates/router/src/configs/secrets_transformers.rs** Modify existing code **crates/router/src/configs/settings.rs** Modify existing code **crates/router/src/consts.rs** Add: - mod: pub::superposition **crates/router/src/core.rs** Remove: - mod: pub::debit_routing - mod: pub::profile_acquirer - mod: pub::unified_authentication_service - mod: pub::unified_connector_service - mod: pub::proxy - mod: pub::relay - mod: pub::revenue_recovery - mod: pub::chat - mod: pub::revenue_recovery_data_backfill - mod: pub::tokenization Add: - mod: pub::chat - mod: pub::debit_routing - mod: pub::profile_acquirer - mod: pub::proxy - mod: pub::relay - mod: pub::revenue_recovery - mod: pub::revenue_recovery_data_backfill - mod: pub::tokenization - mod: pub::unified_authentication_service - mod: pub::unified_connector_service **crates/router/src/core/configs.rs** Add: - function: pub::get_config_bool - function: pub::get_config_string - function: pub::get_config_int - function: pub::get_config_float - function: pub::get_config_object **crates/router/src/core/payment_methods/cards.rs** Modify existing code **crates/router/src/routes/app.rs** Modify existing code
{"pr_number": 9289, "pr_title": "feat: introduce a framework to fetch configs from superposition", "merged_at": "2025-10-09T11:05:38Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user", "card"]}, "hierarchy": {"core_business": ["crates/router/src/core.rs", "crates/router/src/core/configs.rs", "crates/router/src/core/payment_methods/cards.rs"], "types": ["crates/external_services/src/superposition/types.rs"], "config": ["config/config.example.toml", "config/deployments/env_specific.toml", "config/development.toml", "config/docker_compose.toml", "crates/external_services/Cargo.toml", "crates/router/Cargo.toml", "crates/router/src/configs/secrets_transformers.rs", "crates/router/src/configs/settings.rs", "docker-compose-development.yml"], "other": ["Cargo.lock", "crates/external_services/src/lib.rs", "crates/external_services/src/superposition.rs", "crates/router/src/consts.rs", "crates/router/src/routes/app.rs"]}, "change_types": {"structs_added": 4, "functions_added": 19, "enums_added": 1, "fields_added": 76, "imports_added": 9, "conditionals_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
chore(connector): [Fiuu] log keys in the PSync response (cherry picked from commit c044ffff0c47ee5d3ef5f905c3f590fae4ac9a24) ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Hotfix for https://github.com/juspay/hyperswitch/pull/7189 ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context This helps in debugging PSync deserialization errors for Fiuu for DuitNow payment method. ## How did you test it? As mentioned in https://github.com/juspay/hyperswitch/pull/7189 ## Checklist <!-- Put 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` **Code Patterns Applied:** - Implement new functions (2 changes) - Add conditional logic for feature flags or filtering (2 changes) **Detailed Identifier Changes:** Commit d1718ef0: Files to modify: **crates/hyperswitch_connectors/src/connectors/fiuu.rs** Add: - function: pub::parse_and_log_keys_in_url_encoded_response
{"pr_number": 7239, "pr_title": "chore(connector): [Fiuu] log keys in the PSync response", "merged_at": "2025-02-12T06:26:43Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/fiuu.rs"]}, "change_types": {"functions_added": 2, "imports_added": 1, "conditionals_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): [Tesouro] Add template code ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Template for Tesouro integration ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. 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 12 more files **3. Tests** - `config/deployments/integration_test.toml` - `loadtest/config/development.toml` **4. Configuration Files** - `config/config.example.toml` - `config/deployments/production.toml` - `config/deployments/sandbox.toml` - ... and 2 more files **Code Patterns Applied:** - Define new data structures (10 changes) - Implement new functions (83 changes) - Extend existing types with new fields (165 changes) **Detailed Identifier Changes:** Commit 239b6d37: Files to modify: **crates/connector_configs/src/connector.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors.rs** Add: - mod: pub::tesouro **crates/hyperswitch_connectors/src/connectors/tesouro.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::Tesouro - impl: impl Tesouro - impl: impl api::Payment for Tesouro - impl: impl api::PaymentSession for Tesouro - impl: impl api::ConnectorAccessToken for Tesouro - impl: impl api::MandateSetup for Tesouro - impl: impl api::PaymentAuthorize for Tesouro - impl: impl api::PaymentSync for Tesouro - impl: impl api::PaymentCapture for Tesouro - impl: impl api::PaymentVoid for Tesouro - impl: impl api::Refund for Tesouro - impl: impl api::RefundExecute for Tesouro - impl: impl api::RefundSync for Tesouro - impl: impl api::PaymentToken for Tesouro - impl: impl ConnectorIntegration<PaymentMethodToken, PaymentMethodTokenizationData, PaymentsResponseData> for Tesouro - impl: impl ConnectorCommonExt<Flow, Request, Response> for Tesouro - impl: impl ConnectorCommon for Tesouro - impl: impl ConnectorValidation for Tesouro - impl: impl ConnectorIntegration<Session, PaymentsSessionData, PaymentsResponseData> for Tesouro - impl: impl ConnectorIntegration<AccessTokenAuth, AccessTokenRequestData, AccessToken> for Tesouro - impl: impl ConnectorIntegration<SetupMandate, SetupMandateRequestData, PaymentsResponseData> for Tesouro - impl: impl ConnectorIntegration<Authorize, PaymentsAuthorizeData, PaymentsResponseData> for Tesouro - impl: impl ConnectorIntegration<PSync, PaymentsSyncData, PaymentsResponseData> for Tesouro - impl: impl ConnectorIntegration<Capture, PaymentsCaptureData, PaymentsResponseData> for Tesouro - impl: impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Tesouro - impl: impl ConnectorIntegration<Execute, RefundsData, RefundsResponseData> for Tesouro - impl: impl ConnectorIntegration<RSync, RefundsData, RefundsResponseData> for Tesouro - impl: impl webhooks::IncomingWebhook for Tesouro - impl: impl ConnectorSpecifications for Tesouro - mod: pub::transformers **crates/hyperswitch_connectors/src/connectors/tesouro/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::TesouroRouterData - struct: pub::TesouroPaymentsRequest - struct: pub::TesouroCard - struct: pub::TesouroAuthType - struct: pub::TesouroPaymentsResponse - struct: pub::TesouroRefundRequest - struct: pub::RefundResponse - struct: pub::TesouroErrorResponse - enum: pub::TesouroPaymentStatus - enum: pub::RefundStatus - impl: impl From<(FloatMajorUnit, T)> for TesouroRouterData<T> - impl: impl TryFrom<&TesouroRouterData<&PaymentsAuthorizeRouterData>> for TesouroPaymentsRequest - impl: impl TryFrom<&ConnectorAuthType> for TesouroAuthType - impl: impl From<TesouroPaymentStatus> for common_enums::AttemptStatus - impl: impl TryFrom<ResponseRouterData<F, TesouroPaymentsResponse, T, PaymentsResponseData>> for RouterData<F, T, PaymentsResponseData> - impl: impl TryFrom<&TesouroRouterData<&RefundsRouterData<F>>> for TesouroRefundRequest - impl: impl From<RefundStatus> for enums::RefundStatus - impl: impl TryFrom<RefundsResponseRouterData<Execute, RefundResponse>> for RefundsRouterData<Execute> - impl: impl TryFrom<RefundsResponseRouterData<RSync, RefundResponse>> for RefundsRouterData<RSync> **crates/hyperswitch_connectors/src/default_implementations.rs** Modify existing code **crates/hyperswitch_connectors/src/default_implementations_v2.rs** Modify existing code **crates/hyperswitch_domain_models/src/connector_endpoints.rs** Modify existing code **crates/router/src/connector.rs** Modify existing code **crates/router/tests/connectors/main.rs** Add: - mod: private::tesouro **crates/router/tests/connectors/tesouro.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::TesouroTest - impl: impl ConnectorActions for TesouroTest - impl: impl utils::Connector for TesouroTest **crates/test_utils/src/connector_auth.rs** Modify existing code
{"pr_number": 9555, "pr_title": "feat(connector): [Tesouro] Add template code", "merged_at": "2025-09-25T18:03:31Z", "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/tesouro.rs", "crates/hyperswitch_connectors/src/connectors/tesouro/transformers.rs", "crates/hyperswitch_connectors/src/default_implementations.rs", "crates/hyperswitch_connectors/src/default_implementations_v2.rs", "crates/router/src/connector.rs", "crates/router/tests/connectors/main.rs", "crates/router/tests/connectors/sample_auth.toml", "crates/router/tests/connectors/tesouro.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": 165, "imports_added": 22}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(refunds): Add refunds diesel model support in V2 API ## 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 is a part of v2 implementation of refunds. This PR contains the necessary database schema refactoring as well as handling this in the storage_impl crate. ### 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). --> Merging this PR would add db support for refunds in 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)? --> Cannot be tested because the core flow is not implemented for the refunds in V2 APIs, will be taking that in upcoming PRs. ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Database Layer (Queries & Schema)** - `crates/diesel_models/Cargo.toml` - `crates/diesel_models/src/kv.rs` - `crates/diesel_models/src/query/refund.rs` - ... and 3 more files **2. Type Definitions** - `crates/router/src/types/storage/refund.rs` **3. Configuration Files** - `crates/router/Cargo.toml` - `crates/storage_impl/Cargo.toml` **4. Other** - `crates/router/src/db/kafka_store.rs` - `crates/router/src/db/refund.rs` - `crates/router/src/services/kafka/refund.rs` - ... and 12 more files **Code Patterns Applied:** - Define new data structures (5 changes) - Implement new functions (26 changes) - Extend existing types with new fields (326 changes) - Modify database queries (1 changes) **Detailed Identifier Changes:** Commit bc8b9409: Files to modify: **crates/diesel_models/src/kv.rs** Modify existing code **crates/diesel_models/src/query/refund.rs** Add: - function: pub::update_with_id - function: pub::find_by_global_id - impl: impl Refund **crates/diesel_models/src/query/user/sample_data.rs** Modify existing code **crates/diesel_models/src/refund.rs** Add: - function: pub::create_refund - function: private::from - function: pub::apply_changeset - function: private::get_api_event_type - struct: pub::Refund - struct: pub::RefundNew - struct: pub::RefundUpdateInternal - enum: pub::RefundUpdate - impl: impl RefundUpdateInternal - impl: impl From<RefundUpdate> for RefundUpdateInternal - impl: impl RefundUpdate - impl: impl common_utils::events::ApiEventMetric for Refund **crates/diesel_models/src/schema_v2.rs** Modify existing code **crates/router/src/db/kafka_store.rs** Add: - function: private::find_refund_by_id **crates/router/src/db/refund.rs** Add: - function: private::insert_refund - function: private::update_refund - function: private::find_refund_by_id - function: private::insert_refund - function: private::update_refund - function: private::find_refund_by_id **crates/router/src/services/kafka/refund.rs** Add: - function: pub::from_storage - function: private::event_type - function: private::key - struct: pub::KafkaRefund - impl: impl KafkaRefund<'a> **crates/router/src/services/kafka/refund_event.rs** Add: - function: pub::from_storage - function: private::event_type - function: private::key - struct: pub::KafkaRefundEvent - impl: impl KafkaRefundEvent<'a> **crates/router/src/types/storage/refund.rs** Modify existing code **crates/storage_impl/src/lib.rs** Add: - function: private::unique_constraints - function: private::table_name - impl: impl UniqueConstraints for diesel_models::Refund
{"pr_number": 7503, "pr_title": "feat(refunds): Add refunds diesel model support in V2 API", "merged_at": "2025-03-24T11:16:20Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["refund"]}, "hierarchy": {"database": ["crates/diesel_models/Cargo.toml", "crates/diesel_models/src/kv.rs", "crates/diesel_models/src/query/refund.rs", "crates/diesel_models/src/query/user/sample_data.rs", "crates/diesel_models/src/refund.rs", "crates/diesel_models/src/schema_v2.rs"], "types": ["crates/router/src/types/storage/refund.rs"], "config": ["crates/router/Cargo.toml", "crates/storage_impl/Cargo.toml"], "other": ["crates/router/src/db/kafka_store.rs", "crates/router/src/db/refund.rs", "crates/router/src/services/kafka/refund.rs", "crates/router/src/services/kafka/refund_event.rs", "crates/storage_impl/src/lib.rs", "v2_compatible_migrations/2024-08-28-081721_add_v2_columns/down.sql", "v2_compatible_migrations/2024-08-28-081721_add_v2_columns/up.sql", "v2_compatible_migrations/2024-08-28-081757_drop_not_null_constraints_on_v1_columns/down.sql", "v2_compatible_migrations/2024-08-28-081757_drop_not_null_constraints_on_v1_columns/up.sql", "v2_migrations/2024-08-28-081839_add_not_null_constraints_to_v2_columns/down.sql", "v2_migrations/2024-08-28-081839_add_not_null_constraints_to_v2_columns/up.sql", "v2_migrations/2024-08-28-081838_update_v2_primary_key_constraints/down.sql", "v2_migrations/2024-08-28-081838_update_v2_primary_key_constraints/up.sql", "v2_migrations/2025-01-13-081847_drop_v1_columns/down.sql", "v2_migrations/2025-01-13-081847_drop_v1_columns/up.sql"]}, "change_types": {"structs_added": 5, "functions_added": 26, "enums_added": 1, "fields_added": 326, "imports_added": 7, "database_queries": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): Fix Serde derserialization issue -Elavon/Adyen ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Fix Serde derserialization issue -Elavon/Adyen updated Serde lib was showing some errors ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> New Serde update disallows same rename value for multiple fields during deserialization. ## How did you test 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="746" alt="Screenshot 2025-04-21 at 12 25 53 AM" src="https://github.com/user-attachments/assets/6c01a837-af24-4609-8fe0-37d89b7b5dfe" /> adyen test cases <img width="893" alt="Screenshot 2025-04-28 at 11 29 44 AM" src="https://github.com/user-attachments/assets/bddd2e95-18f1-4322-9456-7b8366cca5cd" /> iDeal Bank Redirect is failing (on main branch too) <img width="639" alt="Screenshot 2025-04-28 at 11 30 50 AM" src="https://github.com/user-attachments/assets/485081e7-cb82-4fc6-bfe7-92a044b394e6" /> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs` - `crates/hyperswitch_connectors/src/connectors/elavon.rs` - `crates/hyperswitch_connectors/src/connectors/elavon/transformers.rs` **2. Tests** - `cypress-tests/cypress/e2e/configs/Payment/Elavon.js` **Code Patterns Applied:** - Define new data structures (2 changes) - Implement new functions (4 changes) - Extend existing types with new fields (90 changes) - Add conditional logic for feature flags or filtering (2 changes) **Detailed Identifier Changes:** Commit 78892257: Files to modify: **crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/elavon.rs** Remove: - impl: impl ConnectorValidation for Elavon Add: - function: private::validate_mandate_payment - impl: impl ConnectorValidation for Elavon **crates/hyperswitch_connectors/src/connectors/elavon/transformers.rs** Remove: - enum: pub::ElavonPaymentsResponse Add: - function: private::deserialize - struct: pub::ElavonPaymentsResponse - struct: private::XmlResponse - enum: pub::ElavonResult
{"pr_number": 7823, "pr_title": "feat(connector): Fix Serde derserialization issue -Elavon/Adyen", "merged_at": "2025-05-05T10:49:22Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs", "crates/hyperswitch_connectors/src/connectors/elavon.rs", "crates/hyperswitch_connectors/src/connectors/elavon/transformers.rs"], "tests": ["cypress-tests/cypress/e2e/configs/Payment/Elavon.js"]}, "change_types": {"structs_added": 2, "functions_added": 4, "enums_added": 1, "fields_added": 90, "imports_added": 3, "conditionals_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): [Paysafe] Implement card 3ds flow ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Implement card 3ds flow for Paysafe ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with 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 card 3ds payment for paysafe ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: _' \ --data '{ "amount": 1500, "currency": "USD", "confirm": true, "capture_method": "automatic", "customer_id": "aaaa", "payment_method": "card", "payment_method_type": "credit", "profile_id": "pro_ndJetHbOnmgPs4ed6FLr", "authentication_type" : "three_ds", "payment_method_data": { "card": { "card_number": "4000000000001091", "card_exp_month": "10", "card_exp_year": "25", "card_holder_name": "Joseph", "card_cvc": "111" } }, "billing": { "address": { "line1": "Singapore Changi Airport. 2nd flr", "line2": "", "line3": "", "city": "Downtown Core", "state": "Central Indiana America", "zip": "039393", "country": "SG", "first_name": "박성준", "last_name": "박성준" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "shipping": { "address": { "line1": "Singapore Changi Airport. 2nd flr", "line2": "", "line3": "", "city": "Downtown Core", "state": "Central Indiana America", "zip": "039393", "country": "SG", "first_name": "박성준", "last_name": "박성준" }, "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": "127.0.0.1" } }' ``` Response ``` { "payment_id": "pay_UZEf5nPy4rjBtygB8Wm1", "merchant_id": "merchant_1757407144", "status": "requires_customer_action", "amount": 1500, "net_amount": 1500, "shipping_cost": null, "amount_capturable": 1500, "amount_received": null, "connector": "paysafe", "client_secret": "pay_UZEf5nPy4rjBtygB8Wm1_secret_mMQoKXN8QCHYDAl0fYKQ", "created": "2025-09-09T09:23:44.962Z", "currency": "USD", "customer_id": "aaaa", "customer": { "id": "aaaa", "name": null, "email": null, "phone": null, "phone_country_code": null }, "description": null, "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "1091", "card_type": "CREDIT", "card_network": "Visa", "card_issuer": "INTL HDQTRS-CENTER OWNED", "card_issuing_country": "UNITEDSTATES", "card_isin": "400000", "card_extended_bin": null, "card_exp_month": "10", "card_exp_year": "25", "card_holder_name": "Joseph", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": { "address": { "city": "Downtown Core", "country": "SG", "line1": "Singapore Changi Airport. 2nd flr", "line2": "", "line3": "", "zip": "039393", "state": "Central Indiana America", "first_name": "박성준", "last_name": "박성준", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "billing": { "address": { "city": "Downtown Core", "country": "SG", "line1": "Singapore Changi Airport. 2nd flr", "line2": "", "line3": "", "zip": "039393", "state": "Central Indiana America", "first_name": "박성준", "last_name": "박성준", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "order_details": null, "email": null, "name": null, "phone": null, "return_url": null, "authentication_type": "three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": { "type": "redirect_to_url", "redirect_to_url": "http://localhost:8080/payments/redirect/pay_UZEf5nPy4rjBtygB8Wm1/merchant_1757407144/pay_UZEf5nPy4rjBtygB8Wm1_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": "aaaa", "created_at": 1757409824, "expires": 1757413424, "secret": "epk_e1f53385eb104247b6d2a830b38696de" }, "manual_retry_allowed": null, "connector_transaction_id": null, "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": { "redirect_response": null, "search_tags": null, "apple_pay_recurring_details": null, "gateway_system": "direct" }, "reference_id": null, "payment_link": null, "profile_id": "pro_ndJetHbOnmgPs4ed6FLr", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_uXktUCjj5V9CBf3x48Pz", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-09T09:38:44.962Z", "fingerprint": null, "browser_info": { "language": "nl-NL", "time_zone": 0, "ip_address": "127.0.0.1", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "color_depth": 24, "java_enabled": true, "screen_width": 1536, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 723, "java_script_enabled": true }, "payment_channel": null, "payment_method_id": null, "network_transaction_id": null, "payment_method_status": null, "updated": "2025-09-09T09:23:46.684Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null, "enable_partial_authorization": null } ``` complete the payment using redirection 2. sync payment ``` curl --location 'http://localhost:8080/payments/pay_UZEf5nPy4rjBtygB8Wm1?force_sync=true' \ --header 'Accept: application/json' \ --header 'api-key: dev_tFbrAdIUEDW40STTsNQNk5dFxYgRoZPtPW7GtKCP7tbSapty2u1UuDBxl4zkLCxf' ``` Response ``` { "payment_id": "pay_UZEf5nPy4rjBtygB8Wm1", "merchant_id": "merchant_1757407144", "status": "succeeded", "amount": 1500, "net_amount": 1500, "shipping_cost": null, "amount_capturable": 0, "amount_received": 1500, "connector": "paysafe", "client_secret": "pay_UZEf5nPy4rjBtygB8Wm1_secret_mMQoKXN8QCHYDAl0fYKQ", "created": "2025-09-09T09:23:44.962Z", "currency": "USD", "customer_id": "aaaa", "customer": { "id": "aaaa", "name": null, "email": null, "phone": null, "phone_country_code": null }, "description": null, "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "1091", "card_type": "CREDIT", "card_network": "Visa", "card_issuer": "INTL HDQTRS-CENTER OWNED", "card_issuing_country": "UNITEDSTATES", "card_isin": "400000", "card_extended_bin": null, "card_exp_month": "10", "card_exp_year": "25", "card_holder_name": "Joseph", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": { "address": { "city": "Downtown Core", "country": "SG", "line1": "Singapore Changi Airport. 2nd flr", "line2": "", "line3": "", "zip": "039393", "state": "Central Indiana America", "first_name": "박성준", "last_name": "박성준", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "billing": { "address": { "city": "Downtown Core", "country": "SG", "line1": "Singapore Changi Airport. 2nd flr", "line2": "", "line3": "", "zip": "039393", "state": "Central Indiana America", "first_name": "박성준", "last_name": "박성준", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "order_details": null, "email": null, "name": null, "phone": null, "return_url": null, "authentication_type": "three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "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": "3dbc45d1-878b-446c-8b97-3d299aa3effc", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": { "redirect_response": null, "search_tags": null, "apple_pay_recurring_details": null, "gateway_system": "direct" }, "reference_id": null, "payment_link": null, "profile_id": "pro_ndJetHbOnmgPs4ed6FLr", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_uXktUCjj5V9CBf3x48Pz", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-09T09:38:44.962Z", "fingerprint": null, "browser_info": { "language": "nl-NL", "time_zone": 0, "ip_address": "127.0.0.1", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "color_depth": 24, "java_enabled": true, "screen_width": 1536, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 723, "java_script_enabled": true }, "payment_channel": null, "payment_method_id": null, "network_transaction_id": null, "payment_method_status": null, "updated": "2025-09-09T09:25:27.509Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null, "enable_partial_authorization": null } ``` cypress <img width="1131" height="846" alt="Screenshot 2025-09-11 at 6 33 31 PM" src="https://github.com/user-attachments/assets/6e7669a6-6af3-4362-9afe-8cc8f832fd15" /> <img width="1201" height="813" alt="Screenshot 2025-09-11 at 6 33 59 PM" src="https://github.com/user-attachments/assets/3429e33b-6fbf-41a0-bb70-3de0add2f46c" /> After redirection i m using ngrok as , connector only allows https redirection. ## Checklist <!-- Put 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/paysafe.rs` - `crates/hyperswitch_connectors/src/connectors/paysafe/transformers.rs` - `crates/hyperswitch_connectors/src/default_implementations.rs` - ... and 1 more files **2. Tests** - `cypress-tests/cypress/e2e/configs/Payment/Paysafe.js` - `cypress-tests/cypress/support/redirectionHandler.js` **Code Patterns Applied:** - Define new data structures (6 changes) - Implement new functions (16 changes) - Extend existing types with new fields (110 changes) - Add conditional logic for feature flags or filtering (1 changes) **Detailed Identifier Changes:** Commit a87ab733: Files to modify: **crates/hyperswitch_connectors/src/connectors/paysafe.rs** Add: - 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 - impl: impl api::PaymentsCompleteAuthorize for Paysafe **crates/hyperswitch_connectors/src/connectors/paysafe/transformers.rs** Add: - struct: pub::PaysafePaymentMethodDetails - struct: pub::CardAccountId - enum: pub::DeviceChannel - enum: pub::ThreeDsMessageCategory - enum: pub::ThreeDsAuthenticationPurpose - enum: pub::ThreeDsChallengePreference **crates/hyperswitch_connectors/src/default_implementations.rs** Modify existing code **crates/hyperswitch_connectors/src/utils.rs** Add: - function: private::get_optional_connector_transaction_id
{"pr_number": 9305, "pr_title": "feat(connector): [Paysafe] Implement card 3ds flow", "merged_at": "2025-09-11T15:53:05Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/paysafe.rs", "crates/hyperswitch_connectors/src/connectors/paysafe/transformers.rs", "crates/hyperswitch_connectors/src/default_implementations.rs", "crates/hyperswitch_connectors/src/utils.rs"], "tests": ["cypress-tests/cypress/e2e/configs/Payment/Paysafe.js", "cypress-tests/cypress/support/redirectionHandler.js"]}, "change_types": {"structs_added": 6, "functions_added": 16, "enums_added": 6, "fields_added": 110, "imports_added": 3, "conditionals_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(core): add referer field to browser_info ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This PR adds a referer field to the BrowserInformation struct to capture the HTTP Referer header value from client requests. ### 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)? --> Enable UCS ``` curl --location 'http://localhost:8080/v2/configs/' \ --header 'Authorization: admin-api-key=test_admin' \ --header 'x-tenant-id: public' \ --header 'Content-Type: application/json' \ --data '{ "key": "ucs_rollout_config_cloth_seller_Zoo9KadtslxR8ICC7dB6_razorpay_upi_Authorize", "value": "1.0" }' ``` Create payment ``` curl --location 'http://localhost:8080/v2/payments' \ --header 'Content-Type: application/json' \ --header 'x-profile-id: pro_zjXchnTKtjXfUfQ9FJEL' \ --header 'X-Merchant-Id: cloth_seller_Zoo9KadtslxR8ICC7dB6' \ --header 'x-tenant-id: public' \ --data-raw '{ "amount_details": { "order_amount": 100, "currency": "INR" }, "merchant_connector_details": { "connector_name": "razorpay", "merchant_connector_creds": { "auth_type": "BodyKey", "api_key": "_", "key1": "_" } }, "return_url": "https://api-ns2.juspay.in/v2/pay/response/irctc", "merchant_reference_id": "razorpayirctc1758535732", "capture_method":"automatic", "payment_method_data": { "upi": { "upi_collect": { "vpa_id": "success@razorpay" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "IN", "first_name": "Swangi", "last_name": "Kumari" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "swangi.kumari@juspay.in" } }, "browser_info": { "user_agent": "Dalvik/2.1.0", "referer": "abcd.com", "ip_address": "157.51.3.204" }, "payment_method_subtype": "upi_collect", "payment_method_type": "upi", "return_raw_connector_response": true }' ``` Verify UCS call to connector <img width="1286" height="196" alt="image" src="https://github.com/user-attachments/assets/97c7a7ad-7a6d-4a89-8b99-ba3dc52c2eff" /> ## Checklist <!-- Put 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. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/router_request_types.rs` **2. Core Business Logic** - `crates/router/src/core/unified_connector_service/transformers.rs` **3. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/trustpay/transformers.rs` - `crates/router/tests/connectors/trustpay.rs` - `crates/router/tests/connectors/utils.rs` **4. Type Definitions** - `crates/common_utils/src/types.rs` **5. Utils** - `crates/router/src/routes/payments/helpers.rs` **6. Configuration Files** - `crates/external_services/Cargo.toml` - `crates/router/Cargo.toml` **7. Other** - `Cargo.lock` - `api-reference/v2/openapi_spec_v2.json` - `crates/router/src/services/api.rs` **Code Patterns Applied:** - Extend existing types with new fields (13 changes) **Detailed Identifier Changes:** Commit 46d483d8: Files to modify: **crates/common_utils/src/types.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/trustpay/transformers.rs** Modify existing code **crates/hyperswitch_domain_models/src/router_request_types.rs** Modify existing code **crates/router/src/core/unified_connector_service/transformers.rs** Modify existing code **crates/router/src/routes/payments/helpers.rs** Modify existing code **crates/router/src/services/api.rs** Modify existing code **crates/router/tests/connectors/trustpay.rs** Modify existing code **crates/router/tests/connectors/utils.rs** Modify existing code
{"pr_number": 9474, "pr_title": "feat(core): add referer field to browser_info", "merged_at": "2025-09-24T16:51:54Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "merchant", "user"]}, "hierarchy": {"domain": ["crates/hyperswitch_domain_models/src/router_request_types.rs"], "core_business": ["crates/router/src/core/unified_connector_service/transformers.rs"], "connectors": ["crates/hyperswitch_connectors/src/connectors/trustpay/transformers.rs", "crates/router/tests/connectors/trustpay.rs", "crates/router/tests/connectors/utils.rs"], "types": ["crates/common_utils/src/types.rs"], "utils": ["crates/router/src/routes/payments/helpers.rs"], "config": ["crates/external_services/Cargo.toml", "crates/router/Cargo.toml"], "other": ["Cargo.lock", "api-reference/v2/openapi_spec_v2.json", "crates/router/src/services/api.rs"]}, "change_types": {"fields_added": 13}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(payout): use billing address in payment_methods ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Hotfix for https://github.com/juspay/hyperswitch/pull/9277 ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Core Business Logic** - `crates/router/src/core/payments/routing.rs` - `crates/router/src/core/payouts.rs` - `crates/router/src/core/payouts/helpers.rs` - ... and 1 more files **Code Patterns Applied:** - Implement new functions (1 changes) - Extend existing types with new fields (9 changes) **Detailed Identifier Changes:** Commit 308760dd: Files to modify: **crates/router/src/core/payments/routing.rs** Modify existing code **crates/router/src/core/payouts.rs** Modify existing code **crates/router/src/core/payouts/helpers.rs** Add: - function: pub::resolve_billing_address_for_payout **crates/router/src/core/utils.rs** Modify existing code
{"pr_number": 9311, "pr_title": "fix(payout): use billing address in payment_methods", "merged_at": "2025-09-09T11:27:30Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"core_business": ["crates/router/src/core/payments/routing.rs", "crates/router/src/core/payouts.rs", "crates/router/src/core/payouts/helpers.rs", "crates/router/src/core/utils.rs"]}, "change_types": {"functions_added": 1, "fields_added": 9, "imports_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(core): Fix net_amount on Incremental Authorization Update ## 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/9072) ## Description <!-- Describe your changes in detail --> Fixed net_amount on Incremental Authorization Update. Additional amount gets added again during incremental authorization. Additional amount should get added once only during payments-create call ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with 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 Call (with Shipping Cost): Request: ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_LrNckNcOPFASn7VpEoEhyyiRB48cyo9t1csS7YCdWl3jXZgegV7BLdyIZi0ZrS6Z' \ --data-raw ' { "amount": 6500, "shipping_cost": 100, "currency": "USD", "confirm": true, "capture_method": "manual", "capture_on": "2022-09-10T10:11:12Z", "customer_id": "StripeCustomer", "email": "abcdef123@gmail.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment request", "authentication_type": "no_three_ds", "return_url": "https://duck.com", "billing": { "address": { "first_name": "John", "last_name": "Doe", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US" } }, "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4242424242424242", "card_exp_month": "03", "card_exp_year": "2030", "card_holder_name": "joseph Doe", "card_cvc": "737" } }, "browser_info": { "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "language": "nl-NL", "color_depth": 24, "screen_height": 723, "screen_width": 1536, "time_zone": 0, "java_enabled": true, "java_script_enabled": true, "ip_address": "127.0.0.1" }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "John", "last_name": "Doe" } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2025-07-25T11:46:12Z" }, "request_incremental_authorization": true } ' ``` Response: ``` { "payment_id": "pay_upjMvDYu9WjajAzyRlXo", "merchant_id": "merchant_1756308166", "status": "requires_capture", "amount": 6500, "net_amount": 6600, "shipping_cost": 100, "amount_capturable": 6600, "amount_received": null, "connector": "stripe", "client_secret": "pay_upjMvDYu9WjajAzyRlXo_secret_1G2kKy9iAhTmwNQa5k93", "created": "2025-08-27T15:47:52.956Z", "currency": "USD", "customer_id": "StripeCustomer", "customer": { "id": "StripeCustomer", "name": "John Doe", "email": "abcdef123@gmail.com", "phone": "999999999", "phone_country_code": "+65" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "manual", "payment_method": "card", "payment_method_data": { "card": { "last4": "4242", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "424242", "card_extended_bin": null, "card_exp_month": "03", "card_exp_year": "2030", "card_holder_name": "joseph Doe", "payment_checks": { "cvc_check": "pass", "address_line1_check": "pass", "address_postal_code_check": "pass" }, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "John", "last_name": "Doe", "origin_zip": null }, "phone": null, "email": null }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "John", "last_name": "Doe", "origin_zip": null }, "phone": null, "email": null }, "order_details": null, "email": "abcdef123@gmail.com", "name": "John Doe", "phone": "999999999", "return_url": "https://duck.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "StripeCustomer", "created_at": 1756309672, "expires": 1756313272, "secret": "epk_4f4fb7f0092d42289f9cd9bc7eadeff2" }, "manual_retry_allowed": false, "connector_transaction_id": "pi_3S0lZlE9cSvqiivY0lSuXawj", "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2025-07-25T11:46:12Z", "new_customer": "true" }, "connector_metadata": null, "feature_metadata": { "redirect_response": null, "search_tags": null, "apple_pay_recurring_details": null, "gateway_system": "direct" }, "reference_id": "pi_3S0lZlE9cSvqiivY0lSuXawj", "payment_link": null, "profile_id": "pro_fW5H3dRoivQsyI9e3xgm", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_bLPtb7IYMPK6HwBo25Sf", "incremental_authorization_allowed": true, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-08-27T16:02:52.956Z", "fingerprint": null, "browser_info": { "language": "nl-NL", "time_zone": 0, "ip_address": "127.0.0.1", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "color_depth": 24, "java_enabled": true, "screen_width": 1536, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 723, "java_script_enabled": true }, "payment_channel": null, "payment_method_id": null, "network_transaction_id": "561027010586901", "payment_method_status": null, "updated": "2025-08-27T15:47:53.993Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null, "enable_partial_authorization": null } ``` 2. Incremental Authorization Request: ``` curl --location 'http://localhost:8080/payments/pay_upjMvDYu9WjajAzyRlXo/incremental_authorization' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_LrNckNcOPFASn7VpEoEhyyiRB48cyo9t1csS7YCdWl3jXZgegV7BLdyIZi0ZrS6Z' \ --data '{ "amount": 6700 }' ``` Response: ``` { "payment_id": "pay_upjMvDYu9WjajAzyRlXo", "merchant_id": "merchant_1756308166", "status": "requires_capture", "amount": 6600, "net_amount": 6700, "shipping_cost": 100, "amount_capturable": 6700, "amount_received": null, "connector": "stripe", "client_secret": "pay_upjMvDYu9WjajAzyRlXo_secret_wd5Y8MKQvldzNS07lJg9", "created": "2025-08-27T16:09:46.666Z", "currency": "USD", "customer_id": null, "customer": { "id": null, "name": "John Doe", "email": "abcdef123@gmail.com", "phone": "999999999", "phone_country_code": "+65" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "manual", "payment_method": "card", "payment_method_data": { "card": { "last4": "4242", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "424242", "card_extended_bin": null, "card_exp_month": "03", "card_exp_year": "2030", "card_holder_name": "joseph Doe", "payment_checks": { "cvc_check": "pass", "address_line1_check": "pass", "address_postal_code_check": "pass" }, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": null, "order_details": null, "email": null, "name": null, "phone": null, "return_url": "https://duck.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": null, "manual_retry_allowed": false, "connector_transaction_id": "pi_3S0luxE9cSvqiivY19yeqwRn", "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2025-07-25T11:46:12Z", "new_customer": "true" }, "connector_metadata": null, "feature_metadata": { "redirect_response": null, "search_tags": null, "apple_pay_recurring_details": null, "gateway_system": "direct" }, "reference_id": "pi_3S0luxE9cSvqiivY19yeqwRn", "payment_link": null, "profile_id": "pro_fW5H3dRoivQsyI9e3xgm", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_bLPtb7IYMPK6HwBo25Sf", "incremental_authorization_allowed": true, "authorization_count": 1, "incremental_authorizations": [ { "authorization_id": "auth_sz8ljqdlMKe2dckB5YzK_1", "amount": 6700, "status": "success", "error_code": null, "error_message": null, "previously_authorized_amount": 6600 } ], "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-08-27T16:24:46.666Z", "fingerprint": null, "browser_info": { "language": "nl-NL", "time_zone": 0, "ip_address": "127.0.0.1", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "color_depth": 24, "java_enabled": true, "screen_width": 1536, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 723, "java_script_enabled": true }, "payment_channel": null, "payment_method_id": null, "network_transaction_id": "561027010586901", "payment_method_status": null, "updated": "2025-08-27T16:09:50.595Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null, "enable_partial_authorization": null } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/payments/payment_attempt.rs` **2. Core Business Logic** - `crates/router/src/core/payments/operations/payment_response.rs` **Code Patterns Applied:** - Implement new functions (2 changes) - Extend existing types with new fields (1 changes) **Detailed Identifier Changes:** Commit 24beaa22: Files to modify: **crates/hyperswitch_domain_models/src/payments/payment_attempt.rs** Add: - function: pub::get_additional_amount **crates/router/src/core/payments/operations/payment_response.rs** Modify existing code
{"pr_number": 9073, "pr_title": "fix(core): Fix net_amount on Incremental Authorization Update", "merged_at": "2025-09-01T12:44:33Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"domain": ["crates/hyperswitch_domain_models/src/payments/payment_attempt.rs"], "core_business": ["crates/router/src/core/payments/operations/payment_response.rs"]}, "change_types": {"functions_added": 2, "fields_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}