prompt
stringlengths
83
247k
response
stringlengths
121
36.1k
metadata
stringlengths
314
42.3k
feat(auth): add new authentication to communicate between microservices ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [X] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This pull request introduces a new authentication mechanism for internal service communication using a shared API key, merchant ID, and profile ID. The changes add configuration options for this authentication method across all environment config files, update the core settings and secrets transformers to support it, and implement the logic for handling requests authenticated via these headers in the payments route and authentication service. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> Considering subscription as microservice, payment will be its dependant service, so for all the calls to payments service we need an authentication mechanism instead of using the actual merchant API key auth. so to achieve this we are adding a new authentication which will accept the merchant_id, profile_id and internal_api_key in the request headers and use it for authentication, API key auth/ Fallback auth will be used if one of the required parameter is missing the request. ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> 1. Create Merchant, API Key, Create Connector 2. Create a Payment with API key Request ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'x-feature: router-custom-dbd' \ --header 'api-key: dev_CLbdgP5Lj11ZF7RfJgM4ck8Qk8AK5yzhEgpPr7d0MmSWC7FvLaQAKKUSOfXBasRD' \ --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://google.com", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4242424242424242", "card_exp_month": "10", "card_exp_year": "25", "card_holder_name": "joseph Doe", "card_cvc": "123" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } }' ``` Response ``` {"payment_id":"pay_EsecigedwijD3sy0IdXz","merchant_id":"merchant_1758720430","status":"succeeded","amount":6540,"net_amount":6540,"shipping_cost":null,"amount_capturable":0,"amount_received":6540,"connector":"cybersource","client_secret":"pay_EsecigedwijD3sy0IdXz_secret_uzmcKlyyzyDvVfJfYav2","created":"2025-09-24T13:44:59.316Z","currency":"USD","customer_id":"StripeCustomer","customer":{"id":"StripeCustomer","name":"John Doe","email":"guest@example.com","phone":"999999999","phone_country_code":"+1"},"description":"Its my first payment request","refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":null,"off_session":null,"capture_on":null,"capture_method":"automatic","payment_method":"card","payment_method_data":{"card":{"last4":"4242","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"424242","card_extended_bin":null,"card_exp_month":"10","card_exp_year":"25","card_holder_name":"joseph Doe","payment_checks":{"avs_response":{"code":"Y","codeRaw":"Y"},"card_verification":{"resultCode":"M","resultCodeRaw":"M"}},"authentication_data":null},"billing":null},"payment_token":"token_qdq6SaWLktu6jk7HSVeB","shipping":{"address":{"city":"San Fransico","country":"US","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"California","first_name":"joseph","last_name":"Doe","origin_zip":null},"phone":{"number":"8056594427","country_code":"+91"},"email":null},"billing":{"address":{"city":"San Fransico","country":"US","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"California","first_name":"joseph","last_name":"Doe","origin_zip":null},"phone":{"number":"8056594427","country_code":"+91"},"email":null},"order_details":null,"email":"guest@example.com","name":"John Doe","phone":"999999999","return_url":"https://google.com/","authentication_type":"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":1758721499,"expires":1758725099,"secret":"epk_2ff5fccb274e4aaab7e8802e6c06e54c"},"manual_retry_allowed":null,"connector_transaction_id":"7587215004986946903814","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_EsecigedwijD3sy0IdXz_1","payment_link":null,"profile_id":"pro_W3ToWs6EezKDjps5wTlv","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_4rxNg9ZFdVITFBkrkyWO","incremental_authorization_allowed":false,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-09-24T13:59:59.316Z","fingerprint":null,"browser_info":null,"payment_channel":null,"payment_method_id":null,"network_transaction_id":"016153570198200","payment_method_status":null,"updated":"2025-09-24T13:45:01.180Z","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. Create a payment without API key and Internal API key Request ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'x-merchant-id: merchant_1758720430' \ --header 'x-profile-id: pro_W3ToWs6EezKDjps5wTlv' \ --header 'x-internal-api-key: test_internal_api_key' \ --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://google.com", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4242424242424242", "card_exp_month": "10", "card_exp_year": "25", "card_holder_name": "joseph Doe", "card_cvc": "123" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } }' ``` Response ``` {"payment_id":"pay_uBRYL3QTCWj5H21GbWTa","merchant_id":"merchant_1758720430","status":"succeeded","amount":6540,"net_amount":6540,"shipping_cost":null,"amount_capturable":0,"amount_received":6540,"connector":"cybersource","client_secret":"pay_uBRYL3QTCWj5H21GbWTa_secret_RM3Ch7Ux9P8QPFFxwM5p","created":"2025-09-24T13:46:37.902Z","currency":"USD","customer_id":"StripeCustomer","customer":{"id":"StripeCustomer","name":"John Doe","email":"guest@example.com","phone":"999999999","phone_country_code":"+1"},"description":"Its my first payment request","refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":null,"off_session":null,"capture_on":null,"capture_method":"automatic","payment_method":"card","payment_method_data":{"card":{"last4":"4242","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"424242","card_extended_bin":null,"card_exp_month":"10","card_exp_year":"25","card_holder_name":"joseph Doe","payment_checks":{"avs_response":{"code":"Y","codeRaw":"Y"},"card_verification":{"resultCode":"M","resultCodeRaw":"M"}},"authentication_data":null},"billing":null},"payment_token":"token_TBdELmgqZJCVa9guAIIv","shipping":{"address":{"city":"San Fransico","country":"US","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"California","first_name":"joseph","last_name":"Doe","origin_zip":null},"phone":{"number":"8056594427","country_code":"+91"},"email":null},"billing":{"address":{"city":"San Fransico","country":"US","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"California","first_name":"joseph","last_name":"Doe","origin_zip":null},"phone":{"number":"8056594427","country_code":"+91"},"email":null},"order_details":null,"email":"guest@example.com","name":"John Doe","phone":"999999999","return_url":"https://google.com/","authentication_type":"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":1758721597,"expires":1758725197,"secret":"epk_90617482ef1e43e0a833db8cb04fb2e9"},"manual_retry_allowed":null,"connector_transaction_id":"7587215991316984603814","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_uBRYL3QTCWj5H21GbWTa_1","payment_link":null,"profile_id":"pro_W3ToWs6EezKDjps5wTlv","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_4rxNg9ZFdVITFBkrkyWO","incremental_authorization_allowed":false,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-09-24T14:01:37.902Z","fingerprint":null,"browser_info":null,"payment_channel":null,"payment_method_id":null,"network_transaction_id":"016153570198200","payment_method_status":null,"updated":"2025-09-24T13:46:39.783Z","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. Create a payment with both API key and Internal API key missing Request ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --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://google.com", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4242424242424242", "card_exp_month": "10", "card_exp_year": "25", "card_holder_name": "joseph Doe", "card_cvc": "123" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } }' ``` Response ``` {"error":{"type":"invalid_request","message":"API key not provided or invalid API key used","code":"IR_01"}} ``` 5. Create a payment with API Key and one of the required header missing Request ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'x-merchant-id: merchant_1758720430' \ --header 'x-profile-id: pro_W3ToWs6EezKDjps5wTlv' \ --header 'api-key: dev_CLbdgP5Lj11ZF7RfJgM4ck8Qk8AK5yzhEgpPr7d0MmSWC7FvLaQAKKUSOfXBasRD' \ --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://google.com", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4242424242424242", "card_exp_month": "10", "card_exp_year": "25", "card_holder_name": "joseph Doe", "card_cvc": "123" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } }' ``` Response ``` {"payment_id":"pay_jZTH3Kb5c8W15TZ9lzWN","merchant_id":"merchant_1758720430","status":"succeeded","amount":6540,"net_amount":6540,"shipping_cost":null,"amount_capturable":0,"amount_received":6540,"connector":"cybersource","client_secret":"pay_jZTH3Kb5c8W15TZ9lzWN_secret_rLDuvU2PG61w94lS0DTI","created":"2025-09-24T13:48:50.432Z","currency":"USD","customer_id":"StripeCustomer","customer":{"id":"StripeCustomer","name":"John Doe","email":"guest@example.com","phone":"999999999","phone_country_code":"+1"},"description":"Its my first payment request","refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":null,"off_session":null,"capture_on":null,"capture_method":"automatic","payment_method":"card","payment_method_data":{"card":{"last4":"4242","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"424242","card_extended_bin":null,"card_exp_month":"10","card_exp_year":"25","card_holder_name":"joseph Doe","payment_checks":{"avs_response":{"code":"Y","codeRaw":"Y"},"card_verification":{"resultCode":"M","resultCodeRaw":"M"}},"authentication_data":null},"billing":null},"payment_token":"token_pthFLPrsyFFd7LKMNIN9","shipping":{"address":{"city":"San Fransico","country":"US","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"California","first_name":"joseph","last_name":"Doe","origin_zip":null},"phone":{"number":"8056594427","country_code":"+91"},"email":null},"billing":{"address":{"city":"San Fransico","country":"US","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"California","first_name":"joseph","last_name":"Doe","origin_zip":null},"phone":{"number":"8056594427","country_code":"+91"},"email":null},"order_details":null,"email":"guest@example.com","name":"John Doe","phone":"999999999","return_url":"https://google.com/","authentication_type":"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":1758721730,"expires":1758725330,"secret":"epk_2bd324735af649278a7afdc0fab609fd"},"manual_retry_allowed":null,"connector_transaction_id":"7587217314886872803813","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_jZTH3Kb5c8W15TZ9lzWN_1","payment_link":null,"profile_id":"pro_W3ToWs6EezKDjps5wTlv","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_4rxNg9ZFdVITFBkrkyWO","incremental_authorization_allowed":false,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-09-24T14:03:50.432Z","fingerprint":null,"browser_info":null,"payment_channel":null,"payment_method_id":null,"network_transaction_id":"016153570198200","payment_method_status":null,"updated":"2025-09-24T13:48:52.097Z","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} ``` 6. Create a payment with API key and all required headers for Internal API Auth with incorrect internal API key Request ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'x-merchant-id: merchant_1758720430' \ --header 'x-profile-id: pro_W3ToWs6EezKDjps5wTlv' \ --header 'x-internal-api-key: test_internal_api_keys' \ --header 'api-key: dev_CLbdgP5Lj11ZF7RfJgM4ck8Qk8AK5yzhEgpPr7d0MmSWC7FvLaQAKKUSOfXBasRD' \ --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://google.com", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4242424242424242", "card_exp_month": "10", "card_exp_year": "25", "card_holder_name": "joseph Doe", "card_cvc": "123" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } }' ``` Response ``` {"error":{"type":"invalid_request","message":"API key not provided or invalid API key used","code":"IR_01"}} ``` 7. Payment Sync with client secret ``` curl --location 'http://localhost:8080/payments/pay_b5o0Y2uk1KNGXHqTQxCF?client_secret=pay_b5o0Y2uk1KNGXHqTQxCF_secret_CD48nj9Ef7Os5peUPMHt' \ --header 'Accept: application/json' \ --header 'api-key: pk_dev_78bec5909ea84a92bee1f6ae9e243ea8' ``` Response ``` { "payment_id": "pay_b5o0Y2uk1KNGXHqTQxCF", "merchant_id": "merchant_1758799800", "status": "succeeded", "amount": 6540, "net_amount": 6540, "shipping_cost": null, "amount_capturable": 0, "amount_received": 6540, "connector": "cybersource", "client_secret": "pay_b5o0Y2uk1KNGXHqTQxCF_secret_CD48nj9Ef7Os5peUPMHt", "created": "2025-09-25T14:31:26.721Z", "currency": "USD", "customer_id": "StripeCustomer", "customer": { "id": "StripeCustomer", "name": "John Doe", "email": "guest@example.com", "phone": "999999999", "phone_country_code": "+1" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "4242", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "424242", "card_extended_bin": null, "card_exp_month": "10", "card_exp_year": "25", "card_holder_name": "joseph Doe", "payment_checks": { "avs_response": { "code": "Y", "codeRaw": "Y" }, "card_verification": { "resultCode": "M", "resultCodeRaw": "M" } }, "authentication_data": null }, "billing": null }, "payment_token": "token_R5qt6L28kHcTGNklyS2v", "shipping": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "order_details": null, "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "return_url": "https://google.com/", "authentication_type": "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": null, "connector_transaction_id": "7588106881976314703814", "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_b5o0Y2uk1KNGXHqTQxCF_1", "payment_link": null, "profile_id": "pro_ZLxuLxjbtAvxP8UluouT", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_szN2aVSuqzlKQWlg5Uxx", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-25T14:46:26.721Z", "fingerprint": null, "browser_info": null, "payment_channel": null, "payment_method_id": null, "network_transaction_id": "016153570198200", "payment_method_status": null, "updated": "2025-09-25T14:31:29.010Z", "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 } ``` 8. Payment Sync with API key ``` curl --location 'http://localhost:8080/payments/pay_b5o0Y2uk1KNGXHqTQxCF' \ --header 'Accept: application/json' \ --header 'api-key: dev_MjuJcRJNsddyqcjvIgQornBitkJdxnLjtpCxWr6kCZ99TacNP92VykGNqyIUgBns' ``` Response ``` { "payment_id": "pay_b5o0Y2uk1KNGXHqTQxCF", "merchant_id": "merchant_1758799800", "status": "succeeded", "amount": 6540, "net_amount": 6540, "shipping_cost": null, "amount_capturable": 0, "amount_received": 6540, "connector": "cybersource", "client_secret": "pay_b5o0Y2uk1KNGXHqTQxCF_secret_CD48nj9Ef7Os5peUPMHt", "created": "2025-09-25T14:31:26.721Z", "currency": "USD", "customer_id": "StripeCustomer", "customer": { "id": "StripeCustomer", "name": "John Doe", "email": "guest@example.com", "phone": "999999999", "phone_country_code": "+1" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "4242", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "424242", "card_extended_bin": null, "card_exp_month": "10", "card_exp_year": "25", "card_holder_name": "joseph Doe", "payment_checks": { "avs_response": { "code": "Y", "codeRaw": "Y" }, "card_verification": { "resultCode": "M", "resultCodeRaw": "M" } }, "authentication_data": null }, "billing": null }, "payment_token": "token_R5qt6L28kHcTGNklyS2v", "shipping": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "order_details": null, "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "return_url": "https://google.com/", "authentication_type": "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": null, "connector_transaction_id": "7588106881976314703814", "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_b5o0Y2uk1KNGXHqTQxCF_1", "payment_link": null, "profile_id": "pro_ZLxuLxjbtAvxP8UluouT", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_szN2aVSuqzlKQWlg5Uxx", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-25T14:46:26.721Z", "fingerprint": null, "browser_info": null, "payment_channel": null, "payment_method_id": null, "network_transaction_id": "016153570198200", "payment_method_status": null, "updated": "2025-09-25T14:31:29.010Z", "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 } ``` 9. Payment Sync with Internal API Key ``` curl --location 'http://localhost:8080/payments/pay_b5o0Y2uk1KNGXHqTQxCF' \ --header 'Accept: application/json' \ --header 'x-merchant-id: merchant_1758799800' \ --header 'x-profile-id: pro_ZLxuLxjbtAvxP8UluouT' \ --header 'x-internal-api-key: test_internal_api_key' ``` Response ``` {"payment_id":"pay_b5o0Y2uk1KNGXHqTQxCF","merchant_id":"merchant_1758799800","status":"succeeded","amount":6540,"net_amount":6540,"shipping_cost":null,"amount_capturable":0,"amount_received":6540,"connector":"cybersource","client_secret":"pay_b5o0Y2uk1KNGXHqTQxCF_secret_CD48nj9Ef7Os5peUPMHt","created":"2025-09-25T14:31:26.721Z","currency":"USD","customer_id":"StripeCustomer","customer":{"id":"StripeCustomer","name":"John Doe","email":"guest@example.com","phone":"999999999","phone_country_code":"+1"},"description":"Its my first payment request","refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":null,"off_session":null,"capture_on":null,"capture_method":"automatic","payment_method":"card","payment_method_data":{"card":{"last4":"4242","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"424242","card_extended_bin":null,"card_exp_month":"10","card_exp_year":"25","card_holder_name":"joseph Doe","payment_checks":{"avs_response":{"code":"Y","codeRaw":"Y"},"card_verification":{"resultCode":"M","resultCodeRaw":"M"}},"authentication_data":null},"billing":null},"payment_token":"token_R5qt6L28kHcTGNklyS2v","shipping":{"address":{"city":"San Fransico","country":"US","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"California","first_name":"joseph","last_name":"Doe","origin_zip":null},"phone":{"number":"8056594427","country_code":"+91"},"email":null},"billing":{"address":{"city":"San Fransico","country":"US","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"California","first_name":"joseph","last_name":"Doe","origin_zip":null},"phone":{"number":"8056594427","country_code":"+91"},"email":null},"order_details":null,"email":"guest@example.com","name":"John Doe","phone":"999999999","return_url":"https://google.com/","authentication_type":"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":null,"connector_transaction_id":"7588106881976314703814","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_b5o0Y2uk1KNGXHqTQxCF_1","payment_link":null,"profile_id":"pro_ZLxuLxjbtAvxP8UluouT","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_szN2aVSuqzlKQWlg5Uxx","incremental_authorization_allowed":false,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-09-25T14:46:26.721Z","fingerprint":null,"browser_info":null,"payment_channel":null,"payment_method_id":null,"network_transaction_id":"016153570198200","payment_method_status":null,"updated":"2025-09-25T14:31:29.010Z","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} ``` 10. Payment Sync with invalid Internal API Key ``` curl --location 'http://localhost:8080/payments/pay_b5o0Y2uk1KNGXHqTQxCF' \ --header 'Accept: application/json' \ --header 'x-merchant-id: merchant_1758799800' \ --header 'x-profile-id: pro_ZLxuLxjbtAvxP8UluouT' \ --header 'x-internal-api-key: test_internal_api_keys' ``` Response ``` { "error": { "type": "invalid_request", "message": "API key not provided or invalid API key used", "code": "IR_01" } } ``` ## 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` - `loadtest/config/development.toml` **2. Configuration Files** - `config/config.example.toml` - `config/deployments/env_specific.toml` - `config/deployments/production.toml` - ... and 5 more files **3. Other** - `crates/router/src/lib.rs` - `crates/router/src/routes/app.rs` - `crates/router/src/routes/payments.rs` - ... and 1 more files **Code Patterns Applied:** - Define new data structures (2 changes) - Implement new functions (6 changes) - Extend existing types with new fields (27 changes) - Add conditional logic for feature flags or filtering (4 changes) **Detailed Identifier Changes:** Commit b8900d00: Files to modify: **crates/router/src/configs/secrets_transformers.rs** Modify existing code **crates/router/src/configs/settings.rs** Add: - struct: pub::InternalMerchantIdProfileIdAuthSettings **crates/router/src/lib.rs** Modify existing code **crates/router/src/routes/app.rs** Modify existing code **crates/router/src/routes/payments.rs** Modify existing code **crates/router/src/services/authentication.rs** Add: - function: private::authenticate_and_fetch - function: pub::is_internal_api_key_merchant_id_profile_id_auth - function: pub::check_internal_api_key_auth - impl: impl AuthenticateAndFetch<AuthenticationData, A> for InternalMerchantIdProfileIdAuth<F>
{"pr_number": 9547, "pr_title": "feat(auth): add new authentication to communicate between microservices", "merged_at": "2025-09-29T18:26:45Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"tests": ["config/deployments/integration_test.toml", "loadtest/config/development.toml"], "config": ["config/config.example.toml", "config/deployments/env_specific.toml", "config/deployments/production.toml", "config/deployments/sandbox.toml", "config/development.toml", "config/docker_compose.toml", "crates/router/src/configs/secrets_transformers.rs", "crates/router/src/configs/settings.rs"], "other": ["crates/router/src/lib.rs", "crates/router/src/routes/app.rs", "crates/router/src/routes/payments.rs", "crates/router/src/services/authentication.rs"]}, "change_types": {"structs_added": 2, "functions_added": 6, "fields_added": 27, "conditionals_added": 4}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(connector): fix incorrect mapping of attempt status in AuthorizeDotNet connector ## 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/7522) ## Description <!-- Describe your changes in detail --> Changed the attempt status mapping of `CapturedPendingSettlement` given by AuthorizeDotNet from `ChargeInitiated` 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). --> When the capture_method is automatic, AuthorizeDotNet connector first sends a `CapturedPendingSettlement` status which is mapped to `ChargeInitiated` in our codebase. That results in `processing` transaction status in the Hyperswitch's response (in production environment). ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Postman tests are not valid since AuthorizeDotNet directly sends `SettledSuccessfully` status in local/sandbox environment. ## 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/authorizedotnet/transformers.rs` **Detailed Identifier Changes:** Commit 04ede122: Files to modify: **crates/hyperswitch_connectors/src/connectors/authorizedotnet/transformers.rs** Modify existing code
{"pr_number": 7523, "pr_title": "fix(connector): fix incorrect mapping of attempt status in AuthorizeDotNet connector", "merged_at": "2025-03-17T14:53:38Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["connector", "transaction"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/authorizedotnet/transformers.rs"]}, "change_types": {}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor(payment-links): use top redirection in status page ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description This PR updates the behavior of final redirection to use top redirection when payment link's status page is present in the flow as well. Explained in https://github.com/juspay/hyperswitch/issues/8639 ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context Helps keep the behavior of payment links consistent. ## How did you test it? <details> <summary>1. Create a default payment link</summary> cURL curl --location --request POST 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_l9cbI5mKxdcSM5xnj2wiPTQGwO0lXCXDnHBeiCL9v9mbgQfYPdNcxSyEO8EHhaQN' \ --data '{"payment_id":"25c03e52-2ed0-4ca9-9841-5554f1857d8b","authentication_type":"three_ds","customer_id":"cus_UWxTZBStM3s2FzdDGGun","profile_id":"pro_gSujWAfJukk8ammz6aft","customer_acceptance":{"acceptance_type":"online","accepted_at":"1963-05-03T04:07:52.723Z","online":{"ip_address":"127.0.0.1","user_agent":"amet irure esse"}},"setup_future_usage":"off_session","amount":1,"currency":"EUR","confirm":false,"payment_link":true,"session_expiry":2629800,"payment_link_config":{},"return_url":"https://www.example.com"}' Response {"payment_id":"fdb4c32a-c9ff-4742-a3f4-0cdc03d04f52","merchant_id":"merchant_1752567879","status":"requires_payment_method","amount":1,"net_amount":1,"shipping_cost":null,"amount_capturable":0,"amount_received":null,"connector":null,"client_secret":"fdb4c32a-c9ff-4742-a3f4-0cdc03d04f52_secret_YM3fNu32vNuM3v8lrJzR","created":"2025-07-15T08:28:36.362Z","currency":"EUR","customer_id":"cus_UWxTZBStM3s2FzdDGGun","customer":{"id":"cus_UWxTZBStM3s2FzdDGGun","name":null,"email":null,"phone":null,"phone_country_code":null},"description":null,"refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":"off_session","off_session":null,"capture_on":null,"capture_method":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://www.example.com/","authentication_type":"three_ds","statement_descriptor_name":null,"statement_descriptor_suffix":null,"next_action":null,"cancellation_reason":null,"error_code":null,"error_message":null,"unified_code":null,"unified_message":null,"payment_experience":null,"payment_method_type":null,"connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":{"customer_id":"cus_UWxTZBStM3s2FzdDGGun","created_at":1752568116,"expires":1752571716,"secret":"epk_06cd3c6510724493aee541a72cb1a5c2"},"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_1752567879/fdb4c32a-c9ff-4742-a3f4-0cdc03d04f52?locale=en","secure_link":null,"payment_link_id":"plink_NkEB0uKH4Tg5baxkU7NF"},"profile_id":"pro_gSujWAfJukk8ammz6aft","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-14T18:58:36.361Z","fingerprint":null,"browser_info":null,"payment_method_id":null,"payment_method_status":null,"updated":"2025-07-15T08:28:36.369Z","split_payments":null,"frm_metadata":null,"extended_authorization_applied":null,"capture_before":null,"merchant_order_reference_id":null,"order_tax_amount":null,"connector_mandate_id":null,"card_discovery":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>2. Open payment link inside an and process using a non 3DS card</summary> Iframe template <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <style> html, body { margin: 0; display: flex; align-items: center; justify-content: center; background-color: black; height: 100vh; width: 100vw; } iframe { border-radius: 4px; height: 90vh; width: 90vw; background-color: white; } </style> </head> <body> <iframe allow="payment" src="http://localhost:8080/payment_link/merchant_1752567879/12883fad-a7ce-4535-a327-7eccabb1258c?locale=en" frameborder="0" ></iframe> </body> <!-- <script src="https://6498-49-207-207-180.ngrok-free.app/HyperLoader.js" ></script> --> </html> Test cards https://docs.adyen.com/development-resources/testing/test-card-numbers/#visa Behavior - Redirection to status page happens inside an iframe - Redirection to return_url happens in top <img width="949" height="938" alt="Screenshot 2025-07-15 at 2 08 07 PM" src="https://github.com/user-attachments/assets/66846803-9dba-48e8-a843-a3ddcfdaac20" /> <img width="947" height="939" alt="Screenshot 2025-07-15 at 2 08 11 PM" src="https://github.com/user-attachments/assets/7c5435f0-ac8f-4b49-8a12-34c8032f2269" /> </details> <details> <summary>3. Create a payment link skipping the status screen</summary> cURL curl --location --request POST 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_l9cbI5mKxdcSM5xnj2wiPTQGwO0lXCXDnHBeiCL9v9mbgQfYPdNcxSyEO8EHhaQN' \ --data '{"payment_id":"d60872e7-104d-493d-a88b-1030ccde869d","authentication_type":"three_ds","customer_id":"cus_UWxTZBStM3s2FzdDGGun","profile_id":"pro_gSujWAfJukk8ammz6aft","customer_acceptance":{"acceptance_type":"online","accepted_at":"1963-05-03T04:07:52.723Z","online":{"ip_address":"127.0.0.1","user_agent":"amet irure esse"}},"setup_future_usage":"off_session","amount":1,"currency":"EUR","confirm":false,"payment_link":true,"session_expiry":2629800,"payment_link_config":{"skip_status_screen":true},"return_url":"https://www.example.com"}' Response {"payment_id":"d69f0158-a3bc-44ac-80d7-931f60eb102e","merchant_id":"merchant_1752567879","status":"requires_payment_method","amount":1,"net_amount":1,"shipping_cost":null,"amount_capturable":0,"amount_received":null,"connector":null,"client_secret":"d69f0158-a3bc-44ac-80d7-931f60eb102e_secret_sj4ENrQbMcZM87VvlwSg","created":"2025-07-15T08:34:22.075Z","currency":"EUR","customer_id":"cus_UWxTZBStM3s2FzdDGGun","customer":{"id":"cus_UWxTZBStM3s2FzdDGGun","name":null,"email":null,"phone":null,"phone_country_code":null},"description":null,"refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":"off_session","off_session":null,"capture_on":null,"capture_method":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://www.example.com/","authentication_type":"three_ds","statement_descriptor_name":null,"statement_descriptor_suffix":null,"next_action":null,"cancellation_reason":null,"error_code":null,"error_message":null,"unified_code":null,"unified_message":null,"payment_experience":null,"payment_method_type":null,"connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":{"customer_id":"cus_UWxTZBStM3s2FzdDGGun","created_at":1752568462,"expires":1752572062,"secret":"epk_c474ec1928d4487799a10fdec281d647"},"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_1752567879/d69f0158-a3bc-44ac-80d7-931f60eb102e?locale=en","secure_link":null,"payment_link_id":"plink_AG81wLnXtkzSLv1D499u"},"profile_id":"pro_gSujWAfJukk8ammz6aft","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-14T19:04:22.073Z","fingerprint":null,"browser_info":null,"payment_method_id":null,"payment_method_status":null,"updated":"2025-07-15T08:34:22.081Z","split_payments":null,"frm_metadata":null,"extended_authorization_applied":null,"capture_before":null,"merchant_order_reference_id":null,"order_tax_amount":null,"connector_mandate_id":null,"card_discovery":null,"force_3ds_challenge":false,"force_3ds_challenge_trigger":false,"issuer_error_code":null,"issuer_error_message":null,"is_iframe_redirection_enabled":null,"whole_connector_response":null} </details> <details> <summary>4. Open payment link inside an and process using a non 3DS card</summary> Iframe template <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <style> html, body { margin: 0; display: flex; align-items: center; justify-content: center; background-color: black; height: 100vh; width: 100vw; } iframe { border-radius: 4px; height: 90vh; width: 90vw; background-color: white; } </style> </head> <body> <iframe allow="payment" src="http://localhost:8080/payment_link/merchant_1752567879/12883fad-a7ce-4535-a327-7eccabb1258c?locale=en" frameborder="0" ></iframe> </body> <!-- <script src="https://6498-49-207-207-180.ngrok-free.app/HyperLoader.js" ></script> --> </html> Test cards https://docs.adyen.com/development-resources/testing/test-card-numbers/#visa Behavior - Status screen is skipped - Redirection to return_url happens in top <img width="946" height="936" alt="Screenshot 2025-07-15 at 2 04 05 PM" src="https://github.com/user-attachments/assets/16291a93-a167-4195-9e5c-93f709050578" /> <img width="949" height="943" alt="Screenshot 2025-07-15 at 2 04 16 PM" src="https://github.com/user-attachments/assets/1f50ee1f-ca71-41f6-9db7-806dbdb5cf8a" /> </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/payment_link/payment_link_status/status.js`
{"pr_number": 8641, "pr_title": "refactor(payment-links): use top redirection in status page", "merged_at": "2025-07-16T10:19:33Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"core_business": ["crates/router/src/core/payment_link/payment_link_status/status.js"]}, "change_types": {}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
feat(connector): Introduce connector template code for WorldpayXML ## 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 --> Adding support for Worldpay's XML payment processor ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ``` just clippy cargo +nightly fmt --all cargo c ``` Hyperswitch code base should compile. ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I 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. Core Business Logic** - `crates/router/src/core/admin.rs` **3. External Connector Integration** - `crates/common_enums/src/connector_enums.rs` - `crates/connector_configs/src/connector.rs` - `crates/hyperswitch_connectors/src/connectors.rs` - ... and 9 more files **4. Type Definitions** - `crates/router/src/types/api.rs` - `crates/router/src/types/transformers.rs` **5. Tests** - `config/deployments/integration_test.toml` - `loadtest/config/development.toml` **6. Configuration Files** - `config/config.example.toml` - `config/deployments/production.toml` - `config/deployments/sandbox.toml` - ... and 2 more files **Code Patterns Applied:** - Define new data structures (10 changes) - Implement new functions (78 changes) - Extend existing types with new fields (156 changes) **Detailed Identifier Changes:** Commit 57cb3a9f: Files to modify: **crates/common_enums/src/connector_enums.rs** Modify existing code **crates/connector_configs/src/connector.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors.rs** Add: - mod: pub::worldpayxml **crates/hyperswitch_connectors/src/connectors/worldpayxml.rs** Add: - function: pub::new - function: private::build_headers - function: private::id - function: private::get_currency_unit - function: private::common_get_content_type - function: private::base_url - function: private::get_auth_header - function: private::build_error_response - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::get_request_body - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::get_request_body - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::get_request_body - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_webhook_object_reference_id - function: private::get_webhook_event_type - function: private::get_webhook_resource_object - struct: pub::Worldpayxml - impl: impl Worldpayxml - impl: impl api::Payment for Worldpayxml - impl: impl api::PaymentSession for Worldpayxml - impl: impl api::ConnectorAccessToken for Worldpayxml - impl: impl api::MandateSetup for Worldpayxml - impl: impl api::PaymentAuthorize for Worldpayxml - impl: impl api::PaymentSync for Worldpayxml - impl: impl api::PaymentCapture for Worldpayxml - impl: impl api::PaymentVoid for Worldpayxml - impl: impl api::Refund for Worldpayxml - impl: impl api::RefundExecute for Worldpayxml - impl: impl api::RefundSync for Worldpayxml - impl: impl api::PaymentToken for Worldpayxml - impl: impl ConnectorIntegration<PaymentMethodToken, PaymentMethodTokenizationData, PaymentsResponseData> for Worldpayxml - impl: impl ConnectorCommonExt<Flow, Request, Response> for Worldpayxml - impl: impl ConnectorCommon for Worldpayxml - impl: impl ConnectorValidation for Worldpayxml - impl: impl ConnectorIntegration<Session, PaymentsSessionData, PaymentsResponseData> for Worldpayxml - impl: impl ConnectorIntegration<AccessTokenAuth, AccessTokenRequestData, AccessToken> for Worldpayxml - impl: impl ConnectorIntegration<SetupMandate, SetupMandateRequestData, PaymentsResponseData> for Worldpayxml - impl: impl ConnectorIntegration<Authorize, PaymentsAuthorizeData, PaymentsResponseData> for Worldpayxml - impl: impl ConnectorIntegration<PSync, PaymentsSyncData, PaymentsResponseData> for Worldpayxml - impl: impl ConnectorIntegration<Capture, PaymentsCaptureData, PaymentsResponseData> for Worldpayxml - impl: impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Worldpayxml - impl: impl ConnectorIntegration<Execute, RefundsData, RefundsResponseData> for Worldpayxml - impl: impl ConnectorIntegration<RSync, RefundsData, RefundsResponseData> for Worldpayxml - impl: impl webhooks::IncomingWebhook for Worldpayxml - impl: impl ConnectorSpecifications for Worldpayxml - mod: pub::transformers **crates/hyperswitch_connectors/src/connectors/worldpayxml/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::WorldpayxmlRouterData - struct: pub::WorldpayxmlPaymentsRequest - struct: pub::WorldpayxmlCard - struct: pub::WorldpayxmlAuthType - struct: pub::WorldpayxmlPaymentsResponse - struct: pub::WorldpayxmlRefundRequest - struct: pub::RefundResponse - struct: pub::WorldpayxmlErrorResponse - enum: pub::WorldpayxmlPaymentStatus - enum: pub::RefundStatus - impl: impl From<(StringMinorUnit, T)> for WorldpayxmlRouterData<T> - impl: impl TryFrom<&WorldpayxmlRouterData<&PaymentsAuthorizeRouterData>> for WorldpayxmlPaymentsRequest - impl: impl TryFrom<&ConnectorAuthType> for WorldpayxmlAuthType - impl: impl From<WorldpayxmlPaymentStatus> for common_enums::AttemptStatus - impl: impl TryFrom<ResponseRouterData<F, WorldpayxmlPaymentsResponse, T, PaymentsResponseData>> for RouterData<F, T, PaymentsResponseData> - impl: impl TryFrom<&WorldpayxmlRouterData<&RefundsRouterData<F>>> for WorldpayxmlRefundRequest - 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/configs.rs** Modify existing code **crates/router/src/connector.rs** Modify existing code **crates/router/src/core/admin.rs** Modify existing code **crates/router/src/types/api.rs** Modify existing code **crates/router/src/types/transformers.rs** Modify existing code **crates/router/tests/connectors/main.rs** Add: - mod: private::worldpayxml **crates/router/tests/connectors/worldpayxml.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::WorldpayxmlTest - impl: impl ConnectorActions for WorldpayxmlTest - impl: impl utils::Connector for WorldpayxmlTest **crates/test_utils/src/connector_auth.rs** Modify existing code
{"pr_number": 7968, "pr_title": "feat(connector): Introduce connector template code for WorldpayXML ", "merged_at": "2025-05-12T14:33:38Z", "intent": {"feature_type": "payment", "action": "add_feature", "entities": ["payment"]}, "hierarchy": {"domain": ["crates/hyperswitch_domain_models/src/configs.rs"], "core_business": ["crates/router/src/core/admin.rs"], "connectors": ["crates/common_enums/src/connector_enums.rs", "crates/connector_configs/src/connector.rs", "crates/hyperswitch_connectors/src/connectors.rs", "crates/hyperswitch_connectors/src/connectors/worldpayxml.rs", "crates/hyperswitch_connectors/src/connectors/worldpayxml/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/worldpayxml.rs", "crates/test_utils/src/connector_auth.rs", "scripts/add_connector.sh"], "types": ["crates/router/src/types/api.rs", "crates/router/src/types/transformers.rs"], "tests": ["config/deployments/integration_test.toml", "loadtest/config/development.toml"], "config": ["config/config.example.toml", "config/deployments/production.toml", "config/deployments/sandbox.toml", "config/development.toml", "config/docker_compose.toml"]}, "change_types": {"structs_added": 10, "functions_added": 78, "enums_added": 2, "fields_added": 156, "imports_added": 20}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): [BLACKHAWKNETWORK] Add Template Code ## 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 --> Template code added for blackhawknetwork. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Only template code added hence no testing required. ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/connector_endpoints.rs` **2. External Connector Integration** - `crates/connector_configs/src/connector.rs` - `crates/connector_configs/toml/development.toml` - `crates/connector_configs/toml/production.toml` - ... and 11 more files **3. Tests** - `config/deployments/integration_test.toml` - `loadtest/config/development.toml` **4. Configuration Files** - `config/config.example.toml` - `config/deployments/production.toml` - `config/deployments/sandbox.toml` - ... and 2 more files **Code Patterns Applied:** - Define new data structures (10 changes) - Implement new functions (83 changes) - Extend existing types with new fields (164 changes) **Detailed Identifier Changes:** Commit 7f6a1266: Files to modify: **crates/connector_configs/src/connector.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors.rs** Add: - mod: pub::blackhawknetwork **crates/hyperswitch_connectors/src/connectors/blackhawknetwork.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::Blackhawknetwork - impl: impl Blackhawknetwork - impl: impl api::Payment for Blackhawknetwork - impl: impl api::PaymentSession for Blackhawknetwork - impl: impl api::ConnectorAccessToken for Blackhawknetwork - impl: impl api::MandateSetup for Blackhawknetwork - impl: impl api::PaymentAuthorize for Blackhawknetwork - impl: impl api::PaymentSync for Blackhawknetwork - impl: impl api::PaymentCapture for Blackhawknetwork - impl: impl api::PaymentVoid for Blackhawknetwork - impl: impl api::Refund for Blackhawknetwork - impl: impl api::RefundExecute for Blackhawknetwork - impl: impl api::RefundSync for Blackhawknetwork - impl: impl api::PaymentToken for Blackhawknetwork - impl: impl ConnectorIntegration<PaymentMethodToken, PaymentMethodTokenizationData, PaymentsResponseData> for Blackhawknetwork - impl: impl ConnectorCommonExt<Flow, Request, Response> for Blackhawknetwork - impl: impl ConnectorCommon for Blackhawknetwork - impl: impl ConnectorValidation for Blackhawknetwork - impl: impl ConnectorIntegration<Session, PaymentsSessionData, PaymentsResponseData> for Blackhawknetwork - impl: impl ConnectorIntegration<AccessTokenAuth, AccessTokenRequestData, AccessToken> for Blackhawknetwork - impl: impl ConnectorIntegration<SetupMandate, SetupMandateRequestData, PaymentsResponseData> for Blackhawknetwork - impl: impl ConnectorIntegration<Authorize, PaymentsAuthorizeData, PaymentsResponseData> for Blackhawknetwork - impl: impl ConnectorIntegration<PSync, PaymentsSyncData, PaymentsResponseData> for Blackhawknetwork - impl: impl ConnectorIntegration<Capture, PaymentsCaptureData, PaymentsResponseData> for Blackhawknetwork - impl: impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Blackhawknetwork - impl: impl ConnectorIntegration<Execute, RefundsData, RefundsResponseData> for Blackhawknetwork - impl: impl ConnectorIntegration<RSync, RefundsData, RefundsResponseData> for Blackhawknetwork - impl: impl webhooks::IncomingWebhook for Blackhawknetwork - impl: impl ConnectorSpecifications for Blackhawknetwork - mod: pub::transformers **crates/hyperswitch_connectors/src/connectors/blackhawknetwork/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::BlackhawknetworkRouterData - struct: pub::BlackhawknetworkPaymentsRequest - struct: pub::BlackhawknetworkCard - struct: pub::BlackhawknetworkAuthType - struct: pub::BlackhawknetworkPaymentsResponse - struct: pub::BlackhawknetworkRefundRequest - struct: pub::RefundResponse - struct: pub::BlackhawknetworkErrorResponse - enum: pub::BlackhawknetworkPaymentStatus - enum: pub::RefundStatus - impl: impl From<(StringMinorUnit, T)> for BlackhawknetworkRouterData<T> - impl: impl TryFrom<&BlackhawknetworkRouterData<&PaymentsAuthorizeRouterData>> for BlackhawknetworkPaymentsRequest - impl: impl TryFrom<&ConnectorAuthType> for BlackhawknetworkAuthType - impl: impl From<BlackhawknetworkPaymentStatus> for common_enums::AttemptStatus - impl: impl TryFrom<ResponseRouterData<F, BlackhawknetworkPaymentsResponse, T, PaymentsResponseData>> for RouterData<F, T, PaymentsResponseData> - impl: impl TryFrom<&BlackhawknetworkRouterData<&RefundsRouterData<F>>> for BlackhawknetworkRefundRequest - 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/blackhawknetwork.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::BlackhawknetworkTest - impl: impl ConnectorActions for BlackhawknetworkTest - impl: impl utils::Connector for BlackhawknetworkTest **crates/router/tests/connectors/main.rs** Add: - mod: private::blackhawknetwork **crates/test_utils/src/connector_auth.rs** Modify existing code
{"pr_number": 8632, "pr_title": "feat(connector): [BLACKHAWKNETWORK] Add Template Code ", "merged_at": "2025-07-21T11:06:59Z", "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/blackhawknetwork.rs", "crates/hyperswitch_connectors/src/connectors/blackhawknetwork/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/blackhawknetwork.rs", "crates/router/tests/connectors/main.rs", "crates/test_utils/src/connector_auth.rs", "scripts/add_connector.sh"], "tests": ["config/deployments/integration_test.toml", "loadtest/config/development.toml"], "config": ["config/config.example.toml", "config/deployments/production.toml", "config/deployments/sandbox.toml", "config/development.toml", "config/docker_compose.toml"]}, "change_types": {"structs_added": 10, "functions_added": 83, "enums_added": 2, "fields_added": 164, "imports_added": 22}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor(connector): [FISERV, HELCIM] Add amount conversion framework to Fiserv, Helcim ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> added **FloatMajorUnit** for amount conversion for **Fiserv** added **FloatMajorUnit** for amount conversion for **Helcim** ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> fixes #6256 and #6019 ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Tested through postman: - Create a MCA for **fiserv**: - Create a Payment with **fiserv**: request: ``` { "amount": 10000, "currency": "USD", "amount_to_capture": 10000, "confirm": true, "profile_id": {{profile_id}}, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "authentication_type": "no_three_ds", "setup_future_usage": "on_session", "customer": { "id": "customer123", "name": "John Doe", "email": "customer@gmail.com", "phone": "9999999999", "phone_country_code": "+1" }, "customer_id": "customer123", "phone_country_code": "+1", "description": "Its my first payment request", "return_url": "https://google.com", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4147463011110083", "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": "9999999999", "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": "9999999999", "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" } }, //Some connectors like Apple Pay, Airwallex and Noon might require some additional information, find more in the doc. "connector_metadata": { "noon": { "order_category": "pay" } }, "payment_link": false, "payment_link_config": { "theme": "", "logo": "", "seller_name": "", "sdk_layout": "", "display_sdk_only": false, "enabled_saved_payment_method": false }, "payment_type": "normal", "request_incremental_authorization": false, "merchant_order_reference_id": "test_ord", "session_expiry": 900 } ``` response: - The payment should be succeeded ``` { "payment_id": "pay_9mnPycKv5V2w9aNCHyO8", "merchant_id": "merchant_1740127595", "status": "succeeded", "amount": 10000, "net_amount": 10000, "shipping_cost": null, "amount_capturable": 0, "amount_received": 10000, "connector": "fiserv", "client_secret": "pay_9mnPycKv5V2w9aNCHyO8_secret_X4CTRqm4Ldyx6L7s2OPa", "created": "2025-02-21T08:46:50.624Z", "currency": "USD", "customer_id": "customer123", "customer": { "id": "customer123", "name": "John Doe", "email": "customer@gmail.com", "phone": "9999999999", "phone_country_code": "+1" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "on_session", "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "0083", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "414746", "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": "9999999999", "country_code": "+91" }, "email": "guest@example.com" }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "9999999999", "country_code": "+91" }, "email": "guest@example.com" }, "order_details": [ { "brand": null, "amount": 6540, "category": null, "quantity": 1, "tax_rate": null, "product_id": null, "product_name": "Apple iphone 15", "product_type": null, "sub_category": null, "product_img_link": null, "product_tax_code": null, "total_tax_amount": null, "requires_shipping": null } ], "email": "customer@gmail.com", "name": "John Doe", "phone": "9999999999", "return_url": "https://google.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "customer123", "created_at": 1740127610, "expires": 1740131210, "secret": "epk_a6328125a3ad471d88ef13493272c1cc" }, "manual_retry_allowed": false, "connector_transaction_id": "6f2fdeb7a1884bc0957c0f977644c30c", "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2019-09-10T10:11:12Z", "new_customer": "true" }, "connector_metadata": { "apple_pay": null, "airwallex": null, "noon": { "order_category": "pay" } }, "feature_metadata": null, "reference_id": "CHG015117c1ffa76779d655a830730d7add1a", "payment_link": null, "profile_id": "pro_IxmWaGQVX320n30wDNuM", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_o2Tw2yV2oWr4vEC5b22q", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-02-21T09:01:50.623Z", "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-02-21T08:46:54.326Z", "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" } ``` using curl : <img width="614" alt="Screenshot 2025-03-11 at 10 48 50 PM" src="https://github.com/user-attachments/assets/da58c0b9-6dbf-4bab-94d3-37817eac3479" /> <img width="1496" alt="Screenshot 2025-03-11 at 10 51 03 PM" src="https://github.com/user-attachments/assets/e2f6e5f6-40d6-4253-ac82-9ea6da361eac" /> - Create a MCA for **helcim**: - Create a Payment with **helcim**: ``` { "amount": 100, "currency": "USD", "confirm": true, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 100, "customer_id": "helcim", "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": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "5413330089099130", "card_exp_month": "01", "card_exp_year": "28", "card_holder_name": "joseph Doe", "card_cvc": "100" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" }, "browser_info": { "color_depth": 24, "java_enabled": true, "java_script_enabled": true, "language": "en-US", "screen_height": 1080, "screen_width": 1920, "time_zone": 123, "ip_address": "192.168.1.1", "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/58.0.3029.110 Safari/537.36", "os_type": "Windows", "os_version": "10", "device_model": "Desktop" }, "order_details": [{ "product_name":"something", "quantity": 4, "amount" : 400 }] } ``` response: - The payment should be succeeded ``` { "payment_id": "pay_TORNbtguEZUEleC3kYt5", "merchant_id": "merchant_1740386925", "status": "succeeded", "amount": 100, "net_amount": 100, "shipping_cost": null, "amount_capturable": 0, "amount_received": 100, "connector": "helcim", "client_secret": "pay_TORNbtguEZUEleC3kYt5_secret_PLV79VNxPEreoif4WfRh", "created": "2025-02-24T08:49:05.760Z", "currency": "USD", "customer_id": "helcim", "customer": { "id": "helcim", "name": "John Doe", "email": "guest@example.com", "phone": "999999999", "phone_country_code": "+1" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "9130", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "541333", "card_extended_bin": null, "card_exp_month": "01", "card_exp_year": "28", "card_holder_name": "joseph Doe", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "order_details": [ { "brand": null, "amount": 400, "category": null, "quantity": 4, "tax_rate": null, "product_id": null, "product_name": "something", "product_type": null, "sub_category": null, "product_img_link": null, "product_tax_code": null, "total_tax_amount": null, "requires_shipping": null } ], "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "return_url": "https://google.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "helcim", "created_at": 1740386945, "expires": 1740390545, "secret": "epk_79d58a8d4ee84ef7bd0e66d4ffa2d471" }, "manual_retry_allowed": false, "connector_transaction_id": "32476974", "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_TORNbtguEZUEleC3kYt5_1", "payment_link": null, "profile_id": "pro_1daddCjtZeUez131YwqB", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_b16Kuzg7hY5sPy9NgQUV", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-02-24T09:04:05.759Z", "fingerprint": null, "browser_info": { "os_type": "Windows", "language": "en-US", "time_zone": 123, "ip_address": "192.168.1.1", "os_version": "10", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36", "color_depth": 24, "device_model": "Desktop", "java_enabled": true, "screen_width": 1920, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 1080, "java_script_enabled": true }, "payment_method_id": null, "payment_method_status": null, "updated": "2025-02-24T08:49:09.053Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": "manual" } ``` using curl : <img width="1168" alt="Screenshot 2025-03-11 at 11 09 50 PM" src="https://github.com/user-attachments/assets/48ee3269-56fe-45ce-85ac-8a57a72b0640" /> <img width="1496" alt="Screenshot 2025-03-11 at 11 10 41 PM" src="https://github.com/user-attachments/assets/860742b5-d26b-4c4d-91dd-325a39ee5082" /> ## Checklist <!-- Put 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/fiserv.rs` - `crates/hyperswitch_connectors/src/connectors/fiserv/transformers.rs` - `crates/hyperswitch_connectors/src/connectors/helcim.rs` - ... and 4 more files **2. Type Definitions** - `crates/router/src/types/api.rs` **Code Patterns Applied:** - Define new data structures (2 changes) - Implement new functions (4 changes) - Extend existing types with new fields (15 changes) - Modify database queries (1 changes) **Detailed Identifier Changes:** Commit 43521015: Files to modify: **crates/hyperswitch_connectors/src/connectors/fiserv.rs** Remove: - struct: pub::Fiserv Add: - function: pub::new - struct: pub::Fiserv **crates/hyperswitch_connectors/src/connectors/fiserv/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/helcim.rs** Remove: - struct: pub::Helcim Add: - function: pub::new - struct: pub::Helcim - impl: impl Helcim **crates/hyperswitch_connectors/src/connectors/helcim/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/utils.rs** Remove: - function: pub::str_to_f32 **crates/router/src/types/api.rs** Modify existing code **crates/router/tests/connectors/fiserv.rs** Modify existing code **crates/router/tests/connectors/helcim.rs** Modify existing code
{"pr_number": 7336, "pr_title": "refactor(connector): [FISERV, HELCIM] Add amount conversion framework to Fiserv, Helcim", "merged_at": "2025-03-12T07:58:54Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/fiserv.rs", "crates/hyperswitch_connectors/src/connectors/fiserv/transformers.rs", "crates/hyperswitch_connectors/src/connectors/helcim.rs", "crates/hyperswitch_connectors/src/connectors/helcim/transformers.rs", "crates/hyperswitch_connectors/src/utils.rs", "crates/router/tests/connectors/fiserv.rs", "crates/router/tests/connectors/helcim.rs"], "types": ["crates/router/src/types/api.rs"]}, "change_types": {"structs_added": 2, "functions_added": 4, "fields_added": 15, "imports_added": 5, "database_queries": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(payment_methods): add `external_vault_details` for payments v2 sdk session call ## 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 `vault_session_details` field to session's response for vault sdk initiation - This is added for VGS as well as Hyperswitch Vault - add connector customer create call for session call, this is done inside sdk session call of payment to call the payment method service's customer for new customer creation - vault session create call is added to create session for generating `client_secret` and `session_id`, this is done in sdk session call of 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)? --> Tested through Postman: Create an MCA with Hyperswitch Vault: ``` curl --location '{{baseUrl}}/v2/connector-accounts' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'x-merchant-id: cloth_seller_MD4LXpyyn4HhnQVe7xOR' \ --header 'x-profile-id: pro_xcjuaZHwgyfclYJFcHEC' \ --header 'Authorization: admin-api-key=test_admin' \ --data '{ "connector_type": "vault_processor", "connector_name": "hyperswitch_vault", "connector_account_details": { "auth_type": "SignatureKey", "key1": "{{key1}}", "api_key": "{{api_key}}", "api_secret": "{{profile_id}}" }, "payment_methods_enabled": [], "frm_configs": null, "connector_webhook_details": { "merchant_secret": "" }, "profile_id": "pro_xcjuaZHwgyfclYJFcHEC", "metadata": { "proxy_url": "www.google.com" } }' ``` Enable vault SDK through Business Profile: ``` curl --location --request PUT '{{baseUrl}}/v2/profiles/pro_xcjuaZHwgyfclYJFcHEC' \ --header 'x-merchant-id: cloth_seller_MD4LXpyyn4HhnQVe7xOR' \ --header 'Content-Type: application/json' \ --header 'Authorization: admin-api-key={{admin_api_key}}' \ --data-raw '{ "profile_name": "Update", "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, "is_external_vault_enabled": true, "external_vault_connector_details": { "vault_connector_id": "{{mca_id}}", "vault_sdk": "vgs_sdk" } }' ``` Create a Payment Intent: ``` curl --location '{{baseUrl}}/v2/payments/create-intent' \ --header 'api-key:{{api_key}}' \ --header 'Content-Type: application/json' \ --header 'x-profile-id: pro_xcjuaZHwgyfclYJFcHEC' \ --header 'Authorization: api-key={{api_key}}' \ --data-raw '{ "amount_details": { "order_amount": 100, "currency": "USD" }, "customer_id": "12345_cus_01973a9912107142b6ccf7f3817eb976", "capture_method":"manual", "authentication_type": "no_three_ds", "billing": { "address": { "first_name": "John", "last_name": "Dough" }, "email": "example@example.com" }, "shipping": { "address": { "first_name": "John", "last_name": "Dough", "city": "Karwar", "zip": "581301", "state": "Karnataka" }, "email": "example@example.com" } }' ``` Create SDK session call using the payment_id: ``` curl --location '{{baseUrl}}/v2/payments/12345_pay_01973ab796bb747199a143ace666de02/create-external-sdk-tokens' \ --header 'Content-Type: application/json' \ --header 'x-profile-id: pro_xcjuaZHwgyfclYJFcHEC' \ --header 'Authorization: publishable-key={{pub_key}},client-secret={{client_secret}}' \ --data '{}' ``` The response should look like below: ``` { "payment_id": "12345_pay_01973ab796bb747199a143ace666de02", "session_token": [], "vault_details": { "hyperswitch_vault": { "payment_method_session_id": "12345_pms_01973fcf134f78a3a4a2a2f3c9be336a", "client_secret": "cs_01973fcf134f78a3a4a2a30134958fc2", "publishable_key": "pk_dev_69b6efb6288b447b9770a1b34f34599d", "profile_id": "pro_y9cz7vEkbxytqdmltL3K" } } } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] 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/enums.rs` - `crates/api_models/src/payments.rs` **2. Database Layer (Queries & Schema)** - `crates/diesel_models/src/business_profile.rs` **3. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/business_profile.rs` - `crates/hyperswitch_domain_models/src/configs.rs` - `crates/hyperswitch_domain_models/src/payments.rs` - ... and 3 more files **4. Core Business Logic** - `crates/router/src/core/admin.rs` - `crates/router/src/core/payment_methods.rs` - `crates/router/src/core/payment_methods/vault.rs` - ... and 12 more files **5. External Connector Integration** - `crates/common_enums/src/connector_enums.rs` - `crates/connector_configs/src/connector.rs` - `crates/hyperswitch_connectors/src/connectors.rs` - ... and 13 more files **6. Type Definitions** - `crates/hyperswitch_interfaces/src/types.rs` - `crates/router/src/types/api.rs` - `crates/router/src/types/api/payments.rs` - ... and 1 more files **7. Tests** - `config/deployments/integration_test.toml` - `loadtest/config/development.toml` **8. Configuration Files** - `config/config.example.toml` - `config/deployments/production.toml` - `config/deployments/sandbox.toml` - ... and 2 more files **9. Other** - `api-reference-v2/openapi_spec.json` - `api-reference/openapi_spec.json` - `crates/common_enums/src/enums.rs` - ... and 3 more files **Code Patterns Applied:** - Define new data structures (12 changes) - Implement new functions (93 changes) - Extend existing types with new fields (233 changes) - Add conditional logic for feature flags or filtering (3 changes) - Modify database queries (2 changes) **Detailed Identifier Changes:** Commit d32c61a2: Files to modify: **crates/api_models/src/admin.rs** Modify existing code **crates/api_models/src/enums.rs** Modify existing code **crates/api_models/src/payments.rs** Add: - struct: pub::VgsSessionDetails - struct: pub::HyperswitchVaultSessionDetails - enum: pub::VaultSessionDetails **crates/common_enums/src/connector_enums.rs** Modify existing code **crates/common_enums/src/enums.rs** Add: - enum: pub::VaultSdk **crates/connector_configs/src/connector.rs** Modify existing code **crates/diesel_models/src/business_profile.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors.rs** Add: - mod: pub::hyperswitch_vault **crates/hyperswitch_connectors/src/connectors/facilitapay/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/hyperswitch_vault.rs** Add: - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::get_request_body - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::build_request - function: private::build_headers - function: private::id - function: private::get_currency_unit - function: private::common_get_content_type - function: private::base_url - function: private::get_auth_header - function: private::build_error_response - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::get_request_body - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::build_request - function: private::build_request - function: private::build_request - function: private::build_request - function: private::build_request - function: private::build_request - function: private::build_request - function: private::build_request - function: private::build_request - function: private::get_webhook_object_reference_id - function: private::get_webhook_event_type - function: private::get_webhook_resource_object - struct: pub::HyperswitchVault - impl: impl api::Payment for HyperswitchVault - impl: impl api::PaymentSession for HyperswitchVault - impl: impl api::ConnectorAccessToken for HyperswitchVault - impl: impl api::MandateSetup for HyperswitchVault - impl: impl api::PaymentAuthorize for HyperswitchVault - impl: impl api::PaymentSync for HyperswitchVault - impl: impl api::PaymentCapture for HyperswitchVault - impl: impl api::PaymentVoid for HyperswitchVault - impl: impl api::Refund for HyperswitchVault - impl: impl api::RefundExecute for HyperswitchVault - impl: impl api::RefundSync for HyperswitchVault - impl: impl api::PaymentToken for HyperswitchVault - impl: impl api::ExternalVaultCreate for HyperswitchVault - impl: impl api::ConnectorCustomer for HyperswitchVault - impl: impl ConnectorIntegration<ExternalVaultCreateFlow, VaultRequestData, VaultResponseData> for HyperswitchVault - impl: impl ConnectorIntegration<PaymentMethodToken, PaymentMethodTokenizationData, PaymentsResponseData> for HyperswitchVault - impl: impl ConnectorCommonExt<Flow, Request, Response> for HyperswitchVault - impl: impl ConnectorCommon for HyperswitchVault - impl: impl ConnectorIntegration<CreateConnectorCustomer, ConnectorCustomerData, PaymentsResponseData> for HyperswitchVault - impl: impl ConnectorValidation for HyperswitchVault - impl: impl ConnectorIntegration<Session, PaymentsSessionData, PaymentsResponseData> for HyperswitchVault - impl: impl ConnectorIntegration<AccessTokenAuth, AccessTokenRequestData, AccessToken> for HyperswitchVault - impl: impl ConnectorIntegration<SetupMandate, SetupMandateRequestData, PaymentsResponseData> for HyperswitchVault - impl: impl ConnectorIntegration<Authorize, PaymentsAuthorizeData, PaymentsResponseData> for HyperswitchVault - impl: impl ConnectorIntegration<PSync, PaymentsSyncData, PaymentsResponseData> for HyperswitchVault - impl: impl ConnectorIntegration<Capture, PaymentsCaptureData, PaymentsResponseData> for HyperswitchVault - impl: impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for HyperswitchVault - impl: impl ConnectorIntegration<Execute, RefundsData, RefundsResponseData> for HyperswitchVault - impl: impl ConnectorIntegration<RSync, RefundsData, RefundsResponseData> for HyperswitchVault - impl: impl webhooks::IncomingWebhook for HyperswitchVault - impl: impl ConnectorSpecifications for HyperswitchVault - mod: pub::transformers **crates/hyperswitch_connectors/src/connectors/hyperswitch_vault/transformers.rs** Add: - function: private::try_from - function: private::try_from - function: private::try_from - function: private::try_from - function: private::try_from - struct: pub::HyperswitchVaultCreateRequest - struct: pub::HyperswitchVaultAuthType - struct: pub::HyperswitchVaultCreateResponse - struct: pub::HyperswitchVaultCustomerCreateRequest - struct: pub::HyperswitchVaultCustomerCreateResponse - struct: pub::HyperswitchVaultErrorResponse - struct: pub::HyperswitchVaultErrorDetails - impl: impl TryFrom<&VaultRouterData<ExternalVaultCreateFlow>> for HyperswitchVaultCreateRequest - impl: impl TryFrom<&ConnectorAuthType> for HyperswitchVaultAuthType - impl: impl TryFrom<ResponseRouterData<F, HyperswitchVaultCreateResponse, T, VaultResponseData>> for RouterData<F, T, VaultResponseData> - impl: impl TryFrom<&ConnectorCustomerRouterData> for HyperswitchVaultCustomerCreateRequest - impl: impl TryFrom<ResponseRouterData<F, HyperswitchVaultCustomerCreateResponse, T, PaymentsResponseData>> for RouterData<F, T, PaymentsResponseData> **crates/hyperswitch_connectors/src/connectors/vgs/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/constants.rs** Modify existing code **crates/hyperswitch_connectors/src/default_implementations.rs** Modify existing code **crates/hyperswitch_connectors/src/default_implementations_v2.rs** Add: - impl: impl ExternalVaultCreateV2 for $connector - impl: impl ConnectorIntegrationV2< ExternalVaultCreateFlow, VaultConnectorFlowData, VaultRequestData, VaultResponseData, > for $connector **crates/hyperswitch_domain_models/src/business_profile.rs** Add: - function: pub::is_vault_sdk_enabled **crates/hyperswitch_domain_models/src/configs.rs** Modify existing code **crates/hyperswitch_domain_models/src/payments.rs** Modify existing code **crates/hyperswitch_domain_models/src/router_flow_types/vault.rs** Add: - struct: pub::ExternalVaultCreateFlow **crates/hyperswitch_domain_models/src/router_request_types.rs** Modify existing code **crates/hyperswitch_domain_models/src/router_response_types.rs** Modify existing code **crates/hyperswitch_interfaces/src/api/vault.rs** Add: - trait: pub::ExternalVaultCreate **crates/hyperswitch_interfaces/src/api/vault_v2.rs** Add: - trait: pub::ExternalVaultCreateV2 **crates/hyperswitch_interfaces/src/types.rs** Modify existing code **crates/openapi/src/openapi_v2.rs** Modify existing code **crates/router/src/connector.rs** Modify existing code **crates/router/src/core/admin.rs** Modify existing code **crates/router/src/core/payment_methods.rs** Modify existing code **crates/router/src/core/payment_methods/vault.rs** Modify existing code **crates/router/src/core/payments.rs** Add: - function: private::get_connector_customer_id - function: private::get_optional_external_vault_session_details - function: private::set_vault_session_details - function: private::get_connector_customer_id - function: private::get_optional_external_vault_session_details - function: private::set_vault_session_details - function: private::get_connector_customer_id - function: private::get_optional_external_vault_session_details - function: private::set_vault_session_details - function: private::get_connector_customer_id - function: private::get_optional_external_vault_session_details - function: private::set_vault_session_details - mod: pub::vault_session **crates/router/src/core/payments/flows.rs** Add: - impl: impl ExternalVaultCreate for connector::DummyConnector<T> - impl: impl services::ConnectorIntegration< ExternalVaultCreateFlow, types::VaultRequestData, types::VaultResponseData, > for connector::DummyConnector<T> **crates/router/src/core/payments/flows/session_flow.rs** Add: - function: private::create_connector_customer **crates/router/src/core/payments/helpers.rs** Add: - function: pub::get_inner_db_merchant_connector_account - function: pub::get_merchant_connector_account_v2 **crates/router/src/core/payments/operations/payment_create_intent.rs** Modify existing code **crates/router/src/core/payments/operations/payment_get_intent.rs** Modify existing code **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/session_operation.rs** Modify existing code **crates/router/src/core/payments/transformers.rs** Modify existing code **crates/router/src/core/payments/vault_session.rs** Add: - function: pub::populate_vault_session_details - function: pub::call_create_connector_customer_if_required - function: pub::generate_vault_session_details - function: private::generate_hyperswitch_vault_session_details - function: private::call_external_vault_create **crates/router/src/core/utils.rs** Modify existing code **crates/router/src/types/api.rs** Modify existing code **crates/router/src/types/api/payments.rs** Modify existing code **crates/router/src/types/transformers.rs** Modify existing code **crates/router/tests/connectors/hyperswitch_vault.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::HyperswitchVaultTest - impl: impl ConnectorActions for HyperswitchVaultTest - impl: impl utils::Connector for HyperswitchVaultTest **crates/router/tests/connectors/main.rs** Add: - mod: private::hyperswitch_vault **crates/router/tests/connectors/utils.rs** Modify existing code **crates/test_utils/src/connector_auth.rs** Modify existing code
{"pr_number": 8003, "pr_title": "feat(payment_methods): add `external_vault_details` for payments v2 sdk session call", "merged_at": "2025-06-06T12:34:21Z", "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/enums.rs", "crates/api_models/src/payments.rs"], "database": ["crates/diesel_models/src/business_profile.rs"], "domain": ["crates/hyperswitch_domain_models/src/business_profile.rs", "crates/hyperswitch_domain_models/src/configs.rs", "crates/hyperswitch_domain_models/src/payments.rs", "crates/hyperswitch_domain_models/src/router_flow_types/vault.rs", "crates/hyperswitch_domain_models/src/router_request_types.rs", "crates/hyperswitch_domain_models/src/router_response_types.rs"], "core_business": ["crates/router/src/core/admin.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/flows.rs", "crates/router/src/core/payments/flows/session_flow.rs", "crates/router/src/core/payments/helpers.rs", "crates/router/src/core/payments/operations/payment_create_intent.rs", "crates/router/src/core/payments/operations/payment_get_intent.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/session_operation.rs", "crates/router/src/core/payments/transformers.rs", "crates/router/src/core/payments/vault_session.rs", "crates/router/src/core/utils.rs"], "connectors": ["crates/common_enums/src/connector_enums.rs", "crates/connector_configs/src/connector.rs", "crates/hyperswitch_connectors/src/connectors.rs", "crates/hyperswitch_connectors/src/connectors/facilitapay/transformers.rs", "crates/hyperswitch_connectors/src/connectors/hyperswitch_vault.rs", "crates/hyperswitch_connectors/src/connectors/hyperswitch_vault/transformers.rs", "crates/hyperswitch_connectors/src/connectors/vgs/transformers.rs", "crates/hyperswitch_connectors/src/constants.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/hyperswitch_vault.rs", "crates/router/tests/connectors/main.rs", "crates/router/tests/connectors/utils.rs", "crates/test_utils/src/connector_auth.rs", "scripts/add_connector.sh"], "types": ["crates/hyperswitch_interfaces/src/types.rs", "crates/router/src/types/api.rs", "crates/router/src/types/api/payments.rs", "crates/router/src/types/transformers.rs"], "tests": ["config/deployments/integration_test.toml", "loadtest/config/development.toml"], "config": ["config/config.example.toml", "config/deployments/production.toml", "config/deployments/sandbox.toml", "config/development.toml", "config/docker_compose.toml"], "other": ["api-reference-v2/openapi_spec.json", "api-reference/openapi_spec.json", "crates/common_enums/src/enums.rs", "crates/hyperswitch_interfaces/src/api/vault.rs", "crates/hyperswitch_interfaces/src/api/vault_v2.rs", "crates/openapi/src/openapi_v2.rs"]}, "change_types": {"structs_added": 12, "functions_added": 93, "enums_added": 2, "fields_added": 233, "imports_added": 33, "conditionals_added": 3, "database_queries": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(connector): [CASHTOCODE] Added supported countries and currencies ## 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 --> Added supported countries and currencies for Cashtocode. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with 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/development.toml` - ... and 1 more files
{"pr_number": 8060, "pr_title": "fix(connector): [CASHTOCODE] Added supported countries and currencies", "merged_at": "2025-05-19T12:06:18Z", "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/development.toml", "config/docker_compose.toml"]}, "change_types": {}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
feat(ai): add endpoints to chat with ai service ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description The PR does the following actions - Adds endpoints to talk to ai services, particularly to n8n flow and embedded flow - Introduces a feature flag to manage chat features across different envs ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context Closes #8584 ## How did you test it? curl to test this ``` curl --location 'http://localhost:8080/chat/ai/data' \ --header 'x-feature: integ-custom' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer JWT' \ --data '{ "message": "get count of failed payments" }' ``` <img width="1340" height="674" alt="image" src="https://github.com/user-attachments/assets/bd7722d8-a6c0-4494-ab44-d2fb821e5146" /> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] 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/chat.rs` - `crates/api_models/src/events.rs` - `crates/api_models/src/events/chat.rs` - ... and 1 more files **2. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/chat.rs` - `crates/hyperswitch_domain_models/src/lib.rs` **3. Core Business Logic** - `crates/router/src/core.rs` - `crates/router/src/core/chat.rs` - `crates/router/src/core/errors.rs` - ... and 1 more files **4. Type Definitions** - `crates/router_env/src/logger/types.rs` **5. Utils** - `crates/common_utils/src/consts.rs` - `crates/common_utils/src/events.rs` - `crates/router/src/routes/lock_utils.rs` **6. Tests** - `loadtest/config/development.toml` **7. Configuration Files** - `config/config.example.toml` - `config/deployments/env_specific.toml` - `config/development.toml` - ... and 4 more files **8. Other** - `crates/router/src/lib.rs` - `crates/router/src/routes.rs` - `crates/router/src/routes/app.rs` - ... and 1 more files **Code Patterns Applied:** - Define new data structures (6 changes) - Implement new functions (6 changes) - Extend existing types with new fields (27 changes) - Add conditional logic for feature flags or filtering (1 changes) **Detailed Identifier Changes:** Commit 3d60e6c4: Files to modify: **crates/api_models/src/chat.rs** Add: - struct: pub::ChatRequest - struct: pub::ChatResponse **crates/api_models/src/events.rs** Add: - mod: pub::chat **crates/api_models/src/events/chat.rs** Modify existing code **crates/api_models/src/lib.rs** Add: - mod: pub::chat **crates/common_utils/src/consts.rs** Modify existing code **crates/common_utils/src/events.rs** Modify existing code **crates/hyperswitch_domain_models/src/chat.rs** Add: - struct: pub::GetDataMessage - struct: pub::HyperswitchAiDataRequest **crates/hyperswitch_domain_models/src/lib.rs** Add: - mod: pub::chat **crates/router/src/configs/secrets_transformers.rs** Modify existing code **crates/router/src/configs/settings.rs** Add: - struct: pub::ChatSettings **crates/router/src/configs/validations.rs** Add: - function: pub::validate - impl: impl super::settings::ChatSettings **crates/router/src/core.rs** Add: - mod: pub::chat **crates/router/src/core/chat.rs** Add: - function: pub::get_data_from_hyperswitch_ai_workflow **crates/router/src/core/errors.rs** Add: - mod: pub::chat **crates/router/src/core/errors/chat.rs** Add: - function: private::switch - function: pub::get_error_message - enum: pub::ChatErrors - impl: impl common_utils::errors::ErrorSwitch<api_models::errors::types::ApiErrorResponse> for ChatErrors - impl: impl ChatErrors **crates/router/src/lib.rs** Modify existing code **crates/router/src/routes.rs** Add: - mod: pub::chat **crates/router/src/routes/app.rs** Add: - function: pub::server - struct: pub::Chat - impl: impl Chat **crates/router/src/routes/chat.rs** Add: - function: pub::get_data_from_hyperswitch_ai_workflow **crates/router/src/routes/lock_utils.rs** Modify existing code **crates/router_env/src/logger/types.rs** Modify existing code
{"pr_number": 8585, "pr_title": "feat(ai): add endpoints to chat with ai service", "merged_at": "2025-07-16T20:33:11Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "user"]}, "hierarchy": {"api_models": ["crates/api_models/src/chat.rs", "crates/api_models/src/events.rs", "crates/api_models/src/events/chat.rs", "crates/api_models/src/lib.rs"], "domain": ["crates/hyperswitch_domain_models/src/chat.rs", "crates/hyperswitch_domain_models/src/lib.rs"], "core_business": ["crates/router/src/core.rs", "crates/router/src/core/chat.rs", "crates/router/src/core/errors.rs", "crates/router/src/core/errors/chat.rs"], "types": ["crates/router_env/src/logger/types.rs"], "utils": ["crates/common_utils/src/consts.rs", "crates/common_utils/src/events.rs", "crates/router/src/routes/lock_utils.rs"], "tests": ["loadtest/config/development.toml"], "config": ["config/config.example.toml", "config/deployments/env_specific.toml", "config/development.toml", "config/docker_compose.toml", "crates/router/src/configs/secrets_transformers.rs", "crates/router/src/configs/settings.rs", "crates/router/src/configs/validations.rs"], "other": ["crates/router/src/lib.rs", "crates/router/src/routes.rs", "crates/router/src/routes/app.rs", "crates/router/src/routes/chat.rs"]}, "change_types": {"structs_added": 6, "functions_added": 6, "enums_added": 1, "fields_added": 27, "imports_added": 20, "conditionals_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): [jpmorgan] implement refund flow ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [x] CI/CD ## Description <!-- Describe your changes in detail --> This PR implements refund flow for JPMorgan connector. Connector returns `Authorized` state (`Pending`). Post RSync call, the status gets updated to `Success`. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with 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 connector lacked this basic feature until now. Closes #8435 ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Updated Cypress tests: <img width="558" alt="image" src="https://github.com/user-attachments/assets/cb18d34e-d6d2-4145-8e94-773ab6638389" /> There exist an issue from the connector where it returns same `transaction_id` (`connector_transaction_id`) every single time which we have no control. Because of this, refunds tend to exceed the maximum refundable amount resulting in 4xx as shown below: <img width="557" alt="image" src="https://github.com/user-attachments/assets/549c517b-cc54-4114-b034-5df64783bd68" /> <img width="477" alt="image" src="https://github.com/user-attachments/assets/47018470-5798-4a07-b480-1f0694540d68" /> ## 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 && jut clippy_v2` - [x] I reviewed the submitted code - [x] I added unit tests for my changes where possible <!-- @coderabbitai ignore -->
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/jpmorgan.rs` - `crates/hyperswitch_connectors/src/connectors/jpmorgan/transformers.rs` **2. Tests** - `cypress-tests/cypress/e2e/configs/Payment/Jpmorgan.js` **Code Patterns Applied:** - Implement new functions (2 changes) - Extend existing types with new fields (23 changes) **Detailed Identifier Changes:** Commit cf92e1a5: Files to modify: **crates/hyperswitch_connectors/src/connectors/jpmorgan.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/jpmorgan/transformers.rs** Remove: - struct: pub::MerchantSoftware - struct: pub::RefundResponse
{"pr_number": 8436, "pr_title": "feat(connector): [jpmorgan] implement refund flow", "merged_at": "2025-06-25T07:01:17Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user", "refund", "connector"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/jpmorgan.rs", "crates/hyperswitch_connectors/src/connectors/jpmorgan/transformers.rs"], "tests": ["cypress-tests/cypress/e2e/configs/Payment/Jpmorgan.js"]}, "change_types": {"functions_added": 2, "fields_added": 23}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(nix): add support for running external services through services-flake ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Described in #57 ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context Removes dependency on brew for installing and managing external services - redis and Postgres. ## How did you test it? Locally. - Make sure nix is installed - `nix run .#ext-services` ## 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** - `.gitignore` - `docs/try_local_system.md` - `flake.lock` - ... and 1 more files
{"pr_number": 6377, "pr_title": "feat(nix): add support for running external services through services-flake", "merged_at": "2024-11-05T14:07:43Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"other": [".gitignore", "docs/try_local_system.md", "flake.lock", "flake.nix"]}, "change_types": {}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
feat(authentication): Added eligibility flow for modular authentication ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] New feature ## Description <!-- Describe your changes in detail --> ### Additional Changes - [x] This PR modifies the API contract - [x] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables This PR adds an authentication eligibility flow for modular authentication, introducing new APIs and database schema changes to support a more flexible authentication system. ## __Key Features Added__ ### 1. __New Authentication Eligibility API__ - Added `POST /authentication/{authentication_id}/eligibility` endpoint - Allows checking authentication eligibility before proceeding with the full authentication flow - Returns authentication details, 3DS method data, and next action URLs ### 2. __Database Schema Changes__ - __Authentication Table Enhancements:__ - Added `amount` and `currency` fields - Added `billing_address`, `shipping_address`, `browser_info`, `email` fields (encrypted) - Added `profile_acquirer_id` field for linking to profile acquirer configurations - Added `merchant_country_code` field in business profile table ### 3. __API Model Updates__ - __AuthenticationCreateRequest:__ Added `profile_acquirer_id` field - __AuthenticationResponse:__ Added `profile_acquirer_id` field - __New AuthenticationEligibilityRequest:__ Contains payment method data, billing/shipping addresses, browser info - __New AuthenticationEligibilityResponse:__ Returns authentication status, 3DS method details, next action URL ### 4. __Core Business Logic Changes__ - __Unified Authentication Service:__ Enhanced to support both ClickToPay and ExternalAuthentication flows - __Profile Acquirer Integration:__ Authentication now uses acquirer configurations from business profiles - __Encryption Support:__ Added encryption for PII fields (billing address, shipping address, email) - __Merchant Details Enhancement:__ Added support for merchant country code and other metadata ### 5. __Database Migrations__ - `2025-06-20-083632_add-amount-currency-to-authentication-table` - `2025-06-24-172453_add_new_fields_to_authentication_table` - `2025-07-02-071146_add-merchant-country-code-in-business-profile` ### 6. __API Contract Changes__ - Updated OpenAPI specifications for both v1 and v2 - New authentication eligibility endpoints - Enhanced authentication create/response models ### 7. __Configuration Updates__ - Updated development.toml configuration - Added support for new authentication flow configurations ## __Technical Improvements__ ### __Modular Authentication Architecture__ - Separated authentication concerns from payment flows - Introduced trait-based authentication service pattern - Support for multiple authentication types (ClickToPay, External 3DS) ### __Enhanced Data Flow__ 1. __Create Authentication:__ Client creates authentication with profile_acquirer_id 2. __Check Eligibility:__ Client checks authentication eligibility with payment method data 3. __Pre-authentication:__ System performs pre-authentication checks 4. __Authentication:__ Full authentication flow with 3DS if required 5. __Post-authentication:__ Completion and confirmation ### __Security Enhancements__ - PII data encryption for sensitive fields - Client secret validation and expiry checks - Secure handling of authentication credentials ## __Integration Points__ - __Business Profile:__ Authentication now integrates with profile acquirer configurations - __Merchant Configuration:__ Support for merchant-specific authentication settings - __Connector Integration:__ Enhanced connector support for authentication flows - __Payment Flow:__ Seamless integration with existing payment operations ## __Backward Compatibility__ - All new fields are nullable to maintain backward compatibility - Existing authentication flows continue to work - Gradual migration path for new features This PR significantly enhances the authentication system by making it more modular, flexible, and feature-rich while maintaining backward compatibility with existing implementations. ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Setup Netcetera in MCA : ```shell curl --location 'http://localhost:8080/account/sahkal11/connectors' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_xekWBE7fjlTQ4d4fsmYBqgoNyBdfLaZxggJ6nY4tL2Eyl0Ece6lGGH1o7N4ZtrE3' \ --data ' { "connector_type": "authentication_processor", "connector_name": "netcetera", "connector_account_details": { "auth_type": "CertificateAuth", "certificate": CERTIFICATE, "private_key": PRIVATE_KEY }, "test_mode": true, "disabled": false, "metadata": { "mcc": "5411", "merchant_country_code": "840", "merchant_name": "Dummy Merchant", "endpoint_prefix": "flowbird", "three_ds_requestor_name": "juspay-prev", "three_ds_requestor_id": "juspay-prev", "pull_mechanism_for_external_3ds_enabled": false } } ' ``` Setup Profile acquirer Config ``` curl --location 'localhost:8080/profile_acquirer' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_xekWBE7fjlTQ4d4fsmYBqgoNyBdfLaZxggJ6nY4tL2Eyl0Ece6lGGH1o7N4ZtrE3' \ --data '{ "acquirer_assigned_merchant_id": "00002000000", "merchant_name": "Demo Merchant", "network": "AmericanExpress", "acquirer_bin": "400000", "acquirer_fraud_rate": 0.2345545234765, "profile_id": "pro_89fr3mDlSeDfh8fro28W" }' ``` Update Business Profile ```shell curl --location 'http://localhost:8080/account/sahkal11/business_profile/pro_89fr3mDlSeDfh8fro28W' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_xekWBE7fjlTQ4d4fsmYBqgoNyBdfLaZxggJ6nY4tL2Eyl0Ece6lGGH1o7N4ZtrE3' \ --data ' { "authentication_connector_details": { "authentication_connectors": ["netcetera"], "three_ds_requestor_url": "https://google.com" }, "merchant_country_code": "004" } ' ``` Do Authentication Create : ```shell curl --location 'localhost:8080/authentication' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_xekWBE7fjlTQ4d4fsmYBqgoNyBdfLaZxggJ6nY4tL2Eyl0Ece6lGGH1o7N4ZtrE3' \ --data '{ "amount": 10, "currency": "USD", "acquirer_details": { "merchant_id": "12134", "bin": "438309", "country_code": null }, "authentication_connector":"netcetera", "profile_acquirer_id": "pro_acq_JO8uZghB4Y6qJFAgkUbI" }' ``` Do Authentication Eligibility ```shell curl --location 'localhost:8080/authentication/authn_G2nUqHYBrMLIMgcyO8Az/eligibility' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_xekWBE7fjlTQ4d4fsmYBqgoNyBdfLaZxggJ6nY4tL2Eyl0Ece6lGGH1o7N4ZtrE3' \ --data-raw '{ "payment_method": "card", "payment_method_data": { "card": { "card_number": CARD_NUMBER, "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_LhAY1jDOAYJuHeUAQWwh" }' ``` RESPONSE ```shell { "authentication_id": "authn_U4Z7xqe7HHIScfDU50xW", "next_api_action": { "url": "http://localhost:8080/authentication/authn_U4Z7xqe7HHIScfDU50xW/authenticate", "http_method": "POST" }, "status": "pending", "eligibility_response_params": { "ThreeDsData": { "threeds_server_transaction_id": "ed790486-dda7-4972-83ab-5d0afbaa8885", "maximum_supported_3ds_version": "2.3.1", "connector_authentication_id": "ed790486-dda7-4972-83ab-5d0afbaa8885", "three_ds_method_data": "eyJ0aHJlZURTTWV0aG9kTm90aWZpY2F0aW9uVVJMIjoiaHR0cHM6Ly9leGFtcGxlLmNvbS8zZHMtbWV0aG9kLW5vdGlmaWNhdGlvbi11cmwiLCJ0aHJlZURTU2VydmVyVHJhbnNJRCI6ImVkNzkwNDg2LWRkYTctNDk3Mi04M2FiLTVkMGFmYmFhODg4NSJ9", "three_ds_method_url": "https://ndm-prev.3dss-non-prod.cloud.netcetera.com/acs/3ds-method", "message_version": "2.3.1", "directory_server_id": "A000000003" } }, "connector_metadata": null, "profile_id": "pro_To47L194jVTevrWXRxR3", "error_message": null, "error_code": null, "authentication_connector": "netcetera", "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "CA", "first_name": "PiX", "last_name": null }, "phone": { "number": "123456789", "country_code": "12" }, "email": null }, "shipping": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "PiX", "last_name": null }, "phone": { "number": "123456789", "country_code": "12" }, "email": null }, "browser_information": { "color_depth": 24, "java_enabled": true, "java_script_enabled": true, "language": "nl-NL", "screen_height": 723, "screen_width": 1536, "time_zone": 0, "ip_address": "115.99.183.2", "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/70.0.3538.110 Safari/537.36", "os_type": null, "os_version": null, "device_model": null }, "email": "sahkalplanet@gmail.com" } ``` SHOULD RETURN 200 in each case ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **payment** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/authentication.rs` - `crates/api_models/src/payments.rs` **2. Database Layer (Queries & Schema)** - `crates/diesel_models/src/authentication.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/authentication.rs` - `crates/hyperswitch_domain_models/src/lib.rs` - `crates/hyperswitch_domain_models/src/router_request_types/unified_authentication_service.rs` **4. Core Business Logic** - `crates/router/src/core/authentication.rs` - `crates/router/src/core/authentication/utils.rs` - `crates/router/src/core/payments.rs` - ... and 4 more files **5. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/unified_authentication_service.rs` - `crates/hyperswitch_connectors/src/connectors/unified_authentication_service/transformers.rs` **6. Type Definitions** - `crates/router_env/src/logger/types.rs` **7. Utils** - `crates/common_utils/src/errors.rs` - `crates/router/src/routes/lock_utils.rs` **8. Configuration Files** - `config/development.toml` **9. Other** - `api-reference/v1/openapi_spec_v1.json` - `crates/openapi/src/openapi.rs` - `crates/router/src/db/authentication.rs` - ... and 5 more files **Code Patterns Applied:** - Define new data structures (16 changes) - Implement new functions (16 changes) - Extend existing types with new fields (382 changes) - Add conditional logic for feature flags or filtering (3 changes) **Detailed Identifier Changes:** Commit 82eb3ca7: Files to modify: **crates/api_models/src/authentication.rs** Add: - function: pub::get_next_action_api - function: pub::get_billing_address - function: pub::get_shipping_address - function: pub::get_browser_information - function: private::get_api_event_type - function: private::get_api_event_type - struct: pub::AuthenticationEligibilityRequest - struct: pub::AuthenticationEligibilityResponse - struct: pub::ThreeDsData - struct: pub::NextAction - enum: pub::EligibilityResponseParams - impl: impl AuthenticationEligibilityRequest - impl: impl ApiEventMetric for AuthenticationEligibilityRequest - impl: impl ApiEventMetric for AuthenticationEligibilityResponse **crates/api_models/src/payments.rs** Modify existing code **crates/common_utils/src/errors.rs** Modify existing code **crates/diesel_models/src/authentication.rs** Modify existing code **crates/diesel_models/src/schema.rs** Modify existing code **crates/diesel_models/src/schema_v2.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/unified_authentication_service.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/unified_authentication_service/transformers.rs** Add: - function: private::try_from - function: private::try_from - function: pub::get_max_acs_protocol_version_if_available - struct: pub::TokenEligibilityResponse - struct: pub::PaymentMethodDetails - struct: pub::VerificationResults - struct: pub::EnabledServices - struct: pub::ThreeDsEligibilityResponse - struct: pub::AcsProtocolVersion - struct: pub::SupportedMsgExt - struct: pub::ThreeDsMethodDataForm - struct: pub::ThreeDsMethodData - enum: pub::MessageCategory - enum: pub::UnifiedAuthenticationServiceAuthType - enum: pub::Eligibility - impl: impl TryFrom<&UasPreAuthenticationRouterData> for UnifiedAuthenticationServicePreAuthenticateRequest - impl: impl TryFrom<&ConnectorAuthType> for UnifiedAuthenticationServiceAuthType - impl: impl ThreeDsEligibilityResponse **crates/hyperswitch_domain_models/src/authentication.rs** Add: - struct: pub::Authentication **crates/hyperswitch_domain_models/src/lib.rs** Add: - mod: pub::authentication **crates/hyperswitch_domain_models/src/router_request_types/unified_authentication_service.rs** Add: - struct: pub::MerchantDetails **crates/openapi/src/openapi.rs** Modify existing code **crates/router/src/core/authentication.rs** Modify existing code **crates/router/src/core/authentication/utils.rs** Modify existing code **crates/router/src/core/payments.rs** Modify existing code **crates/router/src/core/payments/operations/payment_confirm.rs** Modify existing code **crates/router/src/core/unified_authentication_service.rs** Remove: - mod: pub::utils Add: - mod: pub::utils **crates/router/src/core/unified_authentication_service/types.rs** Modify existing code **crates/router/src/core/unified_authentication_service/utils.rs** Add: - function: pub::authenticate_authentication_client_secret_and_check_expiry **crates/router/src/db/authentication.rs** Modify existing code **crates/router/src/routes/app.rs** Modify existing code **crates/router/src/routes/authentication.rs** Add: - function: pub::authentication_eligibility **crates/router/src/routes/lock_utils.rs** Modify existing code **crates/router/src/services/authentication.rs** Add: - function: private::get_client_secret - impl: impl ClientSecretFetch for api_models::authentication::AuthenticationEligibilityRequest **crates/router_env/src/logger/types.rs** Modify existing code
{"pr_number": 8431, "pr_title": "feat(authentication): Added eligibility flow for modular authentication", "merged_at": "2025-07-21T13:38:52Z", "intent": {"feature_type": "payment", "action": "add_feature", "entities": ["payment", "merchant", "user"]}, "hierarchy": {"api_models": ["crates/api_models/src/authentication.rs", "crates/api_models/src/payments.rs"], "database": ["crates/diesel_models/src/authentication.rs", "crates/diesel_models/src/schema.rs", "crates/diesel_models/src/schema_v2.rs"], "domain": ["crates/hyperswitch_domain_models/src/authentication.rs", "crates/hyperswitch_domain_models/src/lib.rs", "crates/hyperswitch_domain_models/src/router_request_types/unified_authentication_service.rs"], "core_business": ["crates/router/src/core/authentication.rs", "crates/router/src/core/authentication/utils.rs", "crates/router/src/core/payments.rs", "crates/router/src/core/payments/operations/payment_confirm.rs", "crates/router/src/core/unified_authentication_service.rs", "crates/router/src/core/unified_authentication_service/types.rs", "crates/router/src/core/unified_authentication_service/utils.rs"], "connectors": ["crates/hyperswitch_connectors/src/connectors/unified_authentication_service.rs", "crates/hyperswitch_connectors/src/connectors/unified_authentication_service/transformers.rs"], "types": ["crates/router_env/src/logger/types.rs"], "utils": ["crates/common_utils/src/errors.rs", "crates/router/src/routes/lock_utils.rs"], "config": ["config/development.toml"], "other": ["api-reference/v1/openapi_spec_v1.json", "crates/openapi/src/openapi.rs", "crates/router/src/db/authentication.rs", "crates/router/src/routes/app.rs", "crates/router/src/routes/authentication.rs", "crates/router/src/services/authentication.rs", "migrations/2025-06-24-172453_add_new_fields_to_authentication_table/down.sql", "migrations/2025-06-24-172453_add_new_fields_to_authentication_table/up.sql"]}, "change_types": {"structs_added": 16, "functions_added": 16, "enums_added": 4, "fields_added": 382, "imports_added": 18, "conditionals_added": 3}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
build(deps): migrate usages of `once_cell` crate to standard library equivalents ## 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 updates the usages of the `once_cell` crate and its types with their standard library equivalents. This PR replaces: - [`once_cell::sync::OnceCell`](https://docs.rs/once_cell/latest/once_cell/sync/struct.OnceCell.html) with [`std::sync::OnceLock`](https://doc.rust-lang.org/std/sync/struct.OnceLock.html). - [`once_cell::sync::Lazy`](https://docs.rs/once_cell/latest/once_cell/sync/struct.Lazy.html) with [`std::sync::LazyLock`](https://doc.rust-lang.org/std/sync/struct.LazyLock.html). However, this is not a complete migration, since [`once_cell::sync::OnceCell::get_or_try_init()`](https://docs.rs/once_cell/latest/once_cell/sync/struct.OnceCell.html#method.get_or_try_init) cannot be replaced with [`std::sync::OnceLock::get_or_try_init()`](https://doc.rust-lang.org/std/sync/struct.OnceLock.html#method.get_or_try_init) as it is not available in the stable toolchain yet, as of Rust 1.86. Due to this reason, `once_cell` is still kept as a dependency in the `common_utils`, `external_services` and `router` crates, only where the `get_or_try_init()` method is being used. P.S.: This code was mostly written by AI, which I've also reviewed along the way. ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with 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 just replaces usages of one of our dependencies to the standard library equivalents. ## How did you test 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. Performed sanity testing via Postman. The expected result is that there are no behavior changes due to this PR. 2. I have run unit tests on the `euclid` and `common_utils` crates, all of them (from these two crates) passed. Some of these unit tests make use of the static variables that were migrated in this PR: - https://github.com/juspay/hyperswitch/blob/5fd6df73c9adaa454402c9b79ba37eff9f4c3ffc/crates/common_utils/src/validation.rs#L111-L120 - This test exercises the `EMAIL_REGEX` static variable. - https://github.com/juspay/hyperswitch/blob/5fd6df73c9adaa454402c9b79ba37eff9f4c3ffc/crates/euclid/src/dssa/analyzer.rs#L258-L377 - These tests call `analyze` without providing a specific graph, thus using `ANALYSIS_GRAPH`. Screenshot of unit test run: ![Screenshot of unit test run](https://github.com/user-attachments/assets/53502abe-e26e-470f-9e19-84fbe02247fe) 3. I have confirmed that cache system works correctly by adding a log line in case of in-memory cache hits (this log line was added only for testing and is not included in the PR). The in-memory caches also make use of static variables and `LazyLock`, so their correct functioning indicates that the migration hasn't broken the cache system. ![Screenshot of log lines indicating in-memory cache hits](https://github.com/user-attachments/assets/84639408-4467-4617-98b8-a7e330feaf68) ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I 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. Database Layer (Queries & Schema)** - `crates/diesel_models/src/lib.rs` **2. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/consts.rs` - `crates/hyperswitch_domain_models/src/type_encryption.rs` **3. Core Business Logic** - `crates/router/src/core/user_role.rs` **4. External Connector Integration** - `crates/hyperswitch_connectors/Cargo.toml` - `crates/hyperswitch_connectors/src/utils.rs` - `crates/router/src/connector/utils.rs` **5. Type Definitions** - `crates/router/src/types/domain/user.rs` - `crates/router/src/types/domain/user/user_authentication_method.rs` **6. Utils** - `crates/common_utils/src/validation.rs` - `crates/router/src/utils/currency.rs` **7. Tests** - `crates/router_env/tests/logger.rs` - `cypress-tests/cypress/e2e/configs/Payment/Noon.js` - `cypress-tests/cypress/support/commands.js` **8. Configuration Files** - `crates/analytics/Cargo.toml` - `crates/cards/Cargo.toml` - `crates/drainer/Cargo.toml` - ... and 6 more files **9. Other** - `Cargo.lock` - `crates/analytics/src/metrics/request.rs` - `crates/cards/src/validate.rs` - ... and 8 more files **Code Patterns Applied:** - Extend existing types with new fields (9 changes) - Add conditional logic for feature flags or filtering (4 changes) - Modify database queries (2 changes) **Detailed Identifier Changes:** Commit 673cf249: Files to modify: **crates/analytics/src/metrics/request.rs** Modify existing code **crates/cards/src/validate.rs** Modify existing code **crates/common_utils/src/validation.rs** Modify existing code **crates/diesel_models/src/lib.rs** Modify existing code **crates/euclid/src/dssa/analyzer.rs** Modify existing code **crates/euclid/src/dssa/truth.rs** Modify existing code **crates/euclid_wasm/src/lib.rs** Modify existing code **crates/hyperswitch_connectors/src/utils.rs** Modify existing code **crates/hyperswitch_domain_models/src/consts.rs** Modify existing code **crates/hyperswitch_domain_models/src/type_encryption.rs** Modify existing code **crates/router/src/connector/utils.rs** Modify existing code **crates/router/src/core/user_role.rs** Modify existing code **crates/router/src/services/authorization/roles/predefined_roles.rs** Modify existing code **crates/router/src/types/domain/user.rs** Modify existing code **crates/router/src/types/domain/user/user_authentication_method.rs** Modify existing code **crates/router/src/utils/currency.rs** Modify existing code **crates/router_env/src/lib.rs** Modify existing code **crates/router_env/src/logger/formatter.rs** Modify existing code **crates/router_env/src/metrics.rs** Modify existing code **crates/router_env/tests/logger.rs** Modify existing code **crates/storage_impl/src/redis/cache.rs** Modify existing code
{"pr_number": 8030, "pr_title": "build(deps): migrate usages of `once_cell` crate to standard library equivalents", "merged_at": "2025-05-19T11:07:05Z", "intent": {"feature_type": "connector_integration", "action": "add_feature", "entities": ["user"]}, "hierarchy": {"database": ["crates/diesel_models/src/lib.rs"], "domain": ["crates/hyperswitch_domain_models/src/consts.rs", "crates/hyperswitch_domain_models/src/type_encryption.rs"], "core_business": ["crates/router/src/core/user_role.rs"], "connectors": ["crates/hyperswitch_connectors/Cargo.toml", "crates/hyperswitch_connectors/src/utils.rs", "crates/router/src/connector/utils.rs"], "types": ["crates/router/src/types/domain/user.rs", "crates/router/src/types/domain/user/user_authentication_method.rs"], "utils": ["crates/common_utils/src/validation.rs", "crates/router/src/utils/currency.rs"], "tests": ["crates/router_env/tests/logger.rs", "cypress-tests/cypress/e2e/configs/Payment/Noon.js", "cypress-tests/cypress/support/commands.js"], "config": ["crates/analytics/Cargo.toml", "crates/cards/Cargo.toml", "crates/drainer/Cargo.toml", "crates/euclid/Cargo.toml", "crates/euclid_wasm/Cargo.toml", "crates/hyperswitch_interfaces/Cargo.toml", "crates/router_env/Cargo.toml", "crates/scheduler/Cargo.toml", "crates/storage_impl/Cargo.toml"], "other": ["Cargo.lock", "crates/analytics/src/metrics/request.rs", "crates/cards/src/validate.rs", "crates/euclid/src/dssa/analyzer.rs", "crates/euclid/src/dssa/truth.rs", "crates/euclid_wasm/src/lib.rs", "crates/router/src/services/authorization/roles/predefined_roles.rs", "crates/router_env/src/lib.rs", "crates/router_env/src/logger/formatter.rs", "crates/router_env/src/metrics.rs", "crates/storage_impl/src/redis/cache.rs"]}, "change_types": {"fields_added": 9, "imports_added": 14, "conditionals_added": 4, "database_queries": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(connector): [CYBERSOURCE] fix incorrect consumer authentication information fields ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Fix consumer authenttication information fields 1. Renamed _consumer_authentication_information.pares_status_reason_ field to _consumer_authentication_information.signed_pares_status_reason_ 2. Moved _cavv_algorithm_ from _processing_information_ to _consumer_authentication_information_ Verified with cybersouce api spec <img width="531" height="634" alt="Screenshot 2025-08-12 at 5 24 33 PM" src="https://github.com/user-attachments/assets/4e8a1c93-1827-4991-b750-6449f52398fe" /> <img width="416" height="487" alt="Screenshot 2025-08-12 at 5 24 58 PM" src="https://github.com/user-attachments/assets/e80e3233-26ba-49f7-90af-4e2bce65456c" /> ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies 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)? --> Steps: 1. Do a 3ds payment via cybersource and netcetera 2. Check cybersource request fields for signed_pares_status_reason, cavv_algorithm <img width="1496" height="359" alt="Screenshot 2025-08-12 at 5 22 54 PM" src="https://github.com/user-attachments/assets/82bcb9fc-4a0f-4dcf-a45b-fb7f6c4530c9" /> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] 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 (13 changes) **Detailed Identifier Changes:** Commit 07a6271b: Files to modify: **crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs** Modify existing code
{"pr_number": 8927, "pr_title": "fix(connector): [CYBERSOURCE] fix incorrect consumer authentication information fields", "merged_at": "2025-08-13T12:20:13Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "user"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs"]}, "change_types": {"fields_added": 13}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(users): Incorporate themes in user APIs ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> - This PR will introduce theme context in user APIs and email related APIs. - The User APIs which are affected are 1. User Info 2. Invite 3. Resend Invite 4. Reset Password 5. Connect Account 6. Signup with merchant id - Non User flows 1. Request for Recon 2. Recon merchant update 3. API Key expiry reminder ### 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` 4. `crates/router/src/configs` 5. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> Closes #6780 ## How did you test 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. User Info API will send `theme_id` in the response if a theme exists in your lineage. ``` curl --location 'http://localhost:8080/user' \ --header 'Cookie: login_token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiMzAwMjAwN2UtZWE3NC00NzVlLWJmNWQtMzYxNzIwNTk4YzA3IiwibWVyY2hhbnRfaWQiOiJtZXJjaGFudF8xNzMzNDkyMzU3Iiwicm9sZV9pZCI6Im9yZ19hZG1pbiIsImV4cCI6MTczMzY2NTMzOSwib3JnX2lkIjoib3JnX3Z5VDVDb3BEdnpPT3g5V211TTdMIiwicHJvZmlsZV9pZCI6InByb180cHE4ZVVFREJDc1YyaDN5Mk9iSSIsInRlbmFudF9pZCI6InB1YmxpYyJ9.YsKkaY8aFDWz_1CLrZEZWNxmO2rSCk-yTe77OmHP_ZE' ``` ```json { "merchant_id": "merchant_1733492357", "name": "name", "email": "email", "verification_days_left": null, "role_id": "org_admin", "org_id": "org_vyT5CopDvzOOx9WmuM7L", "is_two_factor_auth_setup": false, "recovery_codes_left": null, "profile_id": "pro_4pq8eUEDBCsV2h3y2ObI", "entity_type": "organization", "theme_id": "7792a4e5-bd7c-498d-8478-c4e0a9a0a984" } ``` 2. All the other user specific APIs mentioned above will have `theme_id` in the return URL and also accept `theme_id` in the request. 3. Other flows will reflect the email themes once the email templates are changed to use the theme 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/user.rs` - `crates/api_models/src/user/theme.rs` **2. Database Layer (Queries & Schema)** - `crates/diesel_models/src/query/user/theme.rs` - `crates/diesel_models/src/schema.rs` - `crates/diesel_models/src/schema_v2.rs` - ... and 1 more files **3. Core Business Logic** - `crates/router/src/core/errors/user.rs` - `crates/router/src/core/recon.rs` - `crates/router/src/core/user.rs` - ... and 2 more files **4. Type Definitions** - `crates/common_utils/src/types/theme.rs` - `crates/router/src/services/email/types.rs` **5. Utils** - `crates/router/src/utils/user/theme.rs` **6. Configuration Files** - `config/config.example.toml` - `config/deployments/env_specific.toml` - `config/development.toml` - ... and 3 more files **7. Other** - `crates/router/src/db/kafka_store.rs` - `crates/router/src/db/user/theme.rs` - `crates/router/src/routes/app.rs` - ... and 4 more files **Code Patterns Applied:** - Define new data structures (3 changes) - Implement new functions (19 changes) - Extend existing types with new fields (140 changes) - Add conditional logic for feature flags or filtering (4 changes) - Modify database queries (4 changes) **Detailed Identifier Changes:** Commit 4b989fe0: Files to modify: **crates/api_models/src/user.rs** Remove: - struct: pub::AuthIdQueryParam Add: - struct: pub::AuthIdAndThemeIdQueryParam **crates/api_models/src/user/theme.rs** Modify existing code **crates/common_utils/src/types/theme.rs** Add: - function: pub::new **crates/diesel_models/src/query/user/theme.rs** Add: - function: pub::find_most_specific_theme_in_lineage **crates/diesel_models/src/schema.rs** Modify existing code **crates/diesel_models/src/schema_v2.rs** Modify existing code **crates/diesel_models/src/user/theme.rs** Add: - function: pub::new **crates/router/src/configs/secrets_transformers.rs** Modify existing code **crates/router/src/configs/settings.rs** Add: - struct: pub::ThemeSettings **crates/router/src/core/errors/user.rs** Modify existing code **crates/router/src/core/recon.rs** Modify existing code **crates/router/src/core/user.rs** Modify existing code **crates/router/src/core/user/dashboard_metadata.rs** Modify existing code **crates/router/src/core/user/theme.rs** Modify existing code **crates/router/src/db/kafka_store.rs** Add: - function: private::find_most_specific_theme_in_lineage **crates/router/src/db/user/theme.rs** Add: - function: private::find_most_specific_theme_in_lineage **crates/router/src/routes/app.rs** Modify existing code **crates/router/src/routes/user.rs** Modify existing code **crates/router/src/services/email/types.rs** Modify existing code **crates/router/src/utils/user/theme.rs** Add: - function: pub::get_most_specific_theme_using_token_and_min_entity - function: pub::get_most_specific_theme_using_lineage **crates/router/src/workflows/api_key_expiry.rs** Modify existing code
{"pr_number": 6772, "pr_title": "feat(users): Incorporate themes in user APIs", "merged_at": "2024-12-16T09:20:21Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["merchant", "user", "token"]}, "hierarchy": {"api_models": ["crates/api_models/src/user.rs", "crates/api_models/src/user/theme.rs"], "database": ["crates/diesel_models/src/query/user/theme.rs", "crates/diesel_models/src/schema.rs", "crates/diesel_models/src/schema_v2.rs", "crates/diesel_models/src/user/theme.rs"], "core_business": ["crates/router/src/core/errors/user.rs", "crates/router/src/core/recon.rs", "crates/router/src/core/user.rs", "crates/router/src/core/user/dashboard_metadata.rs", "crates/router/src/core/user/theme.rs"], "types": ["crates/common_utils/src/types/theme.rs", "crates/router/src/services/email/types.rs"], "utils": ["crates/router/src/utils/user/theme.rs"], "config": ["config/config.example.toml", "config/deployments/env_specific.toml", "config/development.toml", "config/docker_compose.toml", "crates/router/src/configs/secrets_transformers.rs", "crates/router/src/configs/settings.rs"], "other": ["crates/router/src/db/kafka_store.rs", "crates/router/src/db/user/theme.rs", "crates/router/src/routes/app.rs", "crates/router/src/routes/user.rs", "crates/router/src/workflows/api_key_expiry.rs", "migrations/2024-12-05-131123_add-email-theme-data-in-themes/down.sql", "migrations/2024-12-05-131123_add-email-theme-data-in-themes/up.sql"]}, "change_types": {"structs_added": 3, "functions_added": 19, "fields_added": 140, "imports_added": 16, "conditionals_added": 4, "database_queries": 4}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor(gsm): add `error_category` column to gsm table ## 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 adds `error_category` column to gsm table which is an enum in application. These could be used to take multiple decisions in future but currently these are required for elimination routing in which these categories will serve as bucket name. Additionally the pr fixes the `last_modified` column not being updated in gsm table during `/update` ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Added new column to GSM table. (`error_category`) ``` curl --location 'http://localhost:8080/gsm' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: test_admin' \ --data '{ "connector": "stripe", "flow" : "flow1", "sub_flow": "sub_flow", "code": "incorrect_cvc", "status": "status1", "decision": "retry", "message": "xyz", "step_up_possible": false, "error_category": "issue_with_payment_method" }' ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/gsm.rs` **2. Database Layer (Queries & Schema)** - `crates/diesel_models/src/gsm.rs` - `crates/diesel_models/src/schema.rs` - `crates/diesel_models/src/schema_v2.rs` **3. Core Business Logic** - `crates/router/src/core/gsm.rs` **4. Type Definitions** - `crates/router/src/types/transformers.rs` **5. Other** - `api-reference-v2/openapi_spec.json` - `api-reference/openapi_spec.json` - `crates/common_enums/src/enums.rs` - ... and 4 more files **Code Patterns Applied:** - Extend existing types with new fields (16 changes) **Detailed Identifier Changes:** Commit fd82cf61: Files to modify: **crates/api_models/src/gsm.rs** Modify existing code **crates/common_enums/src/enums.rs** Add: - enum: pub::ErrorCategory **crates/diesel_models/src/gsm.rs** Modify existing code **crates/diesel_models/src/schema.rs** Modify existing code **crates/diesel_models/src/schema_v2.rs** Modify existing code **crates/openapi/src/openapi.rs** Modify existing code **crates/openapi/src/openapi_v2.rs** Modify existing code **crates/router/src/core/gsm.rs** Modify existing code **crates/router/src/types/transformers.rs** Modify existing code
{"pr_number": 6648, "pr_title": "refactor(gsm): add `error_category` column to gsm table", "merged_at": "2024-12-04T11:00:45Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "connector"]}, "hierarchy": {"api_models": ["crates/api_models/src/gsm.rs"], "database": ["crates/diesel_models/src/gsm.rs", "crates/diesel_models/src/schema.rs", "crates/diesel_models/src/schema_v2.rs"], "core_business": ["crates/router/src/core/gsm.rs"], "types": ["crates/router/src/types/transformers.rs"], "other": ["api-reference-v2/openapi_spec.json", "api-reference/openapi_spec.json", "crates/common_enums/src/enums.rs", "crates/openapi/src/openapi.rs", "crates/openapi/src/openapi_v2.rs", "migrations/2024-11-24-104438_add_error_category_col_to_gsm/down.sql", "migrations/2024-11-24-104438_add_error_category_col_to_gsm/up.sql"]}, "change_types": {"enums_added": 1, "fields_added": 16, "imports_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor(v1v2): refactor database queries for v1 and v2 ## 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 --> Other changes: 1. Introduced product type column in merchant_account 2. restructure payment_methods related v2 DB queries 3. drop auto increment `id` column from all possible v1 tables. 4. introduce varchar `id` column in merchant_account in v1. 5. justfile changes to run all v1 migrations first and then v2 migrations. (prefixed v2 migrations with `9` before copying to a common directory so that all v2 migration will run only after all v1 migrations are run). ### 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` 6. `crates/router/src/configs` 7. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with 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 connector sanity. No test cases. ![image](https://github.com/user-attachments/assets/703009d9-ff13-444d-8fac-ddd0944a97c4) ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] 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/drop_id.patch` - `crates/diesel_models/src/schema.rs` - `crates/diesel_models/remove_id.patch` - ... and 13 more files **2. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/merchant_account.rs` **3. Core Business Logic** - `crates/router/src/core/admin.rs` **4. External Connector Integration** - `v2_migrations/2025-01-29-103844_add_feature_metadata_in_merchant_connector_account/down.sql` - `v2_migrations/2025-01-29-103844_add_feature_metadata_in_merchant_connector_account/up.sql` **5. Type Definitions** - `v2_migrations/2025-01-13-081848_alter_column_types_for_v2/down.sql` - `v2_migrations/2025-01-13-081848_alter_column_types_for_v2/up.sql` **6. Configuration Files** - `crates/router/src/db/configs.rs` - `diesel.toml` - `v2_migrations/2025-01-13-181842_add_three_ds_decision_manager_config_in_profile/down.sql` - ... and 1 more files **7. Other** - `crates/common_enums/src/enums.rs` - `crates/common_enums/src/enums/accounts.rs` - `crates/router/src/db/locker_mock_up.rs` - ... and 21 more files **Code Patterns Applied:** - Extend existing types with new fields (74 changes) - Add conditional logic for feature flags or filtering (1 changes) - Modify database queries (15 changes) **Detailed Identifier Changes:** Commit 65cfaaec: Files to modify: **crates/common_enums/src/enums.rs** Add: - mod: private::accounts **crates/common_enums/src/enums/accounts.rs** Add: - enum: pub::MerchantProductType **crates/diesel_models/src/schema.rs** Modify existing code **crates/diesel_models/src/schema.rs** Modify existing code **crates/diesel_models/src/blocklist_fingerprint.rs** Modify existing code **crates/diesel_models/src/blocklist_lookup.rs** Modify existing code **crates/diesel_models/src/business_profile.rs** Modify existing code **crates/diesel_models/src/configs.rs** Modify existing code **crates/diesel_models/src/locker_mock_up.rs** Modify existing code **crates/diesel_models/src/merchant_account.rs** Modify existing code **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/payment_intent.rs** Modify existing code **crates/diesel_models/src/payment_method.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/merchant_account.rs** Modify existing code **crates/router/src/core/admin.rs** Modify existing code **crates/router/src/db/configs.rs** Modify existing code **crates/router/src/db/locker_mock_up.rs** Modify existing code
{"pr_number": 7244, "pr_title": "refactor(v1v2): refactor database queries for v1 and v2", "merged_at": "2025-02-27T07:41:43Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "merchant", "user"]}, "hierarchy": {"database": ["crates/diesel_models/drop_id.patch", "crates/diesel_models/src/schema.rs", "crates/diesel_models/remove_id.patch", "crates/diesel_models/src/schema.rs", "crates/diesel_models/src/blocklist_fingerprint.rs", "crates/diesel_models/src/blocklist_lookup.rs", "crates/diesel_models/src/business_profile.rs", "crates/diesel_models/src/configs.rs", "crates/diesel_models/src/locker_mock_up.rs", "crates/diesel_models/src/merchant_account.rs", "crates/diesel_models/src/merchant_connector_account.rs", "crates/diesel_models/src/payment_attempt.rs", "crates/diesel_models/src/payment_intent.rs", "crates/diesel_models/src/payment_method.rs", "crates/diesel_models/src/schema.rs", "crates/diesel_models/src/schema_v2.rs"], "domain": ["crates/hyperswitch_domain_models/src/merchant_account.rs"], "core_business": ["crates/router/src/core/admin.rs"], "connectors": ["v2_migrations/2025-01-29-103844_add_feature_metadata_in_merchant_connector_account/down.sql", "v2_migrations/2025-01-29-103844_add_feature_metadata_in_merchant_connector_account/up.sql"], "types": ["v2_migrations/2025-01-13-081848_alter_column_types_for_v2/down.sql", "v2_migrations/2025-01-13-081848_alter_column_types_for_v2/up.sql"], "config": ["crates/router/src/db/configs.rs", "diesel.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": ["crates/common_enums/src/enums.rs", "crates/common_enums/src/enums/accounts.rs", "crates/router/src/db/locker_mock_up.rs", "justfile", "migrations/2025-02-06-111828_drop_int_id_column_accross_database/down.sql", "migrations/2025-02-06-111828_drop_int_id_column_accross_database/up.sql", "migrations/2025-02-10-101701_recreate_varchar_id_column_for_merchant_account/down.sql", "migrations/2025-02-10-101701_recreate_varchar_id_column_for_merchant_account/up.sql", "migrations/2025-02-11-062329_add-product-type-column-merchant-account/down.sql", "migrations/2025-02-11-062329_add-product-type-column-merchant-account/up.sql", "v2_migrations/2024-08-23-112510_payment_methods_v2_db_changes/down.sql", "v2_migrations/2024-08-23-112510_payment_methods_v2_db_changes/up.sql", "v2_migrations/2024-08-28-081721_add_v2_columns/down.sql", "v2_migrations/2024-08-28-081721_add_v2_columns/up.sql", "v2_migrations/2024-08-28-081722_drop_not_null_constraints_on_v1_columns/down.sql", "v2_migrations/2024-08-28-081722_drop_not_null_constraints_on_v1_columns/up.sql", "v2_migrations/2024-08-28-081747_recreate_ids_for_v2/down.sql", "v2_migrations/2024-08-28-081747_recreate_ids_for_v2/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/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/2025-01-13-081847_drop_v1_columns/down.sql", "v2_migrations/2025-01-13-081847_drop_v1_columns/up.sql"]}, "change_types": {"enums_added": 1, "fields_added": 74, "imports_added": 12, "conditionals_added": 1, "database_queries": 15}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(analytics): add new filters, dimensions and metrics for authentication analytics ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Hotfix PR Original PR: [https://github.com/juspay/hyperswitch/pull/7451](https://github.com/juspay/hyperswitch/pull/7451) ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/analytics.rs` - `crates/api_models/src/analytics/auth_events.rs` - `crates/api_models/src/events.rs` **2. Database Layer (Queries & Schema)** - `crates/analytics/src/query.rs` **3. Core Business Logic** - `crates/analytics/src/auth_events/core.rs` - `crates/analytics/src/core.rs` **4. Type Definitions** - `crates/analytics/src/auth_events/types.rs` **5. Utils** - `crates/analytics/src/utils.rs` **6. Other** - `crates/analytics/src/auth_events.rs` - `crates/analytics/src/auth_events/accumulator.rs` - `crates/analytics/src/auth_events/filters.rs` - ... and 16 more files **Code Patterns Applied:** - Define new data structures (9 changes) - Implement new functions (17 changes) - Extend existing types with new fields (148 changes) - Add conditional logic for feature flags or filtering (15 changes) - Modify database queries (2 changes) **Detailed Identifier Changes:** Commit 11c703c4: Files to modify: **crates/analytics/src/auth_events.rs** Add: - mod: pub::filters - mod: pub::types **crates/analytics/src/auth_events/accumulator.rs** Add: - function: private::add_metrics_bucket - function: private::collect - struct: pub::AuthenticationErrorMessageAccumulator - impl: impl AuthEventMetricAccumulator for AuthenticationErrorMessageAccumulator **crates/analytics/src/auth_events/core.rs** Modify existing code **crates/analytics/src/auth_events/filters.rs** Add: - function: pub::get_auth_events_filter_for_dimension - struct: pub::AuthEventFilterRow - trait: pub::AuthEventFilterAnalytics **crates/analytics/src/auth_events/metrics.rs** Add: - mod: private::authentication_error_message - mod: private::authentication_funnel **crates/analytics/src/auth_events/metrics/authentication_attempt_count.rs** Modify existing code **crates/analytics/src/auth_events/metrics/authentication_count.rs** Modify existing code **crates/analytics/src/auth_events/metrics/authentication_error_message.rs** Add: - function: private::load_metrics - struct: pub::AuthenticationErrorMessage - impl: impl super::AuthEventMetric<T> for AuthenticationErrorMessage **crates/analytics/src/auth_events/metrics/authentication_funnel.rs** Add: - function: private::load_metrics - struct: pub::AuthenticationFunnel - impl: impl super::AuthEventMetric<T> for AuthenticationFunnel **crates/analytics/src/auth_events/metrics/authentication_success_count.rs** Modify existing code **crates/analytics/src/auth_events/metrics/challenge_attempt_count.rs** Modify existing code **crates/analytics/src/auth_events/metrics/challenge_flow_count.rs** Modify existing code **crates/analytics/src/auth_events/metrics/challenge_success_count.rs** Modify existing code **crates/analytics/src/auth_events/metrics/frictionless_flow_count.rs** Modify existing code **crates/analytics/src/auth_events/metrics/frictionless_success_count.rs** Modify existing code **crates/analytics/src/auth_events/types.rs** Add: - function: private::set_filter_clause - impl: impl QueryFilter<T> for AuthEventFilters **crates/analytics/src/clickhouse.rs** Add: - function: private::try_into - impl: impl super::auth_events::filters::AuthEventFilterAnalytics for ClickhouseClient - impl: impl TryInto<AuthEventFilterRow> for serde_json::Value **crates/analytics/src/core.rs** Modify existing code **crates/analytics/src/lib.rs** Modify existing code **crates/analytics/src/query.rs** Modify existing code **crates/analytics/src/sqlx.rs** Add: - function: private::from_row - function: private::from_row - impl: impl super::auth_events::metrics::AuthEventMetricAnalytics for SqlxClient - impl: impl super::auth_events::filters::AuthEventFilterAnalytics for SqlxClient - impl: impl FromRow<'a, PgRow> for super::auth_events::metrics::AuthEventMetricRow - impl: impl FromRow<'a, PgRow> for super::auth_events::filters::AuthEventFilterRow **crates/analytics/src/utils.rs** Add: - function: pub::get_auth_event_dimensions **crates/api_models/src/analytics.rs** Add: - struct: pub::GetAuthEventFilterRequest - struct: pub::AuthEventFiltersResponse - struct: pub::AuthEventFilterValue - struct: pub::AuthEventMetricsResponse - struct: pub::AuthEventsAnalyticsMetadata **crates/api_models/src/analytics/auth_events.rs** Add: - function: private::from - struct: pub::AuthEventFilters - struct: pub::AuthenticationErrorMessage - impl: impl From<AuthEventDimensions> for NameDescription **crates/api_models/src/events.rs** Add: - function: private::get_api_event_type - impl: impl ApiEventMetric for AuthEventMetricsResponse<T> **crates/common_enums/src/enums.rs** Modify existing code **crates/router/src/analytics.rs** Add: - function: pub::get_merchant_auth_events_filters
{"pr_number": 7453, "pr_title": "feat(analytics): add new filters, dimensions and metrics for authentication analytics", "merged_at": "2025-03-06T17:17:23Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"api_models": ["crates/api_models/src/analytics.rs", "crates/api_models/src/analytics/auth_events.rs", "crates/api_models/src/events.rs"], "database": ["crates/analytics/src/query.rs"], "core_business": ["crates/analytics/src/auth_events/core.rs", "crates/analytics/src/core.rs"], "types": ["crates/analytics/src/auth_events/types.rs"], "utils": ["crates/analytics/src/utils.rs"], "other": ["crates/analytics/src/auth_events.rs", "crates/analytics/src/auth_events/accumulator.rs", "crates/analytics/src/auth_events/filters.rs", "crates/analytics/src/auth_events/metrics.rs", "crates/analytics/src/auth_events/metrics/authentication_attempt_count.rs", "crates/analytics/src/auth_events/metrics/authentication_count.rs", "crates/analytics/src/auth_events/metrics/authentication_error_message.rs", "crates/analytics/src/auth_events/metrics/authentication_funnel.rs", "crates/analytics/src/auth_events/metrics/authentication_success_count.rs", "crates/analytics/src/auth_events/metrics/challenge_attempt_count.rs", "crates/analytics/src/auth_events/metrics/challenge_flow_count.rs", "crates/analytics/src/auth_events/metrics/challenge_success_count.rs", "crates/analytics/src/auth_events/metrics/frictionless_flow_count.rs", "crates/analytics/src/auth_events/metrics/frictionless_success_count.rs", "crates/analytics/src/clickhouse.rs", "crates/analytics/src/lib.rs", "crates/analytics/src/sqlx.rs", "crates/common_enums/src/enums.rs", "crates/router/src/analytics.rs"]}, "change_types": {"structs_added": 9, "functions_added": 17, "fields_added": 148, "imports_added": 33, "conditionals_added": 15, "database_queries": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
Feat(connector): Rapyd, Bamboraapac, Gocardless, Powertranz, Shift4 and Worldline added in feature matrix ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Added feature api details for Rapyd, Bamboraapac, Gocardless and Powertranz ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with 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)? --> Rapid Doc: https://docs.rapyd.net/en/apple-pay.html Request: `curl --location 'http://localhost:8080/feature_matrix' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_vE*****DCUv82mKkL'` Response: ``` { "connector_count": 20, "connectors": [ { "name": "BAMBORA", "display_name": "Bambora", "description": "Bambora is a leading online payment provider in Canada and United States.", "category": "payment_gateway", "supported_payment_methods": [ { "payment_method": "card", "payment_method_type": "credit", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "three_ds": "supported", "no_three_ds": "supported", "supported_card_networks": [ "Visa", "Mastercard", "AmericanExpress", "Discover", "JCB", "DinersClub" ], "supported_countries": [ "CA", "US" ], "supported_currencies": [ "USD" ] } ], "supported_webhook_flows": [] }, { "name": "BAMBORAAPAC", "display_name": "Bambora Asia-Pacific", "description": "Bambora Asia-Pacific, provides comprehensive payment solutions, offering merchants smart and smooth payment processing capabilities.", "category": "payment_gateway", "supported_payment_methods": [ { "payment_method": "card", "payment_method_type": "credit", "mandates": "supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "three_ds": "supported", "no_three_ds": "supported", "supported_card_networks": [ "Visa", "Mastercard", "DinersClub" ], "supported_countries": [ "GW", "SO", "ST", "TJ", "FR", "AZ", "HT", "GY", "TD", "BS", "CL", "EC", "FM", "GD", "KG", "KH", "SL", "CA", "GQ", "LK", "TR", "UA", "BH", "FI", "RO", "UZ", "CM", "ID", "MV", "HU", "MD", "MX", "PK", "EE", "AE", "CF", "ES", "US", "VA", "EG", "AO", "ZM", "AL", "MZ", "PE", "CI", "DO", "RW", "AU", "CY", "IT", "TM", "SZ", "DJ", "NG", "TZ", "GB", "IE", "FJ", "KE", "SV", "CG", "TT", "LI", "NP", "BB", "LB", "TV", "MY", "BN", "BA", "LV", "IS", "CO", "AR", "NE", "BY", "MR", "SB", "SK", "GT", "KR", "PG", "SA", "SE", "MW", "TG", "CH", "IL", "TO", "LS", "HR", "MG", "BJ", "ET", "NA", "BW", "SR", "SM", "GM", "GN", "BG", "AG", "PY", "CN", "NO", "SN", "SS", "MH", "KN", "MM", "DM", "WS", "BE", "KM", "LR", "TH", "GH", "MA", "CR", "AT", "MC", "AD", "GR", "JP", "GE", "ME", "NL", "UG", "ER", "GA", "PL", "PA", "VE", "DK", "KI", "TN", "CD", "BO", "BD", "JO", "KZ", "BR", "IN", "DZ", "ML", "SI", "VU", "GG", "BT", "RS", "PH", "PW", "MN", "LC", "CV", "VC", "MT", "LU", "NI", "BI", "VN", "SG", "KW", "MK", "ZA", "JM", "NR", "AM", "BZ", "CZ", "UY", "LA", "SC", "OM", "PS", "HN", "TL", "ZW", "DE", "MU", "QA", "PT", "LT", "NZ" ], "supported_currencies": [ "GBP", "AUD", "MDL", "LAK", "SLL", "CAD", "HRK", "NZD", "SEK", "ISK", "NPR", "UAH", "VND", "ZAR", "MOP", "RUB", "UYU", "MYR", "GEL", "BND", "IRR", "MZN", "NOK", "RON", "MAD", "INR", "XAF", "AED", "BGN", "GHS", "IQD", "BWP", "MWK", "SAR", "CHF", "HUF", "PEN", "RWF", "EUR", "QAR", "PLN", "IDR", "FJD", "USD", "KWD", "ZMW", "THB", "SGD", "KZT", "HKD", "BOB", "MXN", "TRY", "PKR", "DKK", "JPY", "CZK", "LKR", "TWD", "UGX", "NGN", "CNY", "ILS", "TZS", "KES", "XOF", "COP", "EGP", "SCR", "MMK", "BRL", "KRW", "RSD", "PHP", "BDT", "NAD" ] }, { "payment_method": "card", "payment_method_type": "debit", "mandates": "supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "three_ds": "supported", "no_three_ds": "supported", "supported_card_networks": [ "Visa", "Mastercard", "DinersClub" ], "supported_countries": [ "GQ", "UY", "ET", "IS", "KZ", "NR", "KH", "PS", "BE", "MH", "BI", "TR", "OM", "LT", "LV", "RS", "AM", "CG", "BT", "GB", "BR", "GD", "FR", "BZ", "NP", "CY", "LR", "MY", "PL", "LB", "RW", "SI", "MR", "TL", "TG", "TN", "AU", "BJ", "SS", "SA", "TD", "VE", "UA", "SN", "JO", "ZA", "BY", "GM", "BD", "IN", "HR", "MN", "KI", "TM", "DZ", "AL", "HN", "CA", "LC", "AG", "BA", "SM", "PK", "NO", "KR", "FM", "BS", "PT", "MK", "EC", "NI", "LS", "RO", "GW", "GA", "MV", "SZ", "AZ", "CI", "UG", "ER", "SR", "GH", "ZM", "TZ", "SE", "ST", "SL", "GR", "LU", "JM", "TH", "LI", "TV", "ES", "SG", "GT", "ME", "MA", "WS", "CD", "PY", "BH", "BB", "CH", "KM", "PG", "ML", "KE", "SB", "UZ", "VA", "QA", "EE", "MC", "VC", "NE", "IL", "TJ", "BO", "SV", "MZ", "AT", "NL", "ZW", "FI", "AO", "CM", "MG", "DE", "MT", "SC", "TO", "US", "JP", "MM", "LK", "DJ", "DK", "CV", "HT", "FJ", "SO", "AD", "KN", "CN", "CZ", "ID", "NG", "NZ", "TT", "PH", "MX", "DM", "KW", "GN", "HU", "AE", "MD", "IE", "MW", "NA", "GY", "IT", "MU", "PW", "CR", "EG", "PE", "PA", "AR", "LA", "VU", "KG", "CO", "BN", "VN", "CF", "BW", "SK", "DO", "GG", "CL", "GE", "BG" ], "supported_currencies": [ "BND", "UAH", "MZN", "UGX", "JPY", "LAK", "XOF", "IRR", "RUB", "GEL", "SCR", "MXN", "INR", "KRW", "PHP", "EGP", "USD", "BRL", "ZAR", "MMK", "MOP", "BGN", "KZT", "IDR", "ILS", "CAD", "KWD", "SLL", "FJD", "MAD", "COP", "GHS", "RSD", "SAR", "THB", "BOB", "NGN", "TRY", "IQD", "HKD", "TZS", "NZD", "AUD", "CNY", "RON", "TWD", "CZK", "XAF", "MDL", "MYR", "PLN", "PKR", "HRK", "NOK", "HUF", "BDT", "AED", "BWP", "ISK", "KES", "PEN", "LKR", "SGD", "ZMW", "MWK", "GBP", "RWF", "CHF", "QAR", "VND", "EUR", "NPR", "SEK", "DKK", "NAD", "UYU" ] } ], "supported_webhook_flows": [] }, { "name": "BITPAY", "display_name": "Bitpay", "description": "BitPay is a cryptocurrency payment processor that enables businesses to accept Bitcoin and other digital currencies ", "category": "alternative_payment_method", "supported_payment_methods": [ { "payment_method": "crypto", "payment_method_type": "crypto_currency", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic" ], "supported_countries": [ "SE", "FR", "AT", "ES", "LV", "IT", "CZ", "RO", "EE", "GB", "FI", "DE", "GR", "HU", "SI", "LT", "LU", "US", "PT", "BE", "CY", "BG", "SK", "DK", "CA", "HR", "PL", "IE", "MT", "NL" ], "supported_currencies": [ "CHF", "CAD", "EUR", "AUD", "GBP", "USD", "MXN", "NZD" ] } ], "supported_webhook_flows": [ "payments" ] }, { "name": "DEUTSCHEBANK", "display_name": "Deutsche Bank", "description": "Deutsche Bank is a German multinational investment bank and financial services company ", "category": "bank_acquirer", "supported_payment_methods": [ { "payment_method": "card", "payment_method_type": "debit", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "three_ds": "supported", "no_three_ds": "not_supported", "supported_card_networks": [ "Visa", "Mastercard" ], "supported_countries": null, "supported_currencies": null }, { "payment_method": "card", "payment_method_type": "credit", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "three_ds": "supported", "no_three_ds": "not_supported", "supported_card_networks": [ "Visa", "Mastercard" ], "supported_countries": null, "supported_currencies": null }, { "payment_method": "bank_debit", "payment_method_type": "sepa", "mandates": "supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "supported_countries": null, "supported_currencies": null } ], "supported_webhook_flows": [] }, { "name": "DIGITALVIRGO", "display_name": "Digital Virgo", "description": "Digital Virgo is an alternative payment provider specializing in carrier billing and mobile payments ", "category": "alternative_payment_method", "supported_payment_methods": [ { "payment_method": "mobile_payment", "payment_method_type": "direct_carrier_billing", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": [ "GH", "SG", "CH", "FR", "BR", "IQ", "ZA", "BH", "BE", "SA", "PS", "JO", "MX", "CG", "SN", "DZ", "GA", "OM", "NG", "SD", "CL", "MA", "AE", "KW", "IT", "AR", "NL", "QA", "DE", "IE", "RU", "ES", "EG", "TN", "GN", "AZ", "GB", "GR", "LY", "PT", "BW", "ID", "ML", "MG", "PL", "SK", "CM", "TR" ], "supported_currencies": [ "MGA", "PLN", "KWD", "OMR", "GHS", "BWP", "SDG", "EUR", "AED", "SAR", "BRL", "XAF", "ILS", "ARS", "ZAR", "SGD", "JOD", "MAD", "XOF", "CLP", "TRY", "CDF", "AZN", "IQD", "BHD", "RUB", "DZD", "CHF", "LYD", "IDR", "GBP", "EGP", "TND", "MXN", "NGN", "QAR", "GNF" ] } ], "supported_webhook_flows": [] }, { "name": "DLOCAL", "display_name": "DLOCAL", "description": "Dlocal is a cross-border payment processor enabling businesses to accept and send payments in emerging markets worldwide.", "category": "payment_gateway", "supported_payment_methods": [ { "payment_method": "card", "payment_method_type": "debit", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "three_ds": "supported", "no_three_ds": "supported", "supported_card_networks": [ "Visa", "Mastercard", "AmericanExpress", "Discover", "JCB", "DinersClub", "UnionPay", "Interac", "CartesBancaires" ], "supported_countries": [ "CN", "JP", "PE", "AR", "NI", "KE", "PK", "CO", "EC", "PA", "SN", "EG", "ZM", "CR", "BO", "PH", "BD", "BR", "CM", "HN", "RW", "TR", "TZ", "VN", "MA", "MX", "SV", "DO", "PY", "GH", "UY", "SA", "TH", "GT", "MY", "CI", "ZA", "ID", "CL", "UG", "NG", "IN" ], "supported_currencies": [ "GHS", "JPY", "NGN", "BDT", "ZMW", "MYR", "PEN", "SAR", "THB", "BRL", "PYG", "XAF", "KES", "MXN", "USD", "CLP", "XOF", "MAD", "UGX", "ZAR", "TZS", "ARS", "HNL", "RWF", "CRC", "DOP", "NIO", "PKR", "EGP", "CNY", "PHP", "IDR", "GTQ", "BOB", "TRY", "INR", "UYU", "VND", "COP" ] }, { "payment_method": "card", "payment_method_type": "credit", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "three_ds": "supported", "no_three_ds": "supported", "supported_card_networks": [ "Visa", "Mastercard", "AmericanExpress", "Discover", "JCB", "DinersClub", "UnionPay", "Interac", "CartesBancaires" ], "supported_countries": [ "BD", "CL", "UY", "CR", "IN", "TZ", "CO", "ID", "SV", "BR", "NG", "PH", "SN", "MX", "GT", "PY", "ZA", "TR", "TH", "BO", "PK", "VN", "EC", "CI", "NI", "PA", "SA", "KE", "ZM", "GH", "AR", "RW", "CN", "EG", "MY", "CM", "JP", "UG", "DO", "MA", "PE", "HN" ], "supported_currencies": [ "VND", "COP", "PKR", "CRC", "IDR", "MAD", "USD", "CNY", "BRL", "MYR", "GHS", "XAF", "THB", "ZAR", "RWF", "GTQ", "PHP", "PYG", "ARS", "MXN", "UGX", "CLP", "HNL", "PEN", "SAR", "DOP", "EGP", "BDT", "JPY", "KES", "TRY", "BOB", "UYU", "NIO", "INR", "ZMW", "NGN", "TZS", "XOF" ] } ], "supported_webhook_flows": [] }, { "name": "GOCARDLESS", "display_name": "GoCardless", "description": "GoCardless is a fintech company that specialises in bank payments including recurring payments.", "category": "payment_gateway", "supported_payment_methods": [ { "payment_method": "bank_debit", "payment_method_type": "ach", "mandates": "supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": [ "US" ], "supported_currencies": [ "USD" ] }, { "payment_method": "bank_debit", "payment_method_type": "becs", "mandates": "supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": [ "AU" ], "supported_currencies": [ "AUD" ] }, { "payment_method": "bank_debit", "payment_method_type": "sepa", "mandates": "supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": [ "CH", "FI", "ZA", "BE", "BG", "HU", "HR", "AU", "NO", "CZ", "RO", "SI", "DE", "FR", "LU", "AT", "NL", "IT", "CA", "GB", "DK", "PT", "SK", "IE", "ES", "MT", "SE", "PL", "CY", "NZ" ], "supported_currencies": [ "EUR", "AUD", "NZD", "GBP", "SEK", "DKK", "CAD" ] } ], "supported_webhook_flows": [ "payments", "refunds", "mandates" ] }, { "name": "HELCIM", "display_name": "Helcim", "description": "Helcim is a payment processing company that offers transparent, affordable merchant services for businesses of all sizes", "category": "payment_gateway", "supported_payment_methods": [ { "payment_method": "card", "payment_method_type": "credit", "mandates": "supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "three_ds": "not_supported", "no_three_ds": "supported", "supported_card_networks": [ "Visa", "Mastercard", "Interac", "AmericanExpress", "JCB", "DinersClub", "Discover", "CartesBancaires", "UnionPay" ], "supported_countries": [ "CA", "US" ], "supported_currencies": [ "USD", "CAD" ] }, { "payment_method": "card", "payment_method_type": "debit", "mandates": "supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "three_ds": "not_supported", "no_three_ds": "supported", "supported_card_networks": [ "Visa", "Mastercard", "Interac", "AmericanExpress", "JCB", "DinersClub", "Discover", "CartesBancaires", "UnionPay" ], "supported_countries": [ "CA", "US" ], "supported_currencies": [ "CAD", "USD" ] } ], "supported_webhook_flows": [] }, { "name": "JPMORGAN", "display_name": "Jpmorgan", "description": "J.P. Morgan is a global financial services firm and investment bank, offering banking, asset management, and payment processing solutions", "category": "bank_acquirer", "supported_payment_methods": [ { "payment_method": "card", "payment_method_type": "credit", "mandates": "not_supported", "refunds": "not_supported", "supported_capture_methods": [ "automatic", "manual" ], "three_ds": "not_supported", "no_three_ds": "supported", "supported_card_networks": [ "AmericanExpress", "DinersClub", "Discover", "JCB", "Mastercard", "UnionPay", "Visa" ], "supported_countries": [ "EE", "AT", "SI", "LU", "CA", "FR", "ES", "IT", "GB", "NL", "HR", "IE", "LV", "CZ", "BG", "PL", "MT", "DE", "HU", "PT", "SE", "US", "RO", "SK", "GR", "FI", "BE", "CY", "DK", "LT" ], "supported_currencies": [ "BTN", "DZD", "JPY", "SCR", "BWP", "BRL", "KMF", "TWD", "PGK", "MWK", "XCD", "MGA", "MUR", "MAD", "PEN", "ARS", "UZS", "EUR", "HNL", "MKD", "NGN", "SHP", "BAM", "DKK", "AOA", "EGP", "KYD", "MRU", "BGN", "PLN", "CDF", "VUV", "MMK", "GIP", "NZD", "UGX", "COP", "MZN", "XPF", "CVE", "STN", "HUF", "SLL", "SZL", "SGD", "SEK", "CRC", "AFN", "HTG", "MYR", "NIO", "TJS", "AWG", "AUD", "THB", "PHP", "TTD", "GMD", "JMD", "KHR", "LRD", "XOF", "BZD", "ILS", "HKD", "PAB", "CHF", "NPR", "SBD", "FKP", "UAH", "UYU", "KZT", "RON", "HRK", "ANG", "BIF", "RSD", "NAD", "KES", "TZS", "RWF", "TRY", "XAF", "SAR", "CAD", "MDL", "BMD", "YER", "FJD", "LKR", "LBP", "MNT", "NOK", "GTQ", "QAR", "CZK", "LAK", "AMD", "AZN", "BBD", "SRD", "ISK", "BSD", "INR", "GEL", "MOP", "BYN", "CLP", "DJF", "BDT", "BND", "PKR", "ZMW", "LSL", "BOB", "USD", "PYG", "ETB", "GHS", "ZAR", "GBP", "KRW", "GYD", "MXN", "MVR", "DOP", "AED", "CNY", "SOS", "ALL", "WST", "VND", "TOP", "IDR" ] }, { "payment_method": "card", "payment_method_type": "debit", "mandates": "not_supported", "refunds": "not_supported", "supported_capture_methods": [ "automatic", "manual" ], "three_ds": "not_supported", "no_three_ds": "supported", "supported_card_networks": [ "AmericanExpress", "DinersClub", "Discover", "JCB", "Mastercard", "UnionPay", "Visa" ], "supported_countries": [ "SE", "CY", "LT", "CA", "US", "LV", "SI", "FR", "AT", "DK", "PT", "SK", "DE", "IT", "MT", "BG", "ES", "FI", "RO", "HU", "LU", "PL", "IE", "EE", "GR", "HR", "NL", "GB", "CZ", "BE" ], "supported_currencies": [ "VUV", "HKD", "GHS", "BOB", "GYD", "KRW", "ISK", "DKK", "LBP", "MMK", "UAH", "BIF", "KHR", "TOP", "TZS", "USD", "SRD", "JMD", "KZT", "QAR", "RWF", "AZN", "SAR", "AFN", "GTQ", "HTG", "CNY", "VND", "PKR", "DOP", "GIP", "XOF", "BRL", "BWP", "BTN", "MZN", "ZAR", "AUD", "CDF", "XCD", "HNL", "WST", "NPR", "INR", "ANG", "CLP", "EUR", "CHF", "LKR", "SEK", "MGA", "GBP", "COP", "PGK", "SGD", "NZD", "PLN", "MNT", "CZK", "BDT", "LRD", "NGN", "TRY", "BSD", "SBD", "SLL", "MUR", "ALL", "PHP", "IDR", "FKP", "AWG", "ZMW", "THB", "PAB", "UYU", "XAF", "MVR", "AOA", "EGP", "LSL", "BMD", "KYD", "TTD", "YER", "BBD", "PEN", "BZD", "BND", "XPF", "MRU", "CVE", "NOK", "GMD", "MKD", "PYG", "DJF", "CAD", "DZD", "NIO", "BAM", "RSD", "BYN", "FJD", "ILS", "STN", "AED", "CRC", "LAK", "RON", "ETB", "UGX", "UZS", "MDL", "BGN", "SHP", "NAD", "KES", "KMF", "SCR", "JPY", "HRK", "MAD", "TWD", "MXN", "ARS", "AMD", "GEL", "MOP", "TJS", "MYR", "SZL", "MWK", "SOS", "HUF" ] } ], "supported_webhook_flows": [] }, { "name": "MIFINITY", "display_name": "MIFINITY", "description": "Mifinity is a payment gateway empowering you to pay online, receive funds, and send money globally, the MiFinity eWallet supports super-low fees, offering infinite possibilities to do more of the things you love.", "category": "payment_gateway", "supported_payment_methods": [ { "payment_method": "wallet", "payment_method_type": "mifinity", "mandates": "not_supported", "refunds": "not_supported", "supported_capture_methods": [ "automatic" ], "supported_countries": [ "UZ", "NC", "FK", "LC", "PW", "DE", "JE", "BR", "HM", "TT", "MK", "MF", "ME", "KZ", "VE", "ID", "NL", "PL", "MG", "EC", "UG", "DO", "BT", "CA", "CZ", "CY", "VA", "MP", "SL", "KY", "HN", "BZ", "BG", "LT", "LK", "MS", "PH", "GU", "AE", "VU", "FM", "GA", "IO", "PF", "ET", "PG", "NG", "NU", "PK", "JP", "CU", "UY", "LB", "CK", "MW", "MD", "RS", "AU", "MU", "NA", "BA", "VC", "BS", "GM", "CF", "MR", "BW", "NE", "CH", "SG", "NZ", "MQ", "PT", "IN", "CG", "TM", "NP", "FR", "GY", "KG", "KW", "SB", "PY", "LI", "CI", "AS", "SC", "UA", "TN", "NR", "ER", "JO", "MZ", "SN", "QA", "GF", "PR", "VG", "SH", "IS", "CO", "PE", "GN", "EE", "SV", "TL", "AL", "RE", "DK", "GL", "ZM", "GT", "IT", "RO", "MY", "HT", "GB", "SI", "MT", "AM", "AW", "GD", "MO", "PA", "TR", "TO", "KN", "SX", "BM", "TW", "FI", "MX", "SK", "AT", "GH", "KR", "DJ", "VI", "IE", "PM", "NI", "DZ", "AZ", "MH", "BJ", "VN", "CN", "LA", "TF", "SA", "OM", "SR", "AO", "CW", "KI", "BI", "BQ", "AI", "FO", "GS", "YT", "HK", "BB", "ST", "GG", "FJ", "GR", "SO", "SM", "WS", "ES", "KM", "LV", "CX", "DM", "MA", "SJ", "MC", "EH", "AG", "RW", "SZ", "NF", "TD", "BD", "CM", "BH", "GE", "CC", "GW", "TC", "TV", "AR", "AD", "SE", "BF", "TH", "PN", "KH", "GQ", "CR", "MV", "WF", "MN", "TG", "IM", "BE", "CV", "NO", "LS", "ML", "BO", "HR", "BN", "IL", "RU", "PS", "LU", "BL", "TK", "ZA", "GI", "CL", "AX", "EG", "GP", "KE" ], "supported_currencies": [ "CHF", "PLN", "EUR", "INR", "AUD", "NZD", "CZK", "JPY", "CAD", "SEK", "USD", "DKK", "CNY", "ZAR", "EGP", "RUB", "GBP", "UYU", "NOK", "UZS" ] } ], "supported_webhook_flows": [] }, { "name": "MOLLIE", "display_name": "MOLLIE", "description": "Mollie is a Developer-friendly processor providing simple and customizable payment solutions for businesses of all sizes.", "category": "payment_gateway", "supported_payment_methods": [ { "payment_method": "bank_redirect", "payment_method_type": "eps", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": [ "AT" ], "supported_currencies": [ "EUR" ] }, { "payment_method": "bank_redirect", "payment_method_type": "przelewy24", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": [ "PL" ], "supported_currencies": [ "PLN", "EUR" ] }, { "payment_method": "bank_redirect", "payment_method_type": "bancontact_card", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": null, "supported_currencies": null }, { "payment_method": "bank_redirect", "payment_method_type": "sofort", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": null, "supported_currencies": null }, { "payment_method": "bank_redirect", "payment_method_type": "ideal", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": [ "NL" ], "supported_currencies": [ "EUR" ] }, { "payment_method": "bank_redirect", "payment_method_type": "giropay", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": null, "supported_currencies": null }, { "payment_method": "wallet", "payment_method_type": "apple_pay", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": null, "supported_currencies": null }, { "payment_method": "wallet", "payment_method_type": "paypal", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": null, "supported_currencies": null }, { "payment_method": "card", "payment_method_type": "debit", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "three_ds": "supported", "no_three_ds": "supported", "supported_card_networks": [ "Visa", "Mastercard", "AmericanExpress", "Discover", "JCB", "DinersClub", "UnionPay", "Interac", "CartesBancaires" ], "supported_countries": null, "supported_currencies": null }, { "payment_method": "card", "payment_method_type": "credit", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "three_ds": "supported", "no_three_ds": "supported", "supported_card_networks": [ "Visa", "Mastercard", "AmericanExpress", "Discover", "JCB", "DinersClub", "UnionPay", "Interac", "CartesBancaires" ], "supported_countries": null, "supported_currencies": null }, { "payment_method": "bank_debit", "payment_method_type": "sepa", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": null, "supported_currencies": null } ], "supported_webhook_flows": [] }, { "name": "PAYBOX", "display_name": "Paybox", "description": "Paybox is a payment gateway that enables businesses to process online transactions securely ", "category": "payment_gateway", "supported_payment_methods": [ { "payment_method": "card", "payment_method_type": "debit", "mandates": "supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "three_ds": "supported", "no_three_ds": "supported", "supported_card_networks": [ "Visa", "Mastercard", "Interac", "AmericanExpress", "JCB", "DinersClub", "Discover", "CartesBancaires", "UnionPay" ], "supported_countries": [ "FR" ], "supported_currencies": [ "AUD", "CAD", "EUR", "USD" ] }, { "payment_method": "card", "payment_method_type": "credit", "mandates": "supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "three_ds": "supported", "no_three_ds": "supported", "supported_card_networks": [ "Visa", "Mastercard", "Interac", "AmericanExpress", "JCB", "DinersClub", "Discover", "CartesBancaires", "UnionPay" ], "supported_countries": [ "FR" ], "supported_currencies": [ "AUD", "USD", "EUR", "CAD" ] } ], "supported_webhook_flows": [] }, { "name": "PAYU", "display_name": "Payu", "description": "PayU is a global fintech company providing online payment solutions, including card processing, UPI, wallets, and BNPL services across multiple markets ", "category": "payment_gateway", "supported_payment_methods": [ { "payment_method": "card", "payment_method_type": "debit", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "three_ds": "supported", "no_three_ds": "not_supported", "supported_card_networks": [ "Visa", "Mastercard", "Interac", "AmericanExpress", "JCB", "DinersClub", "Discover", "CartesBancaires", "UnionPay" ], "supported_countries": [ "SR", "KY", "KZ", "DZ", "TW", "VN", "VU", "LI", "NI", "LR", "YE", "CD", "PA", "WS", "BW", "SA", "BY", "SH", "ZW", "AU", "ET", "BA", "AR", "ID", "TJ", "CW", "BZ", "RS", "BG", "UZ", "GH", "IQ", "TM", "BB", "EG", "KW", "MK", "PG", "RW", "CM", "BJ", "MX", "SV", "VE", "OM", "TO", "BR", "CL", "MD", "JM", "MZ", "HT", "CV", "HN", "AW", "GM", "JO", "SZ", "IL", "MO", "PY", "PL", "DO", "BI", "CO", "MG", "AL", "FK", "JP", "MY", "LB", "NA", "HU", "GE", "AM", "CA", "AD", "IS", "BH", "KH", "TN", "AF", "GT", "CN", "KR", "KM", "LA", "SE", "TR", "AO", "BM", "GG", "UG", "BO", "CZ", "TH", "MR", "MW", "ZM", "AE", "GY", "TT", "DK", "CR", "FJ", "PF", "TZ", "SB", "BS", "AS", "NG", "QA", "MV", "AI", "SC", "ZA", "DJ", "UY", "HR", "AZ", "MA", "BN", "SO", "GI", "SG", "MN", "PE", "KG", "BV", "RO", "LS", "GN", "CK", "HK" ], "supported_currencies": [ "HNL", "SBD", "RWF", "SVC", "BBD", "BGN", "LBP", "KRW", "CAD", "KGS", "IDR", "PGK", "HRK", "ANG", "XPF", "ZAR", "SOS", "CLP", "AZN", "MRU", "SEK", "MAD", "NZD", "MOP", "HKD", "MKD", "MVR", "TWD", "ETB", "FKP", "ALL", "HTG", "MNT", "USD", "AOA", "GHS", "TTD", "JPY", "CNY", "NOK", "TMT", "KZT", "BND", "CRC", "GNF", "SZL", "BMD", "VES", "TJS", "AUD", "DJF", "UGX", "BWP", "MYR", "ZWL", "IQD", "BSD", "LAK", "BAM", "VUV", "AED", "GEL", "JOD", "AMD", "PLN", "CDF", "ISK", "SCR", "PEN", "CZK", "DKK", "KWD", "PYG", "SHP", "NAD", "UZS", "BIF", "COP", "EUR", "FJD", "MZN", "ILS", "CVE", "NGN", "PAB", "BHD", "RSD", "HUF", "TOP", "UYU", "MGA", "BRL", "GIP", "GTQ", "DOP", "VND", "XAF", "YER", "EGP", "OMR", "TZS", "KYD", "RON", "SRD", "BYN", "DZD", "JMD", "KMF", "XCD", "MDL", "CHF", "ARS", "MXN", "GMD", "SAR", "GBP", "BZD", "XOF", "THB", "BOB", "AWG", "QAR", "TND", "SGD", "ZMW", "GYD", "LSL", "KHR", "TRY", "LRD", "WST", "MWK", "AFN", "NIO" ] }, { "payment_method": "card", "payment_method_type": "credit", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "three_ds": "supported", "no_three_ds": "not_supported", "supported_card_networks": [ "Visa", "Mastercard", "Interac", "AmericanExpress", "JCB", "DinersClub", "Discover", "CartesBancaires", "UnionPay" ], "supported_countries": [ "IL", "QA", "AS", "RO", "TJ", "TO", "LI", "KW", "FJ", "NI", "SG", "YE", "AL", "SH", "JO", "PA", "CM", "BR", "KH", "DO", "MK", "GM", "AE", "RW", "UZ", "TR", "SE", "DZ", "HT", "TW", "AI", "SC", "LS", "OM", "IQ", "ID", "BB", "TH", "BZ", "KY", "AZ", "GI", "HR", "CA", "LR", "AM", "LA", "KZ", "KG", "ZA", "HK", "TM", "BM", "JM", "VE", "ZM", "HN", "SA", "CD", "MA", "MO", "PE", "GT", "IS", "TN", "BN", "MR", "MZ", "SB", "DK", "MX", "BG", "FK", "TZ", "KM", "WS", "TT", "CK", "PL", "PG", "MY", "CR", "PY", "BY", "MG", "VN", "CN", "MN", "MD", "ZW", "SZ", "DJ", "AO", "CO", "BS", "UG", "CZ", "JP", "BJ", "CL", "NG", "GE", "MW", "HU", "NA", "UY", "BH", "BV", "ET", "SO", "SV", "GG", "CV", "VU", "BO", "AF", "BI", "AU", "KR", "MV", "PF", "RS", "AR", "BW", "AW", "BA", "GH", "CW", "GN", "AD", "EG", "LB", "SR", "GY" ], "supported_currencies": [ "GBP", "KWD", "SBD", "SGD", "TRY", "GEL", "VND", "BIF", "RON", "UZS", "SRD", "XPF", "DOP", "TOP", "GIP", "DZD", "NIO", "KRW", "TMT", "YER", "HNL", "CNY", "DKK", "JMD", "AMD", "GHS", "XOF", "MKD", "MOP", "SCR", "TJS", "BAM", "ZMW", "DJF", "ILS", "AOA", "ANG", "BHD", "CZK", "EGP", "TND", "TWD", "AED", "UGX", "HUF", "GYD", "MYR", "PLN", "RWF", "CDF", "FKP", "BOB", "TTD", "KGS", "NAD", "XCD", "FJD", "OMR", "MRU", "AZN", "BND", "BSD", "ETB", "KMF", "LAK", "LRD", "SOS", "THB", "USD", "BYN", "ARS", "PAB", "XAF", "SAR", "LBP", "BMD", "KYD", "CAD", "GMD", "MZN", "MDL", "MNT", "SVC", "BZD", "MGA", "MWK", "QAR", "ZWL", "AUD", "PYG", "SEK", "NGN", "SHP", "TZS", "PGK", "JOD", "LSL", "VES", "AFN", "NOK", "NZD", "ZAR", "BBD", "MAD", "CHF", "EUR", "HKD", "KHR", "KZT", "CLP", "MXN", "WST", "PEN", "COP", "CRC", "IDR", "JPY", "HTG", "MVR", "RSD", "SZL", "AWG", "UYU", "GTQ", "BRL", "BWP", "IQD", "ALL", "BGN", "HRK", "CVE", "GNF", "VUV", "ISK" ] }, { "payment_method": "wallet", "payment_method_type": "google_pay", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "supported_countries": [ "PG", "AW", "MK", "BS", "SG", "FK", "GE", "BI", "UZ", "AR", "AI", "DJ", "PE", "RS", "SE", "LB", "CL", "MR", "SH", "CW", "BG", "BR", "AM", "CD", "DZ", "KZ", "BY", "VU", "ZM", "KH", "BA", "NA", "AS", "AZ", "IQ", "MD", "GH", "FJ", "IL", "SO", "AL", "CV", "GM", "ID", "QA", "ZA", "AD", "SA", "AU", "BH", "HU", "BO", "EG", "VE", "MZ", "PL", "MX", "TO", "MO", "HN", "TM", "SC", "TZ", "LA", "CZ", "LS", "GY", "KW", "YE", "LR", "MA", "MY", "RW", "JO", "PY", "BJ", "TR", "AF", "GG", "CO", "HR", "HT", "PF", "TH", "CR", "UY", "DK", "WS", "AO", "TT", "BZ", "DO", "SZ", "PA", "BM", "OM", "VN", "JM", "UG", "KR", "LI", "KG", "BV", "TW", "CA", "HK", "BW", "NG", "AE", "ET", "SB", "KM", "ZW", "CN", "BB", "MW", "NI", "SV", "CM", "MN", "RO", "IS", "TJ", "GI", "MV", "KY", "SR", "CK", "MG", "BN", "TN", "GN", "GT", "JP" ], "supported_currencies": [ "BAM", "NIO", "MKD", "CZK", "NZD", "PLN", "GMD", "SRD", "TTD", "VES", "AUD", "DZD", "RWF", "FJD", "GIP", "MAD", "TND", "PAB", "WST", "XCD", "BYN", "KGS", "MGA", "MNT", "NOK", "BWP", "HUF", "RON", "SGD", "GBP", "GHS", "IQD", "KYD", "BMD", "DOP", "EGP", "CHF", "JMD", "HNL", "KWD", "ZMW", "IDR", "AWG", "MRU", "CNY", "SHP", "SVC", "HRK", "BGN", "BIF", "COP", "ARS", "HKD", "KZT", "MYR", "GEL", "QAR", "YER", "SCR", "MVR", "MWK", "BBD", "UZS", "BOB", "FKP", "LRD", "AMD", "MZN", "DJF", "JPY", "ETB", "TOP", "KHR", "TRY", "TJS", "AED", "XAF", "KRW", "DKK", "XPF", "LBP", "THB", "OMR", "SEK", "MXN", "AZN", "MOP", "XOF", "TWD", "PYG", "JOD", "PEN", "TZS", "SAR", "LAK", "UYU", "ISK", "NGN", "CAD", "RSD", "USD", "ZWL", "SOS", "HTG", "ALL", "PGK", "GTQ", "CDF", "LSL", "BRL", "GYD", "BZD", "CVE", "CRC", "BSD", "MDL", "SBD", "GNF", "AOA", "VND", "NAD", "BND", "UGX", "KMF", "TMT", "BHD", "CLP", "SZL", "ILS", "ANG", "VUV", "AFN", "ZAR", "EUR" ] }, { "payment_method": "wallet", "payment_method_type": "apple_pay", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "supported_countries": null, "supported_currencies": null } ], "supported_webhook_flows": [] }, { "name": "POWERTRANZ", "display_name": "Powertranz", "description": "Powertranz is a leading payment gateway serving the Caribbean and parts of Central America ", "category": "payment_gateway", "supported_payment_methods": [ { "payment_method": "card", "payment_method_type": "debit", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "three_ds": "supported", "no_three_ds": "supported", "supported_card_networks": [ "Visa", "Mastercard" ], "supported_countries": [ "HM", "SE", "OM", "GL", "AU", "NO", "KN", "LC", "MK", "PG", "IR", "TJ", "ET", "BH", "MW", "MO", "TN", "FJ", "MN", "QA", "UG", "AG", "PT", "SY", "FM", "KM", "VN", "CC", "CD", "KI", "LY", "MY", "HR", "YT", "BS", "BT", "TO", "KR", "IQ", "IT", "DO", "GA", "NE", "BL", "WF", "IM", "LR", "EG", "MA", "PY", "SC", "HN", "KG", "RE", "BD", "LI", "BA", "GN", "SH", "TH", "RU", "CH", "WS", "GF", "JE", "PM", "SI", "ST", "GD", "PW", "HK", "AM", "MC", "UY", "VC", "SV", "SM", "JM", "TV", "ZM", "HT", "PS", "VG", "YE", "AZ", "TW", "NR", "PF", "BF", "PA", "FK", "SO", "RO", "MU", "SA", "CZ", "SB", "VE", "DJ", "AT", "LA", "SG", "JO", "IL", "GW", "ES", "LT", "BY", "DK", "MS", "GE", "GY", "BB", "TD", "SL", "KY", "NI", "NA", "BO", "RS", "TL", "TZ", "GB", "AS", "CV", "SR", "NG", "UM", "BN", "GG", "CR", "KE", "VI", "LB", "AF", "MM", "PR", "GT", "SN", "TM", "TT", "UZ", "ER", "IS", "TR", "DE", "GI", "PE", "CM", "CL", "NC", "DZ", "ZA", "GR", "IN", "EC", "GQ", "JP", "KH", "MF", "AW", "BV", "KP", "ID", "LU", "MZ", "RW", "SD", "CX", "LV", "MV", "MH", "BJ", "AQ", "BZ", "IO", "EH", "TF", "SS", "FR", "MD", "MQ", "LK", "EE", "SJ", "VA", "HU", "AE", "ME", "US", "PK", "MX", "NF", "AL", "KZ", "TC", "NP", "MR", "VU", "SX", "FO", "IE", "CO", "GM", "GH", "AO", "BE", "DM", "NU", "GP", "PL", "BQ", "CI", "CK", "FI", "MP", "LS", "CN", "AX", "CY", "BW", "ZW", "PN", "UA", "CW", "PH", "AR", "SK", "NL", "CF", "KW", "SZ", "CA", "AI", "NZ", "CU", "GU", "MT", "TG", "BI", "CG", "MG", "ML", "BR", "BG", "BM" ], "supported_currencies": [ "BMD", "HNL", "KYD", "BSD", "GTQ", "BBD", "CRC", "TTD", "USD", "JMD" ] }, { "payment_method": "card", "payment_method_type": "credit", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "three_ds": "supported", "no_three_ds": "supported", "supported_card_networks": [ "Visa", "Mastercard" ], "supported_countries": [ "RS", "SX", "CG", "BF", "HU", "FO", "KG", "MD", "IL", "TM", "SZ", "TC", "UM", "IT", "AX", "IQ", "TV", "PS", "JO", "LB", "AO", "GW", "JE", "SK", "BO", "UY", "SN", "VG", "BR", "GD", "CZ", "SA", "KM", "PH", "LR", "ID", "NA", "ST", "LK", "BW", "VU", "JP", "TO", "TW", "GT", "GP", "BI", "BT", "NU", "LA", "MT", "GY", "LU", "BY", "LY", "GA", "GM", "NF", "GE", "TD", "AR", "BJ", "CX", "BB", "IM", "TN", "CK", "SI", "SJ", "FR", "CD", "UA", "FI", "JM", "PR", "CR", "TT", "AG", "CW", "VA", "QA", "PK", "PE", "TJ", "US", "DM", "CV", "KN", "PL", "ES", "AQ", "DO", "MM", "MQ", "UG", "AM", "CI", "RE", "MG", "KE", "PF", "UZ", "BG", "SG", "MS", "SO", "KH", "MR", "MY", "LI", "KR", "RU", "AT", "SL", "GL", "SY", "SS", "HT", "KZ", "GH", "PM", "ZM", "ER", "SB", "SD", "VC", "SC", "LS", "VI", "VN", "DE", "HR", "VE", "WF", "IN", "MK", "PW", "AF", "MV", "TH", "GN", "GU", "KI", "CA", "PT", "SE", "LV", "CU", "FM", "AU", "GG", "TZ", "WS", "PY", "GF", "MH", "AE", "SR", "TF", "IE", "GB", "IS", "MO", "CC", "CO", "MC", "DK", "BL", "GI", "HM", "LT", "SV", "ET", "EC", "CY", "AL", "TL", "NO", "AI", "MW", "ZW", "BA", "KW", "BM", "TR", "NP", "BZ", "AS", "OM", "NE", "DZ", "FK", "NC", "BD", "BH", "IR", "BE", "MZ", "MF", "EG", "AZ", "KP", "MU", "TG", "GQ", "BS", "DJ", "FJ", "PN", "SM", "YT", "AW", "HN", "NI", "BV", "CM", "NL", "CN", "GR", "EE", "PA", "BQ", "NR", "IO", "YE", "MX", "ME", "RW", "BN", "CL", "SH", "HK", "ML", "NG", "EH", "LC", "RO", "MA", "KY", "MN", "CH", "MP", "CF", "ZA", "PG", "NZ" ], "supported_currencies": [ "BMD", "JMD", "GTQ", "CRC", "BSD", "KYD", "TTD", "BBD", "HNL", "USD" ] } ], "supported_webhook_flows": [] }, { "name": "RAPYD", "display_name": "Billwerk", "description": "Rapyd is a fintech company that enables businesses to collect payments in local currencies across the globe ", "category": "payment_gateway", "supported_payment_methods": [ { "payment_method": "card", "payment_method_type": "credit", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "three_ds": "supported", "no_three_ds": "supported", "supported_card_networks": [ "AmericanExpress", "Visa", "JCB", "DinersClub", "UnionPay", "Mastercard", "Discover" ], "supported_countries": [ "GP", "TG", "CH", "JO", "LT", "EE", "LV", "CL", "IR", "GD", "OM", "VE", "UZ", "PW", "HN", "AI", "AS", "IL", "GG", "PT", "TW", "SK", "VA", "SA", "ES", "PL", "ER", "UM", "BV", "HT", "BF", "IS", "MF", "BT", "LY", "KZ", "IM", "LA", "GH", "GR", "NF", "HU", "PE", "HR", "AG", "LS", "MX", "UY", "YE", "MY", "CU", "GB", "SC", "WS", "FK", "AQ", "VI", "MO", "TR", "GF", "RS", "NU", "TT", "TO", "NG", "GA", "PM", "GQ", "IN", "BN", "MT", "JE", "TH", "CY", "CK", "FI", "PA", "MD", "DE", "JP", "BR", "SL", "ID", "BM", "SD", "NC", "CF", "TN", "MH", "CV", "CD", "BW", "FO", "GT", "BD", "SI", "ZA", "SM", "RE", "JM", "DJ", "MR", "ZM", "IE", "CM", "EC", "BL", "SO", "KE", "BB", "KR", "GI", "KG", "RW", "BQ", "BZ", "SG", "BY", "TZ", "MC", "MZ", "BE", "IQ", "KY", "ZW", "UA", "BS", "CN", "LU", "NP", "FJ", "MN", "RU", "MU", "GY", "NA", "BH", "AL", "EH", "GN", "MV", "YT", "TD", "BA", "LB", "CW", "IT", "KP", "MG", "AW", "DO", "BO", "MK", "GM", "AX", "VN", "WF", "PF", "AR", "EG", "BI", "HM", "LR", "SN", "SR", "NI", "AE", "AT", "MM", "FR", "UG", "VC", "RO", "SX", "CO", "LC", "CI", "SS", "ST", "CX", "SV", "AU", "MQ", "ME", "NR", "MS", "KI", "QA", "SJ", "AF", "US", "DZ", "HK", "NO", "CA", "LI", "KH", "MP", "SB", "IO", "PG", "SZ", "SE", "BG", "MA", "PK", "AZ", "TM", "NZ", "CC", "FM", "TF", "PY", "SY", "ET", "GW", "LK", "TV", "ML", "GE", "CR", "PN", "PS", "NE", "CZ", "TL", "BJ", "KN", "AO", "KW", "MW", "PR", "VG", "TC", "VU", "AM", "CG", "GU", "DM", "GL", "TJ", "PH", "DK", "KM", "NL", "SH" ], "supported_currencies": [ "HKD", "MMK", "TRY", "PEN", "BRL", "TZS", "KRW", "MYR", "GEL", "UAH", "RUB", "HUF", "SAR", "XAF", "IQD", "AUD", "ILS", "UGX", "ZAR", "FJD", "GHS", "BOB", "GBP", "COP", "AED", "CNY", "CAD", "NGN", "KES", "NPR", "RWF", "SGD", "KZT", "MXN", "NAD", "USD", "HRK", "IRR", "XOF", "JPY", "NOK", "IDR", "PKR", "RSD", "DKK", "CHF", "ISK", "EUR", "PHP", "THB", "VND", "BWP", "KWD", "MWK", "MAD", "MZN", "EGP", "BND", "LKR", "QAR", "SEK", "LAK", "UYU", "CZK", "BGN", "PLN", "NZD", "RON", "SCR", "TWD", "SLL", "ZMW", "MOP", "INR", "BDT", "MDL" ] }, { "payment_method": "card", "payment_method_type": "debit", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "three_ds": "supported", "no_three_ds": "supported", "supported_card_networks": [ "AmericanExpress", "Visa", "JCB", "DinersClub", "UnionPay", "Mastercard", "Discover" ], "supported_countries": [ "US", "KG", "AZ", "LR", "VA", "NE", "HU", "AI", "BN", "GA", "KE", "SE", "NG", "BS", "NI", "GY", "KM", "GT", "TG", "TH", "PY", "SO", "KR", "RU", "BV", "NZ", "BY", "BD", "DO", "GR", "LC", "TT", "BE", "GE", "PK", "BF", "PW", "PF", "IT", "NL", "DE", "PL", "KI", "IS", "DM", "VG", "JO", "EH", "SD", "CV", "BO", "LK", "ZM", "BH", "FR", "NP", "NU", "PT", "ER", "VC", "WS", "VN", "ES", "LU", "RW", "KP", "QA", "BT", "AL", "ET", "AO", "JE", "ZA", "RS", "ME", "SV", "FI", "BM", "FJ", "PH", "SX", "MG", "MV", "IO", "LI", "PG", "UA", "MW", "KN", "RE", "BL", "GM", "MR", "DK", "SR", "VU", "CA", "IL", "MO", "SK", "TO", "GU", "MK", "CC", "SL", "MD", "HR", "GN", "JM", "OM", "FM", "GQ", "MZ", "PN", "PS", "BG", "MM", "GB", "KZ", "TW", "CG", "CM", "KW", "TZ", "DZ", "BI", "EG", "TV", "IQ", "AE", "BA", "CI", "IR", "KH", "NO", "SZ", "BR", "CL", "GL", "HT", "SI", "GP", "GI", "EC", "ID", "TD", "LY", "SH", "MF", "TR", "VI", "LA", "TN", "SG", "SM", "TM", "TJ", "FO", "VE", "GF", "CD", "MC", "AT", "MP", "AQ", "CY", "RO", "UM", "NC", "BB", "TC", "HN", "BJ", "SC", "NR", "NF", "FK", "LV", "MS", "BZ", "UZ", "LS", "MN", "CU", "DJ", "LT", "MT", "GG", "PR", "PM", "ML", "GW", "SY", "PA", "AS", "GH", "HK", "ZW", "SA", "AF", "SN", "AG", "AR", "CK", "AW", "AU", "CN", "SB", "WF", "CZ", "CX", "MU", "BW", "IE", "IN", "PE", "MH", "MX", "TL", "MY", "SS", "CW", "YT", "CO", "CF", "CH", "MQ", "GD", "CR", "AM", "LB", "BQ", "ST", "UY", "NA", "TF", "UG", "HM", "EE", "MA", "AX", "SJ", "IM", "KY", "YE", "JP" ], "supported_currencies": [ "THB", "BGN", "CHF", "RON", "MXN", "BOB", "AUD", "MOP", "USD", "XOF", "XAF", "COP", "SGD", "CZK", "BWP", "KWD", "BND", "KZT", "CNY", "EUR", "GHS", "NZD", "PLN", "UGX", "VND", "UAH", "KRW", "IQD", "INR", "SLL", "ZAR", "HUF", "NAD", "PKR", "NOK", "PEN", "SEK", "UYU", "SAR", "MZN", "NGN", "CAD", "LAK", "NPR", "QAR", "MMK", "KES", "HRK", "RUB", "TZS", "ZMW", "FJD", "AED", "PHP", "MAD", "MDL", "DKK", "JPY", "ISK", "MWK", "TWD", "LKR", "GEL", "MYR", "RWF", "TRY", "BRL", "BDT", "HKD", "EGP", "ILS", "IRR", "SCR", "RSD", "IDR", "GBP" ] }, { "payment_method": "wallet", "payment_method_type": "apple_pay", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "supported_countries": [ "TJ", "KW", "RS", "PR", "EE", "RO", "HU", "PT", "GB", "US", "AM", "CR", "IE", "VI", "GU", "SI", "BA", "LU", "GI", "GT", "MD", "UA", "NO", "HN", "VN", "PA", "IL", "ME", "MP", "CH", "CA", "EC", "IT", "AZ", "CY", "AT", "JP", "NI", "BH", "GG", "BR", "SV", "SG", "ZA", "SE", "AL", "FO", "AE", "MY", "MK", "CL", "LV", "TW", "UY", "PY", "FI", "KH", "CO", "SM", "ES", "KY", "GL", "LT", "PE", "GE", "MT", "AD", "IS", "PL", "TH", "HK", "KZ", "KG", "LI", "DE", "DO", "IM", "AS", "BM", "MO", "MA", "DK", "NL", "GR", "NZ", "BG", "HR", "AR", "CZ", "MC", "MX", "BE", "AU", "FR", "QA", "SK" ], "supported_currencies": [ "EUR", "GBP", "ISK", "USD" ] }, { "payment_method": "wallet", "payment_method_type": "google_pay", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "supported_countries": [ "HR", "NL", "TW", "VA", "SK", "GB", "MY", "GR", "RS", "PT", "IT", "AT", "NZ", "SE", "FI", "EC", "BA", "AZ", "EE", "LT", "CN", "NO", "RO", "OM", "BE", "UA", "DE", "IL", "IS", "TH", "MX", "SG", "MA", "SA", "PR", "MN", "JP", "PE", "MD", "LI", "FR", "HK", "DK", "LA", "LU", "HU", "AM", "CO", "JE", "NC", "KZ", "PA", "EG", "US", "SM", "QA", "BG", "CY", "GL", "MT", "SI", "JO", "IE", "UY", "DO", "BY", "VN", "GT", "GE", "PL", "CA", "SV", "MC", "CR", "CL", "ZA", "CZ", "AU", "CH", "IM", "LV", "HN", "KW", "MO", "ME", "ES" ], "supported_currencies": [ "ISK", "EUR", "GBP", "USD" ] } ], "supported_webhook_flows": [ "payments", "refunds", "disputes" ] }, { "name": "RAZORPAY", "display_name": "RAZORPAY", "description": "Razorpay helps you accept online payments from customers across Desktop, Mobile web, Android & iOS. Additionally by using Razorpay Payment Links, you can collect payments across multiple channels like SMS, Email, Whatsapp, Chatbots & Messenger.", "category": "payment_gateway", "supported_payment_methods": [ { "payment_method": "upi", "payment_method_type": "upi_collect", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic" ], "supported_countries": [ "IN" ], "supported_currencies": [ "INR" ] } ], "supported_webhook_flows": [ "payments", "refunds" ] }, { "name": "SHIFT4", "display_name": "Shift4", "description": "Shift4 Payments, Inc. is an American payment processing company based in Allentown, Pennsylvania. ", "category": "payment_gateway", "supported_payment_methods": [ { "payment_method": "card", "payment_method_type": "credit", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "three_ds": "supported", "no_three_ds": "supported", "supported_card_networks": [ "Visa", "Mastercard" ], "supported_countries": [ "CC", "MG", "MD", "GI", "KY", "ZM", "AL", "LU", "DZ", "BA", "MU", "CV", "FI", "AT", "GT", "GR", "MS", "SN", "DK", "MH", "SG", "CZ", "IL", "YE", "BY", "CH", "PR", "TO", "BM", "TH", "SO", "BR", "GF", "CI", "NU", "ZA", "MZ", "AR", "CR", "TD", "UM", "VU", "AI", "TG", "BJ", "SD", "UZ", "PK", "PS", "ES", "FM", "HK", "SI", "TF", "DM", "PW", "BL", "AM", "MT", "GB", "PG", "TZ", "LA", "BT", "MO", "IQ", "NL", "LK", "ER", "SJ", "SV", "TW", "MP", "YT", "RU", "EG", "IM", "AW", "RS", "BZ", "GM", "CG", "ZW", "DJ", "AQ", "HM", "MY", "LC", "US", "CK", "LS", "SL", "DO", "SZ", "VG", "IS", "MV", "JO", "VA", "EE", "FK", "BN", "GW", "GA", "RE", "AU", "JE", "KW", "SM", "AO", "PH", "QA", "KM", "PT", "SY", "ST", "KR", "MC", "AX", "FR", "HR", "IO", "NO", "NC", "GL", "NP", "BE", "BH", "BI", "FO", "NZ", "PM", "KI", "IR", "MK", "MN", "TC", "MX", "ID", "SC", "SX", "UG", "GH", "PA", "NG", "VN", "GE", "SS", "AZ", "TJ", "VI", "WF", "CF", "LI", "PN", "NF", "TR", "SB", "TV", "MM", "MR", "CU", "KG", "BG", "ET", "FJ", "NE", "PL", "KH", "BD", "KE", "KP", "TM", "NI", "CX", "AF", "GP", "CN", "UY", "PY", "CO", "LT", "SE", "MF", "LV", "AS", "DE", "KN", "HN", "MQ", "ME", "MA", "WS", "CM", "GQ", "BW", "IN", "TN", "AE", "BQ", "IE", "VE", "OM", "GY", "TL", "UA", "CA", "PE", "NR", "JP", "SR", "BO", "AG", "RO", "VC", "CL", "AD", "BB", "GG", "EH", "GU", "HU", "BS", "LY", "GN", "SA", "HT", "ML", "KZ", "GD", "SH", "EC", "CD", "MW", "SK", "CW", "CY", "BV", "IT", "TT", "JM", "LR", "LB", "RW", "NA", "PF", "BF" ], "supported_currencies": [ "BND", "GBP", "BOB", "GTQ", "LBP", "BMD", "DZD", "LAK", "IRR", "MRU", "GYD", "LKR", "GIP", "KGS", "LYD", "RUB", "SOS", "CZK", "BGN", "TWD", "NOK", "PHP", "PLN", "MNT", "XPF", "DKK", "INR", "MKD", "USD", "RON", "MXN", "TMT", "CNY", "CHF", "WST", "CAD", "TZS", "AMD", "RSD", "THB", "MOP", "XAF", "GEL", "UZS", "ZAR", "GNF", "AOA", "KMF", "PGK", "YER", "VUV", "MGA", "KPW", "CUP", "VND", "BSD", "ISK", "NIO", "AZN", "NPR", "MVR", "BDT", "MMK", "QAR", "SVC", "CDF", "ILS", "TOP", "SBD", "SZL", "UGX", "DOP", "GHS", "GMD", "KRW", "ARS", "PYG", "KZT", "HNL", "XOF", "KWD", "SGD", "DJF", "ANG", "ALL", "BTN", "TJS", "SYP", "MDL", "IDR", "SCR", "COP", "FKP", "PKR", "RWF", "SHP", "XCD", "NZD", "SRD", "CLP", "CRC", "BYN", "MZN", "BAM", "ETB", "NGN", "BRL", "HRK", "AUD", "SEK", "KYD", "OMR", "CVE", "HTG", "ERN", "SDG", "AWG", "MAD", "BBD", "FJD", "SLL", "EGP", "SSP", "AFN", "EUR", "BZD", "TND", "JOD", "HKD", "HUF", "SAR", "MYR", "UYU", "BHD", "KES", "MWK", "BIF", "IQD", "LSL", "PAB", "TTD", "UAH", "KHR", "MUR", "AED", "LRD", "ZMW", "NAD", "PEN", "BWP", "ZWL", "TRY", "JMD", "JPY" ] }, { "payment_method": "card", "payment_method_type": "debit", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "three_ds": "supported", "no_three_ds": "supported", "supported_card_networks": [ "Visa", "Mastercard" ], "supported_countries": [ "GF", "AZ", "GI", "GW", "DK", "RU", "EG", "TR", "BB", "BZ", "HR", "LI", "KE", "DZ", "IL", "BI", "PE", "VU", "QA", "BM", "LU", "KM", "JM", "ZW", "TZ", "AT", "MY", "ET", "EH", "IR", "MK", "PR", "SZ", "UZ", "MP", "OM", "PG", "SI", "WS", "YT", "AD", "CZ", "MN", "VG", "PM", "CA", "FK", "NI", "SJ", "AL", "MR", "ES", "GM", "NZ", "BR", "RS", "ST", "TN", "VC", "GN", "CY", "SR", "MO", "AI", "GY", "VE", "GT", "ID", "AR", "FM", "GA", "VI", "SD", "KW", "UA", "FI", "GH", "NA", "ER", "BG", "NU", "CC", "DE", "PH", "KH", "NL", "PF", "TT", "BS", "BO", "LK", "MA", "AG", "KI", "AX", "MW", "SB", "BN", "CI", "CK", "DO", "NP", "IE", "AQ", "EE", "ZA", "KZ", "PY", "PT", "BH", "CD", "NG", "KN", "MU", "MX", "SE", "SY", "GR", "ME", "PN", "GU", "EC", "MQ", "CR", "TO", "CG", "CW", "HK", "MV", "UY", "VA", "ZM", "US", "JE", "IN", "MC", "GB", "JP", "MZ", "BJ", "JO", "CL", "SS", "BL", "GQ", "IT", "TW", "WF", "FJ", "BA", "MT", "NE", "MD", "TD", "PS", "SL", "TL", "TH", "KR", "LR", "PA", "AW", "MM", "CM", "PL", "BQ", "GE", "HM", "IS", "SA", "AE", "CN", "RO", "LS", "TM", "UM", "HU", "IQ", "BV", "HN", "UG", "MF", "TF", "VN", "BF", "NF", "DM", "NC", "SX", "KP", "BE", "SO", "SN", "MH", "TG", "LB", "CF", "KG", "GD", "GP", "BY", "CH", "CV", "PW", "NO", "NR", "GG", "CO", "KY", "TJ", "LA", "CU", "BW", "TC", "MG", "MS", "SG", "RW", "SC", "CX", "SK", "LT", "AM", "BT", "YE", "LV", "ML", "IM", "GL", "SV", "FR", "LY", "PK", "BD", "AO", "AU", "IO", "AS", "RE", "AF", "HT", "LC", "SM", "DJ", "FO", "SH", "TV" ], "supported_currencies": [ "UAH", "AED", "EGP", "MYR", "SVC", "XPF", "ZMW", "CRC", "SZL", "PEN", "CHF", "MGA", "XAF", "SEK", "TMT", "HTG", "MOP", "RSD", "MUR", "RWF", "BBD", "LKR", "LSL", "IRR", "LAK", "NOK", "PKR", "CLP", "ANG", "DJF", "BND", "SLL", "RON", "PHP", "LYD", "JOD", "TND", "IDR", "KES", "LBP", "AMD", "MXN", "TJS", "RUB", "MVR", "EUR", "ERN", "SBD", "BAM", "AFN", "KHR", "GEL", "MRU", "TWD", "BDT", "BRL", "NIO", "BYN", "ETB", "AZN", "GMD", "COP", "CVE", "ALL", "PAB", "KYD", "LRD", "NGN", "NZD", "KRW", "GBP", "KGS", "GYD", "AUD", "AWG", "USD", "UYU", "XCD", "BOB", "ILS", "DKK", "NAD", "BZD", "INR", "BSD", "TZS", "VND", "SSP", "HRK", "GHS", "MNT", "SRD", "ZAR", "CAD", "SCR", "PLN", "BTN", "GTQ", "KWD", "CUP", "FJD", "NPR", "SAR", "SDG", "SHP", "FKP", "ISK", "QAR", "SYP", "UGX", "ARS", "HUF", "BMD", "CNY", "MAD", "GIP", "HNL", "CDF", "SOS", "VUV", "PYG", "XOF", "IQD", "MMK", "MWK", "THB", "HKD", "JPY", "TRY", "BHD", "YER", "KMF", "TTD", "MDL", "BIF", "MZN", "ZWL", "MKD", "JMD", "GNF", "DOP", "CZK", "DZD", "KPW", "KZT", "PGK", "OMR", "BWP", "AOA", "SGD", "UZS", "BGN", "WST", "TOP" ] }, { "payment_method": "bank_redirect", "payment_method_type": "sofort", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "supported_countries": [ "SE", "DE", "AT", "FI", "CH", "GB", "IT", "NL", "FR", "ES", "BE", "PL" ], "supported_currencies": [ "EUR", "CHF" ] }, { "payment_method": "bank_redirect", "payment_method_type": "eps", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "supported_countries": [ "AT" ], "supported_currencies": [ "EUR" ] }, { "payment_method": "bank_redirect", "payment_method_type": "ideal", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "supported_countries": [ "NL" ], "supported_currencies": [ "EUR" ] }, { "payment_method": "bank_redirect", "payment_method_type": "giropay", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "supported_countries": [ "DE" ], "supported_currencies": [ "EUR" ] } ], "supported_webhook_flows": [ "payments" ] }, { "name": "VOLT", "display_name": "VOLT", "description": "Volt is a payment gateway operating in China, specializing in facilitating local bank transfers", "category": "payment_gateway", "supported_payment_methods": [ { "payment_method": "bank_redirect", "payment_method_type": "open_banking_uk", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic" ], "supported_countries": [ "BE", "GB", "IE", "IT", "LT", "MT", "LV", "DK", "PT", "HR", "DE", "HU", "AU", "FI", "BR", "NL", "SK", "RO", "NO", "CZ", "FR", "ES", "AT", "CY", "EE", "SE", "LU", "BG", "GR", "SI", "PL" ], "supported_currencies": [ "AUD", "PLN", "DKK", "NOK", "EUR", "BRL", "SEK", "GBP" ] } ], "supported_webhook_flows": [] }, { "name": "WORLDLINE", "display_name": "Worldline", "description": "Worldline, Europe's leading payment service provider", "category": "payment_gateway", "supported_payment_methods": [ { "payment_method": "bank_redirect", "payment_method_type": "giropay", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "supported_countries": [ "DE" ], "supported_currencies": [ "EUR" ] }, { "payment_method": "bank_redirect", "payment_method_type": "ideal", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "supported_countries": [ "NL" ], "supported_currencies": [ "EUR" ] }, { "payment_method": "card", "payment_method_type": "credit", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "three_ds": "supported", "no_three_ds": "supported", "supported_card_networks": [ "AmericanExpress", "Discover", "Mastercard", "Visa" ], "supported_countries": [ "MH", "KP", "IE", "TL", "MU", "RS", "TZ", "CD", "FJ", "GL", "CG", "KR", "HU", "BL", "IS", "LC", "CF", "GR", "NE", "RW", "SS", "NF", "TH", "UM", "YT", "AT", "ME", "MZ", "PA", "LA", "ZA", "JE", "LV", "IR", "UG", "SE", "CM", "AE", "FK", "PF", "MQ", "AX", "ST", "LK", "BD", "YE", "GB", "BQ", "MG", "SR", "SY", "TN", "DJ", "GM", "SM", "IM", "LR", "TW", "CZ", "NO", "BY", "UA", "CN", "IT", "LI", "LY", "PK", "AG", "AD", "ML", "AL", "ER", "AU", "NZ", "BW", "SO", "SG", "MX", "GA", "AQ", "MR", "VG", "KN", "MV", "MO", "BR", "LB", "NR", "LS", "MT", "JM", "KG", "AM", "TM", "HK", "SB", "EE", "PM", "CV", "KE", "GE", "HM", "NI", "AF", "PL", "BV", "ZM", "DO", "AR", "MS", "BA", "DZ", "SL", "GP", "RU", "CK", "IO", "FO", "UZ", "JO", "AS", "GY", "CX", "BI", "MC", "US", "HN", "IQ", "UY", "VC", "SH", "EH", "VI", "RO", "VU", "KZ", "TC", "SA", "CW", "MY", "PS", "DE", "EC", "TT", "LT", "MA", "FM", "GF", "IL", "MD", "NL", "AZ", "WS", "BM", "SV", "DK", "AO", "GU", "OM", "CA", "NG", "PH", "FR", "PR", "IN", "PW", "TJ", "AW", "BE", "CL", "GT", "SI", "RE", "CI", "TF", "PE", "DM", "TV", "GG", "CH", "BN", "TD", "BG", "TO", "HT", "SN", "BJ", "BO", "KM", "MF", "PG", "EG", "BZ", "PN", "ZW", "VA", "SD", "KI", "NA", "BF", "BB", "AI", "CO", "HR", "QA", "TR", "GW", "SX", "VE", "WF", "ET", "BT", "CY", "LU", "MM", "MW", "VN", "CU", "GN", "BH", "CC", "BS", "GH", "KH", "MN", "FI", "NU", "SZ", "KY", "MK", "SJ", "PT", "GQ", "PY", "ES", "MP", "CR", "GD", "NC", "NP", "GI", "SC", "TG", "ID", "SK", "JP", "KW" ], "supported_currencies": [ "TMT", "WST", "BND", "GEL", "LSL", "MYR", "PAB", "PHP", "COP", "AED", "LRD", "BMD", "MDL", "GYD", "AWG", "MRU", "BAM", "SVC", "UAH", "HKD", "KHR", "CRC", "FKP", "HRK", "NOK", "MOP", "SCR", "LBP", "BRL", "NGN", "YER", "ZAR", "CAD", "XPF", "JMD", "AMD", "XCD", "AUD", "QAR", "PYG", "BYN", "CLP", "ISK", "KMF", "GTQ", "BGN", "DOP", "LAK", "BZD", "DZD", "GBP", "MXN", "PEN", "RUB", "SEK", "ANG", "NAD", "SGD", "SHP", "SLL", "SRD", "BTN", "DJF", "GNF", "AZN", "IQD", "KYD", "DKK", "BOB", "VND", "ERN", "TZS", "LKR", "KGS", "CZK", "KZT", "XOF", "PGK", "MVR", "SDG", "CUP", "ILS", "RON", "KPW", "AOA", "RSD", "SSP", "XAF", "MNT", "ARS", "CDF", "BDT", "JOD", "SZL", "TOP", "PLN", "MGA", "MUR", "FJD", "GMD", "BIF", "BWP", "MMK", "IRR", "SOS", "THB", "USD", "MZN", "ALL", "KWD", "LYD", "TTD", "TND", "JPY", "NPR", "EGP", "TWD", "NZD", "KES", "SYP", "HNL", "UZS", "HTG", "BHD", "IDR", "ETB", "KRW", "CHF", "UYU", "PKR", "BSD", "CVE", "TRY", "VUV", "EUR", "MWK", "AFN", "GHS", "GIP", "ZWL", "CNY", "HUF", "SAR", "MKD", "BBD", "INR", "NIO", "OMR", "MAD", "RWF", "SBD", "TJS", "UGX", "ZMW" ] }, { "payment_method": "card", "payment_method_type": "debit", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "three_ds": "supported", "no_three_ds": "supported", "supported_card_networks": [ "AmericanExpress", "Discover", "Mastercard", "Visa" ], "supported_countries": [ "SH", "HK", "YT", "WF", "HT", "HN", "HR", "PW", "MT", "AR", "CH", "NE", "PL", "CL", "PF", "SO", "LV", "PR", "TF", "GU", "TO", "FR", "GG", "BM", "BR", "KP", "NA", "GR", "MV", "EE", "ER", "GD", "IR", "HM", "HU", "AF", "CI", "LB", "VG", "QA", "MS", "BB", "CW", "TG", "TL", "GT", "NO", "SS", "AU", "TW", "MK", "VN", "BD", "NP", "SV", "AT", "BH", "JP", "WS", "ZM", "IL", "JM", "SY", "NU", "CN", "JO", "MX", "DO", "MH", "GH", "TC", "IO", "ML", "TH", "KI", "VA", "CO", "SR", "MP", "GL", "ID", "BN", "NZ", "PG", "AM", "FI", "TJ", "IQ", "LU", "LS", "SX", "UG", "TN", "DJ", "CK", "BQ", "ZA", "BL", "CM", "KY", "AZ", "UZ", "BI", "FO", "KG", "AQ", "MG", "CF", "EG", "MO", "DK", "GN", "KZ", "SE", "MN", "US", "GM", "VC", "TR", "AO", "SI", "BS", "PH", "LI", "NG", "BY", "CD", "AG", "AD", "AL", "CC", "IT", "BZ", "KM", "GQ", "TV", "PA", "SN", "UA", "AW", "CY", "NC", "DE", "KE", "RU", "PE", "MF", "MZ", "LC", "CV", "GA", "NR", "BG", "CZ", "BW", "LA", "MU", "MD", "ME", "RO", "PY", "ES", "BT", "BF", "FJ", "SB", "MY", "MC", "AS", "DM", "KN", "PM", "BJ", "ZW", "GB", "PS", "AE", "RS", "RW", "ST", "BA", "TT", "SZ", "IN", "JE", "NL", "UM", "MQ", "KW", "GP", "EC", "MA", "MW", "IM", "RE", "PN", "TD", "NI", "LT", "PT", "CG", "BO", "CA", "SK", "CR", "VI", "AI", "BV", "SM", "AX", "VU", "EH", "TM", "FM", "KH", "SL", "GF", "CU", "CX", "SA", "LR", "VE", "SC", "GY", "LK", "GI", "NF", "BE", "IS", "IE", "GE", "UY", "YE", "PK", "SD", "FK", "TZ", "KR", "MM", "ET", "LY", "MR", "GW", "SJ", "OM", "SG", "DZ" ], "supported_currencies": [ "BBD", "NZD", "PYG", "MUR", "ZAR", "BZD", "CRC", "KMF", "HNL", "TZS", "EGP", "ZWL", "CNY", "SBD", "TTD", "INR", "LRD", "DJF", "JOD", "MAD", "NIO", "BRL", "VUV", "WST", "MWK", "AFN", "DOP", "MXN", "HRK", "THB", "SHP", "PGK", "PEN", "NGN", "SAR", "SYP", "CZK", "MRU", "YER", "CAD", "UYU", "GYD", "SLL", "AWG", "BWP", "BYN", "GEL", "CDF", "MOP", "BTN", "IQD", "SCR", "GHS", "JPY", "LSL", "MNT", "RON", "KRW", "SZL", "TOP", "TMT", "MDL", "MKD", "SEK", "NOK", "QAR", "SVC", "KYD", "SSP", "TND", "XAF", "DKK", "KZT", "MGA", "XOF", "ISK", "SDG", "SGD", "SOS", "BAM", "DZD", "CVE", "MVR", "VND", "GMD", "LBP", "BOB", "AZN", "UGX", "IRR", "TRY", "EUR", "HUF", "SRD", "KWD", "XCD", "AOA", "BMD", "ILS", "LKR", "AED", "ETB", "MYR", "ARS", "BGN", "JMD", "BND", "FJD", "AUD", "GBP", "MMK", "PKR", "PHP", "GTQ", "PLN", "CLP", "KES", "ALL", "KHR", "KPW", "HKD", "BIF", "NAD", "RSD", "TJS", "TWD", "UZS", "XPF", "MZN", "PAB", "CHF", "ANG", "BHD", "COP", "AMD", "KGS", "FKP", "RUB", "RWF", "BSD", "ERN", "HTG", "LAK", "GIP", "UAH", "GNF", "USD", "BDT", "OMR", "LYD", "CUP", "IDR", "ZMW", "NPR" ] } ], "supported_webhook_flows": [ "payments" ] }, { "name": "ZSL", "display_name": "ZSL", "description": "Zsl is a payment gateway operating in China, specializing in facilitating local bank transfers", "category": "payment_gateway", "supported_payment_methods": [ { "payment_method": "bank_transfer", "payment_method_type": "local_bank_transfer", "mandates": "not_supported", "refunds": "not_supported", "supported_capture_methods": [ "automatic" ], "supported_countries": [ "CN" ], "supported_currencies": [ "CNY" ] } ], "supported_webhook_flows": [] } ] } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/bamboraapac.rs` - `crates/hyperswitch_connectors/src/connectors/gocardless.rs` - `crates/hyperswitch_connectors/src/connectors/powertranz.rs` - ... and 3 more files **2. Tests** - `config/deployments/integration_test.toml` - `loadtest/config/development.toml` **3. Configuration Files** - `config/config.example.toml` - `config/deployments/production.toml` - `config/deployments/sandbox.toml` - ... and 2 more files **Code Patterns Applied:** - Implement new functions (18 changes) - Extend existing types with new fields (132 changes) **Detailed Identifier Changes:** Commit 9fe9e9e0: Files to modify: **crates/hyperswitch_connectors/src/connectors/bamboraapac.rs** Remove: - function: private::validate_connector_against_payment_request - impl: impl ConnectorSpecifications for Bamboraapac Add: - function: private::get_connector_about - function: private::get_supported_payment_methods - function: private::get_supported_webhook_flows - impl: impl ConnectorSpecifications for Bamboraapac **crates/hyperswitch_connectors/src/connectors/gocardless.rs** Remove: - function: private::validate_connector_against_payment_request - impl: impl ConnectorSpecifications for Gocardless Add: - function: private::get_connector_about - function: private::get_supported_payment_methods - function: private::get_supported_webhook_flows - impl: impl ConnectorSpecifications for Gocardless **crates/hyperswitch_connectors/src/connectors/powertranz.rs** Remove: - function: private::validate_connector_against_payment_request - impl: impl ConnectorValidation for Powertranz - impl: impl ConnectorSpecifications for Powertranz Add: - function: private::get_connector_about - function: private::get_supported_payment_methods - function: private::get_supported_webhook_flows - impl: impl ConnectorValidation for Powertranz - impl: impl ConnectorSpecifications for Powertranz **crates/hyperswitch_connectors/src/connectors/rapyd.rs** Remove: - function: private::validate_connector_against_payment_request - impl: impl ConnectorValidation for Rapyd - impl: impl ConnectorSpecifications for Rapyd Add: - function: private::get_connector_about - function: private::get_supported_payment_methods - function: private::get_supported_webhook_flows - impl: impl ConnectorValidation for Rapyd - impl: impl ConnectorSpecifications for Rapyd **crates/hyperswitch_connectors/src/connectors/shift4.rs** Remove: - function: private::validate_connector_against_payment_request - impl: impl ConnectorValidation for Shift4 - impl: impl ConnectorSpecifications for Shift4 Add: - function: private::get_connector_about - function: private::get_supported_payment_methods - function: private::get_supported_webhook_flows - impl: impl ConnectorValidation for Shift4 - impl: impl ConnectorSpecifications for Shift4 **crates/hyperswitch_connectors/src/connectors/worldline.rs** Remove: - function: private::validate_connector_against_payment_request - impl: impl ConnectorValidation for Worldline - impl: impl ConnectorSpecifications for Worldline Add: - function: private::get_connector_about - function: private::get_supported_payment_methods - function: private::get_supported_webhook_flows - impl: impl ConnectorValidation for Worldline - impl: impl ConnectorSpecifications for Worldline
{"pr_number": 7136, "pr_title": "Feat(connector): Rapyd, Bamboraapac, Gocardless, Powertranz, Shift4 and Worldline added in feature matrix", "merged_at": "2025-03-11T11:46:47Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/bamboraapac.rs", "crates/hyperswitch_connectors/src/connectors/gocardless.rs", "crates/hyperswitch_connectors/src/connectors/powertranz.rs", "crates/hyperswitch_connectors/src/connectors/rapyd.rs", "crates/hyperswitch_connectors/src/connectors/shift4.rs", "crates/hyperswitch_connectors/src/connectors/worldline.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": 18, "fields_added": 132, "imports_added": 6}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(diesel_models): Fix error message while using generic filter ## 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 changes the way we raise error if something goes wrong with generic filter. Currently we throw not found error which is wrong. This feature is hard to test on hosted environments, as this requires to make some db changes so that we can get error in generic filter. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with 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 will able able to log correct error messages ## How did you test 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 it with dropping `organization_id` column in refund table while trying to create refund. According to current implementation, we are raising not found error which is incorrect because it is not displaying the right cause. <img width="1637" alt="Screenshot 2025-04-29 at 4 24 40 PM" src="https://github.com/user-attachments/assets/940fda38-c6dc-46ae-b6e1-01aabd6c2a4f" /> Implementation in this PR fixes this bug. <img width="1534" alt="Screenshot 2025-04-29 at 4 28 33 PM" src="https://github.com/user-attachments/assets/d8a61239-433c-4d17-bfb6-0ae2d81c9cdb" /> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] 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/generics.rs` **Detailed Identifier Changes:** Commit 997ef019: Files to modify: **crates/diesel_models/src/query/generics.rs** Modify existing code
{"pr_number": 7935, "pr_title": "fix(diesel_models): Fix error message while using generic filter", "merged_at": "2025-05-02T12:44:50Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user", "refund"]}, "hierarchy": {"database": ["crates/diesel_models/src/query/generics.rs"]}, "change_types": {}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix: invalidate surcharge cache during update ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> When surcharge rules where updated or deleted, the in memory cache was being invalidated using the wrong key. Fixed that issue in this PR. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test 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. upsert surcharge rules. If amount >500 and <1000 add a surcharge of 40%. ``` curl --location --request PUT 'http://localhost:8080/routing/decision/surcharge' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_bLGFEtyJtHdvJqXtbnwOcnxpBuNk9lcGIHewiAgCcQQKXYdyoHw8SyAz5JcfikMl' \ --data '{ "name": "Surcharge Conditional config", "algorithm": { "defaultSelection": { "surcharge_details": null }, "rules": [ { "name": "rule_1", "routingOutput": { "surcharge_details": { "surcharge": { "type": "rate", "value": { "percentage": 40 } }, "tax_on_surcharge": { "percentage": 40 } } }, "statements": [ { "condition": [ { "lhs": "amount", "comparison": "greater_than", "value": { "type": "number", "value": 500 }, "metadata": {} }, { "lhs": "amount", "comparison": "less_than", "value": { "type": "number", "value": 1000 }, "metadata": {} } ], "nested": null } ] } ], "metadata": {} }, "merchant_surcharge_configs": { "show_surcharge_breakup_screen": true } }' ``` should get status code 200 response. 2. Create payment of 540 ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_bLGFEtyJtHdvJqXtbnwOcnxpBuNk9lcGIHewiAgCcQQKXYdyoHw8SyAz5JcfikMl' \ --data-raw '{ "amount": 540, "currency": "USD", "confirm": false, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 540, "customer_id": "StripeCustomer", "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment request", "authentication_type": "no_three_ds", "return_url": "https://duck.com", "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "PiX" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "PiX" } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } }' ``` 3. Do payment method list. ``` curl --location 'http://localhost:8080/account/payment_methods?client_secret=pay_rKiEoW6t1eHHzS8WukOx_secret_QvEuTgyhWcGmNhzqHrTc' \ --header 'Accept: application/json' \ --header 'api-key: pk_dev_8ea5f5ea888f43e199ae05a22b7aaae8' ``` Appropriate surcharge must be applied to each of the payment method. ``` "surcharge_details": { "surcharge": { "type": "rate", "value": { "percentage": 40.0 } }, "tax_on_surcharge": { "percentage": 40.0 }, "display_surcharge_amount": 2.16, "display_tax_on_surcharge_amount": 0.87, "display_total_surcharge_amount": 3.03 }, ``` 4. Now update the surcharge rule. If amount >500 and <1000 add a surcharge of 10%. ``` curl --location --request PUT 'http://localhost:8080/routing/decision/surcharge' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_bLGFEtyJtHdvJqXtbnwOcnxpBuNk9lcGIHewiAgCcQQKXYdyoHw8SyAz5JcfikMl' \ --data '{ "name": "Surcharge Conditional config", "algorithm": { "defaultSelection": { "surcharge_details": null }, "rules": [ { "name": "rule_1", "routingOutput": { "surcharge_details": { "surcharge": { "type": "rate", "value": { "percentage": 10 } }, "tax_on_surcharge": { "percentage": 10 } } }, "statements": [ { "condition": [ { "lhs": "amount", "comparison": "greater_than", "value": { "type": "number", "value": 500 }, "metadata": {} }, { "lhs": "amount", "comparison": "less_than", "value": { "type": "number", "value": 1000 }, "metadata": {} } ], "nested": null } ] } ], "metadata": {} }, "merchant_surcharge_configs": { "show_surcharge_breakup_screen": true } }' ``` 5. Do payment method list again. ``` curl --location 'http://localhost:8080/account/payment_methods?client_secret=pay_rKiEoW6t1eHHzS8WukOx_secret_QvEuTgyhWcGmNhzqHrTc' \ --header 'Accept: application/json' \ --header 'api-key: pk_dev_8ea5f5ea888f43e199ae05a22b7aaae8' ``` Appropriate surcharge must be applied to each of the payment method. ``` "surcharge_details": { "surcharge": { "type": "rate", "value": { "percentage": 10.0 } }, "tax_on_surcharge": { "percentage": 10.0 }, "display_surcharge_amount": 0.54, "display_tax_on_surcharge_amount": 0.06, "display_total_surcharge_amount": 0.6 }, ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] 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/surcharge_decision_config.rs` **Detailed Identifier Changes:** Commit 8ac1b839: Files to modify: **crates/router/src/core/surcharge_decision_config.rs** Modify existing code
{"pr_number": 6907, "pr_title": "fix: invalidate surcharge cache during update", "merged_at": "2025-02-04T01:18:46Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"core_business": ["crates/router/src/core/surcharge_decision_config.rs"]}, "change_types": {}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(router): [Xendit] add support for split 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 --> Add support for split payments via xendit platform Payment: Request for split ``` "split_payments": { "xendit_split_payment": { "multiple_splits" : { "name": "20210908 Test", "for_user_id":"***************", //Include in case of partner to platform or platform to partner "description": "Platform fee and Delivery Fee for Marketplace", "routes": [ { "flat_amount": 3000, "currency": "IDR", "destination_account_id": "***************", "reference_id": "1234" }, { "percent_amount": 5, "currency": "IDR", "destination_account_id": "***************", "reference_id": "1235" } ] } } } ``` Payment: Request to collect 100% money to sub-merchant ``` "split_payments": { "xendit_split_payment": { "single_split" : { "for_user_id":"***************", } } } ``` Request for Refund (incase of platform to partner or parner to platform) ``` "split_refunds": { "xendit_split_refund": { "for_user_id": "*****************" } } ``` ### Additional Changes - [x] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> <details> <summary>0. Xendit Connector create</summary> ```bash curl --location 'http://localhost:8080/account/postman_merchant_GHAction_93c5b6a1-6cef-4c5d-a3e1-8af3d2e9ffcc/connectors' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: test_admin' \ --data '{ "connector_type": "payment_processor", "connector_name": "xendit", "business_country": "US", "business_label": "default", "connector_account_details": { "auth_type": "HeaderKey", "api_key": "******************" }, "test_mode": false, "disabled": false, "payment_methods_enabled": [ { "payment_method": "card", "payment_method_types": [ { "payment_method_type": "credit", "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true } ] }, { "payment_method": "card", "payment_method_types": [ { "payment_method_type": "debit", "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true } ] } ], "metadata": { "google_pay": { "allowed_payment_methods": [ { "type": "CARD", "parameters": { "allowed_auth_methods": [ "PAN_ONLY", "CRYPTOGRAM_3DS" ], "allowed_card_networks": [ "AMEX", "DISCOVER", "INTERAC", "JCB", "MASTERCARD", "VISA" ] }, "tokenization_specification": { "type": "PAYMENT_GATEWAY", "parameters": { "gateway": "example", "gateway_merchant_id": "" } } } ], "merchant_info": { "merchant_name": "Naraat" } } } }' ```` Response ```bash { "connector_type": "payment_processor", "connector_name": "xendit", "merchant_connector_id": "mca_z4B5KU0SEVErGg0tILxm", "profile_id": "pro_WlOOrlmdJGP9hwjDxXaC", "connector_account_details": { "auth_type": "HeaderKey", "api_key": "******************" }, "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 } ] }, ], "connector_webhook_details": { "merchant_secret": "dce1d767-7c28-429c-b0fe-9e0b9e91f962", "additional_secret": null }, "metadata": { "city": "NY", "unit": "245" }, "test_mode": false, "disabled": false, "frm_configs": null, "business_country": "US", "business_label": "food", "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>1. Create a payment with Xendit for split payments.</summary> ```bash curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_P7h3XhxNefWKFy*********' \ --data-raw '{ "amount": 651200, "currency": "IDR", "confirm": true, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "customer_id": "First_Customer", "name": "John Doe", "authentication_type": "no_three_ds", "return_url": "https://google.com", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4000000000001091", "card_exp_month": "12", "card_exp_year": "27", "card_holder_name": "joseph Doe", "card_cvc": "124" } }, "billing": { "phone": { "number": "8056594427", "country_code": "+91" }, "email": "johndoe@gmail.com" }, "split_payments": { "xendit_split_payment": { "multiple_splits": { "name": "20210908 Test", "for_user_id": "************", "description": "Platform fee and Delivery Fee for Marketplace", "routes": [ { "flat_amount": 3000, "currency": "IDR", "destination_account_id": "************", "reference_id": "1234" }, { "percent_amount": 5, "currency": "IDR", "destination_account_id": "*********", "reference_id": "1235" } ] } } } }' ``` Response ```bash { "payment_id": "pay_dnEIldnxQ8vWeuIiLW9C", "merchant_id": "postman_merchant_GHAction_961c0f56-fb6c-41c2-99ca-fd1afb129ade", "status": "processing", "amount": 651200, "net_amount": 651200, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": "xendit", "client_secret": "pay_dnEIldnxQ8vWeuIiLW9C_secret_HEvaKI904Jjq7SuawBXA", "created": "2025-02-04T07:37:37.711Z", "currency": "IDR", "customer_id": "First_Customer", "customer": { "id": "First_Customer", "name": "John Doe", "email": null, "phone": null, "phone_country_code": null }, "description": null, "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "1091", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "400000", "card_extended_bin": null, "card_exp_month": "12", "card_exp_year": "27", "card_holder_name": "joseph Doe", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": null, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "johndoe@gmail.com" }, "order_details": null, "email": null, "name": "John Doe", "phone": null, "return_url": "https://google.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "First_Customer", "created_at": 1738654657, "expires": 1738658257, "secret": "epk_575497a6d58543eeac7d9c6d0f973efc" }, "manual_retry_allowed": false, "connector_transaction_id": "pr-a00691fb-fe32-44e2-814a-c98b40781549", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "57b25bcb-e12e-4fe8-8b80-1467d5395602", "payment_link": null, "profile_id": "pro_aursQAXlQyPzu0T6cEK8", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_O0rfcjvhxpV2hxAJkLlv", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-02-04T07:52:37.711Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2025-02-04T07:37:39.298Z", "split_payments": { "xendit_split_payment": { "multiple_splits": { "split_rule_id": "splitru_26fc58d7-ba11-4f66-92f6-7f525bccbf5a", "for_user_id": "************", "name": "20210908 Test", "description": "Platform fee and Delivery Fee for Marketplace", "routes": [ { "flat_amount": 3000, "percent_amount": null, "currency": "IDR", "destination_account_id": "**********", "reference_id": "1234" }, { "flat_amount": null, "percent_amount": 5, "currency": "IDR", "destination_account_id": "************", "reference_id": "1235" } ] } } }, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null } ``` Psync ```bash curl --location 'http://localhost:8080/payments/pay_dnEIldnxQ8vWeuIiLW9C?force_sync=true' \ --header 'Accept: application/json' \ --header 'api-key: dev_P7h3XhxNefWKF************************9' ``` Response ```bash { "payment_id": "pay_dnEIldnxQ8vWeuIiLW9C", "merchant_id": "postman_merchant_GHAction_961c0f56-fb6c-41c2-99ca-fd1afb129ade", "status": "succeeded", "amount": 651200, "net_amount": 651200, "shipping_cost": null, "amount_capturable": 0, "amount_received": 651200, "connector": "xendit", "client_secret": "pay_dnEIldnxQ8vWeuIiLW9C_secret_HEvaKI904Jjq7SuawBXA", "created": "2025-02-04T07:37:37.711Z", "currency": "IDR", "customer_id": "First_Customer", "customer": { "id": "First_Customer", "name": "John Doe", "email": null, "phone": null, "phone_country_code": null }, "description": null, "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "1091", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "400000", "card_extended_bin": null, "card_exp_month": "12", "card_exp_year": "27", "card_holder_name": "joseph Doe", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": null, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "johndoe@gmail.com" }, "order_details": null, "email": null, "name": "John Doe", "phone": null, "return_url": "https://google.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": null, "manual_retry_allowed": false, "connector_transaction_id": "pr-a00691fb-fe32-44e2-814a-c98b40781549", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "57b25bcb-e12e-4fe8-8b80-1467d5395602", "payment_link": null, "profile_id": "pro_aursQAXlQyPzu0T6cEK8", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_O0rfcjvhxpV2hxAJkLlv", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-02-04T07:52:37.711Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2025-02-04T07:39:07.974Z", "split_payments": { "xendit_split_payment": { "multiple_splits": { "split_rule_id": "splitru_26fc58d7-ba11-4f66-92f6-7f525bccbf5a", "for_user_id": "************", "name": "20210908 Test", "description": "Platform fee and Delivery Fee for Marketplace", "routes": [ { "flat_amount": 3000, "percent_amount": null, "currency": "IDR", "destination_account_id": "************************", "reference_id": "1234" }, { "flat_amount": null, "percent_amount": 5, "currency": "IDR", "destination_account_id": "**********************", "reference_id": "1235" } ] } } }, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null } ``` </details> <details> <summary>2. Create a split payment for collecting 100% of money to sub merchant </summary> ```bash curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_Q960kFyYD5UojHxadWgkgHHS0jcoMNTbCMgYprENAUoXqTq4jLp1USKMCbTm1Ile' \ --data-raw '{ "amount": 651200, "currency": "IDR", "confirm": true, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "customer_id": "First_Customer", "name": "John Doe", "authentication_type": "no_three_ds", "return_url": "https://google.com", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4000000000001091", "card_exp_month": "12", "card_exp_year": "27", "card_holder_name": "joseph Doe", "card_cvc": "124" } }, "billing": { "phone": { "number": "8056594427", "country_code": "+91" }, "email": "johndoe@gmail.com" }, "split_payments": { "xendit_split_payment": { "single_split": { "for_user_id":"*****************" } } } }' ``` Response ```bash { "payment_id": "pay_mb8NETnhZ56oKBZsdiHO", "merchant_id": "postman_merchant_GHAction_fbdab73a-52eb-4b2b-9fe9-9c30e477297b", "status": "processing", "amount": 651200, "net_amount": 651200, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": "xendit", "client_secret": "pay_mb8NETnhZ56oKBZsdiHO_secret_zufE6rSa8n0p0XA8L0Dc", "created": "2025-02-05T13:34:08.522Z", "currency": "IDR", "customer_id": "First_Customer", "customer": { "id": "First_Customer", "name": "John Doe", "email": null, "phone": null, "phone_country_code": null }, "description": null, "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "1091", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "400000", "card_extended_bin": null, "card_exp_month": "12", "card_exp_year": "27", "card_holder_name": "joseph Doe", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": null, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "johndoe@gmail.com" }, "order_details": null, "email": null, "name": "John Doe", "phone": null, "return_url": "https://google.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "First_Customer", "created_at": 1738762448, "expires": 1738766048, "secret": "epk_4137716f048e429383a9db8d24149590" }, "manual_retry_allowed": false, "connector_transaction_id": "pr-85106bae-b03a-4544-b277-a3c067b8c344", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "f2299abd-9cd3-4371-a3b7-747711896c2a", "payment_link": null, "profile_id": "pro_f4YRlcNQAz0yd85vc4VB", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_tYLW9ImvWAE6EJGJjukn", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-02-05T13:49:08.522Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2025-02-05T13:34:09.722Z", "split_payments": { "xendit_split_payment": { "single_split": { "for_user_id": "*********" } } }, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null } ``` Psync ```bash curl --location 'http://localhost:8080/payments/pay_mb8NETnhZ56oKBZsdiHO?force_sync=true' \ --header 'Accept: application/json' \ --header 'api-key: dev_Q960kFyYD5UojHxadWgkgHHS0jcoMNTbCMgYprENAUoXqTq4jLp1USKMCbTm1Ile' ``` Response ```bash { "payment_id": "pay_mb8NETnhZ56oKBZsdiHO", "merchant_id": "postman_merchant_GHAction_fbdab73a-52eb-4b2b-9fe9-9c30e477297b", "status": "succeeded", "amount": 651200, "net_amount": 651200, "shipping_cost": null, "amount_capturable": 0, "amount_received": 651200, "connector": "xendit", "client_secret": "pay_mb8NETnhZ56oKBZsdiHO_secret_zufE6rSa8n0p0XA8L0Dc", "created": "2025-02-05T13:34:08.522Z", "currency": "IDR", "customer_id": "First_Customer", "customer": { "id": "First_Customer", "name": "John Doe", "email": null, "phone": null, "phone_country_code": null }, "description": null, "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "1091", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "400000", "card_extended_bin": null, "card_exp_month": "12", "card_exp_year": "27", "card_holder_name": "joseph Doe", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": null, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "johndoe@gmail.com" }, "order_details": null, "email": null, "name": "John Doe", "phone": null, "return_url": "https://google.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": null, "manual_retry_allowed": false, "connector_transaction_id": "pr-85106bae-b03a-4544-b277-a3c067b8c344", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "f2299abd-9cd3-4371-a3b7-747711896c2a", "payment_link": null, "profile_id": "pro_f4YRlcNQAz0yd85vc4VB", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_tYLW9ImvWAE6EJGJjukn", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-02-05T13:49:08.522Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2025-02-05T13:34:15.793Z", "split_payments": { "xendit_split_payment": { "single_split": { "for_user_id": "*************" } } }, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null } ``` </details> <details> <summary>3. Split Refund </summary> ```bash curl --location 'http://localhost:8080/refunds' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_Q960kFyYD5UojHxa*******************' \ --data '{ "payment_id": "pay_mb8NETnhZ56oKBZsdiHO", "amount": 200, "reason": "Customer returned product", "refund_type": "instant", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" }, "split_refunds": { "xendit_split_refund": { "for_user_id": "*************" } } }' ``` Response ```bash { "refund_id": "ref_LpFfOYlTnx1ccezJwlJi", "payment_id": "pay_mb8NETnhZ56oKBZsdiHO", "amount": 200, "currency": "IDR", "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-02-05T13:39:54.976Z", "updated_at": "2025-02-05T13:39:57.171Z", "connector": "xendit", "profile_id": "pro_f4YRlcNQAz0yd85vc4VB", "merchant_connector_id": "mca_tYLW9ImvWAE6EJGJjukn", "split_refunds": { "xendit_split_refund": { "for_user_id": "*****************" } } } ``` </details> When total amount of split is greater than the total payment amount we throw a `IR_10` error, with error message `Sum of split amounts should not exceed the total amount` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **payment** feature, you'll need to modify these architectural layers: **1. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/payments.rs` - `crates/hyperswitch_domain_models/src/payments/payment_intent.rs` - `crates/hyperswitch_domain_models/src/router_request_types.rs` **2. Core Business Logic** - `crates/router/src/core/payments.rs` - `crates/router/src/core/payments/flows/authorize_flow.rs` - `crates/router/src/core/payments/flows/complete_authorize_flow.rs` - ... and 4 more files **3. External Connector Integration** - `crates/hyperswitch_connectors/Cargo.toml` - `crates/hyperswitch_connectors/src/connectors/xendit.rs` - `crates/hyperswitch_connectors/src/connectors/xendit/transformers.rs` - ... and 3 more files **4. Type Definitions** - `crates/common_types/src/domain.rs` - `crates/common_types/src/payments.rs` - `crates/common_types/src/refunds.rs` **5. Other** - `Cargo.lock` - `api-reference-v2/openapi_spec.json` - `api-reference/openapi_spec.json` - ... and 2 more files **Code Patterns Applied:** - Define new data structures (9 changes) - Implement new functions (10 changes) - Extend existing types with new fields (92 changes) - Add conditional logic for feature flags or filtering (13 changes) **Detailed Identifier Changes:** Commit 451acba0: Files to modify: **crates/common_types/src/domain.rs** Add: - struct: pub::XenditSplitSubMerchantData **crates/common_types/src/payments.rs** Add: - struct: pub::XenditSplitRoute - struct: pub::XenditMultipleSplitRequest - struct: pub::XenditMultipleSplitResponse - enum: pub::XenditSplitRequest - enum: pub::XenditChargeResponseData **crates/common_types/src/refunds.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/xendit.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::PaymentsPreProcessing for Xendit - impl: impl ConnectorIntegration<PreProcessing, PaymentsPreProcessingData, PaymentsResponseData> for Xendit **crates/hyperswitch_connectors/src/connectors/xendit/transformers.rs** Add: - function: private::try_from - function: private::try_from - struct: pub::XenditSplitRoute - struct: pub::XenditSplitRequest - struct: pub::XenditSplitRequestData - struct: pub::XenditSplitResponse - struct: pub::XenditMetadata - impl: impl TryFrom< ResponseRouterData<F, XenditSplitResponse, PaymentsPreProcessingData, PaymentsResponseData>, > for RouterData<F, PaymentsPreProcessingData, PaymentsResponseData> - impl: impl TryFrom<&PaymentsPreProcessingRouterData> for XenditSplitRequestData - mod: pub::auth_headers **crates/hyperswitch_connectors/src/default_implementations.rs** Modify existing code **crates/hyperswitch_domain_models/src/payments.rs** Modify existing code **crates/hyperswitch_domain_models/src/payments/payment_intent.rs** Modify existing code **crates/hyperswitch_domain_models/src/router_request_types.rs** Modify existing code **crates/openapi/src/openapi.rs** Modify existing code **crates/openapi/src/openapi_v2.rs** Modify existing code **crates/router/src/connector/stripe.rs** Modify existing code **crates/router/src/connector/stripe/transformers.rs** Modify existing code **crates/router/src/core/payments.rs** Modify existing code **crates/router/src/core/payments/flows/authorize_flow.rs** Modify existing code **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/transformers.rs** Modify existing code **crates/router/src/core/refunds/validator.rs** Add: - function: pub::validate_xendit_charge_refund **crates/router/src/core/utils.rs** Modify existing code
{"pr_number": 7143, "pr_title": "feat(router): [Xendit] add support for split payments", "merged_at": "2025-02-20T15:30:54Z", "intent": {"feature_type": "payment", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"domain": ["crates/hyperswitch_domain_models/src/payments.rs", "crates/hyperswitch_domain_models/src/payments/payment_intent.rs", "crates/hyperswitch_domain_models/src/router_request_types.rs"], "core_business": ["crates/router/src/core/payments.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/transformers.rs", "crates/router/src/core/refunds/validator.rs", "crates/router/src/core/utils.rs"], "connectors": ["crates/hyperswitch_connectors/Cargo.toml", "crates/hyperswitch_connectors/src/connectors/xendit.rs", "crates/hyperswitch_connectors/src/connectors/xendit/transformers.rs", "crates/hyperswitch_connectors/src/default_implementations.rs", "crates/router/src/connector/stripe.rs", "crates/router/src/connector/stripe/transformers.rs"], "types": ["crates/common_types/src/domain.rs", "crates/common_types/src/payments.rs", "crates/common_types/src/refunds.rs"], "other": ["Cargo.lock", "api-reference-v2/openapi_spec.json", "api-reference/openapi_spec.json", "crates/openapi/src/openapi.rs", "crates/openapi/src/openapi_v2.rs"]}, "change_types": {"structs_added": 9, "functions_added": 10, "enums_added": 2, "fields_added": 92, "imports_added": 2, "conditionals_added": 13}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor(connector): [RAZORPAY] update generate_connector_request_reference_id to consume merchant_reference_id ## 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 --> For Razorpay (RZP) integration, the `connector_request_reference_id` will now be set as follows: - If `merchant_reference_id` is available, use it directly. - If not available, generate a UUID instead. This ensures compliance with Razorpay’s constraint that the reference ID length must not exceed **40 characters**. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with 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_UPYM7gnwbWs8Cpf0vQkt_razorpay_upi_Authorize", "value": "1.0" }' ``` Create Payment (Razorpay UPI Collect) ``` { "amount_details": { "order_amount": 100, "currency": "INR" }, "merchant_connector_details": { "connector_name": "razorpay", "merchant_connector_creds": { "auth_type": "BodyKey", "api_key": "_", "key1": "_" } }, "merchant_reference_id": "razorpayirctc1758028555", "capture_method":"automatic", "payment_method_data": { "upi": { "upi_collect": { "vpa_id": "success@razorpay" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "swangi.kumari@juspay.in" } }, "payment_method_subtype": "upi_collect", "payment_method_type": "upi", "return_raw_connector_response": true } ``` Verify UCS logs to see if merchant_reference_id is being passed in receipt <img width="756" height="263" alt="image" src="https://github.com/user-attachments/assets/b8e56c71-1c70-4a57-bea9-b19887ebbd5b" /> ## Checklist <!-- Put 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/razorpay.rs` **Code Patterns Applied:** - Extend existing types with new fields (1 changes) **Detailed Identifier Changes:** Commit 9c176c49: Files to modify: **crates/hyperswitch_connectors/src/connectors/razorpay.rs** Modify existing code
{"pr_number": 9404, "pr_title": "refactor(connector): [RAZORPAY] update generate_connector_request_reference_id to consume merchant_reference_id", "merged_at": "2025-09-18T07:18:58Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "merchant", "user"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/razorpay.rs"]}, "change_types": {"fields_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(authentication): add authentication api for modular authentication ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] New feature ## Description <!-- Describe your changes in detail --> add authentication api for modular authentication ## Authentication Authenticate API - `POST /authentication/{authentication_id}/authenticate` This PR adds the authenticate endpoint which is the final step in the 3DS authentication flow. ### __API Endpoint__ ```javascript POST /authentication/{authentication_id}/authenticate ``` ### __Request Structure__ (`AuthenticationAuthenticateRequest`) ```rust { "client_secret": "auth_xxx_secret_xxx", // Optional client secret for validation "sdk_information": { // Optional SDK info if from mobile SDK "sdk_app_id": "...", "sdk_enc_data": "...", "sdk_reference_number": "..." }, "device_channel": "Browser", // "Browser" or "App" "threeds_method_comp_ind": "Y" // "Y", "N", or "U" - 3DS method completion } ``` ### __Response Structure__ (`AuthenticationAuthenticateResponse`) ```rust { "trans_status": "Y", // Transaction status (Y/N/A/U/R/C) "acs_url": "https://acs.bank.com/challenge", // Challenge URL if needed "challenge_request": "base64_encoded_creq", // Challenge request data "acs_reference_number": "ref123", // ACS reference "acs_trans_id": "trans456", // ACS transaction ID "three_dsserver_trans_id": "server789", // 3DS server transaction ID "acs_signed_content": "signed_content", // Signed challenge content "three_ds_requestor_url": "https://merchant.com", // Merchant return URL "three_ds_requestor_app_url": "app://return", // App return URL (optional) "error_message": null, // Error message if failed "error_code": null, // Error code if failed "authentication_value": "cavv_value", // CAVV for successful auth "status": "Success", // Authentication status "authentication_connector": "netcetera" // Connector used } ``` ### __Core Functionality__ (`authentication_authenticate_core`) 1. __Authentication Lookup__: Finds the authentication record by merchant ID and authentication ID 2. __Client Secret Validation__: - Validates the provided client secret against stored value - Checks if client secret has expired - Returns error if validation fails 3. __Data Decryption__: - Decrypts stored email address using merchant key - Parses stored browser information from database 4. __Connector Communication__: - Gets authentication connector configuration (e.g., Netcetera) - Constructs webhook URL for authentication updates - Calls connector's authentication method with: - Browser details - Transaction details (amount, currency) - Pre-authentication data (3DS server transaction ID, message version) - Device channel and SDK information - 3DS method completion indicator 5. __Authentication Processing__: - Executes authentication with 3DS server - Handles both challenge and frictionless flows - Updates authentication record with results 6. __Response Generation__: - Returns challenge data if challenge flow required - Returns authentication value (CAVV) for successful authentications - Provides transaction status and error details ### __Key Features__ __3DS Challenge Flow Support__: - Returns ACS URL and challenge request for challenge flows - Handles signed content from ACS - Supports both browser and app-based challenges __Authentication Value Generation__: - For successful authentications, generates CAVV (Cardholder Authentication Verification Value) - Uses tokenized data from vault for merchant auth flow - Returns masked authentication value for client auth flow __Error Handling__: - Comprehensive error reporting for failed authentications - Proper status tracking throughout the process - Client secret expiry validation __Multi-Channel Support__: - Supports both browser and mobile app authentication - Handles SDK-specific data for app-based flows - Provides appropriate return URLs for each channel This authenticate API completes the 3DS authentication flow by performing the actual authentication challenge with the card issuer's ACS (Access Control Server) and returning the results needed to complete the payment authorization. ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Try the flow with both Friction and Frictionless card Setup Netcetera in MCA : ```shell curl --location 'http://localhost:8080/account/sahkal11/connectors' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_xekWBE7fjlTQ4d4fsmYBqgoNyBdfLaZxggJ6nY4tL2Eyl0Ece6lGGH1o7N4ZtrE3' \ --data ' { "connector_type": "authentication_processor", "connector_name": "netcetera", "connector_account_details": { "auth_type": "CertificateAuth", "certificate": CERTIFICATE, "private_key": PRIVATE_KEY }, "test_mode": true, "disabled": false, "metadata": { "merchant_category_code": "5411", "merchant_country_code": "840", "merchant_name": "Dummy Merchant", "endpoint_prefix": "flowbird", "three_ds_requestor_name": "juspay-prev", "three_ds_requestor_id": "juspay-prev", "pull_mechanism_for_external_3ds_enabled": false } } ' ``` Setup Profile acquirer Config ``` curl --location 'localhost:8080/profile_acquirer' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_xekWBE7fjlTQ4d4fsmYBqgoNyBdfLaZxggJ6nY4tL2Eyl0Ece6lGGH1o7N4ZtrE3' \ --data '{ "acquirer_assigned_merchant_id": "00002000000", "merchant_name": "Demo Merchant", "network": "AmericanExpress", "acquirer_bin": "400000", "acquirer_fraud_rate": 0.2345545234765, "profile_id": "pro_89fr3mDlSeDfh8fro28W" }' ``` Update Business Profile ```shell curl --location 'http://localhost:8080/account/sahkal11/business_profile/pro_89fr3mDlSeDfh8fro28W' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_xekWBE7fjlTQ4d4fsmYBqgoNyBdfLaZxggJ6nY4tL2Eyl0Ece6lGGH1o7N4ZtrE3' \ --data ' { "authentication_connector_details": { "authentication_connectors": ["netcetera"], "three_ds_requestor_url": "https://google.com" }, "merchant_country_code": "004", "merchant_category_code": "5411" } ' ``` Do Authentication Create : ```shell curl --location 'localhost:8080/authentication' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_xekWBE7fjlTQ4d4fsmYBqgoNyBdfLaZxggJ6nY4tL2Eyl0Ece6lGGH1o7N4ZtrE3' \ --data '{ "amount": 10, "currency": "USD", "acquirer_details": { "merchant_id": "12134", "bin": "438309", "country_code": null }, "authentication_connector":"netcetera", "profile_acquirer_id": "pro_acq_JO8uZghB4Y6qJFAgkUbI" }' ``` Do Authentication Eligibility ```shell curl --location 'localhost:8080/authentication/authn_G2nUqHYBrMLIMgcyO8Az/eligibility' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_xekWBE7fjlTQ4d4fsmYBqgoNyBdfLaZxggJ6nY4tL2Eyl0Ece6lGGH1o7N4ZtrE3' \ --data-raw '{ "payment_method": "card", "payment_method_data": { "card": { "card_number": CARD_NUMBER, "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_LhAY1jDOAYJuHeUAQWwh" }' ``` RESPONSE ```shell { "authentication_id": "authn_U4Z7xqe7HHIScfDU50xW", "next_api_action": { "url": "http://localhost:8080/authentication/authn_U4Z7xqe7HHIScfDU50xW/authenticate", "http_method": "POST" }, "status": "pending", "eligibility_response_params": { "ThreeDsData": { "threeds_server_transaction_id": "ed790486-dda7-4972-83ab-5d0afbaa8885", "maximum_supported_3ds_version": "2.3.1", "connector_authentication_id": "ed790486-dda7-4972-83ab-5d0afbaa8885", "three_ds_method_data": "eyJ0aHJlZURTTWV0aG9kTm90aWZpY2F0aW9uVVJMIjoiaHR0cHM6Ly9leGFtcGxlLmNvbS8zZHMtbWV0aG9kLW5vdGlmaWNhdGlvbi11cmwiLCJ0aHJlZURTU2VydmVyVHJhbnNJRCI6ImVkNzkwNDg2LWRkYTctNDk3Mi04M2FiLTVkMGFmYmFhODg4NSJ9", "three_ds_method_url": "https://ndm-prev.3dss-non-prod.cloud.netcetera.com/acs/3ds-method", "message_version": "2.3.1", "directory_server_id": "A000000003" } }, "connector_metadata": null, "profile_id": "pro_To47L194jVTevrWXRxR3", "error_message": null, "error_code": null, "authentication_connector": "netcetera", "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "CA", "first_name": "PiX", "last_name": null }, "phone": { "number": "123456789", "country_code": "12" }, "email": null }, "shipping": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "PiX", "last_name": null }, "phone": { "number": "123456789", "country_code": "12" }, "email": null }, "browser_information": { "color_depth": 24, "java_enabled": true, "java_script_enabled": true, "language": "nl-NL", "screen_height": 723, "screen_width": 1536, "time_zone": 0, "ip_address": "115.99.183.2", "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/70.0.3538.110 Safari/537.36", "os_type": null, "os_version": null, "device_model": null }, "email": "sahkalplanet@gmail.com" } ``` Authentication API ```shell curl --location 'localhost:8080/authentication/authn_mZZSwXGzD20i4x41pjLp/authenticate' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_MB8FHXAmDStuArWrRisGDRe6kadzIIxWgOI8Bk0uEHtIkU5WA2oxcBrvozEjjiP2' \ --data ' { "device_channel": "APP", "threeds_method_comp_ind": "N", "sdk_information": { "sdk_app_id": "4d017186-318a-42e0-99cd-203367af5aa1", "sdk_enc_data": "eyJhbGciOiJSU0EtT0FFUC0yNTYiLCJlbmMiOiJBMTI4Q0JDLUhTMjU2In0.AeiTEwYFYMBl68uRqI2ePfIYJ_xDjZDBjvD-2dS4vCKUCUz-Pab8OVf5DiA8LovnoMI8dVJbFCVfWEgSjb8S99rFkm_g-J3hnBdiWgr7inSoW9NCvHgKU9hrTkhWijOFXNWHtBO4ECYIQg93RCv3svVDGTBkx0CucxlzkZF0Ct4sknMH6p4BGdioet8P8PVZPQcpM_9bd8JSdK1V8sUPPneeyYqlJ3MEQdZSfggRixUvlxdVhxVLlFHLyhjqzN7MpFT3NWsIG7mikkkLjlDlAE29Qm8xLBxqgL8apq57IR8map7KqacT20Uxirstskrlh6nfAk8aqU_Eo78Gd6XZrQ.12WaY03igq7b8At8GXXM7g.qpqNbumX0rpW1WRB_tMOsfVOeYzz6LbJfLFgSH49yMVvfGha7hEYEy0_h5nbPkWA_S95SubmfxQeN9Ale6uPTT_-lfSb4DpHKTMaYx3pVZrYA2qtR-0Iuft-t-zerEfqrd87TaKZNPxGzvrt6tdSig4PmFpg07AqcwQGDVvkxja_wO7PgcvR6lmKAt73IMJYAVXxb6oW1nGREJtzK9rTob48qnMdAJmmB3-0DwCeb7zZaNLI8ngs7qMj740atmzfR-cLdQ3AHDMlv0n4C7INFaaIn3vsJ_UxFuGCTmrTBc-Fgx7F5uOUI3Sc8BehqWTWox1AJ-Qz-t_9I1SobTWWKQ0U-JpeNoloXDEAA3fFgd6acOToAzeTxQckymVGPIhy6-VLYf7d80prT9TzRgMGlUEj-nQjy8svqambWFHvueLZUh_YluyJlWX0R2_1GQKwIExiLoMXBr7dJhLslLBm9VLZKqEa6xGI8uTtO0KpN_FmFXKvBDBSPQ_WK8WpN9OLoElJbuveKwXhkMIDqYexxwOngyAApNjBoKom23r3a1zxWtZZNeD6Z7vPAirHRSN6-YdIJDym2LRopFRItm80oDUAOity5DeZMODTz0SdhNXfpsagsYktRmPXZ1WxKZf6yY9z_EGFYHZ4aYTsulPYuFMhp3Dc6CC-GiM2UdDbztcqoscVJpJLvCr4Yagg5xeEshr3K4F5FDUP1gtkEjQzRdHUTAFJQCKXb0Z6U9F40yiCr-E5SugBZDUk1iGrc72e0s-1xqAx89Q9N_T2j8ejc8M38AaDODnVM5h6E7vhSxilp4f--m_eSCCSyduNM2jE_MT1knfrh16JoE-DLaUr9zYgIN05WjmoT0OWL5ax3x98Y17_fxAxTKW9ZIfTYAG8bFWwlErXzjttZe3_Pe1ORpSKkl5hUWey9RGHk6WqUAZfdACzabJRTUCaC1g2t2KX6sQusFhdh8s-ArfStN7oJ-oO807Phlix2VNxKDiDpUKLaLBwQQV37jRJ2gMohsC-Wl5diOg81c9FPut9v7pTODd0AVEN-Y2CWFVyHdoYgc57MPFTJFkTFCX3j0w5ZZQO10aPyM0_gc9UOiPlPOIsXZdUbBxN_dCcq5xSQgl5rxaLO89444u3Nq3cTVlPu6Vkjardaj2Asz_tdmN6JKbCCHbVg8xUjdY8qbSn144WWc8s_oldaJhV-BlBNt5mFrkLVxy0msyDBRJQ5TK7Prck5Puz36RZ8I7VsTMcyE0q8tO5GXxLYyV-vnJb4IOyfEVBv-SB_g2auAMFB58lRh4lv80gIdRGZcY1sS9cuKeHboQGNSXYtGExPmmb-iV0UA34jNkert9p2-dxQLXfdYSlKXgly_L9qUQEM1kPdwWVin7nwqz4gtt-tnllcve2w2qd1XaY3BdtVkzpqrKQqq0UDz32NKBbSKhzQIfzXadWsjYYJ_bKWF2uKOM6es3Gd-BUP-FvjjHwZyQcQyMBENxAdQyXuicwKcgjFct5GQx2Zt2_K14O8b-y0_-p3n2EmYk7xUWo4JuD_IaOm3EoBo67TVS74F2Ef5mOIx6S8kaHV8N6L9OWJCvgFhkVDYkq6GhCOf5yRP8I-tm4xwwn0Wt60i9nCOvooPI36T-mU8TnKSVGtziKq9JTjLGpFf5jHxBBL97mEstpCONo2B8-U3_wUOkRJEzhAS7sKtvMCcsKzL4ak16GCKrznciiBYdCI6tIjnY0gl0IiFRy_9CNPRym6RTECnksaTjmZIJJgcn2jGP0gFF7BxE2lBVe-3Y5JOHW3ho-i6SEp7cEKVx2pTvc2CBwPoWTUkFlTTelH95tG5ftRpFOQmfrpzvjMW22UU9BFvuU3CBvb5fptq7iqdUm62DuKegEYPQrUq0_K0gwoP1fwdiWYLDI9vlpGTj57E6f8idPb1YunE1Urko9h0m4ye-xlMli6NobPGSX7PpkY4QwkFeAVBUifwy3oodYkiF0QUq2_mMdf2863MfUF8lkp6oVDiFgvy3hmD0EJajnq2KRMIlhOwIrVhSSEc2Oqpn6Fn6xJQcrm556tb6MNh5wpjCQWIc5lHXwANvLSZY70KhKaeM3fsKW5T2c16bQ1BrerrcLiYVYde7o-Zb1xXRyBoopiNvcDxBKcyFgRzaT7TkRjyx-TeZJMjPe-oEk25kJUAgFXpwNB7Ki9Qj2hsLLn_Yc8kUfr4YW_C-64PtDdhqaryHjIYOL5h6YWGizWzmgFKVytTfr2A1WeIdMDsA4IvpOtNZHUr0RR7NPQpwd_7sV3Eb5_utpQ2fnj-D5zdlqK1TODZoZEANFL7T_lwemRZdlhOGS9he19oU8djhaTPNBCvy64lyS3rOaNy_JtgQhS17RKWyqC2YNyfO1G2SGXmO6CDti21TCtgIoh3YLe94RNNzLn2tSPxjI67JQ-5WaVBa1_910Jpy8zRhxo9QMtWzmN4HUoy6GAUPeaRJhtTc9pvMrKxl6WLLNJ4sivGdPR_D6j-wilx6ayQduC8D2NSHhgt2hxT6r_W_ILfQ9GAWc8pNAcn4EVEDf2EMriLveMcFBYOurO8wwndCtHPBlawN93-wNUy6PMh_7KN0Kq-L8pltjj41ymdWQIaph0qgWHTMaO0XAeJGYp9qWlNRX6p-PVJU7vTSV2pKJbl-Bnbw-dBUJXFb6SGrum28Un6bcx5e6cFUN--sZl7OLzLQgexy0CerypsgwTQ68oEDNYQjmRA-Zo5e7eW2srh-kV29TVjwMT49_krBR3ypCEV8gbvHumBLxXR4CiU_PMSSNi-lUt5_kQvMb7GfS_JYwdVRx93nku1RTToStIfoDKhE9VpsSp7GN2Z7Fy1k80d0pQ-d2SwBL3QXGtUVcwqoW4PbPDhwYhjpRAkhTNwO6cw9AgVYNE8--V79Ln6nEXKBBVUK3Coj01jm--G8vkWZZ6U-zt2QZVoJApKombi2TloXw3VohPODsR6UfYJkdpKjl1E_Q4VA1-aLUYDQ6xRlfYi0wSqvQDtKrwlGumIVn0qEjZFeupTtr9ux72i0T2sagb4oOi9FHwLaR7HfcgczCH5OokFv2IpEOV8k91Ucg78KAynqce-l522tCHu3flWelXv2feS7eSqNax9kjBs-rEsxLQtDffccY5L5Zvr90gKaWGAa4z9sqb9QKmOulFGcPLquQZF51VrX-5wFoAQ15xbpYxjX5Ks1i9hwExvyLIW-n4xyxC64n7tHpqDTsnxXu_VHvkyNbF9eXeDT7vhG85zhoi9ULHtRsbJilnlPMZNQcO-cBboVl1sR4_8_t2sCoNjtMGGbnsYintgPfUAGPLfLnddqC8LFIKH0ZN22-cPCthUGFpKNuau9RCaquz7cHjsGkp9yJKVXWlSxfr6WIjGHEe8hi1dnr83rkfcxTzcaxvCaQy6clUQjqyWOV4l-TuAtplv12NQX-mxN2E5cJmFY1wnyJ5GPu9VtYq2xbTw3-xoU8ikgw9XkI7HML2z0HpXi0k5QZJ9QJPXuP3273FjZSOQGyj2qJ3zRGAWJEJdKpMkP4gsxLuPm_mtzSYMj6HxwHjvMB1Yqd9iVUkXQgdRU_kRROK3anyKeetezft1-G4E_ScUNONODn", "sdk_ephem_pub_key": { "kty": "EC", "x": "AIKHXxBSZ9t7wzeiZ9ZpsCjL84btRwXfMM3mtqaQjJw", "y": "6lY5bSlSsx40gUPGKRXBcL05v_rQncf6k0qmLc4V8Qs", "crv": "P-256" }, "sdk_trans_id": "705d277d-e11e-4518-9cf2-88e35fccf8b3", "sdk_reference_number": "3DS_LOA_SDK_NEAG_020301_00792", "sdk_max_timeout": 15 } } ' ``` Response ``` { "trans_status": "C", "acs_url": null, "challenge_request": null, "acs_reference_number": "3DS_LOA_ACS_201_13579", "acs_trans_id": "3ed60678-2116-4b3d-ba8b-fea3368694ee", "three_dsserver_trans_id": "e2f6ac79-b9ef-49a1-999a-2f3d998300db", "acs_signed_content": null, "three_ds_requestor_url": "https://google.com", "three_ds_requestor_app_url": null, "error_message": null, "error_code": null, "authentication_value": null, "status": "pending", "authentication_connector": "netcetera" } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] 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/authentication.rs` **2. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/authentication.rs` - `crates/hyperswitch_domain_models/src/payment_method_data.rs` - `crates/hyperswitch_domain_models/src/router_request_types/unified_authentication_service.rs` **3. Core Business Logic** - `crates/router/src/core/payments.rs` - `crates/router/src/core/unified_authentication_service.rs` - `crates/router/src/core/unified_authentication_service/types.rs` - ... and 1 more files **4. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/unified_authentication_service.rs` - `crates/hyperswitch_connectors/src/connectors/unified_authentication_service/transformers.rs` **5. Type Definitions** - `crates/router_env/src/logger/types.rs` **6. Utils** - `crates/router/src/routes/lock_utils.rs` **7. Other** - `api-reference/v1/openapi_spec_v1.json` - `crates/router/src/routes/app.rs` - `crates/router/src/routes/authentication.rs` - ... and 1 more files **Code Patterns Applied:** - Define new data structures (7 changes) - Implement new functions (18 changes) - Extend existing types with new fields (155 changes) - Add conditional logic for feature flags or filtering (4 changes) **Detailed Identifier Changes:** Commit dbdf7579: Files to modify: **crates/api_models/src/authentication.rs** Add: - function: private::get_api_event_type - function: private::get_api_event_type - struct: pub::AuthenticationAuthenticateRequest - struct: pub::AuthenticationAuthenticateResponse - impl: impl ApiEventMetric for AuthenticationAuthenticateRequest - impl: impl ApiEventMetric for AuthenticationAuthenticateResponse **crates/hyperswitch_connectors/src/connectors/unified_authentication_service.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/unified_authentication_service/transformers.rs** Add: - function: private::try_from - function: private::try_from - struct: pub::UnifiedAuthenticationServiceAuthenticateRequest - struct: pub::ServiceDetails - struct: pub::ThreeDsResponseData - struct: pub::ThreeDsAuthDetails - struct: pub::DeviceDetails - enum: pub::UnifiedAuthenticationServiceAuthenticateResponse - enum: pub::ACSChallengeMandatedEnum - impl: impl TryFrom<&UnifiedAuthenticationServiceRouterData<&UasAuthenticationRouterData>> for UnifiedAuthenticationServiceAuthenticateRequest - impl: impl TryFrom< ResponseRouterData< F, UnifiedAuthenticationServiceAuthenticateResponse, T, UasAuthenticationResponseData, >, > for RouterData<F, T, UasAuthenticationResponseData> **crates/hyperswitch_domain_models/src/authentication.rs** Modify existing code **crates/hyperswitch_domain_models/src/payment_method_data.rs** Add: - function: pub::get_card_data **crates/hyperswitch_domain_models/src/router_request_types/unified_authentication_service.rs** Modify existing code **crates/router/src/core/payments.rs** Modify existing code **crates/router/src/core/unified_authentication_service.rs** Add: - function: pub::authentication_authenticate_core - function: private::foreign_try_from - impl: impl ForeignTryFrom<( &Authentication, Option<masking::Secret<String>>, Option<String>, diesel_models::business_profile::AuthenticationConnectorDetails, )> for AuthenticationAuthenticateResponse **crates/router/src/core/unified_authentication_service/types.rs** Modify existing code **crates/router/src/core/unified_authentication_service/utils.rs** Modify existing code **crates/router/src/routes/app.rs** Modify existing code **crates/router/src/routes/authentication.rs** Add: - function: pub::authentication_authenticate **crates/router/src/routes/lock_utils.rs** Modify existing code **crates/router/src/services/authentication.rs** Add: - function: private::get_client_secret - impl: impl ClientSecretFetch for api_models::authentication::AuthenticationAuthenticateRequest **crates/router_env/src/logger/types.rs** Modify existing code
{"pr_number": 8459, "pr_title": "feat(authentication): add authentication api for modular authentication", "merged_at": "2025-07-25T09:47:50Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "merchant", "user"]}, "hierarchy": {"api_models": ["crates/api_models/src/authentication.rs"], "domain": ["crates/hyperswitch_domain_models/src/authentication.rs", "crates/hyperswitch_domain_models/src/payment_method_data.rs", "crates/hyperswitch_domain_models/src/router_request_types/unified_authentication_service.rs"], "core_business": ["crates/router/src/core/payments.rs", "crates/router/src/core/unified_authentication_service.rs", "crates/router/src/core/unified_authentication_service/types.rs", "crates/router/src/core/unified_authentication_service/utils.rs"], "connectors": ["crates/hyperswitch_connectors/src/connectors/unified_authentication_service.rs", "crates/hyperswitch_connectors/src/connectors/unified_authentication_service/transformers.rs"], "types": ["crates/router_env/src/logger/types.rs"], "utils": ["crates/router/src/routes/lock_utils.rs"], "other": ["api-reference/v1/openapi_spec_v1.json", "crates/router/src/routes/app.rs", "crates/router/src/routes/authentication.rs", "crates/router/src/services/authentication.rs"]}, "change_types": {"structs_added": 7, "functions_added": 18, "enums_added": 2, "fields_added": 155, "imports_added": 4, "conditionals_added": 4}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(router): check payment_method_data before the decryption flow ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Add a validation to check if payment method data passed in the request, if not passed decryption flow will be skipped main branch pr: https://github.com/juspay/hyperswitch/pull/9521 ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ### Hyperswitch decryption flow #### CIT request ``` { "amount": 6500, "currency": "USD", "confirm": true, "business_country": "US", "business_label": "default", "amount_to_capture": 6500, "customer_id": "cu_{{$timestamp}}", "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "setup_future_usage": "off_session", "authentication_type": "no_three_ds", "return_url": "https://google.com", "email": "something@gmail.com", "name": "Joseph Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment request", "statement_descriptor_name": "Juspay", "statement_descriptor_suffix": "Router", "payment_method": "wallet", "payment_method_type": "apple_pay", "customer_acceptance": { "acceptance_type": "offline", "accepted_at": "1963-05-03T04:07:52.723Z", "online": { "ip_address": "in sit", "user_agent": "amet irure esse" } }, "payment_method_data": { "wallet": { "apple_pay": { "payment_data": "eyJkYXRhIjoiMTRnT3F1UjVtOVdoSmFQQ28vTUg0OXVQZDlza1NMajdVR0FpOVVnek9TeWJ5cWI5dXVaZTk3VGZJUCtaZjV6NzVk92UEVEajlMQT09IiwidHJhbnNhY3Rpb25JZCI6IjA1ZThiYjUzNjdjOWQzN2NkZGUyNTU3ODFhNGQzYjBjYWQ1ZTJmNTkzODAyNWQzZGVlMWQyYWNhN2JhMjA0NjkifSwidmVyc2lvbiI6IkVDX3YxIn0=", "payment_method": { "display_name": "Visa 0121", "network": "Visa", "type": "credit" }, "transaction_identifier": "c91059b674937b377d7b0062878696509342" } } } } ``` response ``` { "payment_id": "pay_QKxthnLdXlFDVsAoI3Eo", "merchant_id": "merchant_1758632884", "status": "succeeded", "amount": 6500, "net_amount": 6500, "shipping_cost": null, "amount_capturable": 6500, "amount_received": 6500, "connector": "stripe", "client_secret": "pay_QKxthnLdXlFDVsAoI3Eo_secret_dfimraAm1H76cng9GMwL", "created": "2025-09-23T16:10:43.333Z", "currency": "USD", "customer_id": "cu_1758643843", "customer": { "id": "cu_1758643843", "name": "Joseph Doe", "email": "something@gmail.com", "phone": "999999999", "phone_country_code": "+65" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "off_session", "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "wallet", "payment_method_data": { "wallet": { "apple_pay": { "last4": "0121", "card_network": "Visa", "type": "credit" } }, "billing": null }, "payment_token": null, "shipping": null, "billing": null, "order_details": null, "email": "something@gmail.com", "name": "Joseph Doe", "phone": "999999999", "return_url": "https://google.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": "Juspay", "statement_descriptor_suffix": "Router", "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "apple_pay", "connector_label": "stripe_US_default", "business_country": "US", "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "cu_1758643843", "created_at": 1758643843, "expires": 1758647443, "secret": "epk_8dbac4154430478686dea71a24b5f08c" }, "manual_retry_allowed": null, "connector_transaction_id": "pi_3SAYnhEOqOywnAIx0F33RUS2", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": { "redirect_response": null, "search_tags": null, "apple_pay_recurring_details": null, "gateway_system": "direct" }, "reference_id": "pi_3SAYnhEOqOywnAIx0F33RUS2", "payment_link": null, "profile_id": "pro_tDAPEkTZn0w9FBb1CJaB", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_s0qX20tZJUYlpSmdIyY7", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-23T16:25:43.333Z", "fingerprint": null, "browser_info": null, "payment_channel": null, "payment_method_id": "pm_gDWLZYRnzQ7JVSYBLZOk", "network_transaction_id": "978911882105101", "payment_method_status": "active", "updated": "2025-09-23T16:10:46.459Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": false, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": "pm_1SAYnhEOqOywnAIxO5W66wtL", "card_discovery": null, "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null, "enable_partial_authorization": null, "enable_overcapture": null, "is_overcapture_enabled": false, "network_details": null } ``` #### MIT request ``` curl --location 'http://localhost:8080/payments' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_HCk8bn8RudGtr9D686ITLBJzwrZB42LuwkjHHUS4eeb7wKAOmnEBco2ZQiWKORTr' \ --data-raw '{ "amount": 7000, "currency": "USD", "confirm": true, "return_url": "https://hyperswitch.io", "recurring_details": { "type": "payment_method_id", "data": "pm_gDWLZYRnzQ7JVSYBLZOk" }, "customer_id": "cu_1758643843", "off_session": true, "email": "lol@gmail.com", "billing": { "address": { "first_name": "John", "last_name": "Doe", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US" }, "phone": { "number": "9123456789", "country_code": "+91" } }, "browser_info": { "ip_address": "129.0.0.1", "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "language": "en-US", "color_depth": 30, "screen_height": 1117, "screen_width": 1728, "time_zone": -330, "java_enabled": true, "java_script_enabled": true }, "capture_method": "automatic" }' ``` resposne ``` { "payment_id": "pay_siSi0qevGJfkuJn2cJi8", "merchant_id": "merchant_1758632884", "status": "succeeded", "amount": 7000, "net_amount": 7000, "shipping_cost": null, "amount_capturable": 7000, "amount_received": 7000, "connector": "stripe", "client_secret": "pay_siSi0qevGJfkuJn2cJi8_secret_HmSEbF9KcUCKPlIgPqVz", "created": "2025-09-23T16:20:02.057Z", "currency": "USD", "customer_id": "cu_1758643843", "customer": { "id": "cu_1758643843", "name": "Joseph Doe", "email": "lol@gmail.com", "phone": "999999999", "phone_country_code": "+65" }, "description": null, "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": true, "capture_on": null, "capture_method": "automatic", "payment_method": "wallet", "payment_method_data": { "wallet": { "apple_pay": { "last4": "0121", "card_network": "Visa", "type": "credit" } }, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "John", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "9123456789", "country_code": "+91" }, "email": null }, "order_details": null, "email": "lol@gmail.com", "name": "Joseph Doe", "phone": "999999999", "return_url": "https://hyperswitch.io/", "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "apple_pay", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "cu_1758643843", "created_at": 1758644402, "expires": 1758648002, "secret": "epk_afd96a04bae34ccf820dd7996f9fa48e" }, "manual_retry_allowed": null, "connector_transaction_id": "pi_3SAYwgEOqOywnAIx0L6LHPPK", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": { "redirect_response": null, "search_tags": null, "apple_pay_recurring_details": null, "gateway_system": "direct" }, "reference_id": "pi_3SAYwgEOqOywnAIx0L6LHPPK", "payment_link": null, "profile_id": "pro_tDAPEkTZn0w9FBb1CJaB", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_s0qX20tZJUYlpSmdIyY7", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-23T16:35:02.057Z", "fingerprint": null, "browser_info": { "language": "en-US", "time_zone": -330, "ip_address": "129.0.0.1", "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36", "color_depth": 30, "java_enabled": true, "screen_width": 1728, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 1117, "java_script_enabled": true }, "payment_channel": null, "payment_method_id": "pm_gDWLZYRnzQ7JVSYBLZOk", "network_transaction_id": "978911882105101", "payment_method_status": "active", "updated": "2025-09-23T16:20:03.652Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": false, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": "pm_1SAYnhEOqOywnAIxO5W66wtL", "card_discovery": null, "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null, "enable_partial_authorization": null, "enable_overcapture": null, "is_overcapture_enabled": false, "network_details": null } ``` ### Connector decryption flow ``` { "amount": 6500, "currency": "USD", "confirm": true, "business_country": "US", "business_label": "default", "amount_to_capture": 6500, "customer_id": "cu_{{$timestamp}}", "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "setup_future_usage": "off_session", "authentication_type": "no_three_ds", "return_url": "https://google.com", "email": "something@gmail.com", "name": "Joseph Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment request", "statement_descriptor_name": "Juspay", "statement_descriptor_suffix": "Router", "payment_method": "wallet", "payment_method_type": "apple_pay", "customer_acceptance": { "acceptance_type": "offline", "accepted_at": "1963-05-03T04:07:52.723Z", "online": { "ip_address": "in sit", "user_agent": "amet irure esse" } }, "payment_method_data": { "wallet": { "apple_pay": { "payment_data": "WRlciI6eyJwdWJsaWNLZXlIYXNoIjoidXd3VzM5ZGt2MjMyVFA1VTVLMjhFaWp4V0FBdmRzMDFrQ2hCY05hMzk4cz0iLCJlcGhlbWVyYWxQdWJsaWNLZXkiOiJNRmt3RXdZSEtvWkl6ajBDQVFZSUtvWkl6ajBEQVFjRFFnQUUrR1pyWXY2R0c0Y0xnNm4rdmphVUx0TDN4WGNDMGhCbE9GWjlIY05QOWYrMzE0enVVRWw5c1Nkcyt5QUFRWCthRXFWUVBVZkZSOWorRGxLeHN3V3I2Zz09IiwidHJhbnNhY3Rpb25JZCI6IjhhNjM1YTRhMzRiMDFmM2Y4ZmQzZWRhZWY1YzY2ODJhMGRjNjUzNmRhNTlhZGE5NDZmZWRhNDNjMTY3YjA2MWEifSwidmVyc2lvbiI6IkVDX3YxIn0=", "payment_method": { "display_name": "MasterCard 0049", "network": "MasterCard", "type": "credit" }, "transaction_identifier": "8a635a4a34b01f3f8fd3edaef5c6682a0dc6536da59ada946feda43c167b061a" } } } } ``` ``` { "payment_id": "pay_m5kXbC2hEbdrMFOmb1u5", "merchant_id": "merchant_1758645561", "status": "processing", "amount": 6500, "net_amount": 6500, "shipping_cost": null, "amount_capturable": 6500, "amount_received": null, "connector": "adyen", "client_secret": "pay_m5kXbC2hEbdrMFOmb1u5_secret_XFNHlPwVhe4tcyUjOmvn", "created": "2025-09-23T16:39:42.261Z", "currency": "USD", "customer_id": "cu_1758645582", "customer": { "id": "cu_1758645582", "name": "Joseph Doe", "email": "something@gmail.com", "phone": "999999999", "phone_country_code": "+65" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "off_session", "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "wallet", "payment_method_data": { "wallet": { "apple_pay": { "last4": "0049", "card_network": "MasterCard", "type": "credit" } }, "billing": null }, "payment_token": null, "shipping": null, "billing": null, "order_details": null, "email": "something@gmail.com", "name": "Joseph Doe", "phone": "999999999", "return_url": "https://google.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": "Juspay", "statement_descriptor_suffix": "Router", "next_action": null, "cancellation_reason": null, "error_code": "5_004", "error_message": "Could not find Merchant Private Key", "unified_code": "UE_9000", "unified_message": "Something went wrong", "payment_experience": null, "payment_method_type": "apple_pay", "connector_label": "adyen_US_default", "business_country": "US", "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "cu_1758645582", "created_at": 1758645582, "expires": 1758649182, "secret": "epk_345bf6ea5a8841818aef283236fc555b" }, "manual_retry_allowed": null, "connector_transaction_id": "LGX9FHPL4L6DCQV5", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": { "redirect_response": null, "search_tags": null, "apple_pay_recurring_details": null, "gateway_system": "direct" }, "reference_id": null, "payment_link": null, "profile_id": "pro_DEPa1tm6HCWaRDpKUhiw", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_DniO167JdDFagf728nCR", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-23T16:54:42.261Z", "fingerprint": null, "browser_info": null, "payment_channel": null, "payment_method_id": null, "network_transaction_id": null, "payment_method_status": null, "updated": "2025-09-23T16:39:43.481Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": null, "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null, "enable_partial_authorization": null, "enable_overcapture": null, "is_overcapture_enabled": null, "network_details": { "network_advice_code": null } } ``` ### Pre-decryption flow ``` { "amount": 7445, "currency": "USD", "confirm": true, "business_country": "US", "business_label": "default", "amount_to_capture": 7445, "customer_id": "cu_{{$timestamp}}", "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "setup_future_usage": "on_session", "authentication_type": "no_three_ds", "return_url": "https://google.com", "email": "something@gmail.com", "name": "Joseph Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment request", "statement_descriptor_name": "Juspay", "statement_descriptor_suffix": "Router", "payment_method": "wallet", "payment_method_type": "apple_pay", "billing": { "address": { "line1": "1467", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "customer_acceptance": { "acceptance_type": "offline", "accepted_at": "1963-05-03T04:07:52.723Z", "online": { "ip_address": "in sit", "user_agent": "amet irure esse" } }, "payment_method_data": { "wallet": { "apple_pay": { "payment_data": { "application_primary_account_number": "4242424242424242", "application_expiration_month": "09", "application_expiration_year": "30", "payment_data": { "online_payment_cryptogram": "c635c5b3af900d7bd81fecd7028f1262f9d030754ee65ec7afd988a678194751", "eci_indicator": "5" } }, "payment_method": { "display_name": "Discover 9319", "network": "Visa", "type": "debit" }, "transaction_identifier": "c635c5b3af900d7bd81fecd7028f1262f9d030754ee65ec7afd988a678194751" } } } } ``` ``` { "payment_id": "pay_vlBGIV4arCs324zqb245", "merchant_id": "merchant_1758646116", "status": "failed", "amount": 7445, "net_amount": 7445, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": "worldpayvantiv", "client_secret": "pay_vlBGIV4arCs324zqb245_secret_K6ZvvoCFwEGrAeNaEAsP", "created": "2025-09-23T16:49:08.504Z", "currency": "USD", "customer_id": "cu_1758646148", "customer": { "id": "cu_1758646148", "name": "Joseph Doe", "email": "something@gmail.com", "phone": "999999999", "phone_country_code": "+65" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "on_session", "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "wallet", "payment_method_data": { "wallet": { "apple_pay": { "last4": "9319", "card_network": "Visa", "type": "debit" } }, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": null, "line3": null, "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "order_details": null, "email": "something@gmail.com", "name": "Joseph Doe", "phone": "999999999", "return_url": "https://google.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": "Juspay", "statement_descriptor_suffix": "Router", "next_action": null, "cancellation_reason": null, "error_code": "1", "error_message": "Invalid credentials. Contact eCommerceSupport@worldpay.com.", "unified_code": "UE_9000", "unified_message": "Something went wrong", "payment_experience": null, "payment_method_type": "apple_pay", "connector_label": "worldpayvantiv_US_default", "business_country": "US", "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "cu_1758646148", "created_at": 1758646148, "expires": 1758649748, "secret": "epk_c805578c79634db68981e99cefb0887d" }, "manual_retry_allowed": null, "connector_transaction_id": null, "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": { "redirect_response": null, "search_tags": null, "apple_pay_recurring_details": null, "gateway_system": "direct" }, "reference_id": null, "payment_link": null, "profile_id": "pro_7L7CCetsppn2SFed8gDl", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_CfdihSpeGdbjdb3Azvct", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-23T17:04:08.504Z", "fingerprint": null, "browser_info": null, "payment_channel": null, "payment_method_id": null, "network_transaction_id": null, "payment_method_status": null, "updated": "2025-09-23T16:49:12.077Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": null, "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null, "enable_partial_authorization": null, "enable_overcapture": null, "is_overcapture_enabled": null, "network_details": { "network_advice_code": null } } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Core Business Logic** - `crates/router/src/core/payments.rs` **Detailed Identifier Changes:** Commit b4e6be74: Files to modify: **crates/router/src/core/payments.rs** Modify existing code
{"pr_number": 9522, "pr_title": "fix(router): check payment_method_data before the decryption flow", "merged_at": "2025-09-24T08:06:03Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"core_business": ["crates/router/src/core/payments.rs"]}, "change_types": {}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(users): refactor `ProdIntent` to support product-type context and merchant-scope ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Hotfix PR Original PR: [https://github.com/juspay/hyperswitch/pull/7638](https://github.com/juspay/hyperswitch/pull/7638) ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/user/dashboard_metadata.rs` **2. Core Business Logic** - `crates/router/src/core/user.rs` - `crates/router/src/core/user/dashboard_metadata.rs` **3. Type Definitions** - `crates/router/src/services/email/types.rs` - `crates/router/src/types/domain/user.rs` **4. Utils** - `crates/router/src/utils/user/dashboard_metadata.rs` **5. Other** - `crates/common_enums/src/enums/accounts.rs` - `crates/router/src/routes/app.rs` - `crates/router/src/routes/user.rs` - ... and 1 more files **Code Patterns Applied:** - Extend existing types with new fields (9 changes) **Detailed Identifier Changes:** Commit 8dc771e8: Files to modify: **crates/api_models/src/user/dashboard_metadata.rs** Modify existing code **crates/common_enums/src/enums/accounts.rs** Modify existing code **crates/router/src/core/user.rs** Modify existing code **crates/router/src/core/user/dashboard_metadata.rs** Modify existing code **crates/router/src/routes/app.rs** Modify existing code **crates/router/src/routes/user.rs** Modify existing code **crates/router/src/services/email/types.rs** Modify existing code **crates/router/src/types/domain/user.rs** Modify existing code **crates/router/src/utils/user/dashboard_metadata.rs** Modify existing code
{"pr_number": 7787, "pr_title": "feat(users): refactor `ProdIntent` to support product-type context and merchant-scope", "merged_at": "2025-04-10T15:33:01Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"api_models": ["crates/api_models/src/user/dashboard_metadata.rs"], "core_business": ["crates/router/src/core/user.rs", "crates/router/src/core/user/dashboard_metadata.rs"], "types": ["crates/router/src/services/email/types.rs", "crates/router/src/types/domain/user.rs"], "utils": ["crates/router/src/utils/user/dashboard_metadata.rs"], "other": ["crates/common_enums/src/enums/accounts.rs", "crates/router/src/routes/app.rs", "crates/router/src/routes/user.rs", "crates/router/src/services/email/assets/bizemailprod.html"]}, "change_types": {"fields_added": 9, "imports_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(router): add /retrieve api for relay ## 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 --> /relay is a api that will be used to just forward the request sent by merchant without performing any application logic on it. This is particular to support the refunds for the payments that was directly performed with the connector (example stripe) with out hyperswitch involved during the payment flow. This PR introduces changes to add a retrieve API for relay refunds. The retrieve API will: 1. Return the relay status from our database when a retrieve call is made. 2. If force_sync = true is passed and the relay status is not in a terminal state in our system, the API will call the connector to fetch the latest status. Flow 1. Merchant performs payment directly with processor and stores the payment reference id associated with it. 2. Merchant tiggers the refund through hyperswitch using the processor reference id for the payment. 3. Merchant makes retrieve call for the relay status ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with 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 -> Make a refund request with invalid connector_resource_id ``` curl --location 'http://localhost:8080/relay' \ --header 'Content-Type: application/json' \ --header 'X-Profile-Id: pro_rIikb0gPrzd0vEY8hIiP' \ --header 'api-key: dev_qqMQAuMWCclJSk4uMBeNNSpqAPlsKlBA3blQOwOoq5ogTSFVON3taShABqtqYNA4' \ --data '{ "connector_id": "mca_8W0CQfwE89J1BJBbpcnt", "connector_resource_id": "7349526182906968904951", "data": { "refund": { "amount": 50, "currency": "USD" }}, "type": "refund" }' ``` ``` { "id": "relay_4lgXCQW0EnqKddZ9CC3b", "status": "pending", "connector_resource_id": "7349526182906968904951", "error": null, "connector_reference_id": "7349526431306986204951", "connector_id": "mca_8W0CQfwE89J1BJBbpcnt", "profile_id": "pro_rIikb0gPrzd0vEY8hIiP", "type": "refund", "data": { "refund": { "amount": 50, "currency": "USD", "reason": null } } } ``` -> Relay retrieve ``` curl --location 'http://localhost:8080/relay/relay_4lgXCQW0EnqKddZ9CC3b' \ --header 'Content-Type: application/json' \ --header 'X-Idempotency-Key: <x-idempotency-key>' \ --header 'X-Profile-Id: pro_rIikb0gPrzd0vEY8hIiP' \ --header 'api-key: dev_qqMQAuMWCclJSk4uMBeNNSpqAPlsKlBA3blQOwOoq5ogTSFVON3taShABqtqYNA4' \ --data '' ``` ``` { "id": "relay_4lgXCQW0EnqKddZ9CC3b", "status": "pending", "connector_resource_id": "7349526182906968904951", "error": null, "connector_reference_id": "7349526431306986204951", "connector_id": "mca_8W0CQfwE89J1BJBbpcnt", "profile_id": "pro_rIikb0gPrzd0vEY8hIiP", "type": "refund", "data": { "refund": { "amount": 50, "currency": "USD", "reason": null } } } ``` -> Relay retrieve force_sync = `true` ``` curl --location 'http://localhost:8080/relay/relay_4lgXCQW0EnqKddZ9CC3b?force_sync=true' \ --header 'Content-Type: application/json' \ --header 'X-Idempotency-Key: <x-idempotency-key>' \ --header 'X-Profile-Id: pro_rIikb0gPrzd0vEY8hIiP' \ --header 'api-key: dev_qqMQAuMWCclJSk4uMBeNNSpqAPlsKlBA3blQOwOoq5ogTSFVON3taShABqtqYNA4' \ --data '' ``` ``` { "id": "relay_4lgXCQW0EnqKddZ9CC3b", "status": "success", "connector_resource_id": "7349526182906968904951", "error": null, "connector_reference_id": "7349526431306986204951", "connector_id": "mca_8W0CQfwE89J1BJBbpcnt", "profile_id": "pro_rIikb0gPrzd0vEY8hIiP", "type": "refund", "data": { "refund": { "amount": 50, "currency": "USD", "reason": null } } } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/relay.rs` **2. Database Layer (Queries & Schema)** - `crates/diesel_models/src/query/relay.rs` - `crates/diesel_models/src/relay.rs` **3. Core Business Logic** - `crates/router/src/core/relay.rs` **4. Type Definitions** - `crates/router_env/src/logger/types.rs` **5. Utils** - `crates/router/src/routes/lock_utils.rs` **6. Other** - `crates/router/src/db/relay.rs` - `crates/router/src/routes/app.rs` - `crates/router/src/routes/relay.rs` **Code Patterns Applied:** - Define new data structures (1 changes) - Implement new functions (9 changes) - Extend existing types with new fields (37 changes) - Add conditional logic for feature flags or filtering (2 changes) - Modify database queries (1 changes) **Detailed Identifier Changes:** Commit 04787313: Files to modify: **crates/api_models/src/relay.rs** Add: - struct: pub::RelayRetrieveBody **crates/diesel_models/src/query/relay.rs** Add: - function: pub::find_by_id **crates/diesel_models/src/relay.rs** Modify existing code **crates/router/src/core/relay.rs** Add: - function: pub::relay_retrieve - function: private::should_call_connector_for_relay_refund_status - function: pub::sync_relay_refund_with_gateway **crates/router/src/db/relay.rs** Add: - function: private::find_relay_by_id - function: private::find_relay_by_id - function: private::find_relay_by_id **crates/router/src/routes/app.rs** Modify existing code **crates/router/src/routes/lock_utils.rs** Modify existing code **crates/router/src/routes/relay.rs** Add: - function: pub::relay_retrieve **crates/router_env/src/logger/types.rs** Modify existing code
{"pr_number": 6918, "pr_title": "feat(router): add /retrieve api for relay", "merged_at": "2024-12-23T13:21:14Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "merchant", "refund"]}, "hierarchy": {"api_models": ["crates/api_models/src/relay.rs"], "database": ["crates/diesel_models/src/query/relay.rs", "crates/diesel_models/src/relay.rs"], "core_business": ["crates/router/src/core/relay.rs"], "types": ["crates/router_env/src/logger/types.rs"], "utils": ["crates/router/src/routes/lock_utils.rs"], "other": ["crates/router/src/db/relay.rs", "crates/router/src/routes/app.rs", "crates/router/src/routes/relay.rs"]}, "change_types": {"structs_added": 1, "functions_added": 9, "fields_added": 37, "imports_added": 2, "conditionals_added": 2, "database_queries": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(connector): Change Refund Reason Type in Adyen ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD Closes this [issue](https://github.com/juspay/hyperswitch/issues/8845) ## Description <!-- Describe your changes in detail --> This PR updates the reason field in AdyenRefundRequest from Option<String> to Option<AdyenRefundRequestReason>, a strongly typed enum. This change ensures only supported values (FRAUD, CUSTOMER REQUEST, RETURN, DUPLICATE, OTHER) are used. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with 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 A. Refund(with valid reason): Request: ``` curl --location 'http://localhost:8080/refunds' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_Emxcc7NEApdtpDZyA54Hc0hN43a4wvBTlJ0wIGGeGquavEbsE4lhVWQcyPV8jMFu' \ --data '{ "payment_id": "pay_aUwRQFUMFVSuIsfGRRiq", "amount": 100, "reason": "CUSTOMER REQUEST", "refund_type": "instant", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } }' ``` Response: ``` { "refund_id": "ref_3UOUCY4WziTz0iWhRGjT", "payment_id": "pay_aUwRQFUMFVSuIsfGRRiq", "amount": 100, "currency": "USD", "status": "pending", "reason": "CUSTOMER REQUEST", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" }, "error_message": null, "error_code": null, "unified_code": null, "unified_message": null, "created_at": "2025-08-06T04:02:37.782Z", "updated_at": "2025-08-06T04:02:39.280Z", "connector": "adyen", "profile_id": "pro_H4NAjXx3vY9NI4nQbXom", "merchant_connector_id": "mca_EC2PLdAi5hhl8zAKbt0G", "split_refunds": null, "issuer_error_code": null, "issuer_error_message": null } ``` B. Refund (with invalid reason): Request: ``` curl --location 'http://localhost:8080/refunds' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_8rgdhjpDZyA54Hc0hN43a4wvBTlJ0wIGGeGquavEbsa.kjsfhgubdhrsj' \ --data '{ "payment_id": "pay_dwfsrgdfnQSuIsfGRerjgh", "amount": 100, "reason": "customer returned product", "refund_type": "instant", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } }' ``` Response: ``` { "refund_id": "ref_7JGWziplkiWhRaSg", "payment_id": "pay_dwfsrgdfnQSuIsfGRerjgh", "amount": 100, "currency": "USD", "status": "pending", "reason": "OTHER", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" }, "error_message": null, "error_code": null, "unified_code": null, "unified_message": null, "created_at": "2025-08-06T04:02:37.782Z", "updated_at": "2025-08-06T04:02:39.280Z", "connector": "adyen", "profile_id": "pro_H4NAjXx3vY9NI4nQbXom", "merchant_connector_id": "mca_EC2PLdAi5hhl8zAKbt0G", "split_refunds": null, "issuer_error_code": null, "issuer_error_message": null } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/connector_configs/toml/production.toml` - `crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs` **Code Patterns Applied:** - Implement new functions (1 changes) - Extend existing types with new fields (2 changes) **Detailed Identifier Changes:** Commit 3547eac3: Files to modify: **crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs** Add: - function: private::from_str - enum: pub::AdyenRefundRequestReason - impl: impl FromStr for AdyenRefundRequestReason
{"pr_number": 8849, "pr_title": "fix(connector): Change Refund Reason Type in Adyen", "merged_at": "2025-08-08T13:06:37Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/connector_configs/toml/production.toml", "crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs"]}, "change_types": {"functions_added": 1, "enums_added": 1, "fields_added": 2, "imports_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(billing): add support to configure billing processor in profile ## 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 --> As part of the subscription, a billing processor need to be configured at profile level to route the subscription creation and other related activities. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> Adding billing_processor_id in the profile table to use it during subscription operations. ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> 1. Create merchant account Request ``` curl --location 'http://localhost:8080/accounts' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'x-feature: router-custom' \ --header 'api-key: test_admin' \ --data-raw '{ "merchant_id": "merchant_1758189685", "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" } ] }' ``` Response ``` { "merchant_id": "merchant_1758189675", "merchant_name": "NewAge Retailer", "return_url": "https://google.com/success", "enable_payment_response_hash": true, "payment_response_hash_key": "xn1iJ8FBkwGYVJbo4BIIndl2zIE8p8pNpksCA6r764i9xD8LD3WvkRNC5hq8bYON", "redirect_to_merchant_with_http_post": false, "merchant_details": { "primary_contact_person": "John Test", "primary_phone": "sunt laborum", "primary_email": "JohnTest@test.com", "secondary_contact_person": "John Test2", "secondary_phone": "cillum do dolor id", "secondary_email": "JohnTest2@test.com", "website": "www.example.com", "about_business": "Online Retail with a wide selection of organic products for North America", "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": null, "last_name": null, "origin_zip": null }, "merchant_tax_registration_id": null }, "webhook_details": { "webhook_version": "1.0.1", "webhook_username": "ekart_retail", "webhook_password": "password_ekart@123", "webhook_url": null, "payment_created_enabled": true, "payment_succeeded_enabled": true, "payment_failed_enabled": true, "payment_statuses_enabled": null, "refund_statuses_enabled": null, "payout_statuses_enabled": null }, "payout_routing_algorithm": null, "sub_merchants_enabled": false, "parent_merchant_id": null, "publishable_key": "pk_dev_2250d33a4b344663846c41c8b058546c", "metadata": { "city": "NY", "unit": "245", "compatible_connector": null }, "locker_id": "m0010", "primary_business_details": [ { "country": "US", "business": "default" } ], "frm_routing_algorithm": null, "organization_id": "org_zNQexFZeBIibQLnmfMOf", "is_recon_enabled": false, "default_profile": "pro_UCU7YbjjS89XQ9vch5hi", "recon_status": "not_requested", "pm_collect_link_config": null, "product_type": "orchestration", "merchant_account_type": "standard" } ``` 2. Create API key Request ``` curl --location 'http://localhost:8080/api_keys/merchant_1758189675' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: test_admin' \ --data '{ "name": "API Key 1", "description": null, "expiration": "2038-01-19T03:14:08.000Z" }' ``` Response ``` { "key_id": "dev_lc3LHo3Q8FWQautTIDy8", "merchant_id": "merchant_1758189675", "name": "API Key 1", "description": null, "api_key": "dev_nKpWbedawCxOo4fCSnIWHKT5lr6cxBR0qkiquexf2hZjfhcf6UGzbXAl3HFE2AJL", "created": "2025-09-18T10:02:31.552Z", "expiration": "2038-01-19T03:14:08.000Z" } ``` 3. Create billing connector Request ``` curl --location 'http://localhost:8080/account/merchant_1758189675/connectors' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_nKpWbedawCxOo4fCSnIWHKT5lr6cxBR0qkiquexf2hZjfhcf6UGzbXAl3HFE2AJL' \ --data '{ "connector_type": "billing_processor", "connector_name": "chargebee", "connector_account_details": { "auth_type": "HeaderKey", "api_key": "test_MK", "site": "" }, "business_country": "US", "business_label": "default", "connector_webhook_details": { "merchant_secret": "hyperswitch", "additional_secret": "hyperswitch" }, "metadata": { "site": "nish-test" } }' ``` Response ``` { "connector_type": "billing_processor", "connector_name": "chargebee", "connector_label": "chargebee_US_default", "merchant_connector_id": "mca_LJR3NoCsDKbYFTKnTGek", "profile_id": "pro_UCU7YbjjS89XQ9vch5hi", "connector_account_details": { "auth_type": "HeaderKey", "api_key": "te**********************************MK" }, "payment_methods_enabled": null, "connector_webhook_details": { "merchant_secret": "hyperswitch", "additional_secret": "hyperswitch" }, "metadata": { "site": "nish-test" }, "test_mode": null, "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 } ``` 4. Update billing processor id in the profile Request ``` curl --location 'http://localhost:8080/account/merchant_1758189675/business_profile/pro_UCU7YbjjS89XQ9vch5hi' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_nKpWbedawCxOo4fCSnIWHKT5lr6cxBR0qkiquexf2hZjfhcf6UGzbXAl3HFE2AJL' \ --data '{ "billing_processor_id": "mca_LJR3NoCsDKbYFTKnTGek" }' ``` Response ``` { "merchant_id": "merchant_1758189675", "profile_id": "pro_UCU7YbjjS89XQ9vch5hi", "profile_name": "US_default", "return_url": "https://google.com/success", "enable_payment_response_hash": true, "payment_response_hash_key": "xn1iJ8FBkwGYVJbo4BIIndl2zIE8p8pNpksCA6r764i9xD8LD3WvkRNC5hq8bYON", "redirect_to_merchant_with_http_post": false, "webhook_details": { "webhook_version": "1.0.1", "webhook_username": "ekart_retail", "webhook_password": "password_ekart@123", "webhook_url": null, "payment_created_enabled": true, "payment_succeeded_enabled": true, "payment_failed_enabled": true, "payment_statuses_enabled": null, "refund_statuses_enabled": null, "payout_statuses_enabled": null }, "metadata": null, "routing_algorithm": null, "intent_fulfillment_time": 900, "frm_routing_algorithm": null, "payout_routing_algorithm": null, "applepay_verified_domains": null, "session_expiry": 900, "payment_link_config": null, "authentication_connector_details": null, "use_billing_as_payment_method_billing": true, "extended_card_info_config": null, "collect_shipping_details_from_wallet_connector": false, "collect_billing_details_from_wallet_connector": false, "always_collect_shipping_details_from_wallet_connector": false, "always_collect_billing_details_from_wallet_connector": false, "is_connector_agnostic_mit_enabled": false, "payout_link_config": null, "outgoing_webhook_custom_http_headers": null, "tax_connector_id": null, "is_tax_connector_enabled": false, "is_network_tokenization_enabled": false, "is_auto_retries_enabled": false, "max_auto_retries_enabled": null, "always_request_extended_authorization": null, "is_click_to_pay_enabled": false, "authentication_product_ids": null, "card_testing_guard_config": { "card_ip_blocking_status": "disabled", "card_ip_blocking_threshold": 3, "guest_user_card_blocking_status": "disabled", "guest_user_card_blocking_threshold": 10, "customer_id_blocking_status": "disabled", "customer_id_blocking_threshold": 5, "card_testing_guard_expiry": 3600 }, "is_clear_pan_retries_enabled": false, "force_3ds_challenge": false, "is_debit_routing_enabled": false, "merchant_business_country": null, "is_pre_network_tokenization_enabled": false, "acquirer_configs": null, "is_iframe_redirection_enabled": null, "merchant_category_code": null, "merchant_country_code": null, "dispute_polling_interval": null, "is_manual_retry_enabled": null, "always_enable_overcapture": null, "billing_processor_id": "mca_LJR3NoCsDKbYFTKnTGek" } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/admin.rs` **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/v1/openapi_spec_v1.json` - `api-reference/v2/openapi_spec_v2.json` - `crates/router/src/db/events.rs` - ... and 2 more files **Code Patterns Applied:** - Extend existing types with new fields (52 changes) **Detailed Identifier Changes:** Commit c7ba5962: 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/db/events.rs** Modify existing code **crates/router/src/types/api/admin.rs** Modify existing code
{"pr_number": 9438, "pr_title": "feat(billing): add support to configure billing processor in profile", "merged_at": "2025-09-23T19:41:29Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/admin.rs"], "database": ["crates/diesel_models/src/business_profile.rs", "crates/diesel_models/src/schema.rs", "crates/diesel_models/src/schema_v2.rs"], "domain": ["crates/hyperswitch_domain_models/src/business_profile.rs"], "core_business": ["crates/router/src/core/admin.rs"], "types": ["crates/router/src/types/api/admin.rs"], "other": ["api-reference/v1/openapi_spec_v1.json", "api-reference/v2/openapi_spec_v2.json", "crates/router/src/db/events.rs", "migrations/2025-09-18-063125_add_billing_processor_id_to_business_profile/down.sql", "migrations/2025-09-18-063125_add_billing_processor_id_to_business_profile/up.sql"]}, "change_types": {"fields_added": 52}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(core): Hyperswitch <|> UCS Mandate flow 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 --> This PR implements UCS(Unified Connector Service) Integration for SetupMandate and RepeatEverything (recurring payment) flows. - Updated rust-grpc-client dependency to main branch - Added log for Successful UCS connection ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with 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 Intent for Zero mandate ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: _' \ --data ' { "amount": 0, "confirm": false, "currency": "USD", "customer_id": "Customer123", "setup_future_usage": "off_session" }' ``` Confirm CIT (Authorisedotnet via UCS) ``` curl --location 'http://localhost:8080/payments/pay_YbaKZHAfIRvsnGpeuOcH/confirm' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: _' \ --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", "card_network": "VISA" }, "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" } } }, "all_keys_required": true }' ``` Response ``` { "payment_id": "pay_2d7OcbcSgKUrkt4ETxYP", "merchant_id": "merchant_1753280085", "status": "succeeded", "amount": 0, "net_amount": 0, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": "authorizedotnet", "client_secret": "pay_2d7OcbcSgKUrkt4ETxYP_secret_fLFQbtHQWQGORcgUtr4l", "created": "2025-07-23T14:57:40.169Z", "currency": "USD", "customer_id": "Customer123", "customer": { "id": "Customer123", "name": null, "email": "test@novalnet.de", "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": "4549", "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": "30", "card_holder_name": "joseph Doe", "payment_checks": null, "authentication_data": 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": "test@novalnet.de" } }, "payment_token": null, "shipping": null, "billing": null, "order_details": null, "email": "test@novalnet.de", "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": "523966074", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": null, "payment_link": null, "profile_id": "pro_0UBAnCbAThEENJj9KfZ0", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_XVTNsN4D9kHGw3DxkEP0", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-07-23T15:12:40.168Z", "fingerprint": null, "browser_info": { "os_type": null, "language": null, "time_zone": null, "ip_address": "::1", "os_version": null, "user_agent": null, "color_depth": null, "device_model": null, "java_enabled": null, "screen_width": null, "accept_header": null, "screen_height": null, "accept_language": "en", "java_script_enabled": null }, "payment_method_id": "pm_tSOU7aOBhgKLBE92628X", "payment_method_status": "active", "updated": "2025-07-23T14:58:20.071Z", "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": "523966074-536113445", "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 } ``` Card recurring payment (Authorizedotnet via UCS) ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_dAANSmNFGJ0ppE3KkF0NaFYdWmHDQReivo4zXuzWPPvMae7TSIRPRus6hDyNDTGt' \ --data '{ "amount": 100, "currency": "USD", "confirm": true, "capture_method": "automatic", "customer_id": "Customer123", "off_session": true, "recurring_details": { "type": "payment_method_id", "data": "pm_Ca7e4nuk9S8z1S7ksaF6" } }' ``` Response ``` { "payment_id": "pay_YbaKZHAfIRvsnGpeuOcH", "merchant_id": "merchant_1753280085", "status": "succeeded", "amount": 100, "net_amount": 100, "shipping_cost": null, "amount_capturable": 0, "amount_received": 100, "connector": "authorizedotnet", "client_secret": "pay_YbaKZHAfIRvsnGpeuOcH_secret_hTmFPsa4amP6XdXG6g9d", "created": "2025-07-23T14:58:39.835Z", "currency": "USD", "customer_id": "Customer123", "customer": { "id": "Customer123", "name": null, "email": "test@novalnet.de", "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": "4549", "card_type": null, "card_network": "Visa", "card_issuer": null, "card_issuing_country": null, "card_isin": "434994", "card_extended_bin": null, "card_exp_month": "12", "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": "test@novalnet.de", "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": "Customer123", "created_at": 1753282719, "expires": 1753286319, "secret": "epk_fd17c36b38584f0488578d1335542cbe" }, "manual_retry_allowed": false, "connector_transaction_id": "80042797687", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": null, "payment_link": null, "profile_id": "pro_0UBAnCbAThEENJj9KfZ0", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_XVTNsN4D9kHGw3DxkEP0", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-07-23T15:13:39.835Z", "fingerprint": null, "browser_info": null, "payment_method_id": "pm_Ca7e4nuk9S8z1S7ksaF6", "payment_method_status": "active", "updated": "2025-07-23T14:58:40.816Z", "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": "523965707-536113051", "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Core Business Logic** - `crates/router/src/core/payments/flows/authorize_flow.rs` - `crates/router/src/core/payments/flows/setup_mandate_flow.rs` - `crates/router/src/core/unified_connector_service.rs` - ... and 1 more files **2. External Connector Integration** - `crates/external_services/src/grpc_client/unified_connector_service.rs` **3. Configuration Files** - `crates/external_services/Cargo.toml` - `crates/router/Cargo.toml` **4. Other** - `Cargo.lock` **Code Patterns Applied:** - Implement new functions (15 changes) - Extend existing types with new fields (133 changes) - Add conditional logic for feature flags or filtering (1 changes) - Modify database queries (2 changes) **Detailed Identifier Changes:** Commit f94f39ef: Files to modify: **crates/external_services/src/grpc_client/unified_connector_service.rs** Add: - function: private::payment_setup_mandate - function: pub::payment_repeat **crates/router/src/core/payments/flows/authorize_flow.rs** Add: - function: private::call_unified_connector_service_authorize - function: private::call_unified_connector_service_repeat_payment **crates/router/src/core/payments/flows/setup_mandate_flow.rs** Add: - function: private::call_unified_connector_service **crates/router/src/core/unified_connector_service.rs** Add: - function: pub::handle_unified_connector_service_response_for_payment_register **crates/router/src/core/unified_connector_service/transformers.rs** Add: - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - impl: impl ForeignTryFrom<&RouterData<SetupMandate, SetupMandateRequestData, PaymentsResponseData>> for payments_grpc::PaymentServiceRegisterRequest - impl: impl ForeignTryFrom<&RouterData<Authorize, PaymentsAuthorizeData, PaymentsResponseData>> for payments_grpc::PaymentServiceRepeatEverythingRequest - impl: impl ForeignTryFrom<payments_grpc::PaymentServiceAuthorizeResponse> for Result<PaymentsResponseData, ErrorResponse> - impl: impl ForeignTryFrom<payments_grpc::PaymentServiceGetResponse> for Result<PaymentsResponseData, ErrorResponse> - impl: impl ForeignTryFrom<payments_grpc::PaymentServiceRegisterResponse> for Result<PaymentsResponseData, ErrorResponse> - impl: impl ForeignTryFrom<payments_grpc::PaymentServiceRepeatEverythingResponse> for Result<PaymentsResponseData, ErrorResponse> - impl: impl ForeignTryFrom<storage_enums::FutureUsage> for payments_grpc::FutureUsage - impl: impl ForeignTryFrom<common_types::payments::CustomerAcceptance> for payments_grpc::CustomerAcceptance
{"pr_number": 8738, "pr_title": "feat(core): Hyperswitch <|> UCS Mandate flow integration", "merged_at": "2025-07-28T08:00:47Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"core_business": ["crates/router/src/core/payments/flows/authorize_flow.rs", "crates/router/src/core/payments/flows/setup_mandate_flow.rs", "crates/router/src/core/unified_connector_service.rs", "crates/router/src/core/unified_connector_service/transformers.rs"], "connectors": ["crates/external_services/src/grpc_client/unified_connector_service.rs"], "config": ["crates/external_services/Cargo.toml", "crates/router/Cargo.toml"], "other": ["Cargo.lock"]}, "change_types": {"functions_added": 15, "fields_added": 133, "imports_added": 2, "conditionals_added": 1, "database_queries": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(payments): [Payment links] add hide card nickname field config for secure payment links ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Add hide card nickname field config for secure payment links. https://docs.hyperswitch.io/explore-hyperswitch/merchant-controls/integration-guide/web/customization#id-9.-hide-card-nickname-field . ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> #### Secure links <details> <summary>1. Update `allowed_domains` in business profile - (unfold to view cURL)</summary> ``` curl --location 'http://localhost:8080/account/merchant_1721984694/business_profile/pro_oXHnmgfZSnfe92PvodqP' \ --header 'Content-Type: application/json' \ --header 'api-key: test_admin' \ --data '{ "payment_link_config": { "allowed_domains": [ "*" ], "enabled_saved_payment_method": true, "hide_card_nickname_field" : true } }' ``` </details> <details> <summary>2. Create a payment link - (unfold to view cURL)</summary> ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_eBTVu8OMN1HmE2xr0I0dsfypWOVwQBlietvkxf0sgYMdyFM5nRO40M8M4MLH42Jk' \ --data '{ "customer_id": "cus_izAOZiynP5URGEvEfmgH", "amount": 100, "currency": "USD", "payment_link": true, "connector": [ "stripe" ], "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." } }' ``` </details> 3. Open the secure payment link (`secure_link` in API response) in an iframe for validating the functionality. card nickname field should be disabled even when Save card details checkbox is enabled in sdk. <img width="625" alt="Screenshot 2024-11-13 at 4 19 23 PM" src="https://github.com/user-attachments/assets/41bb43b6-826d-49c4-9ea5-8b42bfe993c9"> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/admin.rs` - `crates/api_models/src/payments.rs` **2. Database Layer (Queries & Schema)** - `crates/diesel_models/src/business_profile.rs` - `crates/diesel_models/src/payment_intent.rs` **3. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/lib.rs` **4. Core Business Logic** - `crates/router/src/core/payment_link.rs` - `crates/router/src/core/payment_link/payment_link_initiate/payment_link_initiator.js` - `crates/router/src/core/payment_link/payment_link_initiate/secure_payment_link_initiator.js` - ... and 1 more files **5. Type Definitions** - `crates/router/src/types/transformers.rs` **6. Utils** - `crates/common_utils/src/consts.rs` **7. Other** - `api-reference-v2/openapi_spec.json` - `api-reference/openapi_spec.json` - `crates/router/src/consts.rs` **Code Patterns Applied:** - Extend existing types with new fields (17 changes) **Detailed Identifier Changes:** Commit 0e026b70: Files to modify: **crates/api_models/src/admin.rs** Modify existing code **crates/api_models/src/payments.rs** Modify existing code **crates/common_utils/src/consts.rs** Modify existing code **crates/diesel_models/src/business_profile.rs** Modify existing code **crates/diesel_models/src/payment_intent.rs** Modify existing code **crates/hyperswitch_domain_models/src/lib.rs** Modify existing code **crates/router/src/consts.rs** Modify existing code **crates/router/src/core/payment_link.rs** Modify existing code **crates/router/src/core/payments/transformers.rs** Modify existing code **crates/router/src/types/transformers.rs** Modify existing code
{"pr_number": 6554, "pr_title": "feat(payments): [Payment links] add hide card nickname field config for secure payment links", "merged_at": "2024-11-18T12:32: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/payments.rs"], "database": ["crates/diesel_models/src/business_profile.rs", "crates/diesel_models/src/payment_intent.rs"], "domain": ["crates/hyperswitch_domain_models/src/lib.rs"], "core_business": ["crates/router/src/core/payment_link.rs", "crates/router/src/core/payment_link/payment_link_initiate/payment_link_initiator.js", "crates/router/src/core/payment_link/payment_link_initiate/secure_payment_link_initiator.js", "crates/router/src/core/payments/transformers.rs"], "types": ["crates/router/src/types/transformers.rs"], "utils": ["crates/common_utils/src/consts.rs"], "other": ["api-reference-v2/openapi_spec.json", "api-reference/openapi_spec.json", "crates/router/src/consts.rs"]}, "change_types": {"fields_added": 17, "imports_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor: remove unused functions crates/router/src/connector/utils.rs ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Removed functions that are not used in other files and removed imports that are only referenced by the unused functions. [crates/router/src/connector/utils.rs](https://github.com/juspay/hyperswitch/blob/3cdb9e174ca384704781a4c56e826c3a5e39d295/crates/router/src/connector/utils.rs) ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context fix: #7928 <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Only removed unused util functions hence no testing required. ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/router/src/connector/utils.rs` **Detailed Identifier Changes:** Commit 46e830a8: Files to modify: **crates/router/src/connector/utils.rs** Remove: - function: pub::get_http_header - function: pub::to_boolean - function: pub::get_connector_meta - function: pub::base64_decode - function: pub::to_currency_base_unit_from_optional_amount - function: pub::get_amount_as_string - function: pub::get_amount_as_f64 - function: pub::to_currency_base_unit - function: pub::to_currency_lower_unit - function: pub::construct_not_implemented_error_report - function: pub::to_currency_base_unit_with_zero_decimal_check - function: pub::to_currency_base_unit_asf64 - function: pub::str_to_f32 - function: pub::collect_values_by_removing_signature - function: pub::collect_and_sort_values_by_removing_signature - function: pub::get_webhook_merchant_secret_key - function: pub::construct_captures_response_hashmap - function: pub::is_manual_capture - function: pub::generate_random_bytes - function: pub::validate_currency - function: pub::get_timestamp_in_milliseconds - function: pub::get_mandate_details Commit be33bc77: Files to modify: **crates/router/src/connector/utils.rs** Remove: - function: pub::get_http_header - function: pub::to_boolean - function: pub::get_connector_meta - function: pub::base64_decode - function: pub::to_currency_base_unit_from_optional_amount - function: pub::get_amount_as_string - function: pub::get_amount_as_f64 - function: pub::to_currency_base_unit - function: pub::to_currency_lower_unit - function: pub::construct_not_implemented_error_report - function: pub::to_currency_base_unit_with_zero_decimal_check - function: pub::to_currency_base_unit_asf64 - function: pub::str_to_f32 - function: pub::collect_values_by_removing_signature - function: pub::collect_and_sort_values_by_removing_signature - function: pub::get_webhook_merchant_secret_key - function: pub::construct_captures_response_hashmap - function: pub::is_manual_capture - function: pub::generate_random_bytes - function: pub::validate_currency - function: pub::get_timestamp_in_milliseconds - function: pub::get_mandate_details
{"pr_number": 7994, "pr_title": "refactor: remove unused functions", "merged_at": "2025-05-14T10:29:02Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["connector"]}, "hierarchy": {"connectors": ["crates/router/src/connector/utils.rs"]}, "change_types": {}, "has_identifier_data": true, "commits_matched": 2, "match_method": "pr_number"}
feat(utils): add iso representation for each state for european countries ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> For each countries present in Europe, their states are converted to ISO Standard [Source for standard](https://github.com/juspay/hyperswitch-web/blob/main/src/States.json) Note: A bugfix is present as well for address_id used to fetch billing_address for external authentication Note: Hotfix against https://github.com/juspay/hyperswitch/pull/7273 ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with 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. API Request/Response Models** - `crates/api_models/src/payments.rs` **2. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/mandates.rs` **3. Core Business Logic** - `crates/router/src/core/payments.rs` **4. External Connector Integration** - `crates/hyperswitch_connectors/src/utils.rs` **5. Configuration Files** - `.typos.toml` **6. Other** - `crates/common_enums/src/enums.rs` **Code Patterns Applied:** - Implement new functions (33 changes) - Extend existing types with new fields (33 changes) **Detailed Identifier Changes:** Commit c17c523c: Files to modify: **crates/api_models/src/payments.rs** Modify existing code **crates/common_enums/src/enums.rs** Add: - enum: pub::AlbaniaStatesAbbreviation - enum: pub::AndorraStatesAbbreviation - enum: pub::AustriaStatesAbbreviation - enum: pub::BelarusStatesAbbreviation - enum: pub::BosniaAndHerzegovinaStatesAbbreviation - enum: pub::BulgariaStatesAbbreviation - enum: pub::CroatiaStatesAbbreviation - enum: pub::CzechRepublicStatesAbbreviation - enum: pub::DenmarkStatesAbbreviation - enum: pub::FinlandStatesAbbreviation - enum: pub::FranceStatesAbbreviation - enum: pub::GermanyStatesAbbreviation - enum: pub::GreeceStatesAbbreviation - enum: pub::HungaryStatesAbbreviation - enum: pub::IcelandStatesAbbreviation - enum: pub::IrelandStatesAbbreviation - enum: pub::LatviaStatesAbbreviation - enum: pub::ItalyStatesAbbreviation - enum: pub::LiechtensteinStatesAbbreviation - enum: pub::LithuaniaStatesAbbreviation - enum: pub::MaltaStatesAbbreviation - enum: pub::MoldovaStatesAbbreviation - enum: pub::MonacoStatesAbbreviation - enum: pub::MontenegroStatesAbbreviation - enum: pub::NetherlandsStatesAbbreviation - enum: pub::NorthMacedoniaStatesAbbreviation - enum: pub::NorwayStatesAbbreviation - enum: pub::PolandStatesAbbreviation - enum: pub::PortugalStatesAbbreviation - enum: pub::SpainStatesAbbreviation - enum: pub::SwitzerlandStatesAbbreviation - enum: pub::UnitedKingdomStatesAbbreviation - enum: pub::RomaniaStatesAbbreviation **crates/hyperswitch_connectors/src/utils.rs** Add: - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - impl: impl ForeignTryFrom<String> for GermanyStatesAbbreviation - impl: impl ForeignTryFrom<String> for SpainStatesAbbreviation - impl: impl ForeignTryFrom<String> for ItalyStatesAbbreviation - impl: impl ForeignTryFrom<String> for NorwayStatesAbbreviation - impl: impl ForeignTryFrom<String> for AlbaniaStatesAbbreviation - impl: impl ForeignTryFrom<String> for AndorraStatesAbbreviation - impl: impl ForeignTryFrom<String> for AustriaStatesAbbreviation - impl: impl ForeignTryFrom<String> for RomaniaStatesAbbreviation - impl: impl ForeignTryFrom<String> for PortugalStatesAbbreviation - impl: impl ForeignTryFrom<String> for SwitzerlandStatesAbbreviation - impl: impl ForeignTryFrom<String> for NorthMacedoniaStatesAbbreviation - impl: impl ForeignTryFrom<String> for MontenegroStatesAbbreviation - impl: impl ForeignTryFrom<String> for MonacoStatesAbbreviation - impl: impl ForeignTryFrom<String> for NetherlandsStatesAbbreviation - impl: impl ForeignTryFrom<String> for MoldovaStatesAbbreviation - impl: impl ForeignTryFrom<String> for LithuaniaStatesAbbreviation - impl: impl ForeignTryFrom<String> for LiechtensteinStatesAbbreviation - impl: impl ForeignTryFrom<String> for LatviaStatesAbbreviation - impl: impl ForeignTryFrom<String> for MaltaStatesAbbreviation - impl: impl ForeignTryFrom<String> for BelarusStatesAbbreviation - impl: impl ForeignTryFrom<String> for IrelandStatesAbbreviation - impl: impl ForeignTryFrom<String> for IcelandStatesAbbreviation - impl: impl ForeignTryFrom<String> for HungaryStatesAbbreviation - impl: impl ForeignTryFrom<String> for GreeceStatesAbbreviation - impl: impl ForeignTryFrom<String> for FinlandStatesAbbreviation - impl: impl ForeignTryFrom<String> for DenmarkStatesAbbreviation - impl: impl ForeignTryFrom<String> for CzechRepublicStatesAbbreviation - impl: impl ForeignTryFrom<String> for CroatiaStatesAbbreviation - impl: impl ForeignTryFrom<String> for BulgariaStatesAbbreviation - impl: impl ForeignTryFrom<String> for BosniaAndHerzegovinaStatesAbbreviation - impl: impl ForeignTryFrom<String> for UnitedKingdomStatesAbbreviation **crates/hyperswitch_domain_models/src/mandates.rs** Modify existing code **crates/router/src/core/payments.rs** Modify existing code
{"pr_number": 7282, "pr_title": "feat(utils): add iso representation for each state for european countries", "merged_at": "2025-02-17T12:55:02Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment"]}, "hierarchy": {"api_models": ["crates/api_models/src/payments.rs"], "domain": ["crates/hyperswitch_domain_models/src/mandates.rs"], "core_business": ["crates/router/src/core/payments.rs"], "connectors": ["crates/hyperswitch_connectors/src/utils.rs"], "config": [".typos.toml"], "other": ["crates/common_enums/src/enums.rs"]}, "change_types": {"functions_added": 33, "enums_added": 33, "fields_added": 33}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(router): add support for partial authorization ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> add support for partial authorization in payments flow **Implementation** 1. Add `enable_partial_authorization` field to payments request and include it in the payment_intent table 2. When enabled in the request, it is forwarded to downstream connectors as well 3. In response handling `amount_capturable` and `amount_captured` populated in the connectors flow based on the amount approved in case of partial authorizations 4. We retrieve the `amount_capturable` and `amount_captured` values populated from connector flows and use them to update our payment_intent and payment_attempt tables in post update trackers 5. Based on the approved amount, mark intent status as `partially_authorized_and_requires_capture` and attempt status as `partially_authorized` in case of partial authorization 6. Allow `partially_authorized_and_requires_capture` intent status to perform capture operation **API Changes** 1. Add `enable_partial_authorization` to payments request and response 2. Add `partially_authorized_and_requires_capture` intent status 3. Add `partially_authorized` attempt status **Database Changes** 1. Add `enable_partial_authorization` field to the payment_intent table ### Additional Changes - [x] This PR modifies the API contract - [x] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> Partial authorization helps minimize the number of declined transactions due to insufficient funds, increasing sales for merchants ## How did you test 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. Sanity Manual And Auto Capture flows (With amount_captured and amount_capturable being populated as expected) <details> <summary> 2. Create a partial auth payment (with capture_method = manual) with `worldpayvantiv` connector, perform subsequent capture and refunds with partially approved amount (verify amount_capturable if populated correctly) </summary> a. Create a Payment Intent with `"enable_partial_authorization": "true"` CURL ``` curl --location '{{BASE_URL}}/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: {{API_KEY}}' \ --data-raw '{ "enable_partial_authorization": true, "amount": 100, "currency": "USD", "confirm": false, "capture_method": "manual", "customer_id": "testsai2", "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment request", "return_url": "https://google.com", "setup_future_usage": "off_session", "shipping_cost": 100 }' ``` Response ``` { "payment_id": "pay_WJVwMc4FnZanTbhI8uFT", "merchant_id": "merchant_1754308486", "status": "processing", "amount": 100, "net_amount": 200, "shipping_cost": 100, "amount_capturable": 160, "amount_received": null, "connector": "worldpayvantiv", "client_secret": "pay_WJVwMc4FnZanTbhI8uFT_secret_hBTPDrNhummuGv5IcsQo", "created": "2025-08-06T14:13:14.167Z", "currency": "USD", "customer_id": "testsai2", "customer": { "id": "testsai2", "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": "manual", "payment_method": "card", "payment_method_data": { "card": { "last4": "0004", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "511201", "card_extended_bin": null, "card_exp_month": "01", "card_exp_year": "2050", "card_holder_name": "John Smith", "payment_checks": { "avs_result": "00", "advanced_a_v_s_result": null, "authentication_result": null, "card_validation_result": null }, "authentication_data": null }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "CA", "first_name": "John", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null } }, "payment_token": null, "shipping": null, "billing": null, "order_details": null, "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "return_url": "https://google.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": 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": "testsai2", "created_at": 1754489594, "expires": 1754493194, "secret": "epk_98cdc5394c6a45aa99e469fbbb82afca" }, "manual_retry_allowed": false, "connector_transaction_id": "83997375063155078", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "pay_WJVwMc4FnZanTbhI8uFT_1", "payment_link": null, "profile_id": "pro_FW0rvO9wk1dBMZJoDRdb", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_pmcx4hlmJazlWDeZi4uo", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-08-06T14:28:14.166Z", "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-06T14:13:17.657Z", "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": true } ``` b. Confirm the payment with following card_details and observe amount_capturable (should be less than total amount) CURL ``` curl --location '{{BASE_URL}}/payments/{{PAYMENT_ID}}/confirm' \ --header 'api-key: {{API_KEY}}' \ --header 'Content-Type: application/json' \ --data '{ "payment_method": "card", "payment_method_data": { "card": { "card_number": "5112010140000004", "card_exp_month": "01", "card_exp_year": "2050", "card_holder_name": "John Smith", "card_cvc": "349", "card_network": "Mastercard" }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "CA", "zip": "94122", "country": "US", "first_name": "John", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } } }, "browser_info": { "user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36", "accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8", "language": "nl-NL", "color_depth": 24, "screen_height": 723, "screen_width": 1536, "time_zone": 0, "java_enabled": true, "java_script_enabled": true, "ip_address": "125.0.0.1" }, "customer_acceptance": { "acceptance_type": "offline", "accepted_at": "1963-05-03T04:07:52.723Z", "online": { "ip_address": "125.0.0.1", "user_agent": "amet irure esse" } } }' ``` Response ``` { "payment_id": "pay_IiDeX5MuG0m02mICx15E", "merchant_id": "merchant_1754308486", "status": "processing", "amount": 100, "net_amount": 200, "shipping_cost": 100, "amount_capturable": 160, "amount_received": null, "connector": "worldpayvantiv", "client_secret": "pay_IiDeX5MuG0m02mICx15E_secret_oj8EqUoys7RdnvitcV1w", "created": "2025-08-06T14:14:15.059Z", "currency": "USD", "customer_id": "testsai2", "customer": { "id": "testsai2", "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": "manual", "payment_method": "card", "payment_method_data": { "card": { "last4": "0004", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "511201", "card_extended_bin": null, "card_exp_month": "01", "card_exp_year": "2050", "card_holder_name": "John Smith", "payment_checks": { "avs_result": "00", "advanced_a_v_s_result": null, "authentication_result": null, "card_validation_result": null }, "authentication_data": null }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "CA", "first_name": "John", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null } }, "payment_token": null, "shipping": null, "billing": null, "order_details": null, "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "return_url": "https://google.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": 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": "84085335970449288", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "pay_IiDeX5MuG0m02mICx15E_1", "payment_link": null, "profile_id": "pro_FW0rvO9wk1dBMZJoDRdb", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_pmcx4hlmJazlWDeZi4uo", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-08-06T14:29:15.059Z", "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_channel": null, "payment_method_id": null, "network_transaction_id": null, "payment_method_status": null, "updated": "2025-08-06T14:14:20.280Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null, "enable_partial_authorization": true } ``` c. force_sync the payment, and observe the intent status to be `partially_authorized_and_requires_capture` with partial amount set in amount_capturable CURL ``` curl --location '{{BASE_URL}}/payments/{{PAYMENT_ID}}?force_sync=true' \ --header 'Accept: application/json' \ --header 'api-key: {{API_KEY}}' ``` Response ``` { "payment_id": "pay_IiDeX5MuG0m02mICx15E", "merchant_id": "merchant_1754308486", "status": "partially_authorized_and_requires_capture", "amount": 100, "net_amount": 200, "shipping_cost": 100, "amount_capturable": 160, "amount_received": null, "connector": "worldpayvantiv", "client_secret": "pay_IiDeX5MuG0m02mICx15E_secret_oj8EqUoys7RdnvitcV1w", "created": "2025-08-06T14:14:15.059Z", "currency": "USD", "customer_id": "testsai2", "customer": { "id": "testsai2", "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": "manual", "payment_method": "card", "payment_method_data": { "card": { "last4": "0004", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "511201", "card_extended_bin": null, "card_exp_month": "01", "card_exp_year": "2050", "card_holder_name": "John Smith", "payment_checks": { "avs_result": "00", "advanced_a_v_s_result": null, "authentication_result": null, "card_validation_result": null }, "authentication_data": null }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "CA", "first_name": "John", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null } }, "payment_token": null, "shipping": null, "billing": null, "order_details": null, "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "return_url": "https://google.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": 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": "84085335970449288", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "pay_IiDeX5MuG0m02mICx15E_1", "payment_link": null, "profile_id": "pro_FW0rvO9wk1dBMZJoDRdb", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_pmcx4hlmJazlWDeZi4uo", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-08-06T14:29:15.059Z", "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_channel": null, "payment_method_id": "pm_Kdmb0Ife3AJSjAbVPNVl", "network_transaction_id": null, "payment_method_status": "inactive", "updated": "2025-08-06T14:14:47.492Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": 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": true } ``` d. Perform capture for amount > amount_capturable which results in error e. Perform capture for amount <= amount_capturable which results in successful capture and verify if amount_captured is populated as expected CURL ``` curl --location '{{BASE_URL}}/payments/{{PAYMENT_ID}}/capture' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: {{API_KEY}}' \ --data '{ "amount_to_capture": 160, "statement_descriptor_name": "Joseph", "statement_descriptor_suffix": "JS" }' ``` Response ``` { "payment_id": "pay_IiDeX5MuG0m02mICx15E", "merchant_id": "merchant_1754308486", "status": "processing", "amount": 100, "net_amount": 200, "shipping_cost": 100, "amount_capturable": 160, "amount_received": null, "connector": "worldpayvantiv", "client_secret": "pay_IiDeX5MuG0m02mICx15E_secret_oj8EqUoys7RdnvitcV1w", "created": "2025-08-06T14:14:15.059Z", "currency": "USD", "customer_id": "testsai2", "customer": { "id": "testsai2", "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": "manual", "payment_method": "card", "payment_method_data": { "card": { "last4": "0004", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "511201", "card_extended_bin": null, "card_exp_month": "01", "card_exp_year": "2050", "card_holder_name": "John Smith", "payment_checks": { "avs_result": "00", "advanced_a_v_s_result": null, "authentication_result": null, "card_validation_result": null }, "authentication_data": null }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "CA", "first_name": "John", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null } }, "payment_token": null, "shipping": null, "billing": null, "order_details": null, "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "return_url": "https://google.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": 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": "84085335970460087", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "pay_IiDeX5MuG0m02mICx15E_1", "payment_link": null, "profile_id": "pro_FW0rvO9wk1dBMZJoDRdb", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_pmcx4hlmJazlWDeZi4uo", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-08-06T14:29:15.059Z", "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_channel": null, "payment_method_id": "pm_Kdmb0Ife3AJSjAbVPNVl", "network_transaction_id": null, "payment_method_status": null, "updated": "2025-08-06T14:15:16.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": "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": true } ``` f. Perform refund for amount <= amount_captured </details> 3. Create a partial auth payment (with capture_method = automatic) with `worldpayvantiv` connector, perform subsequent refund with partially approved amount (verify amount_captured if populated correctly) 4. Perform sanity CIT and MIT payment by sending `enable_partial_authorization` as true 5. Perform sanity Partial Captures ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/payments.rs` **2. Database Layer (Queries & Schema)** - `crates/diesel_models/src/payment_attempt.rs` - `crates/diesel_models/src/payment_intent.rs` - `crates/diesel_models/src/schema.rs` - ... and 1 more files **3. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/payments.rs` - `crates/hyperswitch_domain_models/src/payments/payment_attempt.rs` - `crates/hyperswitch_domain_models/src/payments/payment_intent.rs` - ... and 2 more files **4. Core Business Logic** - `crates/router/src/core/authentication/transformers.rs` - `crates/router/src/core/fraud_check/flows/checkout_flow.rs` - `crates/router/src/core/fraud_check/flows/fulfillment_flow.rs` - ... and 27 more files **5. 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 **6. Type Definitions** - `crates/router/src/compatibility/stripe/payment_intents/types.rs` - `crates/router/src/compatibility/stripe/setup_intents/types.rs` - `crates/router/src/types.rs` - ... and 1 more files **7. Utils** - `crates/router/src/utils/user/sample_data.rs` **8. Tests** - `crates/router/tests/payments.rs` - `crates/router/tests/payments2.rs` **9. Other** - `api-reference/v1/openapi_spec_v1.json` - `api-reference/v2/openapi_spec_v2.json` - `crates/common_enums/src/enums.rs` - ... and 8 more files **Code Patterns Applied:** - Implement new functions (10 changes) - Extend existing types with new fields (151 changes) - Add conditional logic for feature flags or filtering (5 changes) - Modify database queries (1 changes) **Detailed Identifier Changes:** Commit c354e62f: Files to modify: **crates/api_models/src/payments.rs** Modify existing code **crates/common_enums/src/enums.rs** Modify existing code **crates/common_enums/src/transformers.rs** Modify existing code **crates/diesel_models/src/payment_attempt.rs** Modify existing code **crates/diesel_models/src/payment_intent.rs** Modify existing code **crates/diesel_models/src/schema.rs** Modify existing code **crates/diesel_models/src/schema_v2.rs** Modify existing code **crates/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/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/utils.rs** Modify existing code **crates/hyperswitch_domain_models/src/payments.rs** Modify existing code **crates/hyperswitch_domain_models/src/payments/payment_attempt.rs** Modify existing code **crates/hyperswitch_domain_models/src/payments/payment_intent.rs** Modify existing code **crates/hyperswitch_domain_models/src/router_data.rs** Modify existing code **crates/hyperswitch_domain_models/src/router_request_types.rs** Modify existing code **crates/hyperswitch_interfaces/src/conversion_impls.rs** Modify existing code **crates/router/src/compatibility/stripe/payment_intents/types.rs** Modify existing code **crates/router/src/compatibility/stripe/setup_intents/types.rs** Modify existing code **crates/router/src/compatibility/stripe/webhooks.rs** Modify existing code **crates/router/src/connector/utils.rs** Modify existing code **crates/router/src/core/authentication/transformers.rs** Modify existing code **crates/router/src/core/fraud_check/flows/checkout_flow.rs** Modify existing code **crates/router/src/core/fraud_check/flows/fulfillment_flow.rs** Modify existing code **crates/router/src/core/fraud_check/flows/record_return.rs** Modify existing code **crates/router/src/core/fraud_check/flows/sale_flow.rs** Modify existing code **crates/router/src/core/fraud_check/flows/transaction_flow.rs** Modify existing code **crates/router/src/core/mandate/utils.rs** Modify existing code **crates/router/src/core/payment_methods.rs** Modify existing code **crates/router/src/core/payments.rs** Modify existing code **crates/router/src/core/payments/helpers.rs** Modify existing code **crates/router/src/core/payments/operations/payment_attempt_record.rs** Modify existing code **crates/router/src/core/payments/operations/payment_capture_v2.rs** Modify existing code **crates/router/src/core/payments/operations/payment_confirm.rs** Modify existing code **crates/router/src/core/payments/operations/payment_confirm_intent.rs** Modify existing code **crates/router/src/core/payments/operations/payment_create.rs** Modify existing code **crates/router/src/core/payments/operations/payment_get.rs** Modify existing code **crates/router/src/core/payments/operations/payment_response.rs** Modify existing code **crates/router/src/core/payments/operations/payment_session_intent.rs** Modify existing code **crates/router/src/core/payments/operations/payment_update.rs** Modify existing code **crates/router/src/core/payments/operations/payment_update_intent.rs** Modify existing code **crates/router/src/core/payments/operations/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** Modify existing code **crates/router/src/core/relay/utils.rs** Modify existing code **crates/router/src/core/revenue_recovery/transformers.rs** Modify existing code **crates/router/src/core/routing/helpers.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/events.rs** Modify existing code **crates/router/src/types.rs** Modify existing code **crates/router/src/types/api/verify_connector.rs** Modify existing code **crates/router/src/types/transformers.rs** Modify existing code **crates/router/src/utils/user/sample_data.rs** Modify existing code **crates/router/tests/connectors/aci.rs** Modify existing code **crates/router/tests/connectors/utils.rs** Modify existing code **crates/router/tests/payments.rs** Modify existing code **crates/router/tests/payments2.rs** Modify existing code
{"pr_number": 8833, "pr_title": "feat(router): add support for partial authorization", "merged_at": "2025-08-06T14:28:24Z", "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", "crates/diesel_models/src/payment_intent.rs", "crates/diesel_models/src/schema.rs", "crates/diesel_models/src/schema_v2.rs"], "domain": ["crates/hyperswitch_domain_models/src/payments.rs", "crates/hyperswitch_domain_models/src/payments/payment_attempt.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/fraud_check/flows/checkout_flow.rs", "crates/router/src/core/fraud_check/flows/fulfillment_flow.rs", "crates/router/src/core/fraud_check/flows/record_return.rs", "crates/router/src/core/fraud_check/flows/sale_flow.rs", "crates/router/src/core/fraud_check/flows/transaction_flow.rs", "crates/router/src/core/mandate/utils.rs", "crates/router/src/core/payment_methods.rs", "crates/router/src/core/payments.rs", "crates/router/src/core/payments/helpers.rs", "crates/router/src/core/payments/operations/payment_attempt_record.rs", "crates/router/src/core/payments/operations/payment_capture_v2.rs", "crates/router/src/core/payments/operations/payment_confirm.rs", "crates/router/src/core/payments/operations/payment_confirm_intent.rs", "crates/router/src/core/payments/operations/payment_create.rs", "crates/router/src/core/payments/operations/payment_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.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/relay/utils.rs", "crates/router/src/core/revenue_recovery/transformers.rs", "crates/router/src/core/routing/helpers.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/paypal/transformers.rs", "crates/hyperswitch_connectors/src/connectors/recurly/transformers.rs", "crates/hyperswitch_connectors/src/connectors/worldpayvantiv/transformers.rs", "crates/hyperswitch_connectors/src/utils.rs", "crates/router/src/connector/utils.rs", "crates/router/src/types/api/verify_connector.rs", "crates/router/tests/connectors/aci.rs", "crates/router/tests/connectors/utils.rs"], "types": ["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/transformers.rs"], "utils": ["crates/router/src/utils/user/sample_data.rs"], "tests": ["crates/router/tests/payments.rs", "crates/router/tests/payments2.rs"], "other": ["api-reference/v1/openapi_spec_v1.json", "api-reference/v2/openapi_spec_v2.json", "crates/common_enums/src/enums.rs", "crates/common_enums/src/transformers.rs", "crates/hyperswitch_interfaces/src/conversion_impls.rs", "crates/router/src/compatibility/stripe/webhooks.rs", "crates/router/src/db/events.rs", "migrations/2025-08-02-080018_add_partial_authorization_to_payment_intent/down.sql", "migrations/2025-08-02-080018_add_partial_authorization_to_payment_intent/up.sql", "migrations/2025-08-02-084127_add_partial_auth_enum_variants/down.sql", "migrations/2025-08-02-084127_add_partial_auth_enum_variants/up.sql"]}, "change_types": {"functions_added": 10, "fields_added": 151, "conditionals_added": 5, "database_queries": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor(constraint_graph): revert handle for cases where setup_future_usage is null in payments is null in payments ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This will make the `mandate_payments` acceptable even when `setup_future_usage` is null in payments. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Core Business Logic** - `crates/router/src/core/payment_methods/cards.rs` - `crates/router/src/core/payment_methods/utils.rs` **Detailed Identifier Changes:** Commit 62f99435: Files to modify: **crates/router/src/core/payment_methods/cards.rs** Modify existing code **crates/router/src/core/payment_methods/utils.rs** Modify existing code
{"pr_number": 6812, "pr_title": "refactor(constraint_graph): revert handle for cases where setup_future_usage is null in payments is null in payments", "merged_at": "2024-12-11T17:08:34Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment"]}, "hierarchy": {"core_business": ["crates/router/src/core/payment_methods/cards.rs", "crates/router/src/core/payment_methods/utils.rs"]}, "change_types": {}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(router): Add Confirm-Intent API contract changes for split payments (v2) ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> - Added `split_payment_method_data` field to `confirm-intent` call to accept a `Vec` of payment methods <img width="502" height="763" alt="image" src="https://github.com/user-attachments/assets/69ae3cc4-3d06-4980-b2d9-52b489aa98ad" /> ### Additional Changes - [x] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> Closes #9467 ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Note: Currently the `split_payment_method_data` field is not used. This PR just adds it to the API contract. There are no behaviour changes. The field will be used in a future PR. Request: ``` curl --location 'http://localhost:8080/v2/payments/12345_pay_019975b06d2d77b0beff1a83df9a3377/confirm-intent' \ --header 'x-profile-id: pro_JSAAWLeyardnZ5iQDB4o' \ --header 'x-client-secret: cs_019975b06d407b738bb37971ce338246' \ --header 'Authorization: publishable-key=pk_dev_e098d9545be8466a9e52bfd7db41ec77,client-secret=cs_019975b06d407b738bb37971ce338246' \ --header 'Content-Type: application/json' \ --header 'api-key: pk_dev_e098d9545be8466a9e52bfd7db41ec77' \ --data '{ "payment_method_data": { "card": { "card_cvc": "737", "card_exp_month": "03", "card_exp_year": "30", "card_number": "4000620000000007", "card_holder_name": "joseph Doe" } }, "payment_method_type": "card", "payment_method_subtype": "card", "split_payment_method_data": [ { "payment_method_data": { "gift_card": { "givex": { "number": "6036280000000000000", "cvc": "123" } } }, "payment_method_type": "gift_card", "payment_method_subtype": "givex" } ], "browser_info": { "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36", "accept_header": "text\\/html,application\\/xhtml+xml,application\\/xml;q=0.9,image\\/webp,image\\/apng,*\\/*;q=0.8", "language": "en-GB", "color_depth": 24, "screen_height": 1440, "screen_width": 2560, "time_zone": -330, "java_enabled": true, "java_script_enabled": true, "ip_address": "0.0.0.0" } }' ``` Response: ``` { "id": "12345_pay_019975b06d2d77b0beff1a83df9a3377", "status": "succeeded", "amount": { "order_amount": 1000, "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": 1000, "amount_to_capture": null, "amount_capturable": 0, "amount_captured": 1000 }, "customer_id": "12345_cus_019975b064727f82a64abdb387d8fd72", "connector": "adyen", "created": "2025-09-23T08:28:40.634Z", "modified_at": "2025-09-23T08:29:32.736Z", "payment_method_data": { "billing": null }, "payment_method_type": "card", "payment_method_subtype": "card", "connector_transaction_id": "GRFLWGK5NVTV7VV5", "connector_reference_id": "12345_att_019975b12e2176c2bfa32a42a67b8891", "merchant_connector_id": "mca_yON0ejlCVv7kJuPN8wRs", "browser_info": null, "error": null, "shipping": null, "billing": null, "attempts": null, "connector_token_details": null, "payment_method_id": null, "next_action": null, "return_url": "https://google.com/success", "authentication_type": "three_ds", "authentication_type_applied": "three_ds", "is_iframe_redirection_enabled": null, "merchant_reference_id": null, "raw_connector_response": null, "feature_metadata": null, "metadata": 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/v2/openapi_spec_v2.json` - `crates/openapi/src/openapi_v2.rs` **Code Patterns Applied:** - Define new data structures (1 changes) - Extend existing types with new fields (5 changes) **Detailed Identifier Changes:** Commit 46090ea0: Files to modify: **crates/api_models/src/payments.rs** Add: - struct: pub::SplitPaymentMethodDataRequest **crates/openapi/src/openapi_v2.rs** Modify existing code
{"pr_number": 9469, "pr_title": "feat(router): Add Confirm-Intent API contract changes for split payments (v2)", "merged_at": "2025-09-25T17:56:40Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/payments.rs"], "other": ["api-reference/v2/openapi_spec_v2.json", "crates/openapi/src/openapi_v2.rs"]}, "change_types": {"structs_added": 1, "fields_added": 5}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
chore(analytics): opensearch client creation based on config ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Reference https://github.com/juspay/hyperswitch/pull/7810 ### 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). --> When you don't have OpenSearch deployed for Global Search feature on dashboard , the /health/ready ( deep health check ) API which checks health of all the underlying queryable resources fails because OpenSearch is not present. To make it optional based on the deployment type needs changes and should be dependent on a config which should be given out on time of router deployment Currently if you don't have OpenSearch Deployment and have router running ```bash curl http://localhost:8080/health/ready -v * Host localhost:8080 was resolved. * IPv6: ::1 * IPv4: 127.0.0.1 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying [::1]:8080... * Connected to localhost (::1) port 8080 > GET /health/ready HTTP/1.1 > Host: localhost:8080 > User-Agent: curl/8.7.1 > Accept: */* > * Request completely sent off < HTTP/1.1 500 Internal Server Error < content-length: 136 < access-control-expose-headers: x-request-id, content-type, via, strict-transport-security < via: HyperSwitch < x-request-id: 019634f7-a837-7d50-9a50-bb8e7651bd62 < content-type: application/json < vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers < strict-transport-security: max-age=31536000 < date: Mon, 14 Apr 2025 15:42:47 GMT < { [136 bytes data] 100 136 100 136 0 0 7613 0 --:--:-- --:--:-- --:--:-- 8000 { "error": { "type": "api", "message": "Opensearch health check failed with error: Error while executing query in Opensearch", "code": "HE_00" } } ``` ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ```bash curl http://localhost:8080/health/ready -v | jq . * Host localhost:8080 was resolved. * IPv6: ::1 * IPv4: 127.0.0.1 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying [::1]:8080... * Connected to localhost (::1) port 8080 > GET /health/ready HTTP/1.1 > Host: localhost:8080 > User-Agent: curl/8.7.1 > Accept: */* > * Request completely sent off < HTTP/1.1 200 OK < content-length: 90 < content-type: application/json < x-request-id: 01963e0a-e41d-7251-b20a-e9a0a6d1a67a < vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers < access-control-expose-headers: content-type, strict-transport-security, x-request-id, via < strict-transport-security: max-age=31536000 < via: HyperSwitch < date: Wed, 16 Apr 2025 10:00:23 GMT < { [90 bytes data] 100 90 100 90 0 0 236 0 --:--:-- --:--:-- --:--:-- 236 { "database": true, "redis": true, "analytics": true, "opensearch": false, "outgoing_request": true } ``` ## 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/health_check.rs` **2. Configuration Files** - `config/config.example.toml` - `config/deployments/env_specific.toml` - `config/development.toml` - ... and 1 more files **3. Other** - `crates/analytics/src/opensearch.rs` - `crates/router/src/analytics.rs` - `crates/router/src/routes/app.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 (3 changes) **Detailed Identifier Changes:** Commit a387bd47: Files to modify: **crates/analytics/src/opensearch.rs** Modify existing code **crates/router/src/analytics.rs** Modify existing code **crates/router/src/core/health_check.rs** Modify existing code **crates/router/src/routes/app.rs** Modify existing code
{"pr_number": 7881, "pr_title": "chore(analytics): opensearch client creation based on config", "merged_at": "2025-04-23T14:25:19Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user"]}, "hierarchy": {"core_business": ["crates/router/src/core/health_check.rs"], "config": ["config/config.example.toml", "config/deployments/env_specific.toml", "config/development.toml", "config/docker_compose.toml"], "other": ["crates/analytics/src/opensearch.rs", "crates/router/src/analytics.rs", "crates/router/src/routes/app.rs"]}, "change_types": {"functions_added": 1, "fields_added": 5, "conditionals_added": 3}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): add 3DS flow for Worldpay ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Described in #6177 ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context Integrates Worldpay's 3DS flow ## How did you test it? Things to test 1. 3DS payments using automatic capture 2. No 3DS payment using manual capture (full amount captures) 3. Payments Sync <details> <summary>1. Create and capture</summary> cURL curl --location --request POST 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_sMl3D9efytjSoXznSOKCv5PHyql50M1BMhU8e7qsa5m6mXxHvyROVg7cER7AWue9' \ --data-raw '{"authentication_type":"three_ds","capture_method":"automatic","customer_id":"cus_sH6s3hf1uukqvYlAGkj5","profile_id":"pro_OodaMoJ1Y9nlnegU4soR","amount":100,"currency":"USD","confirm":true,"connector":["worldpay"],"billing":{"address":{"line1":"1467","line2":"Harrison Street","line3":"Harrison Street","city":"San Fransico","state":"CA","zip":"94122","country":"US","first_name":"John","last_name":"Doe"},"phone":{"number":"8056594427","country_code":"+91"}},"email":"john.doe@example.com","session_expiry":10000,"return_url":"https://example.com","off_session":true,"payment_method":"card","payment_method_type":"credit","payment_method_data":{"card":{"card_number":"4000000000001091","card_exp_month":"12","card_exp_year":"2030","card_holder_name":"John Doe","card_cvc":"123"}},"browser_info":{"user_agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36","accept_header":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8","language":"en-US","color_depth":24,"screen_height":723,"screen_width":1536,"time_zone":0,"java_enabled":true,"java_script_enabled":true,"ip_address":"127.0.0.1"},"statement_descriptor_name":"John","statement_descriptor_suffix":"JD","metadata":{"udf1":"value1","new_customer":"true","login_date":"2019-09-10T10:11:12Z"}}' Response {"payment_id":"pay_OjJGWEhFHNpycXbZmDNS","merchant_id":"merchant_1728979001","status":"requires_customer_action","amount":100,"net_amount":100,"shipping_cost":null,"amount_capturable":100,"amount_received":null,"connector":"worldpay","client_secret":"pay_OjJGWEhFHNpycXbZmDNS_secret_vMQEnVxtwo0xKYXtDTqh","created":"2024-10-21T10:59:11.767Z","currency":"USD","customer_id":"cus_sH6s3hf1uukqvYlAGkj5","customer":{"id":"cus_sH6s3hf1uukqvYlAGkj5","name":"John Doe","email":"john.doe@example.com","phone":"999999999","phone_country_code":"+65"},"description":null,"refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":null,"off_session":true,"capture_on":null,"capture_method":"automatic","payment_method":"card","payment_method_data":{"card":{"last4":"1091","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"400000","card_extended_bin":null,"card_exp_month":"12","card_exp_year":"2030","card_holder_name":null,"payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":null,"billing":{"address":{"city":"San Fransico","country":"US","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"CA","first_name":"John","last_name":"Doe"},"phone":{"number":"8056594427","country_code":"+91"},"email":null},"order_details":null,"email":"john.doe@example.com","name":"John Doe","phone":"999999999","return_url":"https://example.com/","authentication_type":"three_ds","statement_descriptor_name":"John","statement_descriptor_suffix":"JD","next_action":{"type":"redirect_to_url","redirect_to_url":"http://localhost:8080/payments/redirect/pay_OjJGWEhFHNpycXbZmDNS/merchant_1728979001/pay_OjJGWEhFHNpycXbZmDNS_1"},"cancellation_reason":null,"error_code":null,"error_message":null,"unified_code":null,"unified_message":null,"payment_experience":null,"payment_method_type":"credit","connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":{"customer_id":"cus_sH6s3hf1uukqvYlAGkj5","created_at":1729508351,"expires":1729511951,"secret":"epk_dfac7bbac2014a18ae323ba08bfe7e9b"},"manual_retry_allowed":null,"connector_transaction_id":"eyJrIjoxLCJkIjoibVJjNnpNRE45cys3RmIxWjRRbWF2SWd4akc2VC9KdHZiVlgrTTRvTURQdzJJRGpBeDR3ekZaWWVqNDJzOTJkWiJ9","frm_message":null,"metadata":{"udf1":"value1","login_date":"2019-09-10T10:11:12Z","new_customer":"true"},"connector_metadata":null,"feature_metadata":null,"reference_id":"3fbccf2f-0ab5-494c-9909-1c8d2be40049","payment_link":null,"profile_id":"pro_OodaMoJ1Y9nlnegU4soR","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_omabWO9B7CSmaCMuT6eh","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2024-10-21T13:45:51.767Z","fingerprint":null,"browser_info":{"language":"en-US","time_zone":0,"ip_address":"127.0.0.1","user_agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36","color_depth":24,"java_enabled":true,"screen_width":1536,"accept_header":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8","screen_height":723,"java_script_enabled":true},"payment_method_id":null,"payment_method_status":null,"updated":"2024-10-21T10:59:12.308Z","charges":null,"frm_metadata":null,"merchant_order_reference_id":null,"order_tax_amount":null,"connector_mandate_id":null} Open the link and continue https://github.com/user-attachments/assets/52239cd6-fa40-45e3-88a9-231115ab8b20 </details> <details> <summary>2. Create a payment using manual capture</summary> cURL curl --location --request POST 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_sMl3D9efytjSoXznSOKCv5PHyql50M1BMhU8e7qsa5m6mXxHvyROVg7cER7AWue9' \ --data-raw '{"authentication_type":"three_ds","capture_method":"manual","customer_id":"cus_sH6s3hf1uukqvYlAGkj5","profile_id":"pro_OodaMoJ1Y9nlnegU4soR","amount":100,"currency":"USD","confirm":true,"connector":["worldpay"],"billing":{"address":{"line1":"1467","line2":"Harrison Street","line3":"Harrison Street","city":"San Fransico","state":"CA","zip":"94122","country":"US","first_name":"John","last_name":"Doe"},"phone":{"number":"8056594427","country_code":"+91"}},"email":"john.doe@example.com","session_expiry":10000,"return_url":"https://example.com","off_session":true,"payment_method":"card","payment_method_type":"credit","payment_method_data":{"card":{"card_number":"4000000000001091","card_exp_month":"12","card_exp_year":"2030","card_holder_name":"John Doe","card_cvc":"123"}},"browser_info":{"user_agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36","accept_header":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8","language":"en-US","color_depth":24,"screen_height":723,"screen_width":1536,"time_zone":0,"java_enabled":true,"java_script_enabled":true,"ip_address":"127.0.0.1"},"statement_descriptor_name":"John","statement_descriptor_suffix":"JD","metadata":{"udf1":"value1","new_customer":"true","login_date":"2019-09-10T10:11:12Z"}}' Response {"payment_id":"pay_ff5lUcN6X1lg5f2PBtyv","merchant_id":"merchant_1728979001","status":"requires_customer_action","amount":100,"net_amount":100,"shipping_cost":null,"amount_capturable":100,"amount_received":null,"connector":"worldpay","client_secret":"pay_ff5lUcN6X1lg5f2PBtyv_secret_6iktmiNQwi8DAsIRNn4i","created":"2024-10-21T11:03:31.227Z","currency":"USD","customer_id":"cus_sH6s3hf1uukqvYlAGkj5","customer":{"id":"cus_sH6s3hf1uukqvYlAGkj5","name":"John Doe","email":"john.doe@example.com","phone":"999999999","phone_country_code":"+65"},"description":null,"refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":null,"off_session":true,"capture_on":null,"capture_method":"manual","payment_method":"card","payment_method_data":{"card":{"last4":"1096","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"520000","card_extended_bin":null,"card_exp_month":"12","card_exp_year":"2030","card_holder_name":null,"payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":null,"billing":{"address":{"city":"San Fransico","country":"US","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"CA","first_name":"John","last_name":"Doe"},"phone":{"number":"8056594427","country_code":"+91"},"email":null},"order_details":null,"email":"john.doe@example.com","name":"John Doe","phone":"999999999","return_url":"https://example.com/","authentication_type":"three_ds","statement_descriptor_name":"John","statement_descriptor_suffix":"JD","next_action":{"type":"redirect_to_url","redirect_to_url":"http://localhost:8080/payments/redirect/pay_ff5lUcN6X1lg5f2PBtyv/merchant_1728979001/pay_ff5lUcN6X1lg5f2PBtyv_1"},"cancellation_reason":null,"error_code":null,"error_message":null,"unified_code":null,"unified_message":null,"payment_experience":null,"payment_method_type":"credit","connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":{"customer_id":"cus_sH6s3hf1uukqvYlAGkj5","created_at":1729508611,"expires":1729512211,"secret":"epk_739c58c7f7384fac89c7099e1cdae436"},"manual_retry_allowed":null,"connector_transaction_id":"eyJrIjoxLCJkIjoiQTRKMWZFZXlONnFqdGhHTWlmWDdYY2RzUVlIUzI2dEdLcEFPak9GRzNaczJJRGpBeDR3ekZaWWVqNDJzOTJkWiJ9","frm_message":null,"metadata":{"udf1":"value1","login_date":"2019-09-10T10:11:12Z","new_customer":"true"},"connector_metadata":null,"feature_metadata":null,"reference_id":"5b1cdf1c-26ea-42b1-b6e0-a02453ebf21f","payment_link":null,"profile_id":"pro_OodaMoJ1Y9nlnegU4soR","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_omabWO9B7CSmaCMuT6eh","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2024-10-21T13:50:11.227Z","fingerprint":null,"browser_info":{"language":"en-US","time_zone":0,"ip_address":"127.0.0.1","user_agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36","color_depth":24,"java_enabled":true,"screen_width":1536,"accept_header":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8","screen_height":723,"java_script_enabled":true},"payment_method_id":null,"payment_method_status":null,"updated":"2024-10-21T11:03:31.677Z","charges":null,"frm_metadata":null,"merchant_order_reference_id":null,"order_tax_amount":null,"connector_mandate_id":null} cURL (capture) curl --location --request POST 'http://localhost:8080/payments/pay_ff5lUcN6X1lg5f2PBtyv/capture' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_sMl3D9efytjSoXznSOKCv5PHyql50M1BMhU8e7qsa5m6mXxHvyROVg7cER7AWue9' \ --data '{}' Response {"payment_id":"pay_ff5lUcN6X1lg5f2PBtyv","merchant_id":"merchant_1728979001","status":"processing","amount":100,"net_amount":100,"shipping_cost":null,"amount_capturable":100,"amount_received":null,"connector":"worldpay","client_secret":"pay_ff5lUcN6X1lg5f2PBtyv_secret_6iktmiNQwi8DAsIRNn4i","created":"2024-10-21T11:03:31.227Z","currency":"USD","customer_id":"cus_sH6s3hf1uukqvYlAGkj5","customer":{"id":"cus_sH6s3hf1uukqvYlAGkj5","name":"John Doe","email":"john.doe@example.com","phone":"999999999","phone_country_code":"+65"},"description":null,"refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":null,"off_session":true,"capture_on":null,"capture_method":"manual","payment_method":"card","payment_method_data":{"card":{"last4":"1096","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"520000","card_extended_bin":null,"card_exp_month":"12","card_exp_year":"2030","card_holder_name":null,"payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":null,"billing":{"address":{"city":"San Fransico","country":"US","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"CA","first_name":"John","last_name":"Doe"},"phone":{"number":"8056594427","country_code":"+91"},"email":null},"order_details":null,"email":"john.doe@example.com","name":"John Doe","phone":"999999999","return_url":"https://example.com/","authentication_type":"three_ds","statement_descriptor_name":"John","statement_descriptor_suffix":"JD","next_action":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":"eyJrIjoiazNhYjYzMiIsImxpbmtWZXJzaW9uIjoiNS4wLjAifQ==.sN:g8wd64bwkbrp0md+bPxcanBnk2zLdsIqSa1pR99GGg8fCNQpPLoWNslSzWNPFBM5Tpa8tW7EFI5onKINsgChMHeJVoeH2lrBWCRyjZYT6h+lbqfJa+1BSoKFSY8HLZqKn+Z0amZtgDGJNxxTouoBznrTCkCd2i5TQsznCawECpZY8cZeCeMgt1ol:GABqQG6u+T:u3sfHv3ezSOJxioRTixsThPEhzFW4ZZ6mObj3CK0rnFndcM0swvZMqgQwSEj5tBsydfzM4XKX20O6Nme96ha9twqxTSQIfr1rtl9V3q7fw3w5O9UZT4vQi9BMyCcaHkWSD:RbCWCcmiQqa:C6PZmXicLsKiJilUv0dIUwRuaBJaSeFhCq3fDWQC7:n7drI2adm1BXX7w39afnJw==","frm_message":null,"metadata":{"udf1":"value1","login_date":"2019-09-10T10:11:12Z","new_customer":"true"},"connector_metadata":null,"feature_metadata":null,"reference_id":"f7cb203a-aa4d-4fbc-84e7-9f6c1a9273a5","payment_link":null,"profile_id":"pro_OodaMoJ1Y9nlnegU4soR","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_omabWO9B7CSmaCMuT6eh","incremental_authorization_allowed":false,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2024-10-21T13:50:11.227Z","fingerprint":null,"browser_info":{"language":"en-US","time_zone":0,"ip_address":"127.0.0.1","user_agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36","color_depth":24,"java_enabled":true,"screen_width":1536,"accept_header":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8","screen_height":723,"java_script_enabled":true},"payment_method_id":null,"payment_method_status":null,"updated":"2024-10-21T11:04:47.760Z","charges":null,"frm_metadata":null,"merchant_order_reference_id":null,"order_tax_amount":null,"connector_mandate_id":null} </details> <details> <summary>3. Payments Sync</summary> cURL curl --location --request GET 'http://localhost:8080/payments/pay_ff5lUcN6X1lg5f2PBtyv?force_sync=true' \ --header 'Accept: application/json' \ --header 'api-key: dev_sMl3D9efytjSoXznSOKCv5PHyql50M1BMhU8e7qsa5m6mXxHvyROVg7cER7AWue9' Response {"payment_id":"pay_ff5lUcN6X1lg5f2PBtyv","merchant_id":"merchant_1728979001","status":"processing","amount":100,"net_amount":100,"shipping_cost":null,"amount_capturable":100,"amount_received":null,"connector":"worldpay","client_secret":"pay_ff5lUcN6X1lg5f2PBtyv_secret_6iktmiNQwi8DAsIRNn4i","created":"2024-10-21T11:03:31.227Z","currency":"USD","customer_id":"cus_sH6s3hf1uukqvYlAGkj5","customer":{"id":"cus_sH6s3hf1uukqvYlAGkj5","name":"John Doe","email":"john.doe@example.com","phone":"999999999","phone_country_code":"+65"},"description":null,"refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":null,"off_session":true,"capture_on":null,"capture_method":"manual","payment_method":"card","payment_method_data":{"card":{"last4":"1096","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"520000","card_extended_bin":null,"card_exp_month":"12","card_exp_year":"2030","card_holder_name":null,"payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":null,"billing":{"address":{"city":"San Fransico","country":"US","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"CA","first_name":"John","last_name":"Doe"},"phone":{"number":"8056594427","country_code":"+91"},"email":null},"order_details":null,"email":"john.doe@example.com","name":"John Doe","phone":"999999999","return_url":"https://example.com/","authentication_type":"three_ds","statement_descriptor_name":"John","statement_descriptor_suffix":"JD","next_action":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":"eyJrIjoiazNhYjYzMiIsImxpbmtWZXJzaW9uIjoiNS4wLjAifQ==.sN:g8wd64bwkbrp0md+bPxcanBnk2zLdsIqSa1pR99GGg8fCNQpPLoWNslSzWNPFBM5Tpa8tW7EFI5onKINsgChMHeJVoeH2lrBWCRyjZYT6h+lbqfJa+1BSoKFSY8HLZqKn+Z0amZtgDGJNxxTouoBznrTCkCd2i5TQsznCawECpZY8cZeCeMgt1ol:GABqQG6u+T:u3sfHv3ezSOJxioRTixsThPEhzFW4ZZ6mObj3CK0rnFndcM0swvZMqgQwSEj5tBsydfzM4XKX20O6Nme96ha9twqxTSQIfr1rtl9V3q7fw3w5O9UZT4vQi9BMyCcaHkWSD:RbCWCcmiQqa:C6PZmXicLsKiJilUv0dIUwRuaBJaSeFhCq3fDWQC7:n7drI2adm1BXX7w39afnJw==","frm_message":null,"metadata":{"udf1":"value1","login_date":"2019-09-10T10:11:12Z","new_customer":"true"},"connector_metadata":null,"feature_metadata":null,"reference_id":"eaf9a1d5-031a-4b3b-b70b-ed9b7ec05406","payment_link":null,"profile_id":"pro_OodaMoJ1Y9nlnegU4soR","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_omabWO9B7CSmaCMuT6eh","incremental_authorization_allowed":false,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2024-10-21T13:50:11.227Z","fingerprint":null,"browser_info":{"language":"en-US","time_zone":0,"ip_address":"127.0.0.1","user_agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36","color_depth":24,"java_enabled":true,"screen_width":1536,"accept_header":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8","screen_height":723,"java_script_enabled":true},"payment_method_id":null,"payment_method_status":null,"updated":"2024-10-21T11:06:18.222Z","charges":null,"frm_metadata":null,"merchant_order_reference_id":null,"order_tax_amount":null,"connector_mandate_id":null} </details> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Database Layer (Queries & Schema)** - `crates/diesel_models/src/query/payment_attempt.rs` **2. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/router_response_types.rs` **3. Core Business Logic** - `crates/router/src/core/payments/flows.rs` **4. External Connector Integration** - `crates/router/src/connector/worldpay.rs` - `crates/router/src/connector/worldpay/requests.rs` - `crates/router/src/connector/worldpay/response.rs` - ... and 1 more files **5. Other** - `crates/router/src/services/api.rs` **Code Patterns Applied:** - Define new data structures (8 changes) - Implement new functions (10 changes) - Extend existing types with new fields (108 changes) - Add conditional logic for feature flags or filtering (4 changes) - Modify database queries (3 changes) **Detailed Identifier Changes:** Commit b93c8496: Files to modify: **crates/diesel_models/src/query/payment_attempt.rs** Modify existing code **crates/hyperswitch_domain_models/src/router_response_types.rs** Modify existing code **crates/router/src/connector/worldpay.rs** Add: - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::get_request_body - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_flow_type - impl: impl api::PaymentsCompleteAuthorize for Worldpay - impl: impl ConnectorIntegration< api::CompleteAuthorize, types::CompleteAuthorizeData, types::PaymentsResponseData, > for Worldpay - impl: impl services::ConnectorRedirectResponse for Worldpay **crates/router/src/connector/worldpay/requests.rs** Add: - struct: pub::ThreeDSRequest - struct: pub::ThreeDSRequestDeviceData - struct: pub::ThreeDSRequestChallenge - struct: pub::WorldpayCompleteAuthorizationRequest - enum: pub::ThreeDSRequestChannel **crates/router/src/connector/worldpay/response.rs** Remove: - function: pub::new - impl: impl PaymentsResPaymentInstrument Add: - function: private::fmt - struct: pub::ThreeDsChallengedResponse - struct: pub::AuthenticationResponse - struct: pub::ThreeDsChallenge - struct: pub::CompleteThreeDsActionLink **crates/router/src/connector/worldpay/transformers.rs** Modify existing code **crates/router/src/core/payments/flows.rs** Modify existing code **crates/router/src/services/api.rs** Modify existing code
{"pr_number": 6374, "pr_title": "feat(connector): add 3DS flow for Worldpay", "merged_at": "2024-10-21T14:14:20Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"database": ["crates/diesel_models/src/query/payment_attempt.rs"], "domain": ["crates/hyperswitch_domain_models/src/router_response_types.rs"], "core_business": ["crates/router/src/core/payments/flows.rs"], "connectors": ["crates/router/src/connector/worldpay.rs", "crates/router/src/connector/worldpay/requests.rs", "crates/router/src/connector/worldpay/response.rs", "crates/router/src/connector/worldpay/transformers.rs"], "other": ["crates/router/src/services/api.rs"]}, "change_types": {"structs_added": 8, "functions_added": 10, "enums_added": 1, "fields_added": 108, "imports_added": 4, "conditionals_added": 4, "database_queries": 3}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(payment-link): add config for enabling form button only when form is complete ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description This PR adds a payment link config for controlling the behavior or Submit button on payment links (`enable_button_only_on_form_ready`) - If `enable_button_only_on_form_ready` is true - disallow incomplete form submission - [DEFAULT and CURRENT] If false - allow incomplete form submission and throw validation errors ### 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 This helps add more granular control of the payment links UX. ## How did you test it? Locally using local SDK changes <details> <summary>1. Update business profile to enable confirm button only when form is ready for submission</summary> cURL curl --location --request POST 'http://localhost:8080/account/merchant_1741692513/business_profile/pro_0pSrloAVzi0xbnpnP0mY' \ --header 'Content-Type: application/json' \ --header 'api-key: test_admin' \ --data '{"is_connector_agnostic_mit_enabled":true,"is_network_tokenization_enabled":true,"payment_link_config":{"allowed_domains":["*"],"custom_message_for_card_terms":"Hello","enabled_saved_payment_method":true,"theme":"#1A1A1A","logo":"https://hyperswitch.io/favicon.ico","payment_button_text":"Proceed to Payment!","sdk_ui_rules":{".Label":{"fontWeight":"700 !important","fontSize":"13px !important","color":"#003264 !important","backgroundColor":"red !important","opacity":"1 !important"}},"branding_visibility":false,"business_specific_configs":{"style1":{"enabled_saved_payment_method":true,"theme":"#003264","logo":"https://hyperswitch.io/favicon.ico","display_sdk_only":true,"payment_button_text":"Confirmer","enable_button_only_on_form_ready":true,"custom_message_for_card_terms":"Pour vérifier votre compte, un montant de 0,00 € sera débité lorsque vous aurez cliqué sur le bouton « Confirmer »","sdk_ui_rules":{".Label":{"fontWeight":"600 !important","fontSize":"14px !important","color":"#003264 !important","opacity":"1 !important"},".Input":{"border":"1px solid #003264"},".Input::placeholder":{"fontWeight":"400","fontSize":"16px","color":"#00326480"},".TermsTextLabel":{"color":"#003264 !important","opacity":"1 !important"},".SaveWalletDetailsLabel":{"fontSize":"13px !important","color":"#003264 !important","opacity":"1 !important"},":has(> .TermsTextLabel)":{"opacity":"1 !important"},".SaveWalletDetailsLabel em":{"fontStyle":"normal"}},"payment_link_ui_rules":{"#submit":{"color":"#003264","fontWeight":"700","fontSize":"19px","padding":"25px 0","borderRadius":"5px","backgroundColor":"#FFA445"},"#hyper-checkout-sdk":{"backgroundColor":"#FFFFFF"}}},"style2":{"enabled_saved_payment_method":true,"theme":"#1A1A1A","logo":"https://hyperswitch.io/favicon.ico"},"au":{"theme":"#2167AE","enable_button_only_on_form_ready":true,"payment_button_text":"Pay now","display_sdk_only":true,"payment_link_ui_rules":{"#submit":{"height":"48px","width":"max-content","borderRadius":"50px","padding":"0 20px","marginTop":"24px"},"#submit.processing":{"paddingLeft":"50px !important","paddingRight":"50px !important"}},"sdk_ui_rules":{".Tab":{"display":"none"},".Input, .Input:focus, .Input--invalid, .Input--empty":{"border":"none","boxShadow":"none","borderRadius":"0","padding":"0 !important","paddingBottom":"4px !important"},".Input, .Input:focus, .Input--empty":{"borderBottom":"1px solid #23366F !important","color":"#23366F"},".Input--invalid":{"borderBottom":"1px solid #CB4B40 !important"},".Label":{"marginLeft":"0","color":"#2167AE","opacity":"1 !important","fontSize":"12px !important"},".Label--invalid, .Input--invalid, .Error":{"color":"#CB4B40 !important","opacity":"1 !important"},".InputLogo--empty":{"color":"#979797"},".InputLogo":{"color":"#23366F","margin":"-30px"},".InputLogo--invalid":{"color":"#CB4B40"},".OrPayUsingLabel, .SaveWalletDetailsLabel, .CheckboxLabel, .TermsTextLabel, .InfoElement":{"color":"#003264 !important","opacity":"1 !important"},".OrPayUsingLine":{"backgroundColor":"#003264"}}}}}}' Response {"merchant_id":"merchant_1741692513","profile_id":"pro_0pSrloAVzi0xbnpnP0mY","profile_name":"IN_default","return_url":"https://google.com/success","enable_payment_response_hash":true,"payment_response_hash_key":"kFqRl8UUlHycFDeV4xy9ibEW1bDKgNa7vfd2iYfzgfzc6x3grTHhCb2V2IoMc9uL","redirect_to_merchant_with_http_post":false,"webhook_details":{"webhook_version":"1.0.1","webhook_username":"random","webhook_password":"pass","webhook_url":"https://webhook.site/0728473e-e0aa-4bb6-9eea-85435cf54380","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":{"domain_name":null,"theme":"#1A1A1A","logo":"https://hyperswitch.io/favicon.ico","seller_name":null,"sdk_layout":null,"display_sdk_only":null,"enabled_saved_payment_method":true,"hide_card_nickname_field":null,"show_card_form_by_default":null,"transaction_details":null,"background_image":null,"details_layout":null,"payment_button_text":"Proceed to Payment!","custom_message_for_card_terms":"Hello","payment_button_colour":null,"skip_status_screen":null,"payment_button_text_colour":null,"background_colour":null,"sdk_ui_rules":{".Label":{"opacity":"1 !important","fontSize":"13px !important","backgroundColor":"red !important","color":"#003264 !important","fontWeight":"700 !important"}},"payment_link_ui_rules":null,"enable_button_only_on_form_ready":null,"business_specific_configs":{"style2":{"theme":"#1A1A1A","logo":"https://hyperswitch.io/favicon.ico","seller_name":null,"sdk_layout":null,"display_sdk_only":null,"enabled_saved_payment_method":true,"hide_card_nickname_field":null,"show_card_form_by_default":null,"transaction_details":null,"background_image":null,"details_layout":null,"payment_button_text":null,"custom_message_for_card_terms":null,"payment_button_colour":null,"skip_status_screen":null,"payment_button_text_colour":null,"background_colour":null,"sdk_ui_rules":null,"payment_link_ui_rules":null,"enable_button_only_on_form_ready":null},"au":{"theme":"#2167AE","logo":null,"seller_name":null,"sdk_layout":null,"display_sdk_only":true,"enabled_saved_payment_method":null,"hide_card_nickname_field":null,"show_card_form_by_default":null,"transaction_details":null,"background_image":null,"details_layout":null,"payment_button_text":"Pay now","custom_message_for_card_terms":null,"payment_button_colour":null,"skip_status_screen":null,"payment_button_text_colour":null,"background_colour":null,"sdk_ui_rules":{".Input, .Input:focus, .Input--invalid, .Input--empty":{"border":"none","padding":"0 !important","boxShadow":"none","borderRadius":"0","paddingBottom":"4px !important"},".Input--invalid":{"borderBottom":"1px solid #CB4B40 !important"},".Tab":{"display":"none"},".Input, .Input:focus, .Input--empty":{"color":"#23366F","borderBottom":"1px solid #23366F !important"},".OrPayUsingLabel, .SaveWalletDetailsLabel, .CheckboxLabel, .TermsTextLabel, .InfoElement":{"opacity":"1 !important","color":"#003264 !important"},".OrPayUsingLine":{"backgroundColor":"#003264"},".Label--invalid::after":{"color":"#CB4B40","content":"' *'"},".Label":{"opacity":"1 !important","color":"#2167AE","marginLeft":"0","fontSize":"12px !important"},".InputLogo":{"color":"#23366F","margin":"-30px"},".Label::after":{"content":"' *'","color":"#23366F"},".InputLogo--empty":{"color":"#979797"},".InputLogo--invalid":{"color":"#CB4B40"},".Label--invalid, .Input--invalid, .Error":{"opacity":"1 !important","color":"#CB4B40 !important"}},"payment_link_ui_rules":{"#submit":{"borderRadius":"50px","height":"48px","width":"max-content","padding":"0 20px","marginTop":"24px"},"#submit.processing":{"paddingLeft":"50px !important","paddingRight":"50px !important"}},"enable_button_only_on_form_ready":true},"style1":{"theme":"#003264","logo":"https://hyperswitch.io/favicon.ico","seller_name":null,"sdk_layout":null,"display_sdk_only":true,"enabled_saved_payment_method":true,"hide_card_nickname_field":null,"show_card_form_by_default":null,"transaction_details":null,"background_image":null,"details_layout":null,"payment_button_text":"Confirmer","custom_message_for_card_terms":"Pour vérifier votre compte, un montant de 0,00 € sera débité lorsque vous aurez cliqué sur le bouton « Confirmer »","payment_button_colour":null,"skip_status_screen":null,"payment_button_text_colour":null,"background_colour":null,"sdk_ui_rules":{".TermsTextLabel":{"opacity":"1 !important","color":"#003264 !important"},".Input":{"border":"1px solid #003264"},".Label":{"opacity":"1 !important","color":"#003264 !important","fontSize":"14px !important","fontWeight":"600 !important"},".Input::placeholder":{"color":"#00326480","fontSize":"16px","fontWeight":"400"},".SaveWalletDetailsLabel":{"fontSize":"13px !important","color":"#003264 !important","opacity":"1 !important"},":has(> .TermsTextLabel)":{"opacity":"1 !important"},".SaveWalletDetailsLabel em":{"fontStyle":"normal"}},"payment_link_ui_rules":{"#submit":{"color":"#003264","padding":"25px 0","fontSize":"19px","fontWeight":"700","borderRadius":"5px","backgroundColor":"#FFA445"},"#hyper-checkout-sdk":{"backgroundColor":"#FFFFFF"}},"enable_button_only_on_form_ready":true}},"allowed_domains":["*"],"branding_visibility":false},"authentication_connector_details":null,"use_billing_as_payment_method_billing":true,"extended_card_info_config":null,"collect_shipping_details_from_wallet_connector":false,"collect_billing_details_from_wallet_connector":false,"always_collect_shipping_details_from_wallet_connector":false,"always_collect_billing_details_from_wallet_connector":false,"is_connector_agnostic_mit_enabled":true,"payout_link_config":null,"outgoing_webhook_custom_http_headers":null,"tax_connector_id":null,"is_tax_connector_enabled":false,"is_network_tokenization_enabled":true,"is_auto_retries_enabled":false,"max_auto_retries_enabled":null,"always_request_extended_authorization":null,"is_click_to_pay_enabled":false,"authentication_product_ids":null,"card_testing_guard_config":{"card_ip_blocking_status":"disabled","card_ip_blocking_threshold":3,"guest_user_card_blocking_status":"disabled","guest_user_card_blocking_threshold":10,"customer_id_blocking_status":"disabled","customer_id_blocking_threshold":5,"card_testing_guard_expiry":3600},"is_clear_pan_retries_enabled":false,"force_3ds_challenge":false} </details> <details> <summary>2. Create payment link</summary> cURL curl --location --request POST 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_sI7y2RBalVSE3nYh5k4Gs2WGws277uoKwu3Y7gM9y2U2dmDSVymbHUAqPt3zDsHr' \ --data-raw '{"customer_id":"cus_t0I7DMr69stOdG3QaLZP","profile_id":"pro_0pSrloAVzi0xbnpnP0mY","customer_acceptance":{"acceptance_type":"online","accepted_at":"1963-05-03T04:07:52.723Z","online":{"ip_address":"127.0.0.1","user_agent":"amet irure esse"}},"amount":100,"currency":"USD","payment_link":true,"capture_method":"automatic","email":"john.doe@example.co.in","session_expiry":100000,"return_url":"https://example.com"}' Response {"payment_id":"pay_ufjEW9U5WAea89stlSED","merchant_id":"merchant_1741692513","status":"requires_payment_method","amount":100,"net_amount":100,"shipping_cost":null,"amount_capturable":100,"amount_received":null,"connector":null,"client_secret":"pay_ufjEW9U5WAea89stlSED_secret_eg6sZLpO9LH60crrsV0I","created":"2025-03-13T08:47:48.496Z","currency":"USD","customer_id":"cus_t0I7DMr69stOdG3QaLZP","customer":{"id":"cus_t0I7DMr69stOdG3QaLZP","name":"John Nether","email":"john.doe@example.co.in","phone":"6168205362","phone_country_code":"+1"},"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":"john.doe@example.co.in","name":"John Nether","phone":"6168205362","return_url":"https://example.com/","authentication_type":null,"statement_descriptor_name":null,"statement_descriptor_suffix":null,"next_action":null,"cancellation_reason":null,"error_code":null,"error_message":null,"unified_code":null,"unified_message":null,"payment_experience":null,"payment_method_type":null,"connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":{"customer_id":"cus_t0I7DMr69stOdG3QaLZP","created_at":1741855668,"expires":1741859268,"secret":"epk_3ccf7b98c7c54188ba5d9230c3bd21fe"},"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_1741692513/pay_ufjEW9U5WAea89stlSED?locale=en","secure_link":"http://localhost:8080/payment_link/s/merchant_1741692513/pay_ufjEW9U5WAea89stlSED?locale=en","payment_link_id":"plink_fW4Nnwl7EcbrmjmOQ1pi"},"profile_id":"pro_0pSrloAVzi0xbnpnP0mY","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":null,"incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-03-14T12:34:28.493Z","fingerprint":null,"browser_info":null,"payment_method_id":null,"payment_method_status":null,"updated":"2025-03-13T08:47:48.504Z","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} #### Things to validate 1. Confirm button is greyed out and disabled if form is incomplete <img width="611" alt="Screenshot 2025-03-13 at 2 37 23 PM" src="https://github.com/user-attachments/assets/ffb1b4f2-6c78-4f9c-9080-f74e2bf4223d" /> 2. Confirm button is enabled once form is completely filled <img width="627" alt="Screenshot 2025-03-13 at 2 37 36 PM" src="https://github.com/user-attachments/assets/d4312682-0283-481f-9dfa-de6f0b525810" /> </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` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/admin.rs` - `crates/api_models/src/payments.rs` **2. Database Layer (Queries & Schema)** - `crates/diesel_models/src/business_profile.rs` - `crates/diesel_models/src/payment_intent.rs` **3. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/lib.rs` **4. Core Business Logic** - `crates/router/src/core/payment_link.rs` - `crates/router/src/core/payment_link/payment_link_initiate/payment_link.css` - `crates/router/src/core/payment_link/payment_link_initiate/payment_link.html` - ... and 4 more files **5. Type Definitions** - `crates/router/src/types/transformers.rs` **6. Other** - `api-reference-v2/openapi_spec.json` - `api-reference/openapi_spec.json` - `crates/router/src/consts.rs` **Code Patterns Applied:** - Extend existing types with new fields (15 changes) - Add conditional logic for feature flags or filtering (8 changes) **Detailed Identifier Changes:** Commit 0be1f878: Files to modify: **crates/api_models/src/admin.rs** Modify existing code **crates/api_models/src/payments.rs** Modify existing code **crates/diesel_models/src/business_profile.rs** Modify existing code **crates/diesel_models/src/payment_intent.rs** Modify existing code **crates/hyperswitch_domain_models/src/lib.rs** Modify existing code **crates/router/src/consts.rs** Modify existing code **crates/router/src/core/payment_link.rs** Modify existing code **crates/router/src/core/payments/transformers.rs** Modify existing code **crates/router/src/types/transformers.rs** Modify existing code
{"pr_number": 7517, "pr_title": "feat(payment-link): add config for enabling form button only when form is complete", "merged_at": "2025-03-17T15:05:30Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/admin.rs", "crates/api_models/src/payments.rs"], "database": ["crates/diesel_models/src/business_profile.rs", "crates/diesel_models/src/payment_intent.rs"], "domain": ["crates/hyperswitch_domain_models/src/lib.rs"], "core_business": ["crates/router/src/core/payment_link.rs", "crates/router/src/core/payment_link/payment_link_initiate/payment_link.css", "crates/router/src/core/payment_link/payment_link_initiate/payment_link.html", "crates/router/src/core/payment_link/payment_link_initiate/payment_link.js", "crates/router/src/core/payment_link/payment_link_initiate/payment_link_initiator.js", "crates/router/src/core/payment_link/payment_link_initiate/secure_payment_link_initiator.js", "crates/router/src/core/payments/transformers.rs"], "types": ["crates/router/src/types/transformers.rs"], "other": ["api-reference-v2/openapi_spec.json", "api-reference/openapi_spec.json", "crates/router/src/consts.rs"]}, "change_types": {"fields_added": 15, "conditionals_added": 8}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(connector): [fiuu] update PSync and webhooks response ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description This PR fixes Fiuu integration for PSync response and webhook response ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context Helps fix Fiuu connector specifically for DuitNow. ## How did you test it? DuitNow cannot be tested. Updated based on API documentation. ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/fiuu.rs` - `crates/hyperswitch_connectors/src/connectors/fiuu/transformers.rs` **Code Patterns Applied:** - Extend existing types with new fields (6 changes) **Detailed Identifier Changes:** Commit 1c54211b: Files to modify: **crates/hyperswitch_connectors/src/connectors/fiuu.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/fiuu/transformers.rs** Modify existing code
{"pr_number": 7211, "pr_title": "fix(connector): [fiuu] update PSync and webhooks response", "merged_at": "2025-02-10T06:39:04Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["connector", "webhook"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/fiuu.rs", "crates/hyperswitch_connectors/src/connectors/fiuu/transformers.rs"]}, "change_types": {"fields_added": 6}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): [Finix] Add Google Pay Connector Tokenization Flow ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD Closes this [issue](https://github.com/juspay/hyperswitch/issues/9733) ## Description <!-- Describe your changes in detail --> Added google pay connector tokenization flow for finix connector. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Screenshot of PMT Flow: <img width="1725" height="303" alt="Screenshot 2025-10-10 at 12 35 50 PM" src="https://github.com/user-attachments/assets/073251b3-0a49-45da-ac62-e6e7d741e41c" /> Postman Test Payments-Create: Request: ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: ••••••' \ --data-raw '{ "amount": 6500, "currency": "USD", "confirm": true, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 6500, "customer_id": "Customer4", "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": "wallet", "payment_method_type": "google_pay", "payment_method_data": { "wallet": { "google_pay": { "description": "Credit one: Visa •••• 4242", "tokenization_data": { "type": "PAYMENT_GATEWAY", "token": TOKEN }, "type": "CARD", "info": { "card_network": "VISA", "card_details": "4242" } } } }, "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" } }' ``` Response: ``` { "payment_id": "pay_8UIPJRDCTTBl0bY0UKu3", "merchant_id": "merchant_1759869874", "status": "succeeded", "amount": 6500, "net_amount": 6500, "shipping_cost": null, "amount_capturable": 0, "amount_received": 6500, "connector": "finix", "client_secret": "pay_8UIPJRDCTTBl0bY0UKu3_secret_e6kUS5t7w2W73ieJstMk", "created": "2025-10-07T20:45:05.362Z", "currency": "USD", "customer_id": "Customer4", "customer": { "id": "Customer4", "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": "automatic", "payment_method": "wallet", "payment_method_data": { "wallet": { "google_pay": { "last4": "4242", "card_network": "VISA", "type": "CARD" } }, "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": "google_pay", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "Customer4", "created_at": 1759869905, "expires": 1759873505, "secret": "epk_8a72edc8a39c469597e02db4f36a04ab" }, "manual_retry_allowed": null, "connector_transaction_id": "TRh8uFLCwyh3iZ8roaT1ksyX", "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": null, "payment_link": null, "profile_id": "pro_Ykn6DQM8KzGMHYEnWRW5", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_Q2qpsZHuZ3gq7cTIQvic", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-10-07T21:00:05.362Z", "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-10-07T20:45:08.949Z", "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 } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] 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/connector_configs/toml/development.toml` - `crates/connector_configs/toml/production.toml` - `crates/connector_configs/toml/sandbox.toml` - ... and 3 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 (1 changes) - Implement new functions (1 changes) - Extend existing types with new fields (33 changes) **Detailed Identifier Changes:** Commit e68b151d: Files to modify: **crates/hyperswitch_connectors/src/connectors/finix.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/finix/transformers.rs** Add: - function: private::try_from - impl: impl TryFrom<&Option<common_utils::pii::SecretSerdeValue>> for FinixMeta **crates/hyperswitch_connectors/src/connectors/finix/transformers/request.rs** Add: - struct: pub::FinixMeta **crates/router/src/core/connector_validation.rs** Modify existing code
{"pr_number": 9734, "pr_title": "feat(connector): [Finix] Add Google Pay Connector Tokenization Flow", "merged_at": "2025-10-10T07:59:16Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"core_business": ["crates/router/src/core/connector_validation.rs"], "connectors": ["crates/connector_configs/toml/development.toml", "crates/connector_configs/toml/production.toml", "crates/connector_configs/toml/sandbox.toml", "crates/hyperswitch_connectors/src/connectors/finix.rs", "crates/hyperswitch_connectors/src/connectors/finix/transformers.rs", "crates/hyperswitch_connectors/src/connectors/finix/transformers/request.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": 1, "functions_added": 1, "fields_added": 33, "imports_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(eps_bank_name): send eps supported bank names inside the structs for sdk. ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Previously the bank names were hard coded but we needed to read form `{config}.toml` files to send the supported banks inside `user_bank_options` ## Depricating bank list on top level of `ResponsePaymentMethodTypes` as we need to send it inside particular required fields . ```rust pub struct ResponsePaymentMethodTypes { /// The payment method type enabled #[schema(example = "klarna", value_type = PaymentMethodType)] pub payment_method_type: api_enums::PaymentMethodType, /// The list of payment experiences enabled, if applicable for a payment method type pub payment_experience: Option<Vec<PaymentExperienceTypes>>, /// The list of card networks enabled, if applicable for a payment method type pub card_networks: Option<Vec<CardNetworkTypes>>, #[schema(deprecated)] // --------------------DEPRICATED-------------------------- // /// The list of banks enabled, if applicable for a payment method type pub bank_names: Option<Vec<BankCodeResponse>>, /// The Bank debit payment method information, if applicable for a payment method type. pub bank_debits: Option<BankDebitTypes>, /// The Bank transfer payment method information, if applicable for a payment method type. pub bank_transfers: Option<BankTransferTypes>, /// Required fields for the payment_method_type. pub required_fields: Option<HashMap<String, RequiredFieldInfo>>, /// surcharge details for this payment method type if exists pub surcharge_details: Option<SurchargeDetailsResponse>, /// auth service connector label for this payment method type, if exists pub pm_auth_connector: Option<String>, } ``` ## payment method types response <details> <summary>Payment Request</summary> ```json { "payment_id": "pay_6W7NAlavGWBsNle4fjCm", "merchant_id": "merchant_1751973151", "status": "requires_payment_method", "amount": 6500, "net_amount": 6500, "amount_capturable": 0, "client_secret": "pay_6W7NAlavGWBsNle4fjCm_secret_cGp7blq0k5NBezW6gCmH", "created": "2025-07-08T11:49:13.894Z", "currency": "EUR", "customer_id": "hyperswitch_sdk_demo_id", "customer": { "id": "hyperswitch_sdk_demo_id", "email": "user@gmail.com" }, "description": "Hello this is description", "setup_future_usage": "on_session", "capture_method": "automatic", "shipping": { "address": { "city": "Banglore", "country": "AT", "line1": "sdsdfsdf", "line2": "hsgdbhd", "line3": "alsksoe", "zip": "571201", "state": "California", "first_name": "John", "last_name": "Doe" }, "phone": { "number": "123456789", "country_code": "+1" } }, "billing": { "address": { "city": "San Fransico", "country": "AT", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "order_details": [ { "amount": 6500, "quantity": 1, "product_name": "Apple iphone 15" } ], "email": "user@gmail.com", "business_label": "default", "ephemeral_key": { "customer_id": "hyperswitch_sdk_demo_id", "created_at": 1751975353, "expires": 1751978953, "secret": "epk_78740ac9b3a7426e9ed57c14c801fb4f" }, "metadata": { "udf1": "value1", "login_date": "2019-09-10T10:11:12Z", "new_customer": "true" }, "connector_metadata": { "noon": { "order_category": "applepay" } }, "profile_id": "pro_2UxGWjdVxvRMEw6zBI2V", "attempt_count": 1, "external_3ds_authentication_attempted": false, "expires_on": "2025-07-08T12:04:13.894Z", "updated": "2025-07-08T11:49:13.908Z", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false } ``` </details> ### GET http://localhost:8080/account/payment_methods?client_secret=pay_gvSgEeG6HZU6PnwbHhno_secret_gTL5Uke9uC8r3XGUs3Kx ```json { "redirect_url": "https://google.com/success", "currency": "EUR", "payment_methods": [ { "payment_method": "bank_redirect", "payment_method_types": [ { "payment_method_type": "eps", "payment_experience": null, "card_networks": null, "bank_names": [ { "bank_name": [ "hypo_tirol_bank_ag", "brull_kallmus_bank_ag", "volkskreditbank_ag", "capital_bank_grawe_gruppe_ag", "btv_vier_lander_bank", "marchfelder_bank", "easybank_ag", "hypo_vorarlberg_bank_ag", "hypo_alpeadriabank_international_ag", "oberbank_ag", "hypo_noe_lb_fur_niederosterreich_u_wien", "volksbank_gruppe", "hypo_oberosterreich_salzburg_steiermark", "hypo_bank_burgenland_aktiengesellschaft", "dolomitenbank", "austrian_anadi_bank_ag", "raiffeisen_bankengruppe_osterreich", "sparda_bank_wien", "arzte_und_apotheker_bank", "bankhaus_schelhammer_und_schattera_ag", "bank_austria", "bawag_psk_ag", "schoellerbank_ag", "vr_bank_braunau", "erste_bank_und_sparkassen", "bankhaus_carl_spangler", "bks_bank_ag" ], "eligible_connectors": ["stripe"] } ], "bank_debits": null, "bank_transfers": null, "required_fields": { "billing.address.first_name": { "required_field": "payment_method_data.billing.address.first_name", "display_name": "billing_name", "field_type": "user_full_name", "value": "joseph" }, "payment_method_data.bank_redirect.eps.bank_name": { "required_field": "payment_method_data.bank_redirect.eps.bank_name", "display_name": "bank_name", "field_type": { "user_bank_options": { "options": [ "hypo_tirol_bank_ag", "brull_kallmus_bank_ag", "volkskreditbank_ag", "capital_bank_grawe_gruppe_ag", "btv_vier_lander_bank", "marchfelder_bank", "easybank_ag", "hypo_vorarlberg_bank_ag", "hypo_alpeadriabank_international_ag", "oberbank_ag", "hypo_noe_lb_fur_niederosterreich_u_wien", "volksbank_gruppe", "hypo_oberosterreich_salzburg_steiermark", "hypo_bank_burgenland_aktiengesellschaft", "dolomitenbank", "austrian_anadi_bank_ag", "raiffeisen_bankengruppe_osterreich", "sparda_bank_wien", "arzte_und_apotheker_bank", "bankhaus_schelhammer_und_schattera_ag", "bank_austria", "bawag_psk_ag", "schoellerbank_ag", "vr_bank_braunau", "erste_bank_und_sparkassen", "bankhaus_carl_spangler", "bks_bank_ag" ] } }, "value": null }, "billing.address.last_name": { "required_field": "payment_method_data.billing.address.last_name", "display_name": "billing_name", "field_type": "user_full_name", "value": "Doe" } }, "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 } ``` Related Pr: https://github.com/juspay/hyperswitch/pull/8577 ### Additional Changes - [x] This PR modifies the API contract - [x] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/payment_methods.rs` **2. External Connector Integration** - `crates/payment_methods/src/configs/payment_connector_required_fields.rs` **3. Configuration Files** - `crates/payment_methods/src/configs/settings.rs` - `crates/router/src/configs/settings.rs` **4. Other** - `api-reference/v1/openapi_spec_v1.json` **Code Patterns Applied:** - Define new data structures (3 changes) - Implement new functions (3 changes) - Extend existing types with new fields (2 changes) **Detailed Identifier Changes:** Commit d4d8236e: Files to modify: **crates/api_models/src/payment_methods.rs** Modify existing code **crates/payment_methods/src/configs/payment_connector_required_fields.rs** Add: - function: private::default - impl: impl Default for RequiredFields **crates/payment_methods/src/configs/settings.rs** Add: - struct: pub::BankRedirectConfig - struct: pub::ConnectorBankNames - struct: pub::BanksVector **crates/router/src/configs/settings.rs** Remove: - struct: pub::BankRedirectConfig - struct: pub::ConnectorBankNames - struct: pub::BanksVector
{"pr_number": 8779, "pr_title": "fix(eps_bank_name): send eps supported bank names inside the structs for sdk.", "merged_at": "2025-08-11T07:33:49Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/payment_methods.rs"], "connectors": ["crates/payment_methods/src/configs/payment_connector_required_fields.rs"], "config": ["crates/payment_methods/src/configs/settings.rs", "crates/router/src/configs/settings.rs"], "other": ["api-reference/v1/openapi_spec_v1.json"]}, "change_types": {"structs_added": 3, "functions_added": 3, "fields_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor(connector): [TrustPay] Fix status and wasm changes ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Hotfix for - https://github.com/juspay/hyperswitch/pull/7649 - Fix dynamic fields for SepaBankTransfer - Handle error case Status mapping - Fix wasm Changes for SepaBankTransfer ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? 1. Create Merchant 2. Create API Key 3. Create MCA for Trustpay ``` curl --location 'http://localhost:8080/account/merchant_1742994781/connectors' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: test_admin' \ --data '{ "connector_type": "payment_processor", "connector_name": "trustpay", "connector_account_details": { "auth_type": "SignatureKey", "api_key": "_//=", "key1": "_", "api_secret": "_" }, "test_mode": false, "disabled": false, "payment_methods_enabled": [ { "payment_method": "bank_transfer", "payment_method_types": [ { "payment_method_type": "sepa_bank_transfer", "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_type": "instant_bank_transfer", "recurring_enabled": true, "installment_payment_enabled": true ], "metadata":{ "currency_id": 1, "platform_id": 6, "ledger_account_id": "_" } }' ``` 4. Payment Create ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_90I0ZTyI3Fa4Lt90nzaOp9vk5YsvbNSQ8JQm4vHBDURhjNZaaitQDrrXkBYMlrzq' \ --data ' { "amount": 1000, "currency": "EUR", "confirm": false, "payment_link": false, "return_url": "https://duck.com", "capture_method": "automatic", "customer_id": "cus_536w4t5lmEKMxky8xwN0", "description": "Its my first payment request", "capture_on": "2022-09-10T10:11:12Z", "authentication_type": "no_three_ds", "name": "John Doe", "phone": "98989898989" }' ``` 5. PML response ``` { "redirect_url": "https://google.com/success", "currency": "EUR", "payment_methods": [ { "payment_method": "bank_transfer", "payment_method_types": [ { "payment_method_type": "sepa_bank_transfer", "payment_experience": null, "card_networks": null, "bank_names": null, "bank_debits": null, "bank_transfers": { "eligible_connectors": [ "trustpay" ] }, "required_fields": { "billing.address.country": { "required_field": "payment_method_data.billing.address.country", "display_name": "country", "field_type": { "user_address_country": { "options": [ "ALL" ] } }, "value": null }, "billing.address.zip": { "required_field": "payment_method_data.billing.address.zip", "display_name": "zip", "field_type": "user_address_pincode", "value": null }, "billing.address.first_name": { "required_field": "payment_method_data.billing.address.first_name", "display_name": "billing_first_name", "field_type": "user_billing_name", "value": null }, "billing.address.last_name": { "required_field": "payment_method_data.billing.address.last_name", "display_name": "billing_last_name", "field_type": "user_billing_name", "value": null }, "email": { "required_field": "email", "display_name": "email", "field_type": "user_email_address", "value": "p143@example.com" }, "billing.address.line1": { "required_field": "payment_method_data.billing.address.line1", "display_name": "line1", "field_type": "user_address_line1", "value": null }, "billing.address.city": { "required_field": "payment_method_data.billing.address.city", "display_name": "city", "field_type": "user_address_city", "value": null } }, "surcharge_details": null, "pm_auth_connector": null }, { "payment_method_type": "instant_bank_transfer", "payment_experience": null, "card_networks": null, "bank_names": null, "bank_debits": null, "bank_transfers": { "eligible_connectors": [ "trustpay" ] }, "required_fields": { "email": { "required_field": "email", "display_name": "email", "field_type": "user_email_address", "value": "p143@example.com" }, "billing.address.line1": { "required_field": "payment_method_data.billing.address.line1", "display_name": "line1", "field_type": "user_address_line1", "value": null }, "billing.address.last_name": { "required_field": "payment_method_data.billing.address.last_name", "display_name": "billing_last_name", "field_type": "user_billing_name", "value": null }, "billing.address.first_name": { "required_field": "payment_method_data.billing.address.first_name", "display_name": "billing_first_name", "field_type": "user_billing_name", "value": null }, "billing.address.city": { "required_field": "payment_method_data.billing.address.city", "display_name": "city", "field_type": "user_address_city", "value": null }, "billing.address.country": { "required_field": "payment_method_data.billing.address.country", "display_name": "country", "field_type": { "user_address_country": { "options": [ "ALL" ] } }, "value": null }, "billing.address.zip": { "required_field": "payment_method_data.billing.address.zip", "display_name": "zip", "field_type": "user_address_pincode", "value": null } }, "surcharge_details": null, "pm_auth_connector": null } ] } ], "mandate_payment": null, "merchant_name": "NewAge Retailer", "show_surcharge_breakup_screen": false, "payment_type": "normal", "request_external_three_ds_authentication": false, "collect_shipping_details_from_wallets": false, "collect_billing_details_from_wallets": false, "is_tax_calculation_enabled": false } ``` ________________________________________________________________________ Test for Psync after confirm call without redirection 1. Payment Create ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_90I0ZTyI3Fa4Lt90nzaOp9vk5YsvbNSQ8JQm4vHBDURhjNZaaitQDrrXkBYMlrzq' \ --data-raw ' { "amount": 1000, "currency": "EUR", "confirm": false, "payment_link": false, "return_url": "https://duck.com", "capture_method": "automatic", "customer_id": "cus_536w4t5lmEKMxky8xwN0", "description": "Its my first payment request", "capture_on": "2022-09-10T10:11:12Z", "authentication_type": "no_three_ds", "email": "p143@example.com", "name": "John Doe", "phone": "98989898989", "connector_metadata": { "noon": { "order_category": "pay" } }, "setup_future_usage": "on_session", "browser_info": { "user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36", "accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8", "language": "nl-NL", "color_depth": 24, "screen_height": 723, "screen_width": 1536, "time_zone": 0, "java_enabled": true, "java_script_enabled": true, "ip_address": "128.0.0.1" }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "Ceuta", "zip": "94122", "country": "SK", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "p143@example.com" } }' ``` 2. payment Confirm - instant_bank_transfer ``` curl --location 'http://localhost:8080/payments/pay_C6F36iQW3v1Mk4jE5JSI/confirm' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: ______' \ --data ' { "payment_method": "bank_transfer", "payment_method_type": "instant_bank_transfer", "payment_method_data": { "bank_transfer": { "instant_bank_transfer": {} } } }' ``` 3. Psync without completing redirection ``` curl --location 'http://localhost:8080/payments/pay_5lw3r93YnRlLx7JJ849H?force_sync=true' \ --header 'Accept: application/json' \ --header 'api-key: _' ``` Response ``` { "payment_id": "pay_5lw3r93YnRlLx7JJ849H", "merchant_id": "merchant_1742994781", "status": "requires_customer_action", "amount": 1000, "net_amount": 1000, "shipping_cost": null, "amount_capturable": 1000, "amount_received": null, "connector": "trustpay", "client_secret": "pay_5lw3r93YnRlLx7JJ849H_secret_qOk0qcaWOgQolwi8UTZT", "created": "2025-03-26T14:53:38.108Z", "currency": "EUR", "customer_id": "cus_536w4t5lmEKMxky8xwN0", "customer": { "id": "cus_536w4t5lmEKMxky8xwN0", "name": "John Doe", "email": "p143@example.com", "phone": "98989898989", "phone_country_code": null }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "on_session", "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "bank_transfer", "payment_method_data": { "bank_transfer": { "instant_bank_transfer": {} }, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": { "city": "San Fransico", "country": "SK", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "Ceuta", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "p143@example.com" }, "order_details": null, "email": "p143@example.com", "name": "John Doe", "phone": "98989898989", "return_url": "https://duck.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": { "type": "redirect_to_url", "redirect_to_url": "http://localhost:8080/payments/redirect/pay_5lw3r93YnRlLx7JJ849H/merchant_1742994781/pay_5lw3r93YnRlLx7JJ849H_1" }, "cancellation_reason": null, "error_code": "1132005", "error_message": "TransactionNotFound", "unified_code": "UE_9000", "unified_message": "Something went wrong", "payment_experience": null, "payment_method_type": "instant_bank_transfer", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": null, "manual_retry_allowed": null, "connector_transaction_id": "3463456165", "frm_message": null, "metadata": null, "connector_metadata": { "apple_pay": null, "airwallex": null, "noon": { "order_category": "pay" }, "braintree": null }, "feature_metadata": null, "reference_id": null, "payment_link": null, "profile_id": "pro_bfO3IrshhzN8spixIFYU", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_mJ7rFHk2BZ8rjzLAbERd", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-03-26T15:08:38.108Z", "fingerprint": null, "browser_info": { "os_type": null, "language": null, "time_zone": null, "ip_address": "::1", "os_version": null, "user_agent": null, "color_depth": null, "device_model": null, "java_enabled": null, "screen_width": null, "accept_header": null, "screen_height": null, "accept_language": "en", "java_script_enabled": null }, "payment_method_id": null, "payment_method_status": null, "updated": "2025-03-26T14:53:44.157Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": null, "issuer_error_code": null, "issuer_error_message": null } ``` ________________________________________________________________ 1. Create Payment ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: _' \ --data-raw ' { "amount": 1000, "currency": "EUR", "confirm": false, "payment_link": false, "return_url": "https://duck.com", "capture_method": "automatic", "customer_id": "cus_536w4t5lmEKMxky8xwN0", "description": "Its my first payment request", "capture_on": "2022-09-10T10:11:12Z", "authentication_type": "no_three_ds", "email": "p143@example.com", "name": "John Doe", "phone": "98989898989", "connector_metadata": { "noon": { "order_category": "pay" } }, "setup_future_usage": "on_session", "browser_info": { "user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36", "accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8", "language": "nl-NL", "color_depth": 24, "screen_height": 723, "screen_width": 1536, "time_zone": 0, "java_enabled": true, "java_script_enabled": true, "ip_address": "128.0.0.1" }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "Ceuta", "zip": "94122", "country": "SK", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "p143@example.com" } }' ``` 2. Confirm Payment - sepa_bank_transfer ``` curl --location 'http://localhost:8080/payments/pay_xo9DAp8Fy9UzjkWIgLKu/confirm' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: _' \ --data ' { "payment_method": "bank_transfer", "payment_method_type": "sepa_bank_transfer", "payment_method_data": { "bank_transfer": { "sepa_bank_transfer": {} } } } ' ``` 3. Psync without completing redirection ``` curl --location 'http://localhost:8080/payments/pay_xo9DAp8Fy9UzjkWIgLKu?force_sync=true' \ --header 'Accept: application/json' \ --header 'api-key: dev_90I0ZTyI3Fa4Lt90nzaOp9vk5YsvbNSQ8JQm4vHBDURhjNZaaitQDrrXkBYMlrzq' ``` Response ``` {"payment_id":"pay_xo9DAp8Fy9UzjkWIgLKu","merchant_id":"merchant_1742994781","status":"processing","amount":1000,"net_amount":1000,"shipping_cost":null,"amount_capturable":1000,"amount_received":null,"connector":"trustpay","client_secret":"pay_xo9DAp8Fy9UzjkWIgLKu_secret_WSUDpkM2fO9vR3lJwiQt","created":"2025-03-26T14:55:39.245Z","currency":"EUR","customer_id":"cus_536w4t5lmEKMxky8xwN0","customer":{"id":"cus_536w4t5lmEKMxky8xwN0","name":"John Doe","email":"p143@example.com","phone":"98989898989","phone_country_code":null},"description":"Its my first payment request","refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":"on_session","off_session":null,"capture_on":null,"capture_method":"automatic","payment_method":"bank_transfer","payment_method_data":{"bank_transfer":{"sepa":{}},"billing":null},"payment_token":null,"shipping":null,"billing":{"address":{"city":"San Fransico","country":"SK","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"Ceuta","first_name":"joseph","last_name":"Doe"},"phone":{"number":"8056594427","country_code":"+91"},"email":"p143@example.com"},"order_details":null,"email":"p143@example.com","name":"John Doe","phone":"98989898989","return_url":"https://duck.com/","authentication_type":"no_three_ds","statement_descriptor_name":null,"statement_descriptor_suffix":null,"next_action":null,"cancellation_reason":null,"error_code":null,"error_message":null,"unified_code":null,"unified_message":null,"payment_experience":null,"payment_method_type":"sepa_bank_transfer","connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":null,"manual_retry_allowed":false,"connector_transaction_id":"3061758642","frm_message":null,"metadata":null,"connector_metadata":{"apple_pay":null,"airwallex":null,"noon":{"order_category":"pay"},"braintree":null},"feature_metadata":null,"reference_id":null,"payment_link":null,"profile_id":"pro_bfO3IrshhzN8spixIFYU","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_mJ7rFHk2BZ8rjzLAbERd","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-03-26T15:10:39.245Z","fingerprint":null,"browser_info":{"os_type":null,"language":null,"time_zone":null,"ip_address":"::1","os_version":null,"user_agent":null,"color_depth":null,"device_model":null,"java_enabled":null,"screen_width":null,"accept_header":null,"screen_height":null,"accept_language":"en","java_script_enabled":null},"payment_method_id":null,"payment_method_status":null,"updated":"2025-03-26T14:56:25.455Z","split_payments":null,"frm_metadata":null,"extended_authorization_applied":null,"capture_before":null,"merchant_order_reference_id":null,"order_tax_amount":null,"connector_mandate_id":null,"card_discovery":null,"issuer_error_code":null,"issuer_error_message":null} ``` Here we sometime get processing status by connector, and when we will get error response we have mapped to previous status ____________________________________________________ Success scenario 1. SepaBankTransfer Create + confirm ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: _' \ --data-raw ' { "amount": 6540, "currency": "EUR", "confirm": true, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 6540, "customer_id": "StripeCustomer", "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+1", "description": "Its my first payment request", "authentication_type": "three_ds", "return_url": "https://google.com", "payment_method": "bank_transfer", "payment_method_type" :"sepa_bank_transfer", "payment_method_data": { "bank_transfer": { "sepa_bank_transfer": { } } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "ES", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "ES", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "browser_info": { "user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36", "accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8", "language": "nl-NL", "color_depth": 24, "screen_height": 723, "screen_width": 1536, "time_zone": 0, "java_enabled": true, "java_script_enabled": true, "ip_address": "125.0.0.1" } }' ``` Response ``` { "payment_id": "pay_j6Jw3eeOwrFnkMTzcxMt", "merchant_id": "merchant_1742994781", "status": "requires_customer_action", "amount": 6540, "net_amount": 6540, "shipping_cost": null, "amount_capturable": 6540, "amount_received": null, "connector": "trustpay", "client_secret": "pay_j6Jw3eeOwrFnkMTzcxMt_secret_HZoeXhgZjBJiN3mEv3LD", "created": "2025-03-26T14:59:20.559Z", "currency": "EUR", "customer_id": "StripeCustomer", "customer": { "id": "StripeCustomer", "name": "John Doe", "email": "guest@example.com", "phone": "999999999", "phone_country_code": "+1" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "bank_transfer", "payment_method_data": { "bank_transfer": { "sepa": {} }, "billing": null }, "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": "ES", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "billing": { "address": { "city": "San Fransico", "country": "ES", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "order_details": null, "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "return_url": "https://google.com/", "authentication_type": "three_ds", "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "next_action": { "type": "redirect_to_url", "redirect_to_url": "http://localhost:8080/payments/redirect/pay_j6Jw3eeOwrFnkMTzcxMt/merchant_1742994781/pay_j6Jw3eeOwrFnkMTzcxMt_1" }, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "sepa_bank_transfer", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "StripeCustomer", "created_at": 1743001160, "expires": 1743004760, "secret": "epk_90e0284f3902416fb47ba537b7ebf9c0" }, "manual_retry_allowed": null, "connector_transaction_id": "1246086473", "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2019-09-10T10:11:12Z", "new_customer": "true" }, "connector_metadata": null, "feature_metadata": null, "reference_id": null, "payment_link": null, "profile_id": "pro_bfO3IrshhzN8spixIFYU", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_mJ7rFHk2BZ8rjzLAbERd", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-03-26T15:14:20.559Z", "fingerprint": null, "browser_info": { "language": "nl-NL", "time_zone": 0, "ip_address": "125.0.0.1", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "color_depth": 24, "java_enabled": true, "screen_width": 1536, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 723, "java_script_enabled": true }, "payment_method_id": null, "payment_method_status": null, "updated": "2025-03-26T14:59:20.812Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": null, "issuer_error_code": null, "issuer_error_message": null } ``` Complete Redirection 2. Do psync Psync response ``` {"payment_id":"pay_j6Jw3eeOwrFnkMTzcxMt","merchant_id":"merchant_1742994781","status":"processing","amount":6540,"net_amount":6540,"shipping_cost":null,"amount_capturable":6540,"amount_received":null,"connector":"trustpay","client_secret":"pay_j6Jw3eeOwrFnkMTzcxMt_secret_HZoeXhgZjBJiN3mEv3LD","created":"2025-03-26T14:59:20.559Z","currency":"EUR","customer_id":"StripeCustomer","customer":{"id":"StripeCustomer","name":"John Doe","email":"guest@example.com","phone":"999999999","phone_country_code":"+1"},"description":"Its my first payment request","refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":null,"off_session":null,"capture_on":null,"capture_method":"automatic","payment_method":"bank_transfer","payment_method_data":{"bank_transfer":{"sepa":{}},"billing":null},"payment_token":null,"shipping":{"address":{"city":"San Fransico","country":"ES","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"California","first_name":"joseph","last_name":"Doe"},"phone":{"number":"8056594427","country_code":"+91"},"email":null},"billing":{"address":{"city":"San Fransico","country":"ES","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"California","first_name":"joseph","last_name":"Doe"},"phone":{"number":"8056594427","country_code":"+91"},"email":null},"order_details":null,"email":"guest@example.com","name":"John Doe","phone":"999999999","return_url":"https://google.com/","authentication_type":"three_ds","statement_descriptor_name":"joseph","statement_descriptor_suffix":"JS","next_action":null,"cancellation_reason":null,"error_code":null,"error_message":null,"unified_code":null,"unified_message":null,"payment_experience":null,"payment_method_type":"sepa_bank_transfer","connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":null,"manual_retry_allowed":false,"connector_transaction_id":"1246086473","frm_message":null,"metadata":{"udf1":"value1","login_date":"2019-09-10T10:11:12Z","new_customer":"true"},"connector_metadata":null,"feature_metadata":null,"reference_id":null,"payment_link":null,"profile_id":"pro_bfO3IrshhzN8spixIFYU","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_mJ7rFHk2BZ8rjzLAbERd","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-03-26T15:14:20.559Z","fingerprint":null,"browser_info":{"language":"nl-NL","time_zone":0,"ip_address":"125.0.0.1","user_agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36","color_depth":24,"java_enabled":true,"screen_width":1536,"accept_header":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8","screen_height":723,"java_script_enabled":true},"payment_method_id":null,"payment_method_status":null,"updated":"2025-03-26T15:00:25.635Z","split_payments":null,"frm_metadata":null,"extended_authorization_applied":null,"capture_before":null,"merchant_order_reference_id":null,"order_tax_amount":null,"connector_mandate_id":null,"card_discovery":null,"issuer_error_code":null,"issuer_error_message":null} ``` instant bank transfer create+ confirm ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_90I0ZTyI3Fa4Lt90nzaOp9vk5YsvbNSQ8JQm4vHBDURhjNZaaitQDrrXkBYMlrzq' \ --data-raw ' { "amount": 6540, "currency": "EUR", "confirm": true, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 6540, "customer_id": "StripeCustomer", "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+1", "description": "Its my first payment request", "authentication_type": "three_ds", "return_url": "https://google.com", "payment_method": "bank_transfer", "payment_method_type" :"instant_bank_transfer", "payment_method_data": { "bank_transfer": { "instant_bank_transfer": { } } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "SK", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "SK", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "browser_info": { "user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36", "accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8", "language": "nl-NL", "color_depth": 24, "screen_height": 723, "screen_width": 1536, "time_zone": 0, "java_enabled": true, "java_script_enabled": true, "ip_address": "125.0.0.1" } }' ``` Response ``` { "payment_id": "pay_Xi9hfKAeDXG1Y2ZDFj16", "merchant_id": "merchant_1742994781", "status": "requires_customer_action", "amount": 6540, "net_amount": 6540, "shipping_cost": null, "amount_capturable": 6540, "amount_received": null, "connector": "trustpay", "client_secret": "pay_Xi9hfKAeDXG1Y2ZDFj16_secret_Ddc5ZtCoDSJcPIwaJGO5", "created": "2025-03-26T15:01:33.841Z", "currency": "EUR", "customer_id": "StripeCustomer", "customer": { "id": "StripeCustomer", "name": "John Doe", "email": "guest@example.com", "phone": "999999999", "phone_country_code": "+1" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "bank_transfer", "payment_method_data": { "bank_transfer": { "instant_bank_transfer": {} }, "billing": null }, "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": "SK", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "billing": { "address": { "city": "San Fransico", "country": "SK", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "order_details": null, "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "return_url": "https://google.com/", "authentication_type": "three_ds", "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "next_action": { "type": "redirect_to_url", "redirect_to_url": "http://localhost:8080/payments/redirect/pay_Xi9hfKAeDXG1Y2ZDFj16/merchant_1742994781/pay_Xi9hfKAeDXG1Y2ZDFj16_1" }, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "instant_bank_transfer", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "StripeCustomer", "created_at": 1743001293, "expires": 1743004893, "secret": "epk_8507cbe0beda44aaa14adb7fa15d7747" }, "manual_retry_allowed": null, "connector_transaction_id": "1871783810", "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2019-09-10T10:11:12Z", "new_customer": "true" }, "connector_metadata": null, "feature_metadata": null, "reference_id": null, "payment_link": null, "profile_id": "pro_bfO3IrshhzN8spixIFYU", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_mJ7rFHk2BZ8rjzLAbERd", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-03-26T15:16:33.841Z", "fingerprint": null, "browser_info": { "language": "nl-NL", "time_zone": 0, "ip_address": "125.0.0.1", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "color_depth": 24, "java_enabled": true, "screen_width": 1536, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 723, "java_script_enabled": true }, "payment_method_id": null, "payment_method_status": null, "updated": "2025-03-26T15:01:34.166Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": null, "issuer_error_code": null, "issuer_error_message": null } ``` Complete redirection 2. Do psync Response ``` { "payment_id": "pay_Xi9hfKAeDXG1Y2ZDFj16", "merchant_id": "merchant_1742994781", "status": "processing", "amount": 6540, "net_amount": 6540, "shipping_cost": null, "amount_capturable": 6540, "amount_received": null, "connector": "trustpay", "client_secret": "pay_Xi9hfKAeDXG1Y2ZDFj16_secret_Ddc5ZtCoDSJcPIwaJGO5", "created": "2025-03-26T15:01:33.841Z", "currency": "EUR", "customer_id": "StripeCustomer", "customer": { "id": "StripeCustomer", "name": "John Doe", "email": "guest@example.com", "phone": "999999999", "phone_country_code": "+1" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "bank_transfer", "payment_method_data": { "bank_transfer": { "instant_bank_transfer": {} }, "billing": null }, "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": "SK", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "billing": { "address": { "city": "San Fransico", "country": "SK", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "order_details": null, "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "return_url": "https://google.com/", "authentication_type": "three_ds", "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "next_action": null, "cancellation_reason": null, "error_code": "1132014", "error_message": "Too many requests for a given ID. Please try again in 00:00:00.3560000", "unified_code": "UE_9000", "unified_message": "Something went wrong", "payment_experience": null, "payment_method_type": "instant_bank_transfer", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": null, "manual_retry_allowed": false, "connector_transaction_id": "1871783810", "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2019-09-10T10:11:12Z", "new_customer": "true" }, "connector_metadata": null, "feature_metadata": null, "reference_id": null, "payment_link": null, "profile_id": "pro_bfO3IrshhzN8spixIFYU", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_mJ7rFHk2BZ8rjzLAbERd", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-03-26T15:16:33.841Z", "fingerprint": null, "browser_info": { "language": "nl-NL", "time_zone": 0, "ip_address": "125.0.0.1", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "color_depth": 24, "java_enabled": true, "screen_width": 1536, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 723, "java_script_enabled": true }, "payment_method_id": null, "payment_method_status": null, "updated": "2025-03-26T15:02:13.934Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": null, "issuer_error_code": null, "issuer_error_message": null } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/connector_configs/toml/development.toml` - `crates/connector_configs/toml/production.toml` - `crates/connector_configs/toml/sandbox.toml` - ... and 2 more files **Code Patterns Applied:** - Extend existing types with new fields (3 changes) **Detailed Identifier Changes:** Commit cc7617df: Files to modify: **crates/hyperswitch_connectors/src/connectors/trustpay/transformers.rs** Modify existing code **crates/router/src/configs/defaults/payment_connector_required_fields.rs** Modify existing code
{"pr_number": 7651, "pr_title": "refactor(connector): [TrustPay] Fix status and wasm changes ", "merged_at": "2025-03-27T08:56:21Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/connector_configs/toml/development.toml", "crates/connector_configs/toml/production.toml", "crates/connector_configs/toml/sandbox.toml", "crates/hyperswitch_connectors/src/connectors/trustpay/transformers.rs", "crates/router/src/configs/defaults/payment_connector_required_fields.rs"]}, "change_types": {"fields_added": 3}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): [DWOLLA] - 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 Added template code for Dwolla. API reference : https://developers.dwolla.com/docs/balance/api-reference/api-fundamentals ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> No test required. ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/configs.rs` **2. Core Business Logic** - `crates/router/src/core/admin.rs` **3. External Connector Integration** - `crates/common_enums/src/connector_enums.rs` - `crates/connector_configs/src/connector.rs` - `crates/hyperswitch_connectors/src/connectors.rs` - ... and 10 more files **4. Type Definitions** - `crates/router/src/types/api.rs` - `crates/router/src/types/transformers.rs` **5. Tests** - `config/deployments/integration_test.toml` - `loadtest/config/development.toml` **6. Configuration Files** - `config/config.example.toml` - `config/deployments/production.toml` - `config/deployments/sandbox.toml` - ... and 2 more files **Code Patterns Applied:** - Define new data structures (10 changes) - Implement new functions (78 changes) - Extend existing types with new fields (157 changes) **Detailed Identifier Changes:** Commit ad522513: Files to modify: **crates/common_enums/src/connector_enums.rs** Modify existing code **crates/connector_configs/src/connector.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors.rs** Add: - mod: pub::dwolla **crates/hyperswitch_connectors/src/connectors/dwolla.rs** Add: - function: pub::new - function: private::build_headers - function: private::id - function: private::get_currency_unit - function: private::common_get_content_type - function: private::base_url - function: private::get_auth_header - function: private::build_error_response - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::get_request_body - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::get_request_body - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::get_request_body - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_webhook_object_reference_id - function: private::get_webhook_event_type - function: private::get_webhook_resource_object - struct: pub::Dwolla - impl: impl Dwolla - impl: impl api::Payment for Dwolla - impl: impl api::PaymentSession for Dwolla - impl: impl api::ConnectorAccessToken for Dwolla - impl: impl api::MandateSetup for Dwolla - impl: impl api::PaymentAuthorize for Dwolla - impl: impl api::PaymentSync for Dwolla - impl: impl api::PaymentCapture for Dwolla - impl: impl api::PaymentVoid for Dwolla - impl: impl api::Refund for Dwolla - impl: impl api::RefundExecute for Dwolla - impl: impl api::RefundSync for Dwolla - impl: impl api::PaymentToken for Dwolla - impl: impl ConnectorIntegration<PaymentMethodToken, PaymentMethodTokenizationData, PaymentsResponseData> for Dwolla - impl: impl ConnectorCommonExt<Flow, Request, Response> for Dwolla - impl: impl ConnectorCommon for Dwolla - impl: impl ConnectorValidation for Dwolla - impl: impl ConnectorIntegration<Session, PaymentsSessionData, PaymentsResponseData> for Dwolla - impl: impl ConnectorIntegration<AccessTokenAuth, AccessTokenRequestData, AccessToken> for Dwolla - impl: impl ConnectorIntegration<SetupMandate, SetupMandateRequestData, PaymentsResponseData> for Dwolla - impl: impl ConnectorIntegration<Authorize, PaymentsAuthorizeData, PaymentsResponseData> for Dwolla - impl: impl ConnectorIntegration<PSync, PaymentsSyncData, PaymentsResponseData> for Dwolla - impl: impl ConnectorIntegration<Capture, PaymentsCaptureData, PaymentsResponseData> for Dwolla - impl: impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Dwolla - impl: impl ConnectorIntegration<Execute, RefundsData, RefundsResponseData> for Dwolla - impl: impl ConnectorIntegration<RSync, RefundsData, RefundsResponseData> for Dwolla - impl: impl webhooks::IncomingWebhook for Dwolla - impl: impl ConnectorSpecifications for Dwolla - mod: pub::transformers **crates/hyperswitch_connectors/src/connectors/dwolla/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::DwollaRouterData - struct: pub::DwollaPaymentsRequest - struct: pub::DwollaCard - struct: pub::DwollaAuthType - struct: pub::DwollaPaymentsResponse - struct: pub::DwollaRefundRequest - struct: pub::RefundResponse - struct: pub::DwollaErrorResponse - enum: pub::DwollaPaymentStatus - enum: pub::RefundStatus - impl: impl From<(StringMajorUnit, T)> for DwollaRouterData<T> - impl: impl TryFrom<&DwollaRouterData<&PaymentsAuthorizeRouterData>> for DwollaPaymentsRequest - impl: impl TryFrom<&ConnectorAuthType> for DwollaAuthType - impl: impl From<DwollaPaymentStatus> for common_enums::AttemptStatus - impl: impl TryFrom<ResponseRouterData<F, DwollaPaymentsResponse, T, PaymentsResponseData>> for RouterData<F, T, PaymentsResponseData> - impl: impl TryFrom<&DwollaRouterData<&RefundsRouterData<F>>> for DwollaRefundRequest - 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/configs.rs** Modify existing code **crates/router/src/connector.rs** Modify existing code **crates/router/src/core/admin.rs** Modify existing code **crates/router/src/types/api.rs** Modify existing code **crates/router/src/types/transformers.rs** Modify existing code **crates/router/tests/connectors/dwolla.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::DwollaTest - impl: impl ConnectorActions for DwollaTest - impl: impl utils::Connector for DwollaTest **crates/router/tests/connectors/main.rs** Add: - mod: private::dwolla **crates/test_utils/src/connector_auth.rs** Modify existing code
{"pr_number": 8496, "pr_title": "feat(connector): [DWOLLA] - Add template code", "merged_at": "2025-07-01T12:34:47Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"domain": ["crates/hyperswitch_domain_models/src/configs.rs"], "core_business": ["crates/router/src/core/admin.rs"], "connectors": ["crates/common_enums/src/connector_enums.rs", "crates/connector_configs/src/connector.rs", "crates/hyperswitch_connectors/src/connectors.rs", "crates/hyperswitch_connectors/src/connectors/dwolla.rs", "crates/hyperswitch_connectors/src/connectors/dwolla/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/dwolla.rs", "crates/router/tests/connectors/main.rs", "crates/router/tests/connectors/sample_auth.toml", "crates/test_utils/src/connector_auth.rs", "scripts/add_connector.sh"], "types": ["crates/router/src/types/api.rs", "crates/router/src/types/transformers.rs"], "tests": ["config/deployments/integration_test.toml", "loadtest/config/development.toml"], "config": ["config/config.example.toml", "config/deployments/production.toml", "config/deployments/sandbox.toml", "config/development.toml", "config/docker_compose.toml"]}, "change_types": {"structs_added": 10, "functions_added": 78, "enums_added": 2, "fields_added": 157, "imports_added": 19}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix: duplicate entries in total count when filtering by object ID ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This PR fixes an issue where the total count of webhook events was incorrectly calculated when filtering by object ID. Previously, the total count logic was based on generic filters, which led to duplicate or incorrect counts when specific object ID filters were applied. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with 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/merchant_1747902702' \ --header 'Content-Type: application/json' \ --header 'api-key: test_admin' \ --data '{ }' ``` Response ``` { "events": [ { "event_id": "evt_0196f73efb2e7dc09c8d6f48f09bbfb0", "merchant_id": "merchant_1747902702", "profile_id": "pro_g9XCI2Z3yKYK3th2AsMZ", "object_id": "pay_rIVdR1DlPgPQkA9cW9Qi", "event_type": "payment_succeeded", "event_class": "payments", "is_delivery_successful": true, "initial_attempt_id": "evt_0196f73efb2e7dc09c8d6f48f09bbfb0", "created": "2025-05-22T09:07:02.063Z" }, { "event_id": "evt_0196f71f17357d608d08a6c06f3d2db5", "merchant_id": "merchant_1747902702", "profile_id": "pro_g9XCI2Z3yKYK3th2AsMZ", "object_id": "ref_OGnyiUPMOUlCpB1pBc9y", "event_type": "refund_succeeded", "event_class": "refunds", "is_delivery_successful": false, "initial_attempt_id": "evt_0196f71f17357d608d08a6c06f3d2db5", "created": "2025-05-22T08:32:12.086Z" }, { "event_id": "evt_0196f71ed2037163ad781fdb10eb715b", "merchant_id": "merchant_1747902702", "profile_id": "pro_g9XCI2Z3yKYK3th2AsMZ", "object_id": "pay_KwWrO9cNRyzCnilFr6Hw", "event_type": "payment_succeeded", "event_class": "payments", "is_delivery_successful": true, "initial_attempt_id": "evt_0196f71ed2037163ad781fdb10eb715b", "created": "2025-05-22T08:31:54.372Z" }, { "event_id": "evt_0196f71ec7ae7212bb8216eae3a763fe", "merchant_id": "merchant_1747902702", "profile_id": "pro_g9XCI2Z3yKYK3th2AsMZ", "object_id": "pay_k3ewq7lpQLDIk6dfCG9E", "event_type": "payment_succeeded", "event_class": "payments", "is_delivery_successful": true, "initial_attempt_id": "evt_0196f71ec7ae7212bb8216eae3a763fe", "created": "2025-05-22T08:31:51.727Z" } ], "total_count": 4 } ``` List initial delivery attempts for a specific object id ``` curl --location 'http://localhost:8080/events/merchant_1747902702' \ --header 'Content-Type: application/json' \ --header 'api-key: test_admin' \ --data '{ "object_id": "pay_KwWrO9cNRyzCnilFr6Hw" }' ``` Response ``` { "events": [ { "event_id": "evt_0196f71ed2037163ad781fdb10eb715b", "merchant_id": "merchant_1747902702", "profile_id": "pro_g9XCI2Z3yKYK3th2AsMZ", "object_id": "pay_KwWrO9cNRyzCnilFr6Hw", "event_type": "payment_succeeded", "event_class": "payments", "is_delivery_successful": true, "initial_attempt_id": "evt_0196f71ed2037163ad781fdb10eb715b", "created": "2025-05-22T08:31:54.372Z" } ], "total_count": 1 } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Core Business Logic** - `crates/router/src/core/webhooks/webhook_events.rs` **Code Patterns Applied:** - Add conditional logic for feature flags or filtering (1 changes) **Detailed Identifier Changes:** Commit 5c8394a6: Files to modify: **crates/router/src/core/webhooks/webhook_events.rs** Modify existing code
{"pr_number": 8109, "pr_title": "fix: duplicate entries in total count when filtering by object ID", "merged_at": "2025-05-27T07:22:39Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "merchant", "refund"]}, "hierarchy": {"core_business": ["crates/router/src/core/webhooks/webhook_events.rs"]}, "change_types": {"conditionals_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(samsung_pay): populate `payment_method_data` in the payment 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 --> This pr contains the changes to populate `payment_method_data` in the samsung pay payment response. As part of this card_type is made a optional for wallet payment_method_data as samsung pay does not send credit or debit in the samsung pay token. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> Having `payment_method_data` for Samsung Pay would be helpful in identifying the customer's card, as it contains the last four digits during a wallet payment. ## How did you test 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 connector with samsung pay enabled -> Make a samsung pay payment, payment_method_data would be populated in the resposne. ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: <api-key>' \ --data-raw '{ "amount": 1, "currency": "USD", "confirm": true, "business_country": "US", "business_label": "default", "amount_to_capture": 1, "customer_id": "cu_1737628105", "setup_future_usage": "off_session", "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "return_url": "https://google.com", "email": "samsungpay@gmail.com", "name": "Joseph Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment request", "statement_descriptor_name": "Juspay", "statement_descriptor_suffix": "Router", "payment_method": "wallet", "payment_method_type": "samsung_pay", "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": { "3_d_s": { "type": "S", "version": "100", "data": "" }, "payment_card_brand": "VI", "payment_currency_type": "USD", "payment_last4_fpan": "1661", "method": "3DS", "recurring_payment": false } } } } } ' ``` ``` { "payment_id": "pay_JfvIOAfcN2hhbntSD4Wl", "merchant_id": "merchant_1737542123", "status": "processing", "amount": 1, "net_amount": 1, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": "cybersource", "client_secret": "pay_JfvIOAfcN2hhbntSD4Wl_secret_XQLmNkq4plkpVOnRJ4Tj", "created": "2025-01-23T08:14:47.701Z", "currency": "USD", "customer_id": "cu_1737620088", "customer": { "id": "cu_1737620088", "name": "Joseph Doe", "email": "samsungpay@gmail.com", "phone": "999999999", "phone_country_code": "+65" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "off_session", "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "wallet", "payment_method_data": { "wallet": { "samsung_pay": { "last4": "1661", "card_network": "Visa", "type": null } }, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "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": "samsungpay@gmail.com", "name": "Joseph Doe", "phone": "999999999", "return_url": "https://google.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": "Juspay", "statement_descriptor_suffix": "Router", "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "samsung_pay", "connector_label": "cybersource_US_default_default", "business_country": "US", "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "cu_1737620088", "created_at": 1737620087, "expires": 1737623687, "secret": "epk_7b4a3abd8dd549c9a62694843d1f34b4" }, "manual_retry_allowed": false, "connector_transaction_id": "7376200888906816004807", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "7376200888906816004807", "payment_link": null, "profile_id": "pro_ufywYBbtUhSFzOf1cGEM", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_27p7IwQqrL6FogXi41pr", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-01-23T08:29:47.701Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2025-01-23T08:14:49.229Z", "split_payments": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/payment_methods.rs` - `crates/api_models/src/payments.rs` - `crates/api_models/src/payments/additional_info.rs` **2. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/payment_method_data.rs` **3. Core Business Logic** - `crates/router/src/core/fraud_check/operation/fraud_check_pre.rs` - `crates/router/src/core/payments/helpers.rs` - `crates/router/src/core/payments/operations/payment_create.rs` **4. Type Definitions** - `crates/router/src/types/fraud_check.rs` **5. Other** - `api-reference-v2/openapi_spec.json` - `api-reference/openapi_spec.json` **Code Patterns Applied:** - Extend existing types with new fields (21 changes) **Detailed Identifier Changes:** Commit 04a5e382: Files to modify: **crates/api_models/src/payment_methods.rs** Modify existing code **crates/api_models/src/payments.rs** Modify existing code **crates/api_models/src/payments/additional_info.rs** Modify existing code **crates/hyperswitch_domain_models/src/payment_method_data.rs** Modify existing code **crates/router/src/core/fraud_check/operation/fraud_check_pre.rs** Modify existing code **crates/router/src/core/payments/helpers.rs** Modify existing code **crates/router/src/core/payments/operations/payment_create.rs** Modify existing code **crates/router/src/types/fraud_check.rs** Modify existing code
{"pr_number": 7095, "pr_title": "fix(samsung_pay): populate `payment_method_data` in the payment response", "merged_at": "2025-02-03T21:50:07Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/payment_methods.rs", "crates/api_models/src/payments.rs", "crates/api_models/src/payments/additional_info.rs"], "domain": ["crates/hyperswitch_domain_models/src/payment_method_data.rs"], "core_business": ["crates/router/src/core/fraud_check/operation/fraud_check_pre.rs", "crates/router/src/core/payments/helpers.rs", "crates/router/src/core/payments/operations/payment_create.rs"], "types": ["crates/router/src/types/fraud_check.rs"], "other": ["api-reference-v2/openapi_spec.json", "api-reference/openapi_spec.json"]}, "change_types": {"fields_added": 21}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor(paymentMethods): move all pm migration related changes to payment methods crate ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [X] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This PR moves all payment method migration related code and functionality from the router crate to the payment_methods crate. This refactoring improves code organization and maintainability by keeping payment method related logic in a dedicated crate. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> - Moved payment method migration handlers to the payment_methods crate - Refactored migration-related data structures and types - Updated feature flags and conditional compilation blocks - Improved error handling and response types for migration operations - Support for network token migration - Enhanced payment method data validation during migration - Added migration-specific types and structs in the payment_methods crate - Implemented proper error handling and status tracking for migration operations - Added support for migrating various payment method attributes: - Card details - Network tokens - Connector mandate details - Network transaction IDs - Improved validation and error reporting during migration ## How did you test 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, API Key, Business profile, Connector, and a customer <details> <summary>Create on-session payment with the created customer</summary> Request curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_FnltW73uMOCcEBApQnrAFpC4E570KVRJWzevF3NMlZS15o13tdMU60eh1wtqz3rc' \ --data-raw '{ "amount": 1000, "currency": "USD", "confirm": false, "capture_method": "automatic", "authentication_type": "no_three_ds", "customer_id": "cus_qmEvJXTwol5oGfYQL25C", "profile_id": "pro_5VR03thJTJH5WVRNXDSp", "email": "hyperswitch_sdk_demo_id@gmail.com", "description": "Hello this is description", "shipping": { "address": { "state": "zsaasdas", "city": "Banglore", "country": "US", "line1": "sdsdfsdf", "line2": "hsgdbhd", "line3": "alsksoe", "zip": "571201", "first_name": "joseph", "last_name": "doe" }, "phone": { "number": "123456789", "country_code": "+1" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "123456789", "country_code": "+1" } }, "setup_future_usage": "on_session", "order_details": null }' Response { "payment_id": "pay_qmwSjRRAsWceStL7ZlWP", "merchant_id": "merchant_1744875358", "status": "requires_payment_method", "amount": 1000, "net_amount": 1000, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": null, "client_secret": "pay_qmwSjRRAsWceStL7ZlWP_secret_qpwNxseYRkppM8dQLGJ2", "created": "2025-04-17T08:26:19.988Z", "currency": "USD", "customer_id": "cus_qmEvJXTwol5oGfYQL25C", "customer": { "id": "cus_qmEvJXTwol5oGfYQL25C", "name": "John Doe", "email": "hyperswitch_sdk_demo_id@gmail.com", "phone": "999999999", "phone_country_code": "+65" }, "description": "Hello this is description", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "on_session", "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": null, "payment_method_data": null, "payment_token": null, "shipping": { "address": { "city": "Banglore", "country": "US", "line1": "sdsdfsdf", "line2": "hsgdbhd", "line3": "alsksoe", "zip": "571201", "state": "zsaasdas", "first_name": "joseph", "last_name": "doe" }, "phone": { "number": "123456789", "country_code": "+1" }, "email": null }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "123456789", "country_code": "+1" }, "email": null }, "order_details": null, "email": "hyperswitch_sdk_demo_id@gmail.com", "name": "John Doe", "phone": "999999999", "return_url": null, "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": null, "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "cus_qmEvJXTwol5oGfYQL25C", "created_at": 1744878379, "expires": 1744881979, "secret": "epk_73acc74e655e4163ba338a637b1248aa" }, "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_5VR03thJTJH5WVRNXDSp", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": null, "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-04-17T08:41:19.988Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2025-04-17T08:26:20.045Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": null, "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null } </details> <details> <summary>Confirm the payment</summary> Request curl --location 'http://localhost:8080/payments/pay_qmwSjRRAsWceStL7ZlWP/confirm' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: pk_dev_83200543d7d045f89bd4aa0d9475a63a' \ --data '{ "payment_method": "card", "payment_method_type": "credit", "client_secret": "pay_qmwSjRRAsWceStL7ZlWP_secret_qpwNxseYRkppM8dQLGJ2", "profile_id": "pro_5VR03thJTJH5WVRNXDSp", "payment_method_data": { "card": { "card_number": "4111111111111111", "card_exp_month": "03", "card_exp_year": "2030", "card_holder_name": "CLBRW dffdg", "card_cvc": "737" } }, "payment_type": "new_mandate", "customer_acceptance": { "acceptance_type": "offline", "accepted_at": "1963-05-03T04:07:52.723Z", "online": { "ip_address": "125.0.0.1", "user_agent": "amet irure esse" } } }' Response { "payment_id": "pay_qmwSjRRAsWceStL7ZlWP", "merchant_id": "merchant_1744875358", "status": "succeeded", "amount": 1000, "net_amount": 1000, "shipping_cost": null, "amount_capturable": 0, "amount_received": 1000, "connector": "cybersource", "client_secret": "pay_qmwSjRRAsWceStL7ZlWP_secret_qpwNxseYRkppM8dQLGJ2", "created": "2025-04-17T08:26:19.988Z", "currency": "USD", "customer_id": "cus_qmEvJXTwol5oGfYQL25C", "customer": { "id": "cus_qmEvJXTwol5oGfYQL25C", "name": "John Doe", "email": "hyperswitch_sdk_demo_id@gmail.com", "phone": "999999999", "phone_country_code": "+65" }, "description": "Hello this is description", "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": "03", "card_exp_year": "2030", "card_holder_name": "CLBRW dffdg", "payment_checks": { "avs_response": { "code": "Y", "codeRaw": "Y" }, "card_verification": null }, "authentication_data": null }, "billing": null }, "payment_token": "token_DirGLr4ZuG0YQLDjnthZ", "shipping": { "address": { "city": "Banglore", "country": "US", "line1": "sdsdfsdf", "line2": "hsgdbhd", "line3": "alsksoe", "zip": "571201", "state": "zsaasdas", "first_name": "joseph", "last_name": "doe" }, "phone": { "number": "123456789", "country_code": "+1" }, "email": null }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "123456789", "country_code": "+1" }, "email": null }, "order_details": null, "email": "hyperswitch_sdk_demo_id@gmail.com", "name": "John Doe", "phone": "999999999", "return_url": null, "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "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": "7448785550036549704805", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "pay_qmwSjRRAsWceStL7ZlWP_1", "payment_link": null, "profile_id": "pro_5VR03thJTJH5WVRNXDSp", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_4cXM5Pc7p96fCmB2oZim", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-04-17T08:41:19.988Z", "fingerprint": null, "browser_info": { "os_type": null, "language": null, "time_zone": null, "ip_address": "::1", "os_version": null, "user_agent": null, "color_depth": null, "device_model": null, "java_enabled": null, "screen_width": null, "accept_header": null, "screen_height": null, "accept_language": "en", "java_script_enabled": null }, "payment_method_id": null, "payment_method_status": null, "updated": "2025-04-17T08:29:15.447Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null } </details> <details> <summary>List customer Payment Methods</summary> Request curl --location 'http://localhost:8080/customers/cus_qmEvJXTwol5oGfYQL25C/payment_methods' \ --header 'Accept: application/json' \ --header 'api-key: dev_FnltW73uMOCcEBApQnrAFpC4E570KVRJWzevF3NMlZS15o13tdMU60eh1wtqz3rc' Response { "customer_payment_methods": [ { "payment_token": "token_C0qM39EOKWuXXaZiqleE", "payment_method_id": "pm_pLVoa3evTaZFbZzjLA8s", "customer_id": "cus_qmEvJXTwol5oGfYQL25C", "payment_method": "card", "payment_method_type": "credit", "payment_method_issuer": "JP Morgan", "payment_method_issuer_code": null, "recurring_enabled": false, "installment_payment_enabled": false, "payment_experience": [ "redirect_to_url" ], "card": { "scheme": "Visa", "issuer_country": "INDIA", "last4_digits": "1111", "expiry_month": "03", "expiry_year": "2030", "card_token": null, "card_holder_name": "CLBRW dffdg", "card_fingerprint": null, "nick_name": null, "card_network": "Visa", "card_isin": "411111", "card_issuer": "JP Morgan", "card_type": "CREDIT", "saved_to_locker": true }, "metadata": null, "created": "2025-04-17T08:29:15.455Z", "bank": null, "surcharge_details": null, "requires_cvv": true, "last_used_at": "2025-04-17T08:29:15.455Z", "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": "CLBRW", "last_name": "dffdg" }, "phone": { "number": "123456789", "country_code": "+1" }, "email": null } } ], "is_guest_customer": null } </details> 2. Create a new customer for offsession payment testing <details> <summary>Create a payment intent with setup_future_usage: offsession</summary> Request curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_FnltW73uMOCcEBApQnrAFpC4E570KVRJWzevF3NMlZS15o13tdMU60eh1wtqz3rc' \ --data-raw '{ "amount": 1000, "currency": "USD", "confirm": false, "capture_method": "automatic", "authentication_type": "no_three_ds", "customer_id": "cus_X4kaqOtEassKw3iiRM4v", "profile_id": "pro_5VR03thJTJH5WVRNXDSp", "email": "hyperswitch_sdk_demo_id@gmail.com", "description": "Hello this is description", "shipping": { "address": { "state": "zsaasdas", "city": "Banglore", "country": "US", "line1": "sdsdfsdf", "line2": "hsgdbhd", "line3": "alsksoe", "zip": "571201", "first_name": "joseph", "last_name": "doe" }, "phone": { "number": "123456789", "country_code": "+1" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "123456789", "country_code": "+1" } }, "setup_future_usage": "off_session", "order_details": null }' Response { "payment_id": "pay_mbPUbwCkHDFtfTWgRpun", "merchant_id": "merchant_1744875358", "status": "requires_payment_method", "amount": 1000, "net_amount": 1000, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": null, "client_secret": "pay_mbPUbwCkHDFtfTWgRpun_secret_gPLUinlRR0INPY21se4T", "created": "2025-04-17T08:32:21.848Z", "currency": "USD", "customer_id": "cus_X4kaqOtEassKw3iiRM4v", "customer": { "id": "cus_X4kaqOtEassKw3iiRM4v", "name": "John Doe", "email": "hyperswitch_sdk_demo_id@gmail.com", "phone": "999999999", "phone_country_code": "+65" }, "description": "Hello this is description", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "off_session", "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": null, "payment_method_data": null, "payment_token": null, "shipping": { "address": { "city": "Banglore", "country": "US", "line1": "sdsdfsdf", "line2": "hsgdbhd", "line3": "alsksoe", "zip": "571201", "state": "zsaasdas", "first_name": "joseph", "last_name": "doe" }, "phone": { "number": "123456789", "country_code": "+1" }, "email": null }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "123456789", "country_code": "+1" }, "email": null }, "order_details": null, "email": "hyperswitch_sdk_demo_id@gmail.com", "name": "John Doe", "phone": "999999999", "return_url": null, "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": null, "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "cus_X4kaqOtEassKw3iiRM4v", "created_at": 1744878741, "expires": 1744882341, "secret": "epk_8cb5ff9074c2494c8449346ee3c44a12" }, "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_5VR03thJTJH5WVRNXDSp", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": null, "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-04-17T08:47:21.848Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2025-04-17T08:32:21.876Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": null, "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null } </details> <details> <summary>Confirm the payment intent</summary> Request curl --location 'http://localhost:8080/payments/pay_mbPUbwCkHDFtfTWgRpun/confirm' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: pk_dev_83200543d7d045f89bd4aa0d9475a63a' \ --data '{ "payment_method": "card", "payment_method_type": "credit", "client_secret": "pay_mbPUbwCkHDFtfTWgRpun_secret_gPLUinlRR0INPY21se4T", "profile_id": "pro_5VR03thJTJH5WVRNXDSp", "payment_method_data": { "card": { "card_number": "4111111111111111", "card_exp_month": "03", "card_exp_year": "2030", "card_holder_name": "CLBRW dffdg", "card_cvc": "737" } }, "payment_type": "new_mandate", "customer_acceptance": { "acceptance_type": "offline", "accepted_at": "1963-05-03T04:07:52.723Z", "online": { "ip_address": "125.0.0.1", "user_agent": "amet irure esse" } } }' Response { "payment_id": "pay_mbPUbwCkHDFtfTWgRpun", "merchant_id": "merchant_1744875358", "status": "succeeded", "amount": 1000, "net_amount": 1000, "shipping_cost": null, "amount_capturable": 0, "amount_received": 1000, "connector": "cybersource", "client_secret": "pay_mbPUbwCkHDFtfTWgRpun_secret_gPLUinlRR0INPY21se4T", "created": "2025-04-17T08:32:21.848Z", "currency": "USD", "customer_id": "cus_X4kaqOtEassKw3iiRM4v", "customer": { "id": "cus_X4kaqOtEassKw3iiRM4v", "name": "John Doe", "email": "hyperswitch_sdk_demo_id@gmail.com", "phone": "999999999", "phone_country_code": "+65" }, "description": "Hello this is description", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "off_session", "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "1111", "card_type": "CREDIT", "card_network": "Visa", "card_issuer": "JP Morgan", "card_issuing_country": "INDIA", "card_isin": "411111", "card_extended_bin": null, "card_exp_month": "03", "card_exp_year": "2030", "card_holder_name": "CLBRW dffdg", "payment_checks": { "avs_response": { "code": "Y", "codeRaw": "Y" }, "card_verification": null }, "authentication_data": null }, "billing": null }, "payment_token": "token_HXjTgyijlJIT12YmXCZT", "shipping": { "address": { "city": "Banglore", "country": "US", "line1": "sdsdfsdf", "line2": "hsgdbhd", "line3": "alsksoe", "zip": "571201", "state": "zsaasdas", "first_name": "joseph", "last_name": "doe" }, "phone": { "number": "123456789", "country_code": "+1" }, "email": null }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "123456789", "country_code": "+1" }, "email": null }, "order_details": null, "email": "hyperswitch_sdk_demo_id@gmail.com", "name": "John Doe", "phone": "999999999", "return_url": null, "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "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": "7448787948566158204806", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "pay_mbPUbwCkHDFtfTWgRpun_1", "payment_link": null, "profile_id": "pro_5VR03thJTJH5WVRNXDSp", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_4cXM5Pc7p96fCmB2oZim", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-04-17T08:47:21.848Z", "fingerprint": null, "browser_info": { "os_type": null, "language": null, "time_zone": null, "ip_address": "::1", "os_version": null, "user_agent": null, "color_depth": null, "device_model": null, "java_enabled": null, "screen_width": null, "accept_header": null, "screen_height": null, "accept_language": "en", "java_script_enabled": null }, "payment_method_id": "pm_eeUJfBIaOvdZZCB49l72", "payment_method_status": "active", "updated": "2025-04-17T08:33:16.039Z", "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": "32F638788713F60BE063AF598E0AECE9", "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null } </details> <details> <summary>List the customer payment methods</summary> Request curl --location 'http://localhost:8080/customers/cus_X4kaqOtEassKw3iiRM4v/payment_methods' \ --header 'Accept: application/json' \ --header 'api-key: dev_FnltW73uMOCcEBApQnrAFpC4E570KVRJWzevF3NMlZS15o13tdMU60eh1wtqz3rc' Response { "customer_payment_methods": [ { "payment_token": "token_Xz7iFHHg2og0ixOa8CYr", "payment_method_id": "pm_eeUJfBIaOvdZZCB49l72", "customer_id": "cus_X4kaqOtEassKw3iiRM4v", "payment_method": "card", "payment_method_type": "credit", "payment_method_issuer": "JP Morgan", "payment_method_issuer_code": null, "recurring_enabled": false, "installment_payment_enabled": false, "payment_experience": [ "redirect_to_url" ], "card": { "scheme": "Visa", "issuer_country": "INDIA", "last4_digits": "1111", "expiry_month": "03", "expiry_year": "2030", "card_token": null, "card_holder_name": "CLBRW dffdg", "card_fingerprint": null, "nick_name": null, "card_network": "Visa", "card_isin": "411111", "card_issuer": "JP Morgan", "card_type": "CREDIT", "saved_to_locker": true }, "metadata": null, "created": "2025-04-17T08:33:16.010Z", "bank": null, "surcharge_details": null, "requires_cvv": true, "last_used_at": "2025-04-17T08:33:16.010Z", "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": "CLBRW", "last_name": "dffdg" }, "phone": { "number": "123456789", "country_code": "+1" }, "email": null } } ], "is_guest_customer": null } </details> 3. Test payment method migrate for new customer. Create a new customer <details> <summary>List payment methods of the customer</summary> Request curl --location 'http://localhost:8080/customers/cus_KLhHM9R3f16CP2v1OuXt/payment_methods' \ --header 'Accept: application/json' \ --header 'x-feature: router-custom-be' \ --header 'api-key: dev_FnltW73uMOCcEBApQnrAFpC4E570KVRJWzevF3NMlZS15o13tdMU60eh1wtqz3rc' Response Expected empty list as the customer is new { "customer_payment_methods": [], "is_guest_customer": null } </details> <details> <summary>Add a payment method for the new customer using /migrate API </summary> Request curl --location 'http://localhost:8080/payment_methods/migrate' \ --header 'api-key: test_admin' \ --header 'Content-Type: application/json' \ --data '{ "payment_method": "card", "merchant_id": "merchant_1744875358", "card": { "card_number": "6011111111111117", "card_exp_month": "10", "card_exp_year": "33", "nick_name": "Joh" }, "customer_id": "cus_KLhHM9R3f16CP2v1OuXt", "connector_mandate_details": { "mca_4cXM5Pc7p96fCmB2oZim": { "connector_mandate_id": "juaghfija" } } } ' Response { "payment_method_response": { "merchant_id": "merchant_1744875358", "customer_id": "cus_KLhHM9R3f16CP2v1OuXt", "payment_method_id": "pm_x58uwwcP6pcqSMPPOsnx", "payment_method": "card", "payment_method_type": null, "card": { "scheme": "DinersClub", "issuer_country": null, "last4_digits": "1117", "expiry_month": "10", "expiry_year": "33", "card_token": null, "card_holder_name": null, "card_fingerprint": null, "nick_name": "Joh", "card_network": "DinersClub", "card_isin": "601111", "card_issuer": null, "card_type": "CREDIT", "saved_to_locker": true }, "recurring_enabled": false, "installment_payment_enabled": false, "payment_experience": [ "redirect_to_url" ], "metadata": null, "created": "2025-04-17T08:36:45.651Z", "last_used_at": "2025-04-17T08:36:45.651Z", "client_secret": "pm_x58uwwcP6pcqSMPPOsnx_secret_VbS8w4pFXCc60aLm0aD4" }, "card_migrated": true, "network_token_migrated": null, "connector_mandate_details_migrated": true, "network_transaction_id_migrated": null } </details> <details> <summary>List the Customer PMs again</summary> Request curl --location 'http://localhost:8080/customers/cus_KLhHM9R3f16CP2v1OuXt/payment_methods' \ --header 'Accept: application/json' \ --header 'x-feature: router-custom-be' \ --header 'api-key: dev_FnltW73uMOCcEBApQnrAFpC4E570KVRJWzevF3NMlZS15o13tdMU60eh1wtqz3rc' Response As expected the customer has new payment methods added via /migrate API { "customer_payment_methods": [ { "payment_token": "token_I9VnnF5P5tBIiQ0xZnM2", "payment_method_id": "pm_x58uwwcP6pcqSMPPOsnx", "customer_id": "cus_KLhHM9R3f16CP2v1OuXt", "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": "DinersClub", "issuer_country": null, "last4_digits": "1117", "expiry_month": "10", "expiry_year": "33", "card_token": null, "card_holder_name": null, "card_fingerprint": null, "nick_name": "Joh", "card_network": "DinersClub", "card_isin": "601111", "card_issuer": null, "card_type": "CREDIT", "saved_to_locker": true }, "metadata": null, "created": "2025-04-17T08:36:45.652Z", "bank": null, "surcharge_details": null, "requires_cvv": true, "last_used_at": "2025-04-17T08:36:45.652Z", "default_payment_method_set": true, "billing": null } ], "is_guest_customer": null } </details> 4. To check if the migrated payment method can be used in the payment, we create an onsession payment intent with this customer id <details> <summary>List the customer payment methods using the client secret</summary> Request curl --location 'http://localhost:8080/customers/payment_methods?client_secret=pay_TcXsFdXIIKsg0vMtsNcw_secret_vfeAOfTzSQfxUajzKe4K' \ --header 'Accept: application/json' \ --header 'api-key: pk_dev_83200543d7d045f89bd4aa0d9475a63a' Response { "customer_payment_methods": [ { "payment_token": "token_gHFHR6PsW8pk1YbLV994", "payment_method_id": "pm_x58uwwcP6pcqSMPPOsnx", "customer_id": "cus_KLhHM9R3f16CP2v1OuXt", "payment_method": "card", "payment_method_type": null, "payment_method_issuer": null, "payment_method_issuer_code": null, "recurring_enabled": true, "installment_payment_enabled": false, "payment_experience": [ "redirect_to_url" ], "card": { "scheme": "DinersClub", "issuer_country": null, "last4_digits": "1117", "expiry_month": "10", "expiry_year": "33", "card_token": null, "card_holder_name": null, "card_fingerprint": null, "nick_name": "Joh", "card_network": "DinersClub", "card_isin": "601111", "card_issuer": null, "card_type": "CREDIT", "saved_to_locker": true }, "metadata": null, "created": "2025-04-17T08:36:45.652Z", "bank": null, "surcharge_details": null, "requires_cvv": true, "last_used_at": "2025-04-17T08:36:45.652Z", "default_payment_method_set": true, "billing": null } ], "is_guest_customer": false } </details> <details> <summary>Confirm the payment with above payment token</summary> Request curl --location 'http://localhost:8080/payments/pay_TcXsFdXIIKsg0vMtsNcw/confirm' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: pk_dev_83200543d7d045f89bd4aa0d9475a63a' \ --data '{ "payment_method": "card", "client_secret": "pay_TcXsFdXIIKsg0vMtsNcw_secret_vfeAOfTzSQfxUajzKe4K", "payment_token": "token_gHFHR6PsW8pk1YbLV994" }' Response { "payment_id": "pay_TcXsFdXIIKsg0vMtsNcw", "merchant_id": "merchant_1744875358", "status": "succeeded", "amount": 1000, "net_amount": 1000, "shipping_cost": null, "amount_capturable": 0, "amount_received": 1000, "connector": "cybersource", "client_secret": "pay_TcXsFdXIIKsg0vMtsNcw_secret_vfeAOfTzSQfxUajzKe4K", "created": "2025-04-17T08:47:25.193Z", "currency": "USD", "customer_id": "cus_KLhHM9R3f16CP2v1OuXt", "customer": { "id": "cus_KLhHM9R3f16CP2v1OuXt", "name": "John Doe", "email": "hyperswitch_sdk_demo_id@gmail.com", "phone": "999999999", "phone_country_code": "+65" }, "description": "Hello this is description", "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": "1117", "card_type": "CREDIT", "card_network": "DinersClub", "card_issuer": null, "card_issuing_country": null, "card_isin": "601111", "card_extended_bin": null, "card_exp_month": "10", "card_exp_year": "33", "card_holder_name": null, "payment_checks": { "avs_response": { "code": "A", "codeRaw": "Y" }, "card_verification": null }, "authentication_data": null }, "billing": null }, "payment_token": "token_gHFHR6PsW8pk1YbLV994", "shipping": { "address": { "city": "Banglore", "country": "US", "line1": "sdsdfsdf", "line2": "hsgdbhd", "line3": "alsksoe", "zip": "571201", "state": "zsaasdas", "first_name": "joseph", "last_name": "doe" }, "phone": { "number": "123456789", "country_code": "+1" }, "email": null }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "123456789", "country_code": "+1" }, "email": null }, "order_details": null, "email": "hyperswitch_sdk_demo_id@gmail.com", "name": "John Doe", "phone": "999999999", "return_url": null, "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": 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": "7448796541886364904807", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "pay_TcXsFdXIIKsg0vMtsNcw_1", "payment_link": null, "profile_id": "pro_5VR03thJTJH5WVRNXDSp", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_4cXM5Pc7p96fCmB2oZim", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-04-17T09:02:25.193Z", "fingerprint": null, "browser_info": { "os_type": null, "language": null, "time_zone": null, "ip_address": "::1", "os_version": null, "user_agent": null, "color_depth": null, "device_model": null, "java_enabled": null, "screen_width": null, "accept_header": null, "screen_height": null, "accept_language": "en", "java_script_enabled": null }, "payment_method_id": "pm_x58uwwcP6pcqSMPPOsnx", "payment_method_status": "active", "updated": "2025-04-17T08:47:34.548Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": "saved_card", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null } </details> 5. Test payment method migration api with network_transaction_id <details> Create a new customer <summary>Add customer payment method with NTID</summary> Request curl --location 'http://localhost:8080/payment_methods/migrate' \ --header 'api-key: test_admin' \ --header 'Content-Type: application/json' \ --data '{ "payment_method": "card", "merchant_id": "merchant_1744875358", "card": { "card_number": "4242424242424242", "card_exp_month": "10", "card_exp_year": "26", "nick_name": "Joh" }, "customer_id": "cus_gIbOHWMUdVIJPXkOmEGw", "network_transaction_id": "network_transaction_id", "connector_mandate_details": { "mca_4cXM5Pc7p96fCmB2oZim": { "connector_mandate_id": "connector_mandate_id", "original_payment_authorized_amount": 6560, "original_payment_authorized_currency": "USD" } } } ' Response { "payment_method_response": { "merchant_id": "merchant_1744875358", "customer_id": "cus_gIbOHWMUdVIJPXkOmEGw", "payment_method_id": "pm_33dm3RNHzkNRoYmkZkq8", "payment_method": "card", "payment_method_type": null, "card": { "scheme": "Visa", "issuer_country": "UNITEDKINGDOM", "last4_digits": "4242", "expiry_month": "10", "expiry_year": "26", "card_token": null, "card_holder_name": null, "card_fingerprint": null, "nick_name": "Joh", "card_network": "Visa", "card_isin": "424242", "card_issuer": "STRIPE PAYMENTS UK LIMITED", "card_type": "CREDIT", "saved_to_locker": true }, "recurring_enabled": false, "installment_payment_enabled": false, "payment_experience": [ "redirect_to_url" ], "metadata": null, "created": "2025-04-17T08:55:40.382Z", "last_used_at": "2025-04-17T08:55:40.382Z", "client_secret": "pm_33dm3RNHzkNRoYmkZkq8_secret_2xHRJBFxmybLzoB1x0hA" }, "card_migrated": true, "network_token_migrated": null, "connector_mandate_details_migrated": true, "network_transaction_id_migrated": true } </details> <details> Create an onsession payment and get the client secret from response <summary>List all the payment methods of the customer using the client secret</summary> Request curl --location 'http://localhost:8080/customers/payment_methods?client_secret=pay_4slVZnQjT2Rgf6hsnH2f_secret_KQqTcwrHYsZmDWfDaqCr' \ --header 'Accept: application/json' \ --header 'api-key: pk_dev_83200543d7d045f89bd4aa0d9475a63a' Response { "customer_payment_methods": [ { "payment_token": "token_rADRActu2VQW7vsZWU51", "payment_method_id": "pm_33dm3RNHzkNRoYmkZkq8", "customer_id": "cus_gIbOHWMUdVIJPXkOmEGw", "payment_method": "card", "payment_method_type": null, "payment_method_issuer": null, "payment_method_issuer_code": null, "recurring_enabled": true, "installment_payment_enabled": false, "payment_experience": [ "redirect_to_url" ], "card": { "scheme": "Visa", "issuer_country": "UNITEDKINGDOM", "last4_digits": "4242", "expiry_month": "10", "expiry_year": "26", "card_token": null, "card_holder_name": null, "card_fingerprint": null, "nick_name": "Joh", "card_network": "Visa", "card_isin": "424242", "card_issuer": "STRIPE PAYMENTS UK LIMITED", "card_type": "CREDIT", "saved_to_locker": true }, "metadata": null, "created": "2025-04-17T08:55:40.385Z", "bank": null, "surcharge_details": null, "requires_cvv": true, "last_used_at": "2025-04-17T08:55:40.385Z", "default_payment_method_set": true, "billing": null } ], "is_guest_customer": false } </details> <details> <summary>Confirm the payment with payment token</summary> Request curl --location 'http://localhost:8080/payments/pay_4slVZnQjT2Rgf6hsnH2f/confirm' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: pk_dev_83200543d7d045f89bd4aa0d9475a63a' \ --data '{ "payment_method": "card", "client_secret": "pay_4slVZnQjT2Rgf6hsnH2f_secret_KQqTcwrHYsZmDWfDaqCr", "payment_token": "token_rADRActu2VQW7vsZWU51" }' Response { "payment_id": "pay_4slVZnQjT2Rgf6hsnH2f", "merchant_id": "merchant_1744875358", "status": "succeeded", "amount": 1000, "net_amount": 1000, "shipping_cost": null, "amount_capturable": 0, "amount_received": 1000, "connector": "cybersource", "client_secret": "pay_4slVZnQjT2Rgf6hsnH2f_secret_KQqTcwrHYsZmDWfDaqCr", "created": "2025-04-17T08:58:04.694Z", "currency": "USD", "customer_id": "cus_gIbOHWMUdVIJPXkOmEGw", "customer": { "id": "cus_gIbOHWMUdVIJPXkOmEGw", "name": "John Doe", "email": "hyperswitch_sdk_demo_id@gmail.com", "phone": "999999999", "phone_country_code": "+65" }, "description": "Hello this is description", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "on_session", "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "4242", "card_type": "CREDIT", "card_network": "Visa", "card_issuer": "STRIPE PAYMENTS UK LIMITED", "card_issuing_country": "UNITEDKINGDOM", "card_isin": "424242", "card_extended_bin": null, "card_exp_month": "10", "card_exp_year": "26", "card_holder_name": null, "payment_checks": { "avs_response": { "code": "Y", "codeRaw": "Y" }, "card_verification": null }, "authentication_data": null }, "billing": null }, "payment_token": "token_rADRActu2VQW7vsZWU51", "shipping": { "address": { "city": "Banglore", "country": "US", "line1": "sdsdfsdf", "line2": "hsgdbhd", "line3": "alsksoe", "zip": "571201", "state": "zsaasdas", "first_name": "joseph", "last_name": "doe" }, "phone": { "number": "123456789", "country_code": "+1" }, "email": null }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "123456789", "country_code": "+1" }, "email": null }, "order_details": null, "email": "hyperswitch_sdk_demo_id@gmail.com", "name": "John Doe", "phone": "999999999", "return_url": null, "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": 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": "7448803299126792804805", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "pay_4slVZnQjT2Rgf6hsnH2f_1", "payment_link": null, "profile_id": "pro_5VR03thJTJH5WVRNXDSp", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_4cXM5Pc7p96fCmB2oZim", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-04-17T09:13:04.694Z", "fingerprint": null, "browser_info": { "os_type": null, "language": null, "time_zone": null, "ip_address": "::1", "os_version": null, "user_agent": null, "color_depth": null, "device_model": null, "java_enabled": null, "screen_width": null, "accept_header": null, "screen_height": null, "accept_language": "en", "java_script_enabled": null }, "payment_method_id": "pm_33dm3RNHzkNRoYmkZkq8", "payment_method_status": "active", "updated": "2025-04-17T08:58:50.272Z", "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 } </details> <details> <summary>Verify Discover cards validation in migrate API</summary> Request curl --location 'http://localhost:8080/payment_methods/migrate' \ --header 'api-key: test_admin' \ --header 'Content-Type: application/json' \ --data '{ "payment_method": "card", "merchant_id": "merchant_1744875358", "card": { "card_number": "6043101111111117", "card_exp_month": "10", "card_exp_year": "33", "nick_name": "Joh" }, "customer_id": "cus_gHT9elNyHdZPJh7Rjv2y", "connector_mandate_details": { "mca_4cXM5Pc7p96fCmB2oZim": { "connector_mandate_id": "juaghfija" } } } ' Response { "error": { "type": "invalid_request", "message": "Missing required params", "code": "IR_21", "data": [ "original_payment_authorized_currency", "original_payment_authorized_amount" ] } } </details> <details> <summary>Test payment method addition using migrate batch endpoint</summary> Request sample.csv merchant_id,merchant_connector_id,name,email,phone,phone_country_code,customer_id,subscription_id,payment_method,payment_method_type,nick_name,payment_instrument_id,card_number_masked,card_expiry_month,card_expiry_year,card_scheme,original_transaction_id,billing_address_zip,billing_address_state,billing_address_first_name,billing_address_last_name,billing_address_city,billing_address_country,billing_address_line1,billing_address_line2,raw_card_number,original_transaction_amount,original_transaction_currency,network_token_number merchant_1744875358,mca_4cXM5Pc7p96fCmB2oZim,noreal name,test@gmail.com,523698741,33,23dsfw23234a,900036959,card,credit,,4CBB27C05DE063AF598E,4242424242424242,03,2027,1,16153570198,94043,CA,NOREAL,NAME,Mountain View,US,1295 Charleston Rd,,,1000,USD,4242424242424242 curl --location 'http://localhost:8080/payment_methods/migrate-batch' \ --header 'api-key: test_admin' \ --header 'Content-Type: application/json' \ --form 'file=@"/Users/jagan.elavarasan/Downloads/sample.csv"' \ --form 'merchant_id="merchant_1745224962"' \ --form 'merchant_connector_id="mca_HmNmIqOB3UlY2ccFnGXV"' Response [ { "line_number": 1, "payment_method_id": "pm_4KzRt3iagMk4O1I0DZwi", "payment_method": "card", "payment_method_type": "credit", "customer_id": "23dsfw23234a", "migration_status": "Success", "card_number_masked": "4242424242424242", "card_migrated": true, "network_token_migrated": true, "connector_mandate_details_migrated": true, "network_transaction_id_migrated": true } ] </details> <details> <summary>Test payment using the saved payment method</summary> Request curl --location 'http://localhost:8080/payments/pay_3NFFos2v0BeZCqmi4h82/confirm' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: pk_dev_9b7204ae65c8401da71fcc17d0dee950' \ --data '{ "payment_method": "card", "client_secret": "pay_3NFFos2v0BeZCqmi4h82_secret_bTwL7nF0BSm9eJXJuSpc", "payment_token": "token_S6l6CTSbQTsAmIPxVyLP" }' Response { "payment_id": "pay_3NFFos2v0BeZCqmi4h82", "merchant_id": "merchant_1745224962", "status": "succeeded", "amount": 1000, "net_amount": 1000, "shipping_cost": null, "amount_capturable": 0, "amount_received": 1000, "connector": "cybersource", "client_secret": "pay_3NFFos2v0BeZCqmi4h82_secret_bTwL7nF0BSm9eJXJuSpc", "created": "2025-04-21T10:33:08.321Z", "currency": "USD", "customer_id": "23dsfw23234a", "customer": { "id": "23dsfw23234a", "name": "noreal name", "email": "hyperswitch_sdk_demo_id@gmail.com", "phone": "523698741", "phone_country_code": "33" }, "description": "Hello this is description", "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": "2027", "card_holder_name": "noreal name", "payment_checks": { "avs_response": { "code": "Y", "codeRaw": "Y" }, "card_verification": null }, "authentication_data": null }, "billing": null }, "payment_token": "token_S6l6CTSbQTsAmIPxVyLP", "shipping": { "address": { "city": "Banglore", "country": "US", "line1": "sdsdfsdf", "line2": "hsgdbhd", "line3": "alsksoe", "zip": "571201", "state": "zsaasdas", "first_name": "joseph", "last_name": "doe" }, "phone": { "number": "123456789", "country_code": "+1" }, "email": null }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "123456789", "country_code": "+1" }, "email": null }, "order_details": null, "email": "hyperswitch_sdk_demo_id@gmail.com", "name": "noreal name", "phone": "523698741", "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": "7452315950806121404805", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "pay_3NFFos2v0BeZCqmi4h82_1", "payment_link": null, "profile_id": "pro_fg5JtKgrVIYUVB7x7zYh", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_HmNmIqOB3UlY2ccFnGXV", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-04-21T10:48:08.321Z", "fingerprint": null, "browser_info": { "os_type": null, "language": null, "time_zone": null, "ip_address": "::1", "os_version": null, "user_agent": null, "color_depth": null, "device_model": null, "java_enabled": null, "screen_width": null, "accept_header": null, "screen_height": null, "accept_language": "en", "java_script_enabled": null }, "payment_method_id": "pm_4KzRt3iagMk4O1I0DZwi", "payment_method_status": "active", "updated": "2025-04-21T10:33:15.495Z", "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 } </details> ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/cards_info.rs` - `crates/hyperswitch_domain_models/src/ext_traits.rs` - `crates/hyperswitch_domain_models/src/lib.rs` **2. Core Business Logic** - `crates/payment_methods/src/core.rs` - `crates/payment_methods/src/core/errors.rs` - `crates/router/src/core/payment_methods/migration.rs` - ... and 17 more files **3. Type Definitions** - `crates/router/src/types/api/mandates.rs` - `crates/router/src/types/domain/types.rs` **4. Utils** - `crates/payment_methods/src/helpers.rs` - `crates/router/src/utils/ext_traits.rs` **5. Configuration Files** - `crates/payment_methods/Cargo.toml` - `crates/router/Cargo.toml` **6. Other** - `Cargo.lock` - `crates/payment_methods/src/controller.rs` - `crates/payment_methods/src/lib.rs` - ... and 8 more files **Code Patterns Applied:** - Define new data structures (2 changes) - Implement new functions (97 changes) - Extend existing types with new fields (568 changes) - Add conditional logic for feature flags or filtering (26 changes) **Detailed Identifier Changes:** Commit 9c8cf936: Files to modify: **crates/hyperswitch_domain_models/src/cards_info.rs** Add: - trait: pub::CardsInfoInterface **crates/hyperswitch_domain_models/src/ext_traits.rs** Add: - function: private::check_value_present - function: private::get_required_value - function: private::parse_enum - function: private::parse_value - function: private::update_value - trait: pub::OptionExt - impl: impl OptionExt<T> for Option<T> **crates/hyperswitch_domain_models/src/lib.rs** Add: - mod: pub::cards_info - mod: pub::ext_traits **crates/payment_methods/src/controller.rs** Add: - function: private::get_or_insert_payment_method - function: pub::create_encrypted_data - struct: pub::DeleteCardResp - enum: pub::DataDuplicationCheck - trait: pub::PaymentMethodsController **crates/payment_methods/src/core.rs** Add: - mod: pub::errors - mod: pub::migration **crates/payment_methods/src/core/errors.rs** Add: - enum: pub::VaultError **crates/payment_methods/src/core/migration/payment_methods.rs** Add: - function: pub::migrate_payment_method - function: pub::migrate_payment_method - function: pub::populate_bin_details_for_masked_card - function: private::foreign_try_from - function: private::foreign_try_from - function: pub::get_client_secret_or_add_payment_method_for_migration - function: pub::skip_locker_call_and_migrate_payment_method - function: pub::skip_locker_call_and_migrate_payment_method - function: pub::get_card_bin_and_last4_digits_for_masked_card - function: pub::save_migration_payment_method - impl: impl ForeignTryFrom<( &api_models::payment_methods::MigrateCardDetail, Option<cards_info::CardInfo>, )> for pm_api::CardDetailFromLocker - impl: impl ForeignTryFrom<( &api_models::payment_methods::MigrateCardDetail, Option<cards_info::CardInfo>, )> for pm_api::CardDetailFromLocker **crates/payment_methods/src/helpers.rs** Add: - function: pub::populate_bin_details_for_payment_method_create - function: pub::populate_bin_details_for_payment_method_create - function: pub::validate_payment_method_type_against_payment_method - function: private::foreign_from - function: private::foreign_from - function: private::to_not_found_response - function: private::to_duplicate_response - trait: pub::ForeignFrom - trait: pub::ForeignTryFrom - trait: pub::StorageErrorExt - impl: impl ForeignFrom<(Option<api::CardDetailFromLocker>, domain::PaymentMethod)> for api::PaymentMethodResponse - impl: impl ForeignFrom<(Option<api::CardDetailFromLocker>, domain::PaymentMethod)> for api::PaymentMethodResponse - impl: impl StorageErrorExt<T, api_error_response::ApiErrorResponse> for error_stack::Result<T, storage_impl::StorageError> **crates/payment_methods/src/lib.rs** Add: - mod: pub::controller - mod: pub::core - mod: pub::helpers **crates/payment_methods/src/state.rs** Modify existing code **crates/router/src/core/cards_info.rs** Modify existing code **crates/router/src/core/customers.rs** Modify existing code **crates/router/src/core/errors.rs** Remove: - enum: pub::VaultError **crates/router/src/core/locker_migration.rs** Modify existing code **crates/router/src/core/mandate.rs** Modify existing code **crates/router/src/core/payment_methods.rs** Remove: - mod: pub::migration **crates/router/src/core/payment_methods/cards.rs** Remove: - function: pub::store_default_payment_method - function: pub::store_default_payment_method - function: pub::get_or_insert_payment_method Add: - function: private::store_default_payment_method - function: private::store_default_payment_method - function: private::get_or_insert_payment_method - function: private::insert_payment_method - function: private::insert_payment_method - function: private::add_bank_to_locker - function: private::add_card_to_locker - function: private::add_card_hs - function: private::get_card_details_with_locker_fallback - function: private::get_card_details_without_locker_fallback - function: private::set_default_payment_method - function: private::add_payment_method_status_update_task - struct: pub::PmCards **crates/router/src/core/payment_methods/network_tokenization.rs** Modify existing code **crates/router/src/core/payment_methods/tokenize.rs** Modify existing code **crates/router/src/core/payment_methods/tokenize/card_executor.rs** Modify existing code **crates/router/src/core/payment_methods/transformers.rs** Remove: - struct: pub::DeleteCardResp - enum: pub::DataDuplicationCheck **crates/router/src/core/payments/helpers.rs** Remove: - function: pub::validate_payment_method_type_against_payment_method - function: pub::populate_bin_details_for_payment_method_create - function: pub::populate_bin_details_for_payment_method_create **crates/router/src/core/payments/tokenization.rs** Modify existing code **crates/router/src/core/payouts/helpers.rs** Modify existing code **crates/router/src/core/payouts/validator.rs** Modify existing code **crates/router/src/core/webhooks/incoming.rs** Modify existing code **crates/router/src/db.rs** Remove: - mod: pub::cards_info Add: - function: private::get_payment_methods_store - function: private::get_payment_methods_store **crates/router/src/db/cards_info.rs** Remove: - function: private::get_card_info - function: private::add_card_info - function: private::update_card_info - function: private::get_card_info - function: private::add_card_info - function: private::update_card_info - trait: pub::CardsInfoInterface - impl: impl CardsInfoInterface for Store - impl: impl CardsInfoInterface for MockDb **crates/router/src/db/kafka_store.rs** Add: - function: private::get_payment_methods_store **crates/router/src/routes/payment_methods.rs** Modify existing code **crates/router/src/types/api/mandates.rs** Modify existing code **crates/router/src/types/domain/types.rs** Add: - function: private::from - impl: impl From<&app::SessionState> for pm_state::PaymentMethodsState **crates/router/src/utils/ext_traits.rs** Remove: - function: private::check_value_present - function: private::get_required_value - function: private::parse_enum - function: private::parse_value - function: private::update_value - trait: pub::OptionExt - impl: impl OptionExt<T> for Option<T> **crates/storage_impl/src/cards_info.rs** Add: - function: private::get_card_info - function: private::add_card_info - function: private::update_card_info - function: private::get_card_info - function: private::add_card_info - function: private::update_card_info - function: private::get_card_info - function: private::add_card_info - function: private::update_card_info - impl: impl KvStorePartition for CardInfo - impl: impl CardsInfoInterface for RouterStore<T> - impl: impl CardsInfoInterface for KVRouterStore<T> - impl: impl CardsInfoInterface for MockDb **crates/storage_impl/src/lib.rs** Add: - mod: pub::cards_info **crates/storage_impl/src/payment_method.rs** Modify existing code
{"pr_number": 7786, "pr_title": "refactor(paymentMethods): move all pm migration related changes to payment methods crate", "merged_at": "2025-05-13T08:44:52Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"domain": ["crates/hyperswitch_domain_models/src/cards_info.rs", "crates/hyperswitch_domain_models/src/ext_traits.rs", "crates/hyperswitch_domain_models/src/lib.rs"], "core_business": ["crates/payment_methods/src/core.rs", "crates/payment_methods/src/core/errors.rs", "crates/router/src/core/payment_methods/migration.rs", "crates/payment_methods/src/core/migration/payment_methods.rs", "crates/router/src/core/cards_info.rs", "crates/router/src/core/customers.rs", "crates/router/src/core/errors.rs", "crates/router/src/core/locker_migration.rs", "crates/router/src/core/mandate.rs", "crates/router/src/core/payment_methods.rs", "crates/router/src/core/payment_methods/cards.rs", "crates/router/src/core/payment_methods/network_tokenization.rs", "crates/router/src/core/payment_methods/tokenize.rs", "crates/router/src/core/payment_methods/tokenize/card_executor.rs", "crates/router/src/core/payment_methods/transformers.rs", "crates/router/src/core/payments/helpers.rs", "crates/router/src/core/payments/tokenization.rs", "crates/router/src/core/payouts/helpers.rs", "crates/router/src/core/payouts/validator.rs", "crates/router/src/core/webhooks/incoming.rs"], "types": ["crates/router/src/types/api/mandates.rs", "crates/router/src/types/domain/types.rs"], "utils": ["crates/payment_methods/src/helpers.rs", "crates/router/src/utils/ext_traits.rs"], "config": ["crates/payment_methods/Cargo.toml", "crates/router/Cargo.toml"], "other": ["Cargo.lock", "crates/payment_methods/src/controller.rs", "crates/payment_methods/src/lib.rs", "crates/payment_methods/src/state.rs", "crates/router/src/db.rs", "crates/router/src/db/cards_info.rs", "crates/router/src/db/kafka_store.rs", "crates/router/src/routes/payment_methods.rs", "crates/storage_impl/src/cards_info.rs", "crates/storage_impl/src/lib.rs", "crates/storage_impl/src/payment_method.rs"]}, "change_types": {"structs_added": 2, "functions_added": 97, "enums_added": 2, "fields_added": 568, "imports_added": 56, "conditionals_added": 26}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
ci(cypress): fix cypress api-key validation ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [x] CI/CD ## Description This PR fixes the Cypress API key validation issue, where the validation was failing for key_prefixes in API keys. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context Test cases were failing ## How did you test it? <img width="628" height="400" alt="image" src="https://github.com/user-attachments/assets/fa28b7ab-6b5d-47d6-ac72-f84297ae1ecb" /> ## 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. Utils** - `cypress-tests/cypress/utils/RequestBodyUtils.js` **Code Patterns Applied:** - Extend existing types with new fields (1 changes)
{"pr_number": 9815, "pr_title": "ci(cypress): fix cypress api-key validation", "merged_at": "2025-10-14T08:07:47Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user"]}, "hierarchy": {"utils": ["cypress-tests/cypress/utils/RequestBodyUtils.js"]}, "change_types": {"fields_added": 1}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
chore: run clippy with default number of jobs in github workflows ## 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 --> changed cargo clippy command in workflow files to use default number of jobs instead of 2. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with 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)? --> Github CI checks has passed. ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] 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** - `.github/workflows/connector-sanity-tests.yml` - `.github/workflows/connector-ui-sanity-tests.yml` **2. Configuration Files** - `.github/workflows/CI-pr.yml` - `.github/workflows/CI-push.yml` - `.github/workflows/postman-collection-runner.yml` **Code Patterns Applied:** - Extend existing types with new fields (16 changes)
{"pr_number": 7088, "pr_title": "chore: run clippy with default number of jobs in github workflows", "merged_at": "2025-01-29T09:06:00Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"connectors": [".github/workflows/connector-sanity-tests.yml", ".github/workflows/connector-ui-sanity-tests.yml"], "config": [".github/workflows/CI-pr.yml", ".github/workflows/CI-push.yml", ".github/workflows/postman-collection-runner.yml"]}, "change_types": {"fields_added": 16}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
refactor(dynamic_routing): add logic for creating merchant account in decision engine ## 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 --> Merchant account creation on decision-engine is pre-requisite for making success based routing calls to it. Since toggle SR endpoint on Hyperswitch is the place where rule creation API of DE is being called, we can check whether merchant_account exists in DE, if exists, toggle endpoint will go ahead with creating the rule. If not, it will first call DE to create a merchant_account and then create the rule. I have created the `is_merchant_created_in_decision_engine` flag inside the `dynamic_routing_algorithm` column which is of type JSON in profile table. I have added a `#[serde(default)]` attribute on top of `is_merchant_created_in_decision_engine`. Hence it shouldn't break for older profiles which doesn't have this field itself. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> 1. Create merchant_account and API key in Hyperswitch. 2. Toggle SR for the default profile created above. ``` curl --location --request POST 'http://localhost:8080/account/merchant_1748681084/business_profile/pro_3gHXWoq1Xh3AKi6tNZV1/dynamic_routing/success_based/toggle?enable=dynamic_connector_selection' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: xyz' ``` Check logs for toggle call which should have something like `Creating merchant_account in decision engine for profile <profile_id>` 3. Try hitting same API again by disabling the SR, it shouldn't have above merchant_account creation log anymore as it should be created once per profile. 4. Also hit toggle API for the profile which already has SR toggled. Even for it, the merchant_account should be created during first toggle call and not during further calls. #### Create merchant in debit routing flow -> Update business profile by setting is_debit_routing_enabled ``` curl --location 'http://localhost:8080/account/merchant_1748956040/business_profile/pro_6QFJX6m7xjQacyygMmBT' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: ' \ --data '{ "is_debit_routing_enabled": true }' ``` ``` { "merchant_id": "merchant_1748956040", "profile_id": "pro_6QFJX6m7xjQacyygMmBT", "profile_name": "US_default", "return_url": "https://google.com/success", "enable_payment_response_hash": true, "payment_response_hash_key": "THd00F3c6WIXOXufmm6sFsUL0zRUFVL2llcMS1SG9rdco16PFty01OOkLcY8IbSS", "redirect_to_merchant_with_http_post": false, "webhook_details": { "webhook_version": "1.0.1", "webhook_username": "ekart_retail", "webhook_password": "password_ekart@123", "webhook_url": null, "payment_created_enabled": true, "payment_succeeded_enabled": true, "payment_failed_enabled": true }, "metadata": null, "routing_algorithm": null, "intent_fulfillment_time": 900, "frm_routing_algorithm": null, "payout_routing_algorithm": null, "applepay_verified_domains": null, "session_expiry": 900, "payment_link_config": null, "authentication_connector_details": null, "use_billing_as_payment_method_billing": true, "extended_card_info_config": null, "collect_shipping_details_from_wallet_connector": false, "collect_billing_details_from_wallet_connector": false, "always_collect_shipping_details_from_wallet_connector": false, "always_collect_billing_details_from_wallet_connector": false, "is_connector_agnostic_mit_enabled": false, "payout_link_config": null, "outgoing_webhook_custom_http_headers": null, "tax_connector_id": null, "is_tax_connector_enabled": false, "is_network_tokenization_enabled": false, "is_auto_retries_enabled": false, "max_auto_retries_enabled": null, "always_request_extended_authorization": null, "is_click_to_pay_enabled": false, "authentication_product_ids": null, "card_testing_guard_config": { "card_ip_blocking_status": "disabled", "card_ip_blocking_threshold": 3, "guest_user_card_blocking_status": "disabled", "guest_user_card_blocking_threshold": 10, "customer_id_blocking_status": "disabled", "customer_id_blocking_threshold": 5, "card_testing_guard_expiry": 3600 }, "is_clear_pan_retries_enabled": false, "force_3ds_challenge": false, "is_debit_routing_enabled": true, "merchant_business_country": null, "is_pre_network_tokenization_enabled": false } ``` -> Db screenshot ![image](https://github.com/user-attachments/assets/24b05943-8d3c-4add-9931-6f6ce66af57a) -> Db entry when business profile is created ![image](https://github.com/user-attachments/assets/dc6b4d26-549b-414c-9395-929c78303d07) #### Test sr <img width="1728" alt="image" src="https://github.com/user-attachments/assets/f7253d1c-ec55-45cd-93e5-ff0e4503fbee" /> <img width="1490" alt="image" src="https://github.com/user-attachments/assets/e1f01c8f-8f22-4612-83ed-01562bc1dc50" /> -> Update profile to enable debit routing <img width="1480" alt="image" src="https://github.com/user-attachments/assets/adce71c4-179b-4990-b693-c75e8ecad080" /> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] 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/admin.rs` - `crates/router/src/core/routing.rs` - `crates/router/src/core/routing/helpers.rs` **Code Patterns Applied:** - Implement new functions (3 changes) - Extend existing types with new fields (13 changes) - Add conditional logic for feature flags or filtering (2 changes) **Detailed Identifier Changes:** Commit 835a425d: Files to modify: **crates/api_models/src/routing.rs** Add: - function: pub::update_merchant_creation_status_in_decision_engine **crates/router/src/core/admin.rs** Modify existing code **crates/router/src/core/routing.rs** Modify existing code **crates/router/src/core/routing/helpers.rs** Add: - function: pub::create_merchant_in_decision_engine_if_not_exists
{"pr_number": 8191, "pr_title": "refactor(dynamic_routing): add logic for creating merchant account in decision engine", "merged_at": "2025-06-04T08:50:40Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/routing.rs"], "core_business": ["crates/router/src/core/admin.rs", "crates/router/src/core/routing.rs", "crates/router/src/core/routing/helpers.rs"]}, "change_types": {"functions_added": 3, "fields_added": 13, "imports_added": 1, "conditionals_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
chore(docker): prefix Hyperswitch Docker image URIs with `docker.juspay.io` ## 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 updates Hyperswitch Docker images to be prefixed by `docker.juspay.io`. I've just done a global search-replace to be honest. ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> N/A ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Tried the Docker Compose setup locally, didn't "test" out any of the other changes though. ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Configuration Files** - `config/deployments/README.md` - `docker-compose-development.yml` - `docker-compose.yml` **2. Other** - `aws/hyperswitch_aws_setup.sh` **Code Patterns Applied:** - Extend existing types with new fields (10 changes)
{"pr_number": 7368, "pr_title": "chore(docker): prefix Hyperswitch Docker image URIs with `docker.juspay.io`", "merged_at": "2025-03-03T15:37:11Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"config": ["config/deployments/README.md", "docker-compose-development.yml", "docker-compose.yml"], "other": ["aws/hyperswitch_aws_setup.sh"]}, "change_types": {"fields_added": 10}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
fix(config): Add VGS baseurl to deployments toml files ## 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 --> Added baseurl for `VGS` connector in relevant deployment TOML files ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [x] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> - `config/deployments/integration_test.toml` - `config/deployments/production.toml` - `config/deployments/sandbox.toml` ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> Closes #8058 ## How did you test 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`
{"pr_number": 8059, "pr_title": "fix(config): Add VGS baseurl to deployments toml files", "merged_at": "2025-05-16T13:03:19Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["connector"]}, "hierarchy": {"tests": ["config/deployments/integration_test.toml"], "config": ["config/deployments/production.toml", "config/deployments/sandbox.toml"]}, "change_types": {}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
fix(connectors): [TSYS] change order of order_number in tsys auth request body ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description This PR fixes the request body order of the TSYS contract for the auth request ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context fixes #9375 ## How did you test it? Unfortunately, I'm not able to test this changes against an actual sandbox as I've been in touch with TYSY and they only provide test credentials for certification purpose. Also [this](https://github.com/juspay/hyperswitch/pull/5758) PR mention that there are not test credential for this project. I was able to reproduce mentioned in the issue by using the Sandbox inside the developer portal: <img width="619" height="358" alt="image" src="https://github.com/user-attachments/assets/55f1e712-1da1-4d3e-88ae-acc6dfbd0053" /> That's because orderNumber is the wrong group as per API specification and should be placed in a different order. If we try to put (as in the PR) right after cvv2, the request is successful: <img width="619" height="358" alt="image" src="https://github.com/user-attachments/assets/5afd2cac-7cc3-4f0d-b77b-646035b136d0" /> 1. Automatic Capture cURL: ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_St9F0EWAvKEY3O3Vz020jZDJSFETJGc5E1sB0gnr9MOFBUJdHbSZDBCPnAybRQdu' \ --data-raw '{ "amount": 2500, "currency": "AED", "connector": ["tsys"], "confirm": true, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 2500, "customer_id": "abcdef", "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment request", "authentication_type": "no_three_ds", "return_url": "https://duck.com", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4002400000000002", "card_exp_month": "12", "card_exp_year": "2028", "card_holder_name": "Max Mustermann", "card_cvc": "999" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "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", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "9123456789", "country_code": "+91" } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "browser_info": { "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "language": "nl-NL", "color_depth": 24, "screen_height": 723, "screen_width": 1536, "time_zone": 0, "java_enabled": true, "java_script_enabled": true, "ip_address": "109.71.40.0" } }' ``` Response: ``` { "payment_id": "pay_aodxpaq2y4Ux6byzMXuZ", "merchant_id": "merchant_1758787422", "status": "succeeded", "amount": 2500, "net_amount": 2500, "shipping_cost": null, "amount_capturable": 0, "amount_received": 2500, "connector": "tsys", "client_secret": "pay_aodxpaq2y4Ux6byzMXuZ_secret_RUgsjBM6VI0x5aRN5PIB", "created": "2025-09-27T13:25:14.335Z", "currency": "AED", "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": "0002", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "400240", "card_extended_bin": null, "card_exp_month": "12", "card_exp_year": "2028", "card_holder_name": "Max Mustermann", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": null, "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "9123456789", "country_code": "+91" }, "email": null }, "billing": { "address": { "city": "San Fransico", "country": null, "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "9123456789", "country_code": "+91" }, "email": null }, "order_details": null, "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "return_url": "https://duck.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "abcdef", "created_at": 1758979514, "expires": 1758983114, "secret": "epk_7f24c06f2f3e4a4dbd0e0a2147afc80f" }, "manual_retry_allowed": null, "connector_transaction_id": "66177209", "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": "66177209", "payment_link": null, "profile_id": "pro_xiKo4uRjNEP5wLuam7Df", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_0iYQCYGnXC9WMGhRyb5O", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-27T13:40:14.335Z", "fingerprint": null, "browser_info": { "language": "nl-NL", "time_zone": 0, "ip_address": "109.71.40.0", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "color_depth": 24, "java_enabled": true, "screen_width": 1536, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 723, "java_script_enabled": true }, "payment_channel": null, "payment_method_id": null, "network_transaction_id": null, "payment_method_status": null, "updated": "2025-09-27T13:25:16.190Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "request_extended_authorization": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null, "enable_partial_authorization": null, "enable_overcapture": null, "is_overcapture_enabled": null, "network_details": null } ``` 2. PSync: cURL: ``` curl --location 'http://localhost:8080/payments/pay_aodxpaq2y4Ux6byzMXuZ?force_sync=true&expand_captures=true&expand_attempts=true' \ --header 'Accept: application/json' \ --header 'api-key: dev_St9F0EWAvKEY3O3Vz020jZDJSFETJGc5E1sB0gnr9MOFBUJdHbSZDBCPnAybRQdu' \ --data '' ``` Response: ``` { "payment_id": "pay_aodxpaq2y4Ux6byzMXuZ", "merchant_id": "merchant_1758787422", "status": "succeeded", "amount": 2500, "net_amount": 2500, "shipping_cost": null, "amount_capturable": 0, "amount_received": 2500, "connector": "tsys", "client_secret": "pay_aodxpaq2y4Ux6byzMXuZ_secret_RUgsjBM6VI0x5aRN5PIB", "created": "2025-09-27T13:25:14.335Z", "currency": "AED", "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, "attempts": [ { "attempt_id": "pay_aodxpaq2y4Ux6byzMXuZ_1", "status": "charged", "amount": 2500, "order_tax_amount": null, "currency": "AED", "connector": "tsys", "error_message": null, "payment_method": "card", "connector_transaction_id": "66177209", "capture_method": "automatic", "authentication_type": "no_three_ds", "created_at": "2025-09-27T13:25:14.335Z", "modified_at": "2025-09-27T13:25:16.189Z", "cancellation_reason": null, "mandate_id": null, "error_code": null, "payment_token": null, "connector_metadata": null, "payment_experience": null, "payment_method_type": "credit", "reference_id": "66177209", "unified_code": null, "unified_message": null, "client_source": null, "client_version": null } ], "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "0002", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "400240", "card_extended_bin": null, "card_exp_month": "12", "card_exp_year": "2028", "card_holder_name": "Max Mustermann", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": null, "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "9123456789", "country_code": "+91" }, "email": null }, "billing": { "address": { "city": "San Fransico", "country": null, "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "9123456789", "country_code": "+91" }, "email": null }, "order_details": null, "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "return_url": "https://duck.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": null, "manual_retry_allowed": null, "connector_transaction_id": "66177209", "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": "66177209", "payment_link": null, "profile_id": "pro_xiKo4uRjNEP5wLuam7Df", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_0iYQCYGnXC9WMGhRyb5O", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-27T13:40:14.335Z", "fingerprint": null, "browser_info": { "language": "nl-NL", "time_zone": 0, "ip_address": "109.71.40.0", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "color_depth": 24, "java_enabled": true, "screen_width": 1536, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 723, "java_script_enabled": true }, "payment_channel": null, "payment_method_id": null, "network_transaction_id": null, "payment_method_status": null, "updated": "2025-09-27T13:25:16.190Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "request_extended_authorization": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null, "enable_partial_authorization": null, "enable_overcapture": null, "is_overcapture_enabled": null, "network_details": null } ``` 3. Manual Capture: Authorize : cURL: ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_St9F0EWAvKEY3O3Vz020jZDJSFETJGc5E1sB0gnr9MOFBUJdHbSZDBCPnAybRQdu' \ --data-raw '{ "amount": 2500, "currency": "AED", "connector": ["tsys"], "confirm": true, "capture_method": "manual", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 2500, "customer_id": "abcdef", "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment request", "authentication_type": "no_three_ds", "return_url": "https://duck.com", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4002400000000002", "card_exp_month": "12", "card_exp_year": "2028", "card_holder_name": "Max Mustermann", "card_cvc": "999" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "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", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "9123456789", "country_code": "+91" } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "browser_info": { "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "language": "nl-NL", "color_depth": 24, "screen_height": 723, "screen_width": 1536, "time_zone": 0, "java_enabled": true, "java_script_enabled": true, "ip_address": "109.71.40.0" } }' ``` Response: ``` { "payment_id": "pay_rOaIbbJ3CsOgmil9s9IS", "merchant_id": "merchant_1758787422", "status": "requires_capture", "amount": 2500, "net_amount": 2500, "shipping_cost": null, "amount_capturable": 2500, "amount_received": null, "connector": "tsys", "client_secret": "pay_rOaIbbJ3CsOgmil9s9IS_secret_99HOxs5GrYWGrG1mw5Tv", "created": "2025-09-27T13:26:45.316Z", "currency": "AED", "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": "manual", "payment_method": "card", "payment_method_data": { "card": { "last4": "0002", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "400240", "card_extended_bin": null, "card_exp_month": "12", "card_exp_year": "2028", "card_holder_name": "Max Mustermann", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": null, "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "9123456789", "country_code": "+91" }, "email": null }, "billing": { "address": { "city": "San Fransico", "country": null, "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "9123456789", "country_code": "+91" }, "email": null }, "order_details": null, "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "return_url": "https://duck.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "abcdef", "created_at": 1758979605, "expires": 1758983205, "secret": "epk_39df53c34971433e93b98adc2bddecb8" }, "manual_retry_allowed": null, "connector_transaction_id": "66177225", "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": "66177225", "payment_link": null, "profile_id": "pro_xiKo4uRjNEP5wLuam7Df", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_0iYQCYGnXC9WMGhRyb5O", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-27T13:41:45.316Z", "fingerprint": null, "browser_info": { "language": "nl-NL", "time_zone": 0, "ip_address": "109.71.40.0", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "color_depth": 24, "java_enabled": true, "screen_width": 1536, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 723, "java_script_enabled": true }, "payment_channel": null, "payment_method_id": null, "network_transaction_id": null, "payment_method_status": null, "updated": "2025-09-27T13:26:46.101Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "request_extended_authorization": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null, "enable_partial_authorization": null, "enable_overcapture": null, "is_overcapture_enabled": null, "network_details": null } ``` Capture: cURL: ``` curl --location 'http://localhost:8080/payments/pay_rOaIbbJ3CsOgmil9s9IS/capture' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_St9F0EWAvKEY3O3Vz020jZDJSFETJGc5E1sB0gnr9MOFBUJdHbSZDBCPnAybRQdu' \ --data '{ "amount_to_capture": 2500, "statement_descriptor_name": "Joseph", "statement_descriptor_prefix" :"joseph", "statement_descriptor_suffix": "JS" }' ``` Response: ``` { "payment_id": "pay_rOaIbbJ3CsOgmil9s9IS", "merchant_id": "merchant_1758787422", "status": "succeeded", "amount": 2500, "net_amount": 2500, "shipping_cost": null, "amount_capturable": 0, "amount_received": 2500, "connector": "tsys", "client_secret": "pay_rOaIbbJ3CsOgmil9s9IS_secret_99HOxs5GrYWGrG1mw5Tv", "created": "2025-09-27T13:26:45.316Z", "currency": "AED", "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": "manual", "payment_method": "card", "payment_method_data": { "card": { "last4": "0002", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "400240", "card_extended_bin": null, "card_exp_month": "12", "card_exp_year": "2028", "card_holder_name": "Max Mustermann", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": null, "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "9123456789", "country_code": "+91" }, "email": null }, "billing": { "address": { "city": "San Fransico", "country": null, "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "9123456789", "country_code": "+91" }, "email": null }, "order_details": null, "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "return_url": "https://duck.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": null, "manual_retry_allowed": null, "connector_transaction_id": "66177225", "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": "66177225", "payment_link": null, "profile_id": "pro_xiKo4uRjNEP5wLuam7Df", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_0iYQCYGnXC9WMGhRyb5O", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-27T13:41:45.316Z", "fingerprint": null, "browser_info": { "language": "nl-NL", "time_zone": 0, "ip_address": "109.71.40.0", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "color_depth": 24, "java_enabled": true, "screen_width": 1536, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 723, "java_script_enabled": true }, "payment_channel": null, "payment_method_id": null, "network_transaction_id": null, "payment_method_status": null, "updated": "2025-09-27T13:27:27.022Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "request_extended_authorization": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null, "enable_partial_authorization": null, "enable_overcapture": null, "is_overcapture_enabled": null, "network_details": null } ``` 4. Refunds Create: cURL: ``` curl --location 'http://localhost:8080/refunds' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_St9F0EWAvKEY3O3Vz020jZDJSFETJGc5E1sB0gnr9MOFBUJdHbSZDBCPnAybRQdu' \ --data '{ "payment_id": "pay_rOaIbbJ3CsOgmil9s9IS", "amount": 2500, "reason": "RETURN", "refund_type": "instant", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } } ' ``` Response: ``` { "refund_id": "ref_xC1sQ292UR5lKLCc9qpL", "payment_id": "pay_rOaIbbJ3CsOgmil9s9IS", "amount": 2500, "currency": "AED", "status": "succeeded", "reason": "RETURN", "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-09-27T13:28:22.276Z", "updated_at": "2025-09-27T13:28:23.380Z", "connector": "tsys", "profile_id": "pro_xiKo4uRjNEP5wLuam7Df", "merchant_connector_id": "mca_0iYQCYGnXC9WMGhRyb5O", "split_refunds": null, "issuer_error_code": null, "issuer_error_message": null } ``` 5. RSync cURL: ``` curl --location 'http://localhost:8080/refunds/ref_xC1sQ292UR5lKLCc9qpL?force_sync=true' \ --header 'Accept: application/json' \ --header 'api-key: dev_St9F0EWAvKEY3O3Vz020jZDJSFETJGc5E1sB0gnr9MOFBUJdHbSZDBCPnAybRQdu' ``` Response: ``` { "refund_id": "ref_xC1sQ292UR5lKLCc9qpL", "payment_id": "pay_rOaIbbJ3CsOgmil9s9IS", "amount": 2500, "currency": "AED", "status": "succeeded", "reason": "RETURN", "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-09-27T13:28:22.276Z", "updated_at": "2025-09-27T13:29:38.380Z", "connector": "tsys", "profile_id": "pro_xiKo4uRjNEP5wLuam7Df", "merchant_connector_id": "mca_0iYQCYGnXC9WMGhRyb5O", "split_refunds": null, "issuer_error_code": null, "issuer_error_message": null } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [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/tsys/transformers.rs` **Code Patterns Applied:** - Extend existing types with new fields (2 changes) **Detailed Identifier Changes:** Commit 0ff6c082: Files to modify: **crates/hyperswitch_connectors/src/connectors/tsys/transformers.rs** Modify existing code
{"pr_number": 9579, "pr_title": "fix(connectors): [TSYS] change order of order_number in tsys auth request body", "merged_at": "2025-10-08T15:39:41Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/tsys/transformers.rs"]}, "change_types": {"fields_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix: docker changes in setup script ## 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 --> Repopulating the docker changes in the stable release ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with 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 #7962, hotfix for #7963. ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Configuration Files** - `docker-compose-development.yml` - `docker-compose.yml` **2. Other** - `README.md` - `scripts/docker_output.sh` - `scripts/poststart_hook.sh` - ... and 2 more files **Code Patterns Applied:** - Extend existing types with new fields (4 changes)
{"pr_number": 7979, "pr_title": "fix: docker changes in setup script", "merged_at": "2025-05-08T09:01:27Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"config": ["docker-compose-development.yml", "docker-compose.yml"], "other": ["README.md", "scripts/docker_output.sh", "scripts/poststart_hook.sh", "scripts/prestart_hook.sh", "scripts/setup.sh"]}, "change_types": {"fields_added": 4}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
fix(core): Add Default Enum Variant in RequestIncrementalAuthorization ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD Closes this [issue](https://github.com/juspay/hyperswitch/issues/8947) ## Description <!-- Describe your changes in detail --> Added Default Enum Variant in RequestIncrementalAuthorization ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with 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. Create a payment with old version confirm with new (old and new application should be able to retrieve) Payments - Create (with Confirm: false) Request: ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_nDwiGI0dyLcP8uP4zJj6TPrzetozj6rVGm7o9WV3KZJX4nKVPrB1VaIhnrcUrkXv' \ --data-raw '{ "amount": 6500, "currency": "USD", "confirm": false, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 6500, "customer_id": "StripeCustomer", "email": "abcdef123@gmail.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment request", "authentication_type": "no_three_ds", "return_url": "https://duck.com", "billing": { "address": { "first_name": "John", "last_name": "Doe", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US" } }, "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4242424242424242", "card_exp_month": "03", "card_exp_year": "2030", "card_holder_name": "joseph Doe", "card_cvc": "737" } }, "browser_info": { "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "language": "nl-NL", "color_depth": 24, "screen_height": 723, "screen_width": 1536, "time_zone": 0, "java_enabled": true, "java_script_enabled": true, "ip_address": "127.0.0.1" }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "John", "last_name": "Doe" } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2025-07-25T11:46:12Z" } }' ``` Response: ``` { "payment_id": "pay_QpckxK3eCQr65QznPuuN", "merchant_id": "merchant_1755160879", "status": "requires_confirmation", "amount": 6500, "net_amount": 6500, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": null, "client_secret": "pay_QpckxK3eCQr65QznPuuN_secret_qV2I7iHAdO5nQb9g1NiG", "created": "2025-08-14T08:41:43.016Z", "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": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "4242", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "424242", "card_extended_bin": null, "card_exp_month": "03", "card_exp_year": "2030", "card_holder_name": "joseph Doe", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": "token_yMCfQBl7o3zcFKRn1moK", "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": 1755160902, "expires": 1755164502, "secret": "epk_c95c09ba12954fa88c93d7216e216242" }, "manual_retry_allowed": null, "connector_transaction_id": null, "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2025-07-25T11:46:12Z", "new_customer": "true" }, "connector_metadata": null, "feature_metadata": null, "reference_id": null, "payment_link": null, "profile_id": "pro_8SHbxLW1M8ueBNJ7tqAf", "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-14T08:56:43.016Z", "fingerprint": null, "browser_info": { "language": "nl-NL", "time_zone": 0, "ip_address": "127.0.0.1", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "color_depth": 24, "java_enabled": true, "screen_width": 1536, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 723, "java_script_enabled": true }, "payment_channel": null, "payment_method_id": null, "network_transaction_id": null, "payment_method_status": null, "updated": "2025-08-14T08:41:43.114Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": null, "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null, "enable_partial_authorization": null } ``` Payments - Confirm Request: ``` curl --location 'http://localhost:8080/payments/pay_QpckxK3eCQr65QznPuuN/confirm' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_nDwiGI0dyLcP8uP4zJj6TPrzetozj6rVGm7o9WV3KZJX4nKVPrB1VaIhnrcUrkXv' \ --data-raw '{ "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" } }, "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" } "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 6500, "customer_id": "StripeCustomer", "email": "abcdef123@gmail.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment request", "authentication_type": "no_three_ds", "return_url": "https://duck.com", "billing": { "address": { "first_name": "John", "last_name": "Doe", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US" } }, "amount": 6500, "currency": "USD" }' ``` Response: ``` { "payment_id": "pay_QpckxK3eCQr65QznPuuN", "merchant_id": "merchant_1755160879", "status": "succeeded", "amount": 6500, "net_amount": 6500, "shipping_cost": null, "amount_capturable": 0, "amount_received": 6500, "connector": "stripe", "client_secret": "pay_QpckxK3eCQr65QznPuuN_secret_qV2I7iHAdO5nQb9g1NiG", "created": "2025-08-14T08:41:43.016Z", "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": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "4242", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "424242", "card_extended_bin": null, "card_exp_month": "03", "card_exp_year": "2030", "card_holder_name": "joseph Doe", "payment_checks": { "cvc_check": "pass", "address_line1_check": "pass", "address_postal_code_check": "pass" }, "authentication_data": null }, "billing": null }, "payment_token": "token_yMCfQBl7o3zcFKRn1moK", "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": null, "manual_retry_allowed": false, "connector_transaction_id": "pi_3RvwugE9cSvqiivY0X0CxZg6", "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_3RvwugE9cSvqiivY0X0CxZg6", "payment_link": null, "profile_id": "pro_8SHbxLW1M8ueBNJ7tqAf", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_E0iaiKWU18mDERnGMckX", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-08-14T08:56:43.016Z", "fingerprint": null, "browser_info": { "os_type": null, "language": "nl-NL", "time_zone": 0, "ip_address": "127.0.0.1", "os_version": null, "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "color_depth": 24, "device_model": null, "java_enabled": true, "screen_width": 1536, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 723, "accept_language": "en", "java_script_enabled": true }, "payment_channel": null, "payment_method_id": null, "network_transaction_id": null, "payment_method_status": null, "updated": "2025-08-14T08:53:35.933Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null, "enable_partial_authorization": null } ``` Payments - sync (with old application): Response: ``` { "payment_id": "pay_QpckxK3eCQr65QznPuuN", "merchant_id": "merchant_1755160879", "status": "succeeded", "amount": 6500, "net_amount": 6500, "shipping_cost": null, "amount_capturable": 0, "amount_received": 6500, "connector": "stripe", "client_secret": "pay_QpckxK3eCQr65QznPuuN_secret_qV2I7iHAdO5nQb9g1NiG", "created": "2025-08-14T08:41:43.016Z", "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": [ { "refund_id": "ref_nzAqQ7BbLsGuCu7K00Gm", "payment_id": "pay_QpckxK3eCQr65QznPuuN", "amount": 1000, "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-08-14T08:55:59.292Z", "updated_at": "2025-08-14T08:56:00.603Z", "connector": "stripe", "profile_id": "pro_8SHbxLW1M8ueBNJ7tqAf", "merchant_connector_id": "mca_E0iaiKWU18mDERnGMckX", "split_refunds": null, "issuer_error_code": null, "issuer_error_message": null }, { "refund_id": "ref_KehvNBg796Hhj5AnjLIU", "payment_id": "pay_QpckxK3eCQr65QznPuuN", "amount": 1000, "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-08-14T09:04:53.067Z", "updated_at": "2025-08-14T09:04:54.257Z", "connector": "stripe", "profile_id": "pro_8SHbxLW1M8ueBNJ7tqAf", "merchant_connector_id": "mca_E0iaiKWU18mDERnGMckX", "split_refunds": null, "issuer_error_code": null, "issuer_error_message": null } ], "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "4242", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "424242", "card_extended_bin": null, "card_exp_month": "03", "card_exp_year": "2030", "card_holder_name": "joseph Doe", "payment_checks": { "cvc_check": "pass", "address_line1_check": "pass", "address_postal_code_check": "pass" }, "authentication_data": null }, "billing": null }, "payment_token": "token_yMCfQBl7o3zcFKRn1moK", "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": null, "manual_retry_allowed": false, "connector_transaction_id": "pi_3RvwugE9cSvqiivY0X0CxZg6", "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_3RvwugE9cSvqiivY0X0CxZg6", "payment_link": null, "profile_id": "pro_8SHbxLW1M8ueBNJ7tqAf", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_E0iaiKWU18mDERnGMckX", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-08-14T08:56:43.016Z", "fingerprint": null, "browser_info": { "os_type": null, "language": "nl-NL", "time_zone": 0, "ip_address": "127.0.0.1", "os_version": null, "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "color_depth": 24, "device_model": null, "java_enabled": true, "screen_width": 1536, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 723, "accept_language": "en", "java_script_enabled": true }, "payment_channel": null, "payment_method_id": "pm_BOcKiwB3ujDSu3H3yheb", "network_transaction_id": null, "payment_method_status": "active", "updated": "2025-08-14T09:05:00.035Z", "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_1RvwugE9cSvqiivY5A84TvB3", "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null, "enable_partial_authorization": null } ``` Payments - Sync (New Application) Response: ``` { "payment_id": "pay_QpckxK3eCQr65QznPuuN", "merchant_id": "merchant_1755160879", "status": "succeeded", "amount": 6500, "net_amount": 6500, "shipping_cost": null, "amount_capturable": 0, "amount_received": 6500, "connector": "stripe", "client_secret": "pay_QpckxK3eCQr65QznPuuN_secret_qV2I7iHAdO5nQb9g1NiG", "created": "2025-08-14T08:41:43.016Z", "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": [ { "refund_id": "ref_nzAqQ7BbLsGuCu7K00Gm", "payment_id": "pay_QpckxK3eCQr65QznPuuN", "amount": 1000, "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-08-14T08:55:59.292Z", "updated_at": "2025-08-14T08:56:00.603Z", "connector": "stripe", "profile_id": "pro_8SHbxLW1M8ueBNJ7tqAf", "merchant_connector_id": "mca_E0iaiKWU18mDERnGMckX", "split_refunds": null, "issuer_error_code": null, "issuer_error_message": null }, { "refund_id": "ref_KehvNBg796Hhj5AnjLIU", "payment_id": "pay_QpckxK3eCQr65QznPuuN", "amount": 1000, "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-08-14T09:04:53.067Z", "updated_at": "2025-08-14T09:04:54.257Z", "connector": "stripe", "profile_id": "pro_8SHbxLW1M8ueBNJ7tqAf", "merchant_connector_id": "mca_E0iaiKWU18mDERnGMckX", "split_refunds": null, "issuer_error_code": null, "issuer_error_message": null } ], "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "4242", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "424242", "card_extended_bin": null, "card_exp_month": "03", "card_exp_year": "2030", "card_holder_name": "joseph Doe", "payment_checks": { "cvc_check": "pass", "address_line1_check": "pass", "address_postal_code_check": "pass" }, "authentication_data": null }, "billing": null }, "payment_token": "token_yMCfQBl7o3zcFKRn1moK", "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": null, "manual_retry_allowed": false, "connector_transaction_id": "pi_3RvwugE9cSvqiivY0X0CxZg6", "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_3RvwugE9cSvqiivY0X0CxZg6", "payment_link": null, "profile_id": "pro_8SHbxLW1M8ueBNJ7tqAf", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_E0iaiKWU18mDERnGMckX", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-08-14T08:56:43.016Z", "fingerprint": null, "browser_info": { "os_type": null, "language": "nl-NL", "time_zone": 0, "ip_address": "127.0.0.1", "os_version": null, "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "color_depth": 24, "device_model": null, "java_enabled": true, "screen_width": 1536, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 723, "accept_language": "en", "java_script_enabled": true }, "payment_channel": null, "payment_method_id": "pm_BOcKiwB3ujDSu3H3yheb", "network_transaction_id": null, "payment_method_status": "active", "updated": "2025-08-14T09:05:00.035Z", "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_1RvwugE9cSvqiivY5A84TvB3", "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. Create + confirm on old version (old and new application should be able to retrieve) Create + Confirm: Response: ``` { "payment_id": "pay_qDAKyiWXL2BToORLLOed", "merchant_id": "merchant_1755163699", "status": "succeeded", "amount": 6500, "net_amount": 6500, "shipping_cost": null, "amount_capturable": 0, "amount_received": 6500, "connector": "stripe", "client_secret": "pay_qDAKyiWXL2BToORLLOed_secret_ApS6p4I8eCgpO7LfReIB", "created": "2025-08-14T09:28:48.465Z", "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": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "4242", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "424242", "card_extended_bin": null, "card_exp_month": "03", "card_exp_year": "2030", "card_holder_name": "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": 1755163728, "expires": 1755167328, "secret": "epk_abc7e336d4c840f1a5ccd8067c76f0d5" }, "manual_retry_allowed": false, "connector_transaction_id": "pi_3RvxSoE9cSvqiivY0Q00nWP3", "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_3RvxSoE9cSvqiivY0Q00nWP3", "payment_link": null, "profile_id": "pro_mQ5idcJcr37iO0GmRSQU", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_2lED1Q9w5btK5Tgsx6CB", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-08-14T09:43:48.465Z", "fingerprint": null, "browser_info": { "language": "nl-NL", "time_zone": 0, "ip_address": "127.0.0.1", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "color_depth": 24, "java_enabled": true, "screen_width": 1536, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 723, "java_script_enabled": true }, "payment_channel": null, "payment_method_id": null, "network_transaction_id": null, "payment_method_status": null, "updated": "2025-08-14T09:28:51.204Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null, "enable_partial_authorization": null } ``` Payments - Sync (on old version) Response: ``` { "payment_id": "pay_qDAKyiWXL2BToORLLOed", "merchant_id": "merchant_1755163699", "status": "succeeded", "amount": 6500, "net_amount": 6500, "shipping_cost": null, "amount_capturable": 0, "amount_received": 6500, "connector": "stripe", "client_secret": "pay_qDAKyiWXL2BToORLLOed_secret_ApS6p4I8eCgpO7LfReIB", "created": "2025-08-14T09:28:48.465Z", "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": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "4242", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "424242", "card_extended_bin": null, "card_exp_month": "03", "card_exp_year": "2030", "card_holder_name": "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": null, "manual_retry_allowed": false, "connector_transaction_id": "pi_3RvxSoE9cSvqiivY0Q00nWP3", "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_3RvxSoE9cSvqiivY0Q00nWP3", "payment_link": null, "profile_id": "pro_mQ5idcJcr37iO0GmRSQU", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_2lED1Q9w5btK5Tgsx6CB", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-08-14T09:43:48.465Z", "fingerprint": null, "browser_info": { "language": "nl-NL", "time_zone": 0, "ip_address": "127.0.0.1", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "color_depth": 24, "java_enabled": true, "screen_width": 1536, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 723, "java_script_enabled": true }, "payment_channel": null, "payment_method_id": null, "network_transaction_id": null, "payment_method_status": null, "updated": "2025-08-14T09:29:05.152Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null, "enable_partial_authorization": null } ``` Payments - Sync (on this branch): Response: ``` { "payment_id": "pay_qDAKyiWXL2BToORLLOed", "merchant_id": "merchant_1755163699", "status": "succeeded", "amount": 6500, "net_amount": 6500, "shipping_cost": null, "amount_capturable": 0, "amount_received": 6500, "connector": "stripe", "client_secret": "pay_qDAKyiWXL2BToORLLOed_secret_ApS6p4I8eCgpO7LfReIB", "created": "2025-08-14T09:28:48.465Z", "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": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "4242", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "424242", "card_extended_bin": null, "card_exp_month": "03", "card_exp_year": "2030", "card_holder_name": "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": null, "manual_retry_allowed": false, "connector_transaction_id": "pi_3RvxSoE9cSvqiivY0Q00nWP3", "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_3RvxSoE9cSvqiivY0Q00nWP3", "payment_link": null, "profile_id": "pro_mQ5idcJcr37iO0GmRSQU", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_2lED1Q9w5btK5Tgsx6CB", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-08-14T09:43:48.465Z", "fingerprint": null, "browser_info": { "language": "nl-NL", "time_zone": 0, "ip_address": "127.0.0.1", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "color_depth": 24, "java_enabled": true, "screen_width": 1536, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 723, "java_script_enabled": true }, "payment_channel": null, "payment_method_id": null, "network_transaction_id": null, "payment_method_status": null, "updated": "2025-08-14T09:29:05.152Z", "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 } ``` 3. Manually override the db enum to store Default and see if the new and old application can retrieve it Payments - Create Response: ``` { "payment_id": "pay_RbtTfVKPmNN6AipdXDBy", "merchant_id": "merchant_1755163699", "status": "requires_capture", "amount": 6500, "net_amount": 6500, "shipping_cost": null, "amount_capturable": 6500, "amount_received": 0, "connector": "stripe", "client_secret": "pay_RbtTfVKPmNN6AipdXDBy_secret_KgqxaJ94DXsIMOOhWNez", "created": "2025-08-14T10:04:50.873Z", "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": 1755165890, "expires": 1755169490, "secret": "epk_c08c26656b7d437e9c2bfc248bc39ab3" }, "manual_retry_allowed": false, "connector_transaction_id": "pi_3Rvy1gE9cSvqiivY1bcNshY0", "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_3Rvy1gE9cSvqiivY1bcNshY0", "payment_link": null, "profile_id": "pro_mQ5idcJcr37iO0GmRSQU", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_2lED1Q9w5btK5Tgsx6CB", "incremental_authorization_allowed": true, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-08-14T10:19:50.873Z", "fingerprint": null, "browser_info": { "language": "nl-NL", "time_zone": 0, "ip_address": "127.0.0.1", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "color_depth": 24, "java_enabled": true, "screen_width": 1536, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 723, "java_script_enabled": true }, "payment_channel": null, "payment_method_id": null, "network_transaction_id": null, "payment_method_status": null, "updated": "2025-08-14T10:04:52.820Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null, "enable_partial_authorization": null } ``` Payments - Sync (on this branch, after changing the value of request_incremental_authorization to default and incremental_authorization_allowed to true): <img width="1259" height="583" alt="Screenshot 2025-08-14 at 3 44 16 PM" src="https://github.com/user-attachments/assets/5d8d45e6-a843-47b7-86e4-314b23502c9c" /> Response: ``` { "payment_id": "pay_RbtTfVKPmNN6AipdXDBy", "merchant_id": "merchant_1755163699", "status": "requires_capture", "amount": 6500, "net_amount": 6500, "shipping_cost": null, "amount_capturable": 6500, "amount_received": 0, "connector": "stripe", "client_secret": "pay_RbtTfVKPmNN6AipdXDBy_secret_KgqxaJ94DXsIMOOhWNez", "created": "2025-08-14T10:04:50.873Z", "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": null, "manual_retry_allowed": false, "connector_transaction_id": "pi_3Rvy1gE9cSvqiivY1bcNshY0", "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_3Rvy1gE9cSvqiivY1bcNshY0", "payment_link": null, "profile_id": "pro_mQ5idcJcr37iO0GmRSQU", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_2lED1Q9w5btK5Tgsx6CB", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-08-14T10:19:50.873Z", "fingerprint": null, "browser_info": { "language": "nl-NL", "time_zone": 0, "ip_address": "127.0.0.1", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "color_depth": 24, "java_enabled": true, "screen_width": 1536, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 723, "java_script_enabled": true }, "payment_channel": null, "payment_method_id": null, "network_transaction_id": null, "payment_method_status": null, "updated": "2025-08-14T10:07:49.655Z", "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_1Rvy1gE9cSvqiivYCvmNitR6", "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null, "enable_partial_authorization": null } ``` Payments - Sync (on old version): Response: ``` { "payment_id": "pay_yySze0C1AcjjVbTE3ecr", "merchant_id": "merchant_1755163699", "status": "requires_capture", "amount": 6500, "net_amount": 6500, "shipping_cost": null, "amount_capturable": 6500, "amount_received": 0, "connector": "stripe", "client_secret": "pay_yySze0C1AcjjVbTE3ecr_secret_GI3GZQZxrsMa6bdmnSZD", "created": "2025-08-14T10:26:23.998Z", "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": null, "manual_retry_allowed": false, "connector_transaction_id": "pi_3RvyMWE9cSvqiivY16aXbZ8T", "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_3RvyMWE9cSvqiivY16aXbZ8T", "payment_link": null, "profile_id": "pro_mQ5idcJcr37iO0GmRSQU", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_2lED1Q9w5btK5Tgsx6CB", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-08-14T10:41:23.998Z", "fingerprint": null, "browser_info": { "language": "nl-NL", "time_zone": 0, "ip_address": "127.0.0.1", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "color_depth": 24, "java_enabled": true, "screen_width": 1536, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 723, "java_script_enabled": true }, "payment_channel": null, "payment_method_id": null, "network_transaction_id": null, "payment_method_status": null, "updated": "2025-08-14T10:29:43.256Z", "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_1RvyMWE9cSvqiivYxCV2kKOB", "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. Other** - `api-reference/v2/openapi_spec_v2.json` - `crates/common_enums/src/enums.rs` **Detailed Identifier Changes:** Commit 176e1ccc: Files to modify: **crates/common_enums/src/enums.rs** Modify existing code
{"pr_number": 8948, "pr_title": "fix(core): Add Default Enum Variant in RequestIncrementalAuthorization", "merged_at": "2025-08-18T07:35:59Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"other": ["api-reference/v2/openapi_spec_v2.json", "crates/common_enums/src/enums.rs"]}, "change_types": {}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
chore: update org retrieve api response to include org type ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Updated `organization_retrieve` api response to contain `organization_type` for v1 and v2 api ### Additional Changes - [x] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? Curl for Organization Retrieve ``` curl --location 'http://localhost:8080/organization/org_nib3yNnE0BcUJJ8ptlh2' \ --header 'api-key: test_admin' \ --header 'Content-Type: application/json' ``` Current response ``` { "organization_id": "org_nib3yNnE0BcUJJ8ptlh2", "organization_name": "org_local", "organization_details": null, "metadata": null, "modified_at": "2025-07-15 15:47:00.992814", "created_at": "2025-07-15 15:47:00.992762", } ``` Updated response ``` { "organization_id": "org_nib3yNnE0BcUJJ8ptlh2", "organization_name": "org_local", "organization_details": null, "metadata": null, "modified_at": "2025-07-15 15:47:00.992814", "created_at": "2025-07-15 15:47:00.992762", "organization_type": "standard" } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/organization.rs` **2. Type Definitions** - `crates/router/src/types/api/admin.rs` **3. Other** - `api-reference/v1/openapi_spec_v1.json` - `api-reference/v2/openapi_spec_v2.json` - `crates/common_enums/src/enums/accounts.rs` - ... and 2 more files **Code Patterns Applied:** - Extend existing types with new fields (3 changes) **Detailed Identifier Changes:** Commit a75af8b3: Files to modify: **crates/api_models/src/organization.rs** Modify existing code **crates/common_enums/src/enums/accounts.rs** Modify existing code **crates/openapi/src/openapi.rs** Modify existing code **crates/openapi/src/openapi_v2.rs** Modify existing code **crates/router/src/types/api/admin.rs** Modify existing code
{"pr_number": 8660, "pr_title": "chore: update org retrieve api response to include org type", "merged_at": "2025-07-18T12:18:24Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"api_models": ["crates/api_models/src/organization.rs"], "types": ["crates/router/src/types/api/admin.rs"], "other": ["api-reference/v1/openapi_spec_v1.json", "api-reference/v2/openapi_spec_v2.json", "crates/common_enums/src/enums/accounts.rs", "crates/openapi/src/openapi.rs", "crates/openapi/src/openapi_v2.rs"]}, "change_types": {"fields_added": 3}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): introduce `feature_matrix` api to coinbase, iatapay, nexixpay and square ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> this pr introduces feature_matrix api to 4 more connectors and in addition to that, pm filters also have been updated. have written many scripts to verify the pm_filters and are attached in the issue ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> With this PR, we'll be increasing the `feature_matrix` coverage for connectors by implementing `ConnectorSpecifications` just so that it will be the single source of truth for getting information about the payment methods and payment method types that the connector supports. ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> tested by making a request to the feature matrix endpoint: request: ```curl curl --location 'http://Localhost:8080/feature_matrix' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' ``` response: ```json { "connector_count": 7, "connectors": [ { "name": "BAMBORA", "display_name": "Bambora", "description": "Bambora is a leading online payment provider in Canada and United States.", "category": "payment_gateway", "supported_payment_methods": [ { "payment_method": "card", "payment_method_type": "credit", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "three_ds": "supported", "no_three_ds": "supported", "supported_card_networks": [ "Visa", "Mastercard", "AmericanExpress", "Discover", "JCB", "DinersClub" ], "supported_countries": [ "US", "CA" ], "supported_currencies": [ "USD" ] } ], "supported_webhook_flows": [] }, { "name": "COINBASE", "display_name": "Coinbase is a place for people and businesses to buy, sell, and manage crypto.", "description": "Square is the largest business technology platform serving all kinds of businesses.", "category": "payment_gateway", "supported_payment_methods": [ { "payment_method": "crypto", "payment_method_type": "crypto_currency", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "supported_countries": [ "VN", "US", "DE", "BR", "SG", "FR", "ZA", "ES", "GB", "CA", "IT", "TR", "NL", "PT", "AU" ], "supported_currencies": null } ], "supported_webhook_flows": [ "payments", "refunds" ] }, { "name": "DEUTSCHEBANK", "display_name": "Deutsche Bank", "description": "Deutsche Bank is a German multinational investment bank and financial services company ", "category": "bank_acquirer", "supported_payment_methods": [ { "payment_method": "bank_debit", "payment_method_type": "sepa", "mandates": "supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "supported_countries": null, "supported_currencies": null }, { "payment_method": "card", "payment_method_type": "debit", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "three_ds": "supported", "no_three_ds": "not_supported", "supported_card_networks": [ "Visa", "Mastercard" ], "supported_countries": null, "supported_currencies": null }, { "payment_method": "card", "payment_method_type": "credit", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "three_ds": "supported", "no_three_ds": "not_supported", "supported_card_networks": [ "Visa", "Mastercard" ], "supported_countries": null, "supported_currencies": null } ], "supported_webhook_flows": [] }, { "name": "IATAPAY", "display_name": "Iatapay", "description": "IATA Pay is a payment method for travellers to pay for air tickets purchased online by directly debiting their bank account.", "category": "payment_gateway", "supported_payment_methods": [ { "payment_method": "bank_redirect", "payment_method_type": "local_bank_redirect", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic" ], "supported_countries": [ "GB", "SG", "LV", "ES", "TH", "AU", "LT", "IE", "MX", "PT", "GH", "FI", "DE", "VN", "FR", "PH", "IN", "JO", "MY", "EE", "HK", "IT", "NL", "CO", "BE", "BR", "LU", "AT" ], "supported_currencies": [ "GBP", "INR", "AUD", "SGD", "EUR", "MXN", "VND", "PHP", "BRL", "MYR", "THB", "HKD", "COP", "JOD", "GHS" ] }, { "payment_method": "bank_redirect", "payment_method_type": "ideal", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic" ], "supported_countries": [ "NL" ], "supported_currencies": [ "EUR" ] }, { "payment_method": "real_time_payment", "payment_method_type": "fps", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic" ], "supported_countries": [ "GB" ], "supported_currencies": [ "GBP" ] }, { "payment_method": "real_time_payment", "payment_method_type": "viet_qr", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic" ], "supported_countries": [ "VN" ], "supported_currencies": [ "VND" ] }, { "payment_method": "real_time_payment", "payment_method_type": "duit_now", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic" ], "supported_countries": [ "MY" ], "supported_currencies": [ "MYR" ] }, { "payment_method": "real_time_payment", "payment_method_type": "prompt_pay", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic" ], "supported_countries": [ "TH" ], "supported_currencies": [ "THB" ] }, { "payment_method": "upi", "payment_method_type": "upi_intent", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic" ], "supported_countries": [ "IN" ], "supported_currencies": [ "INR" ] }, { "payment_method": "upi", "payment_method_type": "upi_collect", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic" ], "supported_countries": [ "IN" ], "supported_currencies": [ "INR" ] } ], "supported_webhook_flows": [ "payments", "refunds" ] }, { "name": "NEXIXPAY", "display_name": "Nexixpay", "description": "Nexixpay is an Italian bank that specialises in payment systems such as Nexi Payments (formerly known as CartaSi).", "category": "payment_gateway", "supported_payment_methods": [ { "payment_method": "card", "payment_method_type": "debit", "mandates": "supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "three_ds": "supported", "no_three_ds": "supported", "supported_card_networks": [ "Visa", "Mastercard", "AmericanExpress", "JCB" ], "supported_countries": [ "BA", "HR", "GB", "DK", "PL", "US", "GI", "HU", "MK", "CZ", "CH", "RS", "SE", "BG", "RO", "UA", "IS" ], "supported_currencies": [ "BGN", "CHF", "HUF", "HRK", "CZK", "RSD", "UAH", "SEK", "GIP", "RON", "ISK", "USD", "PLN", "GBP", "MKD", "DKK", "BAM" ] }, { "payment_method": "card", "payment_method_type": "credit", "mandates": "supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "three_ds": "supported", "no_three_ds": "supported", "supported_card_networks": [ "Visa", "Mastercard", "AmericanExpress", "JCB" ], "supported_countries": [ "RO", "PL", "CH", "UA", "MK", "BA", "CZ", "HU", "SE", "US", "HR", "RS", "DK", "GB", "IS", "BG", "GI" ], "supported_currencies": [ "MKD", "CHF", "HUF", "BGN", "CZK", "ISK", "RSD", "GIP", "SEK", "BAM", "GBP", "USD", "HRK", "RON", "PLN", "DKK", "UAH" ] } ], "supported_webhook_flows": [] }, { "name": "SQUARE", "display_name": "Square", "description": "Square is the largest business technology platform serving all kinds of businesses.", "category": "payment_gateway", "supported_payment_methods": [ { "payment_method": "card", "payment_method_type": "debit", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "three_ds": "not_supported", "no_three_ds": "supported", "supported_card_networks": [ "Visa", "Mastercard", "AmericanExpress", "Discover", "UnionPay", "Interac", "JCB" ], "supported_countries": [ "GB", "ES", "US", "AU", "CA", "FR", "JP", "IE" ], "supported_currencies": [ "MWK", "GIP", "MOP", "AWG", "KMF", "NGN", "TMT", "LKR", "CRC", "HNL", "MXN", "QAR", "BMD", "SYP", "NOK", "AMD", "GYD", "UZS", "XCD", "SLE", "BZD", "GBP", "EUR", "SZL", "TTD", "KYD", "MNT", "KPW", "WST", "RON", "HKD", "GHS", "MUR", "USD", "HRK", "INR", "PYG", "UGX", "LAK", "OMR", "SSP", "HUF", "FJD", "GTQ", "BBD", "MMK", "SRD", "MKD", "CZK", "AUD", "TJS", "ZAR", "RSD", "GEL", "LRD", "AOA", "GNF", "ISK", "NAD", "BGN", "IRR", "BND", "THB", "KRW", "BHD", "TOP", "PHP", "MYR", "UYU", "BSD", "DOP", "SBD", "SVC", "MVR", "EGP", "TRY", "SDG", "KHR", "MAD", "MGA", "SLL", "CDF", "NZD", "TND", "TZS", "VUV", "BAM", "ANG", "NPR", "XOF", "BWP", "XPF", "MDL", "BTN", "DZD", "ETB", "LYD", "IDR", "IQD", "BIF", "CHF", "JPY", "SAR", "KGS", "JOD", "KWD", "PKR", "UAH", "KES", "MZN", "GMD", "LBP", "PAB", "SCR", "YER", "JMD", "ERN", "CNY", "XAF", "BOB", "BDT", "ARS", "PEN", "RUB", "AZN", "KZT", "CAD", "SHP", "CVE", "NIO", "DJF", "HTG", "AED", "BRL", "COP", "DKK", "PLN", "SOS", "SGD", "LSL", "ALL", "ZMW", "PGK", "CLP", "FKP", "AFN", "ILS", "VND", "RWF", "CUP", "SEK", "TWD" ] }, { "payment_method": "card", "payment_method_type": "credit", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "three_ds": "not_supported", "no_three_ds": "supported", "supported_card_networks": [ "Visa", "Mastercard", "AmericanExpress", "Discover", "UnionPay", "Interac", "JCB" ], "supported_countries": [ "JP", "ES", "IE", "AU", "CA", "GB", "FR", "US" ], "supported_currencies": [ "SRD", "SCR", "CLP", "SLL", "VUV", "NIO", "ANG", "DOP", "OMR", "TZS", "IQD", "BIF", "CDF", "ILS", "PAB", "CNY", "ETB", "BDT", "BGN", "SHP", "KHR", "SVC", "AUD", "JOD", "RSD", "IDR", "KGS", "EGP", "SSP", "TND", "XPF", "BND", "ISK", "GHS", "KYD", "GIP", "MGA", "TOP", "TRY", "USD", "RWF", "COP", "BHD", "BBD", "MWK", "WST", "BWP", "XOF", "AMD", "MOP", "QAR", "AFN", "NAD", "PHP", "ALL", "XCD", "AWG", "CZK", "HKD", "GBP", "GNF", "GMD", "NOK", "ERN", "RUB", "PEN", "SBD", "AED", "DJF", "ZMW", "DZD", "UAH", "AOA", "NPR", "HUF", "PKR", "LBP", "DKK", "HNL", "KES", "CHF", "NGN", "SEK", "TWD", "MAD", "FJD", "PYG", "BOB", "JPY", "JMD", "BTN", "LRD", "MNT", "SLE", "SOS", "TTD", "ZAR", "KWD", "UGX", "BAM", "RON", "TJS", "GYD", "NZD", "CAD", "TMT", "MMK", "BRL", "SGD", "UYU", "SZL", "FKP", "SAR", "ARS", "GEL", "LAK", "MZN", "VND", "BSD", "LYD", "UZS", "XAF", "MVR", "PLN", "LKR", "SYP", "HRK", "BZD", "KPW", "PGK", "EUR", "MYR", "GTQ", "YER", "MUR", "CRC", "CUP", "IRR", "KRW", "MXN", "AZN", "BMD", "HTG", "KMF", "INR", "KZT", "LSL", "MDL", "SDG", "THB", "CVE", "MKD" ] } ], "supported_webhook_flows": [ "payments", "refunds" ] }, { "name": "ZSL", "display_name": "ZSL", "description": "Zsl is a payment gateway operating in China, specializing in facilitating local bank transfers", "category": "payment_gateway", "supported_payment_methods": [ { "payment_method": "bank_transfer", "payment_method_type": "local_bank_transfer", "mandates": "not_supported", "refunds": "not_supported", "supported_capture_methods": [ "automatic" ], "supported_countries": [ "CN" ], "supported_currencies": [ "CNY" ] } ], "supported_webhook_flows": [] } ] } ``` Iatapay does support refunds. They have mentioned it in general that refunds are supported. And upon testing (intent creation, sync and refund), all working fine. ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy --all-features --all-targets -- -D warnings` - [x] I reviewed the submitted code - [ ] 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/coinbase.rs` - `crates/hyperswitch_connectors/src/connectors/iatapay.rs` - `crates/hyperswitch_connectors/src/connectors/nexixpay.rs` - ... and 1 more files **2. Tests** - `config/deployments/integration_test.toml` - `loadtest/config/development.toml` **3. Configuration Files** - `config/config.example.toml` - `config/deployments/production.toml` - `config/deployments/sandbox.toml` - ... and 2 more files **Code Patterns Applied:** - Implement new functions (12 changes) - Extend existing types with new fields (74 changes) **Detailed Identifier Changes:** Commit c56f5719: Files to modify: **crates/hyperswitch_connectors/src/connectors/coinbase.rs** Remove: - function: private::validate_connector_against_payment_request - impl: impl ConnectorValidation for Coinbase - impl: impl ConnectorSpecifications for Coinbase Add: - function: private::get_connector_about - function: private::get_supported_payment_methods - function: private::get_supported_webhook_flows - impl: impl ConnectorValidation for Coinbase - impl: impl ConnectorSpecifications for Coinbase **crates/hyperswitch_connectors/src/connectors/iatapay.rs** Remove: - impl: impl ConnectorSpecifications for Iatapay Add: - function: private::get_connector_about - function: private::get_supported_payment_methods - function: private::get_supported_webhook_flows - impl: impl ConnectorSpecifications for Iatapay **crates/hyperswitch_connectors/src/connectors/nexixpay.rs** Remove: - function: private::validate_connector_against_payment_request - impl: impl ConnectorSpecifications for Nexixpay Add: - function: private::get_connector_about - function: private::get_supported_payment_methods - function: private::get_supported_webhook_flows - impl: impl ConnectorSpecifications for Nexixpay **crates/hyperswitch_connectors/src/connectors/square.rs** Remove: - function: private::validate_connector_against_payment_request - impl: impl ConnectorValidation for Square - impl: impl ConnectorSpecifications for Square Add: - function: private::get_connector_about - function: private::get_supported_payment_methods - function: private::get_supported_webhook_flows - impl: impl ConnectorValidation for Square - impl: impl ConnectorSpecifications for Square
{"pr_number": 7339, "pr_title": "feat(connector): introduce `feature_matrix` api to coinbase, iatapay, nexixpay and square", "merged_at": "2025-03-03T09:11:11Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "refund", "connector"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/coinbase.rs", "crates/hyperswitch_connectors/src/connectors/iatapay.rs", "crates/hyperswitch_connectors/src/connectors/nexixpay.rs", "crates/hyperswitch_connectors/src/connectors/square.rs"], "tests": ["config/deployments/integration_test.toml", "loadtest/config/development.toml"], "config": ["config/config.example.toml", "config/deployments/production.toml", "config/deployments/sandbox.toml", "config/development.toml", "config/docker_compose.toml"]}, "change_types": {"functions_added": 12, "fields_added": 74, "imports_added": 5}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
FEAT: Add Support for Amazon Pay Redirect and Amazon Pay payment via Stripe ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Add Support for Amazon Pay Redirect and Amazon Pay payment via Stripe ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> 1. Create connector ``` curl --location 'http://localhost:8080/account/merchant_1737107777/connectors' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: test_admin' \ --data '{ "connector_type": "payment_processor", "connector_name": "stripe", "business_country": "US", "business_label": "default", "connector_account_details": { "auth_type": "HeaderKey", "api_key":API_KEY_HERE }, "test_mode": false, "disabled": false, "payment_methods_enabled": [ { "payment_method": "wallet", "payment_method_types": [ { "payment_method_type": "amazon_pay", "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": false, "installment_payment_enabled": false } ] } ], "metadata": {} } ' ``` Response ``` { "connector_type": "payment_processor", "connector_name": "stripe", "connector_label": "stripe_US_default", "merchant_connector_id": "mca_Y9GMWdiq1dIGbzUGr0cZ", "profile_id": "pro_PX125fppN7NPx0QnQ0kW", "connector_account_details": { "auth_type": "HeaderKey", "api_key": "sk*******************************************************************************************************wS" }, "payment_methods_enabled": [ { "payment_method": "wallet", "payment_method_types": [ { "payment_method_type": "amazon_pay", "payment_experience": null, "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": false, "installment_payment_enabled": false } ] } ], "connector_webhook_details": null, "metadata": {}, "test_mode": false, "disabled": false, "frm_configs": null, "business_country": "US", "business_label": "default", "business_sub_label": null, "applepay_verified_domains": null, "pm_auth_config": null, "status": "active", "additional_merchant_data": null, "connector_wallets_details": null } ``` 2. Authorization ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_0llKWUC3y5Z3vACDU324XIGXXvO8ANUm2FWWjJOPb7ifHOZBllSXLDleAeoXC1ui' \ --data-raw '{ "amount": 1800, "currency": "USD", "confirm": true, "capture_method": "automatic", "customer_id": "klarna", "capture_on": "2022-09-10T10:11:12Z", "authentication_type": "three_ds", "email": "guest1@example.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment request", "return_url": "https://google.com", "business_country": "US", "payment_method": "wallet", "payment_method_type": "amazon_pay", "payment_method_data": { "wallet": { "amazon_pay_redirect": {} } }, "metadata": { "order_details": { "product_name": "Apple iphone 15", "quantity": 1, "amount": 1800, "account_name": "transaction_processing" } } }' ``` Response ``` { "payment_id": "pay_Lcxnnod81tHdyOaL3rKN", "merchant_id": "merchant_1737039949", "status": "requires_customer_action", "amount": 1800, "net_amount": 1800, "shipping_cost": null, "amount_capturable": 1800, "amount_received": 0, "connector": "stripe", "client_secret": "pay_Lcxnnod81tHdyOaL3rKN_secret_koHNJ4k4iszxZGs7UvLS", "created": "2025-01-17T09:43:30.081Z", "currency": "USD", "customer_id": "klarna", "customer": { "id": "klarna", "name": "John Doe", "email": "guest1@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": "wallet", "payment_method_data": { "wallet": {}, "billing": null }, "payment_token": null, "shipping": null, "billing": null, "order_details": null, "email": "guest1@example.com", "name": "John 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_Lcxnnod81tHdyOaL3rKN/merchant_1737039949/pay_Lcxnnod81tHdyOaL3rKN_1" }, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "amazon_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": "klarna", "created_at": 1737107010, "expires": 1737110610, "secret": "epk_a49fc4c439174510b4916078a67daafc" }, "manual_retry_allowed": null, "connector_transaction_id": "pi_3QiC5OAGHc77EJXX19qPFa6Z", "frm_message": null, "metadata": { "order_details": { "amount": 1800, "quantity": 1, "account_name": "transaction_processing", "product_name": "Apple iphone 15" } }, "connector_metadata": null, "feature_metadata": null, "reference_id": "pi_3QiC5OAGHc77EJXX19qPFa6Z", "payment_link": null, "profile_id": "pro_HPdS7uUx46Q3kWNK6x0q", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_5nADZHcVU5I934y0ikbp", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-01-17T09:58:30.081Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2025-01-17T09:43:31.230Z", "split_payments": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null } ``` 3. PSync ``` curl --location 'http://localhost:8080/payments/pay_Lcxnnod81tHdyOaL3rKN?force_sync=true&expand_captures=true&expand_attempts=true' \ --header 'Accept: application/json' \ --header 'api-key: dev_0llKWUC3y5Z3vACDU324XIGXXvO8ANUm2FWWjJOPb7ifHOZBllSXLDleAeoXC1ui' ``` Response ``` { "payment_id": "pay_Lcxnnod81tHdyOaL3rKN", "merchant_id": "merchant_1737039949", "status": "succeeded", "amount": 1800, "net_amount": 1800, "shipping_cost": null, "amount_capturable": 0, "amount_received": 1800, "connector": "stripe", "client_secret": "pay_Lcxnnod81tHdyOaL3rKN_secret_koHNJ4k4iszxZGs7UvLS", "created": "2025-01-17T09:43:30.081Z", "currency": "USD", "customer_id": "klarna", "customer": { "id": "klarna", "name": "John Doe", "email": "guest1@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": "wallet", "payment_method_data": { "wallet": {}, "billing": null }, "payment_token": null, "shipping": null, "billing": null, "order_details": null, "email": "guest1@example.com", "name": "John 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": "amazon_pay", "connector_label": "stripe_US_default", "business_country": "US", "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": null, "manual_retry_allowed": false, "connector_transaction_id": "pi_3QiC5OAGHc77EJXX19qPFa6Z", "frm_message": null, "metadata": { "order_details": { "amount": 1800, "quantity": 1, "account_name": "transaction_processing", "product_name": "Apple iphone 15" } }, "connector_metadata": null, "feature_metadata": null, "reference_id": "pi_3QiC5OAGHc77EJXX19qPFa6Z", "payment_link": null, "profile_id": "pro_HPdS7uUx46Q3kWNK6x0q", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_5nADZHcVU5I934y0ikbp", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-01-17T09:58:30.081Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2025-01-17T09:43:40.352Z", "split_payments": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/payments.rs` **2. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/payment_method_data.rs` **3. Core Business Logic** - `crates/router/src/core/payments/helpers.rs` **4. External Connector Integration** - `crates/connector_configs/toml/development.toml` - `crates/connector_configs/toml/production.toml` - `crates/connector_configs/toml/sandbox.toml` - ... and 31 more files **5. Type Definitions** - `crates/router/src/types/transformers.rs` **6. Utils** - `crates/kgraph_utils/src/mca.rs` - `crates/kgraph_utils/src/transformers.rs` **7. Other** - `api-reference-v2/openapi_spec.json` - `api-reference/openapi_spec.json` - `crates/common_enums/src/enums.rs` - ... and 6 more files **Code Patterns Applied:** - Define new data structures (2 changes) - Extend existing types with new fields (6 changes) **Detailed Identifier Changes:** Commit b54a3f91: Files to modify: **crates/api_models/src/payments.rs** Add: - struct: private::AmazonPayRedirectData **crates/common_enums/src/enums.rs** Modify existing code **crates/common_enums/src/transformers.rs** Modify existing code **crates/euclid/src/frontend/dir/enums.rs** Modify existing code **crates/euclid/src/frontend/dir/lowering.rs** Modify existing code **crates/euclid/src/frontend/dir/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/airwallex/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/bankofamerica/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/bluesnap/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/boku/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/fiuu/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/globepay/transformers.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/shift4/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/square/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/wellsfargo/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/worldpay/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/zen/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/utils.rs** Modify existing code **crates/hyperswitch_domain_models/src/payment_method_data.rs** Modify existing code **crates/kgraph_utils/src/mca.rs** Modify existing code **crates/kgraph_utils/src/transformers.rs** Modify existing code **crates/openapi/src/openapi.rs** Modify existing code **crates/openapi/src/openapi_v2.rs** Modify existing code **crates/router/src/configs/defaults/payment_connector_required_fields.rs** Modify existing code **crates/router/src/connector/aci/transformers.rs** Modify existing code **crates/router/src/connector/adyen.rs** Modify existing code **crates/router/src/connector/adyen/transformers.rs** Modify existing code **crates/router/src/connector/authorizedotnet/transformers.rs** Modify existing code **crates/router/src/connector/checkout/transformers.rs** Modify existing code **crates/router/src/connector/klarna.rs** Modify existing code **crates/router/src/connector/mifinity/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/payme/transformers.rs** Modify existing code **crates/router/src/connector/paypal/transformers.rs** Modify existing code **crates/router/src/connector/stripe/transformers.rs** Add: - struct: pub::AmazonpayPayment **crates/router/src/connector/utils.rs** Modify existing code **crates/router/src/core/payments/helpers.rs** Modify existing code **crates/router/src/types/transformers.rs** Modify existing code Commit a56f6887: Files to modify: **crates/api_models/src/payments.rs** Add: - struct: private::AmazonPayRedirectData **crates/common_enums/src/enums.rs** Modify existing code **crates/common_enums/src/transformers.rs** Modify existing code **crates/euclid/src/frontend/dir/enums.rs** Modify existing code **crates/euclid/src/frontend/dir/lowering.rs** Modify existing code **crates/euclid/src/frontend/dir/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/airwallex/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/bankofamerica/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/bluesnap/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/boku/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/fiuu/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/globepay/transformers.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/shift4/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/square/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/wellsfargo/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/worldpay/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/zen/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/utils.rs** Modify existing code **crates/hyperswitch_domain_models/src/payment_method_data.rs** Modify existing code **crates/kgraph_utils/src/mca.rs** Modify existing code **crates/kgraph_utils/src/transformers.rs** Modify existing code **crates/openapi/src/openapi.rs** Modify existing code **crates/openapi/src/openapi_v2.rs** Modify existing code **crates/router/src/configs/defaults/payment_connector_required_fields.rs** Modify existing code **crates/router/src/connector/aci/transformers.rs** Modify existing code **crates/router/src/connector/adyen.rs** Modify existing code **crates/router/src/connector/adyen/transformers.rs** Modify existing code **crates/router/src/connector/authorizedotnet/transformers.rs** Modify existing code **crates/router/src/connector/checkout/transformers.rs** Modify existing code **crates/router/src/connector/klarna.rs** Modify existing code **crates/router/src/connector/mifinity/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/payme/transformers.rs** Modify existing code **crates/router/src/connector/paypal/transformers.rs** Modify existing code **crates/router/src/connector/stripe/transformers.rs** Add: - struct: pub::AmazonpayPayment **crates/router/src/connector/utils.rs** Modify existing code **crates/router/src/core/payments/helpers.rs** Modify existing code **crates/router/src/types/transformers.rs** Modify existing code
{"pr_number": 7056, "pr_title": "FEAT: Add Support for Amazon Pay Redirect and Amazon Pay payment via Stripe", "merged_at": "2025-02-05T15:24:59Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/payments.rs"], "domain": ["crates/hyperswitch_domain_models/src/payment_method_data.rs"], "core_business": ["crates/router/src/core/payments/helpers.rs"], "connectors": ["crates/connector_configs/toml/development.toml", "crates/connector_configs/toml/production.toml", "crates/connector_configs/toml/sandbox.toml", "crates/hyperswitch_connectors/src/connectors/airwallex/transformers.rs", "crates/hyperswitch_connectors/src/connectors/bankofamerica/transformers.rs", "crates/hyperswitch_connectors/src/connectors/bluesnap/transformers.rs", "crates/hyperswitch_connectors/src/connectors/boku/transformers.rs", "crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs", "crates/hyperswitch_connectors/src/connectors/fiuu/transformers.rs", "crates/hyperswitch_connectors/src/connectors/globepay/transformers.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/shift4/transformers.rs", "crates/hyperswitch_connectors/src/connectors/square/transformers.rs", "crates/hyperswitch_connectors/src/connectors/wellsfargo/transformers.rs", "crates/hyperswitch_connectors/src/connectors/worldpay/transformers.rs", "crates/hyperswitch_connectors/src/connectors/zen/transformers.rs", "crates/hyperswitch_connectors/src/utils.rs", "crates/router/src/configs/defaults/payment_connector_required_fields.rs", "crates/router/src/connector/aci/transformers.rs", "crates/router/src/connector/adyen.rs", "crates/router/src/connector/adyen/transformers.rs", "crates/router/src/connector/authorizedotnet/transformers.rs", "crates/router/src/connector/checkout/transformers.rs", "crates/router/src/connector/klarna.rs", "crates/router/src/connector/mifinity/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/payme/transformers.rs", "crates/router/src/connector/paypal/transformers.rs", "crates/router/src/connector/stripe/transformers.rs", "crates/router/src/connector/utils.rs"], "types": ["crates/router/src/types/transformers.rs"], "utils": ["crates/kgraph_utils/src/mca.rs", "crates/kgraph_utils/src/transformers.rs"], "other": ["api-reference-v2/openapi_spec.json", "api-reference/openapi_spec.json", "crates/common_enums/src/enums.rs", "crates/common_enums/src/transformers.rs", "crates/euclid/src/frontend/dir/enums.rs", "crates/euclid/src/frontend/dir/lowering.rs", "crates/euclid/src/frontend/dir/transformers.rs", "crates/openapi/src/openapi.rs", "crates/openapi/src/openapi_v2.rs"]}, "change_types": {"structs_added": 2, "fields_added": 6}, "has_identifier_data": true, "commits_matched": 2, "match_method": "pr_number"}
ci: update wise connector cypress creds ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [x] CI/CD ## Description Update Cypress Creds ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context wise connector failing ## How did you test it? Ci should pass ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Tests** - `.github/workflows/cypress-tests-runner.yml` **Code Patterns Applied:** - Extend existing types with new fields (1 changes)
{"pr_number": 7477, "pr_title": "ci: update wise connector cypress creds", "merged_at": "2025-03-11T08:47:32Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["connector"]}, "hierarchy": {"tests": [".github/workflows/cypress-tests-runner.yml"]}, "change_types": {"fields_added": 1}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
feat(connector): [Moneris] Implement mandate for Moneris ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Implement mandate for Moneris Card ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? 1. Create Merchant Account 2. Create API Key 3. Create Moneris Connector ``` curl --location 'http://localhost:8080/account/merchant_1739967523/connectors' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: test_admin' \ --data '{ "connector_type": "payment_processor", "connector_name": "moneris", "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", "card_networks": [ "AmericanExpress", "Discover", "Interac", "JCB", "Mastercard", "Visa", "DinersClub", "UnionPay", "RuPay" ], "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_type": "debit", "card_networks": [ "AmericanExpress", "Discover", "Interac", "JCB", "Mastercard", "Visa", "DinersClub", "UnionPay", "RuPay" ], "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true } ] } ], "metadata": { "city": "NY", "unit": "245" }, "connector_webhook_details": { "merchant_secret": "dce1d767-7c28-429c-b0fe-9e0b9e91f962" }, "business_country": "US", "business_label": "food" }' ``` 4. Create Moneris Card Payment (CIT) ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: ____' \ --data-raw '{ "amount": 5000, "currency": "USD", "confirm": true, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 5000, "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://www.google.com/", "payment_method": "card", "payment_method_type": "debit", "setup_future_usage": "off_session", "customer_acceptance": { "acceptance_type": "offline" }, "payment_method_data": { "card": { "card_number": "4242424242424242", "card_exp_month": "01", "card_exp_year": "28", "card_holder_name": "John", "card_cvc": "123" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "DE", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "DE", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "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_7UP5gdycrXM3KW3YIUKB", "merchant_id": "merchant_1739967523", "status": "succeeded", "amount": 5000, "net_amount": 5000, "shipping_cost": null, "amount_capturable": 0, "amount_received": 5000, "connector": "moneris", "client_secret": "pay_7UP5gdycrXM3KW3YIUKB_secret_u0DswE5N9JpuJlCXLcwy", "created": "2025-02-19T13:25:20.144Z", "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": "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": "01", "card_exp_year": "28", "card_holder_name": "John", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": "DE", "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": "DE", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "order_details": null, "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "return_url": "https://www.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": "debit", "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": 1739971520, "expires": 1739975120, "secret": "epk_77384504322540bea2c5f5278ef14a40" }, "manual_retry_allowed": false, "connector_transaction_id": "pi0001JMF64VDBD6K3EPRXS459JWPX", "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2019-09-10T10:11:12Z", "new_customer": "true" }, "connector_metadata": null, "feature_metadata": null, "reference_id": "pi0001JMF64VDBD6K3EPRXS459JWPX", "payment_link": null, "profile_id": "pro_x31oMVWgJJBwVNXsjTBd", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_equI7KeYE9FM2OBeSJAo", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-02-19T13:40:20.144Z", "fingerprint": null, "browser_info": null, "payment_method_id": "pm_LibSbChx3ELq8WvTZbIr", "payment_method_status": "active", "updated": "2025-02-19T13:25:23.064Z", "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": "pm0001JMF64VEB71ERCKXWBJJ20G1R", "card_discovery": "manual" } ``` 5. Create a Payment Request using payment_method_id (MIT) ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: ____' \ --data '{ "amount": 77000, "currency": "USD", "confirm": true, "customer_id": "StripeCustomer", "recurring_details": { "type": "payment_method_id", "data": "pm_LibSbChx3ELq8WvTZbIr" }, "off_session": true }' ``` Response ``` { "payment_id": "pay_jMUZOfWDGPeUXheKhzTx", "merchant_id": "merchant_1739967523", "status": "succeeded", "amount": 77000, "net_amount": 77000, "shipping_cost": null, "amount_capturable": 0, "amount_received": 77000, "connector": "moneris", "client_secret": "pay_jMUZOfWDGPeUXheKhzTx_secret_CQC1uJBCsIstN30YsIoP", "created": "2025-02-19T13:31:45.833Z", "currency": "USD", "customer_id": "StripeCustomer", "customer": { "id": "StripeCustomer", "name": "John Doe", "email": "guest@example.com", "phone": "999999999", "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": "4242", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "424242", "card_extended_bin": null, "card_exp_month": "01", "card_exp_year": "28", "card_holder_name": "John", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": null, "order_details": null, "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "return_url": null, "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "debit", "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": 1739971905, "expires": 1739975505, "secret": "epk_6c1f970404204fa891890bedb1373b88" }, "manual_retry_allowed": false, "connector_transaction_id": "pi0001JMF6GKSPZNEYR39MDTYC39DN", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "pi0001JMF6GKSPZNEYR39MDTYC39DN", "payment_link": null, "profile_id": "pro_x31oMVWgJJBwVNXsjTBd", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_equI7KeYE9FM2OBeSJAo", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-02-19T13:46:45.833Z", "fingerprint": null, "browser_info": null, "payment_method_id": "pm_LibSbChx3ELq8WvTZbIr", "payment_method_status": "active", "updated": "2025-02-19T13:31:48.362Z", "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": "pm0001JMF64VEB71ERCKXWBJJ20G1R", "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. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/moneris.rs` - `crates/hyperswitch_connectors/src/connectors/moneris/transformers.rs` **Code Patterns Applied:** - Define new data structures (3 changes) - Implement new functions (1 changes) - Extend existing types with new fields (18 changes) **Detailed Identifier Changes:** Commit ba84b00e: Files to modify: **crates/hyperswitch_connectors/src/connectors/moneris.rs** Add: - function: private::validate_mandate_payment **crates/hyperswitch_connectors/src/connectors/moneris/transformers.rs** Remove: - struct: pub::PaymentMethod Add: - struct: pub::PaymentMethodCard - struct: pub::PaymentMethodId - enum: pub::PaymentMethod
{"pr_number": 7322, "pr_title": "feat(connector): [Moneris] Implement mandate for Moneris", "merged_at": "2025-03-05T12:25:27Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/moneris.rs", "crates/hyperswitch_connectors/src/connectors/moneris/transformers.rs"]}, "change_types": {"structs_added": 3, "functions_added": 1, "enums_added": 2, "fields_added": 18}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(required_fields): add correct field_type for required_fields ## 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 correct field_type for required_fields for sepa and becs bank debits ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Configuration Files** - `config/payment_required_fields_v2.toml`
{"pr_number": 8625, "pr_title": "fix(required_fields): add correct field_type for required_fields", "merged_at": "2025-07-13T12:02:48Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"config": ["config/payment_required_fields_v2.toml"]}, "change_types": {}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
refactor(cypress): update `Stripe` response `status`, `error_code`, and `error_message` for deprecated `Sofort` ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [x] CI/CD ## Description <!-- Describe your changes in detail --> Mapping `status`, `error_code`, and `error_message` for `Stripe` Payment Processor `Sofort` Bank Transfer Payment Method as `Sofort` has been deprecated by `Stripe`. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> `Stripe` Payment Processor has deprecated `Sofort` Bank Transfer Payment Method. ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ![image](https://github.com/user-attachments/assets/bc3de0de-13ad-4609-85ae-84b67bb2473f) ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Tests** - `cypress-tests/cypress/e2e/configs/Payment/Stripe.js` **Code Patterns Applied:** - Extend existing types with new fields (3 changes)
{"pr_number": 7672, "pr_title": "refactor(cypress): update `Stripe` response `status`, `error_code`, and `error_message` for deprecated `Sofort`", "merged_at": "2025-04-01T08:50:24Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "user"]}, "hierarchy": {"tests": ["cypress-tests/cypress/e2e/configs/Payment/Stripe.js"]}, "change_types": {"fields_added": 3}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
feat(router): add v2 endpoint retrieve payment aggregate based on merchant profile ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Add Aggregate API which enables merchants to retrieve summarized payment data based on a specified date range at profile or merchant level. The API aggregates key payment metrics, such as total transaction count, total processed amount, and status breakdown, helping merchants analyze their payment performance effectively. ## Key Changes `pub async fn get_payments_aggregates_profile` -> `crates/router/src/routes/payments.rs` - this implementation extracts the profile ID directly from the authentication data, ensuring profile-based filtering of payment aggregates. ### 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)? --> - Curl `curl --location 'http://localhost:8080/v2/payments/aggregate?start_time=2025-01-05T18%3A30%3A00Z&end_time=2025-02-05T08%3A59%3A00Z' \ --header 'X-Profile-Id: pro_68rBAUSCoq91kQ870GFR' \ --header 'api-key: dev_elV1dBHRfYgbT09Q3R914ZOZzKCsJFjMJRot4TUcByFCYDseSZHTrZbCJuBX6ZHO'` <img width="396" alt="Screenshot 2025-02-05 at 6 04 35 PM" src="https://github.com/user-attachments/assets/011ef5db-6838-4829-93f5-0be1a1a57f73" /> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] 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_intent.rs` **2. Core Business Logic** - `crates/router/src/core/payments.rs` **3. Other** - `crates/router/src/db/kafka_store.rs` - `crates/router/src/routes/app.rs` - `crates/router/src/routes/payments.rs` - ... and 2 more files **Code Patterns Applied:** - Implement new functions (1 changes) - Extend existing types with new fields (4 changes) **Detailed Identifier Changes:** Commit c17eb01e: Files to modify: **crates/hyperswitch_domain_models/src/payments/payment_intent.rs** Modify existing code **crates/router/src/core/payments.rs** Modify existing code **crates/router/src/db/kafka_store.rs** Modify existing code **crates/router/src/routes/app.rs** Modify existing code **crates/router/src/routes/payments.rs** Add: - function: pub::get_payments_aggregates_profile **crates/storage_impl/src/mock_db/payment_intent.rs** Modify existing code **crates/storage_impl/src/payments/payment_intent.rs** Modify existing code
{"pr_number": 7196, "pr_title": "feat(router): add v2 endpoint retrieve payment aggregate based on merchant profile", "merged_at": "2025-02-14T14:02:44Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "merchant", "user"]}, "hierarchy": {"domain": ["crates/hyperswitch_domain_models/src/payments/payment_intent.rs"], "core_business": ["crates/router/src/core/payments.rs"], "other": ["crates/router/src/db/kafka_store.rs", "crates/router/src/routes/app.rs", "crates/router/src/routes/payments.rs", "crates/storage_impl/src/mock_db/payment_intent.rs", "crates/storage_impl/src/payments/payment_intent.rs"]}, "change_types": {"functions_added": 1, "fields_added": 4}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor(config): enable payout in prod release ## 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 enables payout for release Hotfix raised against: https://github.com/juspay/hyperswitch/pull/8817 ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Run Cypress Module for Payout ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Configuration Files** - `crates/router/Cargo.toml`
{"pr_number": 8819, "pr_title": "refactor(config): enable payout in prod release", "merged_at": "2025-08-05T07:53:31Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"config": ["crates/router/Cargo.toml"]}, "change_types": {}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
refactor(connector): [Authorizedotnet] fix refund status mapping ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description - If Authorize.Net returns status code 1, which indicates an "`Approved`" status in the refund response, it means the refund has been created. - But, "`Approved`" was previously marked as a "Successful Refund." We are now changing "Approved" to "Pending" because, at this stage, the connector has not yet marked the refund as successful. - Therefore, we will also keep it as "Pending" on Hyperswitch's end. Later, when we perform a payment sync (psync) and the refund status changes from "`RefundPendingSettlement`" to "`RefundSettledSuccessfully`," we will then mark the refund as successful. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? 1. Create MCA for Authorizedotnet ``` curl --location 'http://localhost:8080/account/postman_merchant_GHAction_5e66b683-ed3c-419a-a99e-635186bec03b/connectors' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: test_admin' \ --data '{ "connector_type": "payment_processor", "connector_name": "authorizedotnet", "connector_account_details": { "auth_type": "BodyKey", "api_key": "_", "key1": "_" }, "test_mode": false, "disabled": false, "business_country": "US", "business_label": "default", "payment_methods_enabled": [ { "payment_method": "card", "payment_method_types": [ { "payment_method_type": "credit", "card_networks": [ "Visa", "Mastercard" ], "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_type": "debit", "card_networks": [ "Visa", "Mastercard" ], "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true } ] }, { "payment_method": "pay_later", "payment_method_types": [ { "payment_method_type": "klarna", "payment_experience": "redirect_to_url", "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_type": "affirm", "payment_experience": "redirect_to_url", "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_type": "afterpay_clearpay", "payment_experience": "redirect_to_url", "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true } ] }, { "payment_method": "wallet", "payment_method_types": [ { "payment_method_type": "paypal", "payment_experience": "redirect_to_url", "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": false, "installment_payment_enabled": false }, { "payment_method_type": "paypal", "payment_experience": "invoke_sdk_client", "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": false, "installment_payment_enabled": false } ] } ], "metadata": { "city": "NY", "unit": "245" }, "connector_webhook_details": { "merchant_secret": "_" } }' ``` Create a payment ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_rbkPXyBccqZhlmnO2fylT9flVjRPHluVfxTsPHkf2oo4AaLK6nNGHIwELQyv1vEc' \ --data-raw '{ "amount": 6000, "currency": "USD", "confirm": true, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 6000, "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_data": { "card": { "card_number": "4111111111111111", "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": "PiX" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "PiX" } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } }' ``` 3. Create a Refund ``` curl --location 'http://localhost:8080/refunds' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_rbkPXyBccqZhlmnO2fylT9flVjRPHluVfxTsPHkf2oo4AaLK6nNGHIwELQyv1vEc' \ --data '{ "payment_id": "pay_ym3OnRPsUXgH4gGAM5aJ", "amount": 6000, "reason": "Customer returned product", "refund_type": "instant", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } }' ``` Response ``` { "refund_id": "ref_aw3mAESsnoKzwbHL0lLl", "payment_id": "pay_ym3OnRPsUXgH4gGAM5aJ", "amount": 6000, "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-02-07T08:18:41.004Z", "updated_at": "2025-02-07T08:18:41.524Z", "connector": "authorizedotnet", "profile_id": "pro_hpufdpQhkumEk6WajNqe", "merchant_connector_id": "mca_l21jSZO3mpqLE1pvkCPK", "split_refunds": null } ``` It should have `pending` status ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/router/src/connector/authorizedotnet/transformers.rs` **Detailed Identifier Changes:** Commit bfcaf003: Files to modify: **crates/router/src/connector/authorizedotnet/transformers.rs** Modify existing code
{"pr_number": 7208, "pr_title": "refactor(connector): [Authorizedotnet] fix refund status mapping", "merged_at": "2025-02-10T13:08:56Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/router/src/connector/authorizedotnet/transformers.rs"]}, "change_types": {}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor(connector): [BRAINTREE] Pass email in payment requests ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Pass email in payment request body of Braintree as it is mandatory field for sending receipts in braintree ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> https://github.com/juspay/hyperswitch/issues/7590 ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Payment Request: ``` { "amount": 1233, "currency": "EUR", "confirm": true, "customer_id": "abcdef", "billing": { "email": "guest@example.com" } "name": "John Doe", "authentication_type": "no_three_ds", "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" } } } ``` Payment Response: ``` { "payment_id": "pay_o6SLsqlZ6J049AiPkHwW", "merchant_id": "postman_merchant_GHAction_ec4bf644-13b4-420a-9747-5a91dc33c1b5", "status": "requires_customer_action", "amount": 100, "net_amount": 100, "shipping_cost": null, "amount_capturable": 100, "amount_received": null, "connector": "braintree", "client_secret": "pay_o6SLsqlZ6J049AiPkHwW_secret_Bv6iGp8QmWWfywJd7jOO", "created": "2025-03-21T11:15:04.414Z", "currency": "EUR", "customer_id": "deepanshu", "customer": { "id": "deepanshu", "name": null, "email": "deepanshubansal515@gmail.com", "phone": null, "phone_country_code": null }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "off_session", "off_session": null, "capture_on": null, "capture_method": null, "payment_method": "card", "payment_method_data": { "card": { "last4": "1096", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "520000", "card_extended_bin": null, "card_exp_month": "10", "card_exp_year": "25", "card_holder_name": "Deepanshu Bansal", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": null, "phone": null, "email": "guest@example.com" }, "order_details": null, "email": "deepanshubansal515@gmail.com", "name": null, "phone": null, "return_url": "https://duck.com/", "authentication_type": "three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": { "type": "redirect_to_url", "redirect_to_url": "http://localhost:8080/payments/redirect/pay_o6SLsqlZ6J049AiPkHwW/postman_merchant_GHAction_ec4bf644-13b4-420a-9747-5a91dc33c1b5/pay_o6SLsqlZ6J049AiPkHwW_1" }, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "deepanshu", "created_at": 1742555704, "expires": 1742559304, "secret": "epk_cc70c871e62f4f0a9a0fb797bb433941" }, "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_pzlYtlAD7YgNLdXLPSlq", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_CSJaSjj2gRnDoaSDRndr", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-03-21T11:30:04.414Z", "fingerprint": null, "browser_info": null, "payment_method_id": "pm_xp0BCgE81c2YO7G4Zan5", "payment_method_status": "inactive", "updated": "2025-03-21T11:15:06.916Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": "manual", "issuer_error_code": null, "issuer_error_message": null } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/braintree/transformers.rs` **Code Patterns Applied:** - Define new data structures (1 changes) - Extend existing types with new fields (8 changes) **Detailed Identifier Changes:** Commit d59c2fa0: Files to modify: **crates/hyperswitch_connectors/src/connectors/braintree/transformers.rs** Add: - struct: pub::CustomerBody
{"pr_number": 7591, "pr_title": "refactor(connector): [BRAINTREE] Pass email in payment requests", "merged_at": "2025-03-21T15:18:23Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/braintree/transformers.rs"]}, "change_types": {"structs_added": 1, "fields_added": 8}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): [Nuvei] Implement setup mandate flow for cards ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Add setup mandate flow for cards ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> https://github.com/juspay/hyperswitch-cloud/issues/10774 ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Setup mandate flow : <details> <summary> Request </summary> ``` { "amount": 0, "currency": "EUR", "confirm": true, "customer_id":"nithxxinn", "return_url": "https://www.google.com", "capture_method": "automatic", "payment_type" : "setup_mandate", "setup_future_usage": "off_session", "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" } }, "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", "payment_method_data": { "card": { "card_number": "2221008123677736", "card_exp_month": "12", "card_exp_year": "2030", "card_holder_name": "CL-BRW2", "card_cvc": "217" } } } ``` </details> <details> <summary> Response </summary> ``` { "payment_id": "pay_pIlTtdr1FzpccQG2efu1", "merchant_id": "merchant_1755776197", "status": "succeeded", "amount": 0, "net_amount": 0, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": "nuvei", "client_secret": "pay_pIlTtdr1FzpccQG2efu1_secret_81FAsrNQcaGOZA9kn4wg", "created": "2025-08-21T12:22:44.656Z", "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": "card", "payment_method_data": { "card": { "last4": "7736", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "222100", "card_extended_bin": null, "card_exp_month": "12", "card_exp_year": "2030", "card_holder_name": "CL-BRW2", "payment_checks": { "avs_description": null, "avs_result_code": "", "cvv_2_reply_code": "", "cvv_2_description": null, "merchant_advice_code": "", "merchant_advice_code_description": null }, "authentication_data": {} }, "billing": null }, "payment_token": "token_HvFMUgI2CKK3b4yjzVAl", "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": "nithxxinn", "created_at": 1755778964, "expires": 1755782564, "secret": "epk_959b0c962665436da106a97edbd70ae3" }, "manual_retry_allowed": false, "connector_transaction_id": "7110000000016661021", "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": "8110755112", "payment_link": null, "profile_id": "pro_zCDeu3sBLjaoR0j1q2f0", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_DKTxGltWZglmtIc8ESRB", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-08-21T12:37:44.656Z", "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_1e16m2dO2LGRw0xHN4Ns", "network_transaction_id": null, "payment_method_status": "active", "updated": "2025-08-21T12:22:47.199Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": "2088668112", "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> Recurring call : <details> <summary> Request </summary> ``` { "amount": 100, "currency": "EUR", "customer_id": "nithxxinn", "confirm": true, "off_session": true, "recurring_details": { "type": "payment_method_id", "data": "pm_1e16m2dO2LGRw0xHN4Ns" } } ``` </details> <details> <summary> Request </summary> ``` { "payment_id": "pay_0yEgYyrcrlNbjuSUTlRf", "merchant_id": "merchant_1755776197", "status": "succeeded", "amount": 100, "net_amount": 100, "shipping_cost": null, "amount_capturable": 0, "amount_received": 100, "connector": "nuvei", "client_secret": "pay_0yEgYyrcrlNbjuSUTlRf_secret_9c0ZpjkCY5jh9HLeyw22", "created": "2025-08-21T12:23:44.859Z", "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": "card", "payment_method_data": { "card": { "last4": "7736", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "222100", "card_extended_bin": null, "card_exp_month": "12", "card_exp_year": "2030", "card_holder_name": "CL-BRW2", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": null, "order_details": null, "email": "hello@gmail.com", "name": null, "phone": null, "return_url": null, "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "nithxxinn", "created_at": 1755779024, "expires": 1755782624, "secret": "epk_88ca1d7865784274bad1200e6cfc4d64" }, "manual_retry_allowed": false, "connector_transaction_id": "7110000000016661082", "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": "8110775112", "payment_link": null, "profile_id": "pro_zCDeu3sBLjaoR0j1q2f0", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_DKTxGltWZglmtIc8ESRB", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-08-21T12:38:44.858Z", "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_1e16m2dO2LGRw0xHN4Ns", "network_transaction_id": null, "payment_method_status": "active", "updated": "2025-08-21T12:23:46.367Z", "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": "2088668112", "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> <img width="848" height="906" alt="Screenshot 2025-08-26 at 8 21 38 AM" src="https://github.com/user-attachments/assets/dccdd296-d813-4958-894f-34b5b6500bd4" /> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] 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/flows/setup_mandate_flow.rs` - `crates/router/src/core/payments/transformers.rs` **3. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/celero/transformers.rs` - `crates/hyperswitch_connectors/src/connectors/nuvei.rs` - `crates/hyperswitch_connectors/src/connectors/nuvei/transformers.rs` **4. Type Definitions** - `crates/router/src/types.rs` **5. Tests** - `cypress-tests/cypress/e2e/configs/Payment/Nuvei.js` **Code Patterns Applied:** - Implement new functions (33 changes) - Extend existing types with new fields (173 changes) - Add conditional logic for feature flags or filtering (2 changes) **Detailed Identifier Changes:** Commit 58ff01ba: Files to modify: **crates/hyperswitch_connectors/src/connectors/celero/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/nuvei.rs** Remove: - impl: impl ConnectorIntegration<Session, PaymentsSessionData, PaymentsResponseData> for Nuvei Add: - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::get_request_body - impl: impl ConnectorIntegration<Session, PaymentsSessionData, PaymentsResponseData> for Nuvei **crates/hyperswitch_connectors/src/connectors/nuvei/transformers.rs** Add: - function: private::get_complete_authorize_url - function: private::get_connector_mandate_id - function: private::get_return_url_required - function: private::get_capture_method - function: private::get_currency_required - function: private::get_payment_method_data_required - function: private::get_order_tax_amount - function: private::get_minor_amount_required - function: private::get_is_partial_approval - function: private::get_email_required - function: private::is_customer_initiated_mandate_payment - function: private::get_browser_info - function: private::get_related_transaction_id - function: private::get_is_moto - function: private::is_customer_initiated_mandate_payment - impl: impl NuveiAuthorizePreprocessingCommon for SetupMandateRequestData **crates/hyperswitch_domain_models/src/router_request_types.rs** Add: - function: private::try_from - impl: impl TryFrom<SetupMandateRequestData> for PaymentsPreProcessingData **crates/router/src/core/payments/flows/setup_mandate_flow.rs** Add: - function: private::add_session_token - function: private::preprocessing_steps - function: pub::setup_mandate_preprocessing_steps **crates/router/src/core/payments/transformers.rs** Modify existing code **crates/router/src/types.rs** Add: - function: private::foreign_from - impl: impl ForeignFrom<&'a SetupMandateRouterData> for AuthorizeSessionTokenData
{"pr_number": 9012, "pr_title": "feat(connector): [Nuvei] Implement setup mandate flow for cards", "merged_at": "2025-08-26T12:31: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/flows/setup_mandate_flow.rs", "crates/router/src/core/payments/transformers.rs"], "connectors": ["crates/hyperswitch_connectors/src/connectors/celero/transformers.rs", "crates/hyperswitch_connectors/src/connectors/nuvei.rs", "crates/hyperswitch_connectors/src/connectors/nuvei/transformers.rs"], "types": ["crates/router/src/types.rs"], "tests": ["cypress-tests/cypress/e2e/configs/Payment/Nuvei.js"]}, "change_types": {"functions_added": 33, "fields_added": 173, "imports_added": 1, "conditionals_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(core): change condition for updating payment method status ## 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 --> - reference of payment_method_id was taken payment attempt but now it will be taken from payment_data - payment attempt doesn't contain the context of payment_method_id before update tracker - thus, this check was invalid ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Testing needed with Proxy module in Postman Create an MCA with Adyen: Create an MCA with VGS: Enable VGS in profile: ``` curl --location --request PUT '{{baseUrl}}/v2/profiles/{{profile_id}}' \ --header 'x-merchant-id: cloth_seller_guNbcoZfVazM1louchMU' \ --header 'Content-Type: application/json' \ --header 'Authorization: admin-api-key={{admin_api_key}}' \ --data-raw '{ "is_external_vault_enabled": true, "external_vault_connector_details": { "vault_connector_id": "mca_E1POF4A5tJlT6jTRBcdh", "vault_sdk": "vgs_sdk" } }' ``` Create a payment (saved card flow): ``` curl --location '{{baseUrl}}/v2/payments/{{payment_id}}/confirm-intent/external-vault-proxy' \ --header 'x-client-secret: cs_01990f565faa7392ab88b54967d493f0' \ --header 'x-profile-id: pro_g5Nq0IsIhjeuCUf9TnTo' \ --header 'Content-Type: application/json' \ --header 'Authorization: api-key={{api_key}}' \ --data '{ "payment_method_type": "card", "payment_method_subtype": "debit", "payment_method_data": { "vault_data_card": { "card_number": "4166679492386746", "card_exp_month": "03", "card_exp_year": "2030", "card_cvc": "737", "bin_number": "416667", "last_four": "6746" } }, "customer_acceptance": { "acceptance_type": "online", "accepted_at": "2025-05-10T10:11:12Z", "online": null } }' ``` Do a payment method list: ``` curl --location '{{baseUrl}}/api/v2/payments/{{payment_id}}/payment-methods' \ --header 'Content-Type: application/json' \ --header 'x-profile-id: pro_g5Nq0IsIhjeuCUf9TnTo' \ --header 'Authorization: publishable-key=pk_snd_30cf531d830b47b7afd84c18eb4322ce,client-secret=cs_01990f565faa7392ab88b54967d493f0' ``` You should be able to see the saved card token in response ``` { "payment_methods_enabled": [ { "payment_method_type": "card", "payment_method_subtype": "credit", "payment_experience": null, "required_fields": [ { "required_field": "payment_method_data.card.card_number", "display_name": "card_number", "field_type": "user_card_number", "value": null }, { "required_field": "payment_method_data.card.card_exp_month", "display_name": "card_exp_month", "field_type": "user_card_expiry_month", "value": null }, { "required_field": "payment_method_data.card.card_exp_year", "display_name": "card_exp_year", "field_type": "user_card_expiry_year", "value": null }, { "required_field": "payment_method_data.card.card_cvc", "display_name": "card_cvc", "field_type": "user_card_cvc", "value": null }, { "required_field": "payment_method_data.billing.address.first_name", "display_name": "card_holder_name", "field_type": "user_full_name", "value": null }, { "required_field": "payment_method_data.billing.address.last_name", "display_name": "card_holder_name", "field_type": "user_full_name", "value": null } ], "surcharge_details": null }, { "payment_method_type": "card", "payment_method_subtype": "debit", "payment_experience": null, "required_fields": [ { "required_field": "payment_method_data.card.card_number", "display_name": "card_number", "field_type": "user_card_number", "value": null }, { "required_field": "payment_method_data.card.card_exp_month", "display_name": "card_exp_month", "field_type": "user_card_expiry_month", "value": null }, { "required_field": "payment_method_data.card.card_exp_year", "display_name": "card_exp_year", "field_type": "user_card_expiry_year", "value": null }, { "required_field": "payment_method_data.card.card_cvc", "display_name": "card_cvc", "field_type": "user_card_cvc", "value": null }, { "required_field": "payment_method_data.billing.address.first_name", "display_name": "card_holder_name", "field_type": "user_full_name", "value": null }, { "required_field": "payment_method_data.billing.address.last_name", "display_name": "card_holder_name", "field_type": "user_full_name", "value": null } ], "surcharge_details": null }, { "payment_method_type": "card_redirect", "payment_method_subtype": "card_redirect", "payment_experience": [ "redirect_to_url" ], "required_fields": [], "surcharge_details": null }, { "payment_method_type": "pay_later", "payment_method_subtype": "affirm", "payment_experience": [ "redirect_to_url" ], "required_fields": [], "surcharge_details": null }, { "payment_method_type": "pay_later", "payment_method_subtype": "afterpay_clearpay", "payment_experience": [ "redirect_to_url" ], "required_fields": [], "surcharge_details": null }, { "payment_method_type": "pay_later", "payment_method_subtype": "klarna", "payment_experience": [ "redirect_to_url" ], "required_fields": [], "surcharge_details": null }, { "payment_method_type": "pay_later", "payment_method_subtype": "walley", "payment_experience": [ "redirect_to_url" ], "required_fields": [], "surcharge_details": null }, { "payment_method_type": "wallet", "payment_method_subtype": "ali_pay", "payment_experience": null, "required_fields": [], "surcharge_details": null }, { "payment_method_type": "wallet", "payment_method_subtype": "apple_pay", "payment_experience": null, "required_fields": [], "surcharge_details": null }, { "payment_method_type": "wallet", "payment_method_subtype": "google_pay", "payment_experience": null, "required_fields": [], "surcharge_details": null }, { "payment_method_type": "wallet", "payment_method_subtype": "paypal", "payment_experience": null, "required_fields": [ { "required_field": "payment_method_data.billing.email", "display_name": "email_address", "field_type": "user_email_address", "value": null } ], "surcharge_details": null }, { "payment_method_type": "wallet", "payment_method_subtype": "we_chat_pay", "payment_experience": null, "required_fields": [], "surcharge_details": null } ], "customer_payment_methods": [ { "id": "12345_pm_01990f564a727912be328171f3ca0f50", "payment_token": "token_decCbm9z2PPMQyNbFeEV", "customer_id": "12345_cus_01990f5621bc7590bd3bd511774262b1", "payment_method_type": "card", "payment_method_subtype": "credit", "recurring_enabled": true, "payment_method_data": { "card": { "issuer_country": null, "last4_digits": "6746", "expiry_month": "03", "expiry_year": "2030", "card_holder_name": null, "card_fingerprint": null, "nick_name": null, "card_network": null, "card_isin": "416667", "card_issuer": null, "card_type": null, "saved_to_locker": false } }, "bank": null, "created": "2025-09-03T11:28:57.463Z", "requires_cvv": true, "last_used_at": "2025-09-03T11:28:57.463Z", "is_default": false, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "guest@example.com" } } ] } ``` Do a payment with the payment_token: ``` curl --location '{{baseUrl}}/v2/payments/{{payment_id}}/confirm-intent/external-vault-proxy' \ --header 'x-client-secret: cs_01990f565faa7392ab88b54967d493f0' \ --header 'x-profile-id: pro_g5Nq0IsIhjeuCUf9TnTo' \ --header 'Content-Type: application/json' \ --header 'Authorization: api-key={{api_key}}' \ --data '{ "payment_method_data": { "vault_token": { "card_cvc": "737" } }, "payment_token": "{{payment_token}}", "payment_method_type": "card", "payment_method_subtype": "credit" }' ``` You should get a successful transaction ``` { "id": "12345_pay_01990f565f5471d28ea8ef8918e6085e", "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": "12345_cus_01990f5621bc7590bd3bd511774262b1", "connector": "adyen", "created": "2025-09-03T11:29:02.877Z", "payment_method_data": { "billing": null }, "payment_method_type": "card", "payment_method_subtype": "credit", "connector_transaction_id": "RRLJNTS3H7ZN6KV5", "connector_reference_id": "12345_att_01990f56a0267520a2926ff872468e1a", "merchant_connector_id": "mca_6wCX5v7UaShL2Ut8dNsV", "browser_info": null, "error": null, "shipping": null, "billing": null, "attempts": null, "connector_token_details": null, "payment_method_id": null, "next_action": null, "return_url": "https://google.com/success", "authentication_type": "no_three_ds", "authentication_type_applied": "no_three_ds", "is_iframe_redirection_enabled": null, "merchant_reference_id": null, "raw_connector_response": null, "feature_metadata": null } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] 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/external_vault_proxy_payment_intent.rs` **Code Patterns Applied:** - Add conditional logic for feature flags or filtering (1 changes) **Detailed Identifier Changes:** Commit 0543e515: Files to modify: **crates/router/src/core/payments/operations/external_vault_proxy_payment_intent.rs** Modify existing code
{"pr_number": 9259, "pr_title": "fix(core): change condition for updating payment method status", "merged_at": "2025-09-03T14:00:30Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"core_business": ["crates/router/src/core/payments/operations/external_vault_proxy_payment_intent.rs"]}, "change_types": {"conditionals_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(dashboard): Added wasm changes to collect metadata for visa_ctp ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Enhancement ## Description <!-- Describe your changes in detail --> Added wasm changes to collect metadata for visa_ctp ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Once this PR is merged check for `ctp_visa` connector addition and look for input field in metadata in dashboard. Should look similar toh ctp_mastercard metadata input fields ```shell "metadata": { "dpa_id": "DPA-ID", "dpa_name": "TestMerchant", "locale": "en_AU", "card_brands": [ "mastercard", "visa" ], "acquirer_bin": "BIN", "acquirer_merchant_id": "MERCHANT-ID", "merchant_category_code": "0001", "merchant_country_code": "US" } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **payment** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/connector_configs/toml/development.toml` - `crates/connector_configs/toml/production.toml` - `crates/connector_configs/toml/sandbox.toml`
{"pr_number": 7674, "pr_title": "feat(dashboard): Added wasm changes to collect metadata for visa_ctp", "merged_at": "2025-04-01T12:03:54Z", "intent": {"feature_type": "payment", "action": "add_feature", "entities": ["merchant", "connector", "card"]}, "hierarchy": {"connectors": ["crates/connector_configs/toml/development.toml", "crates/connector_configs/toml/production.toml", "crates/connector_configs/toml/sandbox.toml"]}, "change_types": {}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
refactor(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 b97370d5: 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": 7278, "pr_title": "refactor(utils): use to_state_code of hyperswitch_connectors in router", "merged_at": "2025-02-17T12:52:33Z", "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"}
refactor(core): add recurring customer support for nomupay payouts. ## 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 --> - Added `payout_method_id` to Payout API requests and responses. - Added validations for requests with `payout_method_id`. - Added `payout_method` to `PayoutData`. - Added `transfer_method_id` to `PayoutsResponseData`. - Changed `connector_mandate_details` structure to distinguish between **payins** and **payouts**. - Fetch/update `payment_methods` using `payout_method_id` or `transfer_method_id`. ### Additional Changes - [x] This PR modifies the API contract - [x] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> Nomupay requires storing customer payment method details (like cards, bank accounts or id corresponding to them) to process payouts, which is not handled in HyperSwitch. Attempting to re-add the same customer payment method results in errors from Nomupay. To address this, we are leveraging the `payment_methods` table to store these details in the `connector_mandate_details` column, linking them to a customer and distinguishing entries by a new column `transaction_flow` (to identify payins vs. payouts). This change ensures seamless payouts for existing customers by reusing stored mandate details while maintaining compatibility with HyperSwitch's architecture. Additionally, it introduces a `payout_method_id` field in requests and responses to enhance clarity and functionality. This update lays the groundwork for integrating Nomupay while preserving existing payout functionality for other connectors. ## How did you test 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 it is a core change in payouts and Nomupay is yet to be added, it should be tested with an existing connector to ensure it is working as before. Wise Create BACS Payout Request ``` curl --location 'http://localhost:8080/payouts/create' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_BIhanGFzYRX7djOLsCHESaaM.......6xzDP3COyRL6a4TDdep' \ --data-raw '{ "amount": 10, "currency": "GBP", "customer_id": "cus_cXrLjesq3XJ2TpQm5tMh", "email": "payout_customer@example.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payout request", "payout_type": "bank", "connector": [ "wise" ], "payout_method_data": { "bank": { "bank_sort_code": "23...0", "bank_account_number": ".....22", "bank_name": "Deutsche Bank", "bank_country_code": "NL", "bank_city": "Amsterdam" } }, "billing": { "address": { "line1": "1467", "city": "San Fransico", "state": "CA", "zip": "94122", "country": "US", "first_name": "John", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "entity_type": "Individual", "recurring": true, "metadata": { "ref": "123" }, "confirm": true, "auto_fulfill": true, "profile_id": "pro_CieYHTbv5frbdGhOLkfa" }' ``` Wise Create BACS Payout Response ``` { "payout_id": "db30ae7e-9d77-48d3-9c61-01910701881f", "merchant_id": "merchant_1733466428", "amount": 10, "currency": "GBP", "connector": "wise", "payout_type": "bank", "payout_method_data": { "bank": { "bank_sort_code": "23**70", "bank_account_number": "****1822", "bank_name": "Deutsche Bank", "bank_country_code": "NL", "bank_city": "Amsterdam" } }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": null, "line3": null, "zip": "94122", "state": "CA", "first_name": "John", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "auto_fulfill": true, "customer_id": "cus_cXrLjesq3XJ2TpQm5tMh", "customer": { "id": "cus_cXrLjesq3XJ2TpQm5tMh", "name": "John Doe", "email": "guest@example.com", "phone": "6168205366", "phone_country_code": "+1" }, "client_secret": "payout_db30ae7e-9d77-48d3.......01881f_secret_CqkySjvEP.....faBT", "return_url": null, "business_country": null, "business_label": null, "description": "Its my first payout request", "entity_type": "Individual", "recurring": true, "metadata": { "ref": "123" }, "merchant_connector_id": "mca_MPP7hcHFcMyGRgAh7s7j", "status": "success", "error_message": null, "error_code": null, "profile_id": "pro_CieYHTbv5frbdGhOLkfa", "created": "2024-12-06T06:27:33.590Z", "connector_transaction_id": "54574691", "priority": null, "payout_link": null, "email": "guest@example.com", "name": "John Doe", "phone": "6168205366", "phone_country_code": "+1", "unified_code": null, "unified_message": null, "payout_method_id": "pm_vFihj3xNZzOtBRyRLRZ1" } ``` Wise Create SEPA Payout Request ``` curl --location 'http://localhost:8080/payouts/create' \ --header 'x-feature: integ-custom' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_BIhanGFzYRX7djOLs..........M6xzDP3COyRL6a4TDdep' \ --data-raw '{ "amount": 10, "currency": "GBP", "customer_id": "cus_cXrLjesq3XJ2TpQm5tMh", "email": "payout_customer@example.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payout request", "payout_type": "bank", "connector": [ "wise" ], "payout_method_data": { "bank": { "iban": "NL46T....169112", "bic": "ABNANL2A", "bank_name": "Deutsche Bank", "bank_country_code": "NL", "bank_city": "Amsterdam" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "CA", "zip": "94122", "country": "US", "first_name": "John", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "entity_type": "NaturalPerson", "recurring": true, "metadata": { "ref": "123" }, "confirm": true, "auto_fulfill": true, "profile_id": "pro_CieYHTbv5frbdGhOLkfa" }' ``` Wise Create SEPA Payout Response ``` { "payout_id": "24f870ee-5257-415d-a13c-7ce9d7fd9374", "merchant_id": "merchant_1733466428", "amount": 10, "currency": "GBP", "connector": "wise", "payout_type": "bank", "payout_method_data": { "bank": { "iban": "NL46T********69112", "bank_name": "Deutsche Bank", "bank_country_code": "NL", "bank_city": "Amsterdam", "bic": "ABN**L2A" } }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "CA", "first_name": "John", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "auto_fulfill": true, "customer_id": "cus_cXrLjesq3XJ2TpQm5tMh", "customer": { "id": "cus_cXrLjesq3XJ2TpQm5tMh", "name": "John Doe", "email": "guest@example.com", "phone": "6168205366", "phone_country_code": "+1" }, "client_secret": "payout_24f870ee-5257-.......7fd9374_secret_tKAQLKqQd......Mk2XV", "return_url": null, "business_country": null, "business_label": null, "description": "Its my first payout request", "entity_type": "NaturalPerson", "recurring": true, "metadata": { "ref": "123" }, "merchant_connector_id": "mca_MPP7hcHFcMyGRgAh7s7j", "status": "success", "error_message": null, "error_code": null, "profile_id": "pro_CieYHTbv5frbdGhOLkfa", "created": "2024-12-06T07:01:07.314Z", "connector_transaction_id": "54574754", "priority": null, "payout_link": null, "email": "guest@example.com", "name": "John Doe", "phone": "6168205366", "phone_country_code": "+1", "unified_code": null, "unified_message": null, "payout_method_id": "pm_347aDYo0h5aIYJeBiu0L" } ``` Create SEPA Payout Request ``` curl --location 'http://localhost:8080/payouts/create' \ --header 'x-feature: integ-custom' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_BIhanGFzYRX7djOLs.......t02eWxipM6xzDP3COyRL6a4TDdep' \ --data '{ "amount": 1, "currency": "GBP", "description": "Its my first payout request", "payout_type": "bank", "entity_type": "NaturalPerson", "recurring": true, "metadata": { "ref": "123" }, "confirm": false, "auto_fulfill": false }' ``` Create SEPA Payout Response ``` { "payout_id": "07d0bef5-c22e-4ff7-acd5-75e7055ae4b0", "merchant_id": "merchant_1733466428", "amount": 1, "currency": "GBP", "connector": null, "payout_type": "bank", "payout_method_data": null, "billing": null, "auto_fulfill": false, "customer_id": null, "customer": null, "client_secret": "payout_07d0bef5..........055ae4b0_secret_yTgzRXFbUuKXe5UJYNR7", "return_url": null, "business_country": null, "business_label": null, "description": "Its my first payout request", "entity_type": "NaturalPerson", "recurring": true, "metadata": { "ref": "123" }, "merchant_connector_id": null, "status": "requires_payout_method_data", "error_message": null, "error_code": null, "profile_id": "pro_CieYHTbv5frbdGhOLkfa", "created": "2024-12-06T07:03:09.973Z", "connector_transaction_id": null, "priority": null, "payout_link": null, "email": null, "name": null, "phone": null, "phone_country_code": null, "unified_code": null, "unified_message": null, "payout_method_id": null } ``` Update payout Request ``` curl --location --request PUT 'http://localhost:8080/payouts/07d0bef5-c22e-4ff7-acd5-75e7055ae4b0' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_BIhanGFzYRX7djOLsCHESa.........COyRL6a4TDdep' \ --data '{ "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "CA", "zip": "94122", "country": "US", "first_name": "John", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "customer_id": "cus_cXrLjesq3XJ2TpQm5tMh" }' ``` Update payout Response ``` { "payout_id": "07d0bef5-c22e-4ff7-acd5-75e7055ae4b0", "merchant_id": "merchant_1733466428", "amount": 1, "currency": "GBP", "connector": null, "payout_type": "bank", "payout_method_data": null, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "CA", "first_name": "John", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "auto_fulfill": false, "customer_id": "cus_cXrLjesq3XJ2TpQm5tMh", "customer": { "id": "cus_cXrLjesq3XJ2TpQm5tMh", "name": "John Doe", "email": "guest@example.com", "phone": "6168205366", "phone_country_code": "+1" }, "client_secret": "payout_07d0bef5-c22e-4ff7-...........gzRXFbUuKXe5UJYNR7", "return_url": null, "business_country": null, "business_label": null, "description": "Its my first payout request", "entity_type": "NaturalPerson", "recurring": true, "metadata": { "ref": "123" }, "merchant_connector_id": null, "status": "requires_payout_method_data", "error_message": null, "error_code": null, "profile_id": "pro_CieYHTbv5frbdGhOLkfa", "created": "2024-12-06T07:03:09.973Z", "connector_transaction_id": null, "priority": null, "payout_link": null, "email": "guest@example.com", "name": "John Doe", "phone": "6168205366", "phone_country_code": "+1", "unified_code": null, "unified_message": null, "payout_method_id": null } ``` Confirm payout Request ``` curl --location 'http://localhost:8080/payouts/07d0bef5-c22e-4ff7-acd5-75e7055ae4b0/confirm' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_BIhanGFzYRX7djOLsCHESa.........6xzDP3COyRL6a4TDdep' \ --data '{ "payout_method_data": { "bank": { "iban": "NL46TEST0136169112", "bic": "ABNANL2A", "bank_name": "Deutsche Bank", "bank_country_code": "NL", "bank_city": "Amsterdam" } } }' ``` Confirm payout Response ``` { "payout_id": "07d0bef5-c22e-4ff7-acd5-75e7055ae4b0", "merchant_id": "merchant_1733466428", "amount": 1, "currency": "GBP", "connector": "wise", "payout_type": "bank", "payout_method_data": { "bank": { "iban": "NL46T********69112", "bank_name": "Deutsche Bank", "bank_country_code": "NL", "bank_city": "Amsterdam", "bic": "ABN**L2A" } }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "CA", "first_name": "John", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "auto_fulfill": false, "customer_id": "cus_cXrLjesq3XJ2TpQm5tMh", "customer": { "id": "cus_cXrLjesq3XJ2TpQm5tMh", "name": "John Doe", "email": "guest@example.com", "phone": "6168205366", "phone_country_code": "+1" }, "client_secret": "payout_07d0bef5.......secret_yTgzRXFbUuKXe5UJYNR7", "return_url": null, "business_country": null, "business_label": null, "description": "Its my first payout request", "entity_type": "NaturalPerson", "recurring": true, "metadata": { "ref": "123" }, "merchant_connector_id": "mca_MPP7hcHFcMyGRgAh7s7j", "status": "requires_fulfillment", "error_message": null, "error_code": null, "profile_id": "pro_CieYHTbv5frbdGhOLkfa", "created": "2024-12-06T07:03:09.973Z", "connector_transaction_id": "54574758", "priority": null, "payout_link": null, "email": "guest@example.com", "name": "John Doe", "phone": "6168205366", "phone_country_code": "+1", "unified_code": null, "unified_message": null, "payout_method_id": null } ``` Fulfill payout Request ``` curl --location 'http://localhost:8080/payouts/07d0bef5-c22e-4ff7-acd5-75e7055ae4b0/fulfill' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_BIhanGFzYRX7djOLsCH........M6xzDP3COyRL6a4TDdep' \ --data '{ "connector_payout_id" : "c3a71c4d-cbc5-47f1-9950-b59a687d7124" }' ``` Fulfill payout Response ``` { "payout_id": "07d0bef5-c22e-4ff7-acd5-75e7055ae4b0", "merchant_id": "merchant_1733466428", "amount": 1, "currency": "GBP", "connector": "wise", "payout_type": "bank", "payout_method_data": { "bank": { "iban": "NL46T********69112", "bank_name": "Deutsche Bank", "bank_country_code": "NL", "bank_city": "Amsterdam", "bic": "ABN**L2A" } }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "CA", "first_name": "John", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "auto_fulfill": false, "customer_id": "cus_cXrLjesq3XJ2TpQm5tMh", "customer": { "id": "cus_cXrLjesq3XJ2TpQm5tMh", "name": "John Doe", "email": "guest@example.com", "phone": "6168205366", "phone_country_code": "+1" }, "client_secret": "payout_07d0bef5-c22e-.....gzRXFbUuKXe5UJYNR7", "return_url": null, "business_country": null, "business_label": null, "description": "Its my first payout request", "entity_type": "NaturalPerson", "recurring": true, "metadata": { "ref": "123" }, "merchant_connector_id": "mca_MPP7hcHFcMyGRgAh7s7j", "status": "success", "error_message": null, "error_code": null, "profile_id": "pro_CieYHTbv5frbdGhOLkfa", "created": "2024-12-06T07:03:09.973Z", "connector_transaction_id": "54574758", "priority": null, "payout_link": null, "email": "guest@example.com", "name": "John Doe", "phone": "6168205366", "phone_country_code": "+1", "unified_code": null, "unified_message": null, "payout_method_id": "pm_raJAjS0VvYfhL4N8GuUp" } ``` CIT and MIT test Payments CIT request ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_BxHQLlnzzHJZx9Ld4IvQ******ccVrQcbKTQ2BAxGyjt5' \ --data-raw '{ "amount": 10, "currency": "EUR", "confirm": false, "capture_method": "manual", "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" }' ``` Payments CIT response ``` { "payment_id": "pay_QGM2AC1GkymhTRUGFudi", "merchant_id": "merchant_1735909365", "status": "requires_payment_method", "amount": 10, "net_amount": 10, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": null, "client_secret": "pay_QGM2AC1GkymhTRUGFudi_secret_Alsj3tRoRXSA4jQyiZRB", "created": "2025-01-06T05:52:52.140Z", "currency": "EUR", "customer_id": null, "customer": { "id": null, "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": "manual", "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://abc.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": 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_Vqjv2CX86ySHR7gnmg1V", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": null, "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-01-06T06:07:52.139Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2025-01-06T05:52:52.375Z", "charges": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null } ``` Confirm CIT request ``` curl --location 'http://localhost:8080/payments/pay_QGM2AC1GkymhTRUGFudi/confirm' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_BxHQLlnzzHJZx9Ld4IvQmJn*******ccVrQcbKTQ2BAxGyjt5' \ --data-raw '{ "confirm": true, "customer_id": "StripeCustomer3", "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": "4000 0000 0000 1091", "card_exp_month": "12", "card_exp_year": "2025", "card_holder_name": "Max Mustermann", "card_cvc": "123" }, "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" } } } }' ``` Confirm CIT response ``` { "payment_id": "pay_QGM2AC1GkymhTRUGFudi", "merchant_id": "merchant_1735909365", "status": "requires_customer_action", "amount": 10, "net_amount": 10, "shipping_cost": null, "amount_capturable": 10, "amount_received": null, "connector": "novalnet", "client_secret": "pay_QGM2AC1GkymhTRUGFudi_secret_Alsj3tRoRXSA4jQyiZRB", "created": "2025-01-06T05:52:52.140Z", "currency": "EUR", "customer_id": "StripeCustomer3", "customer": { "id": "StripeCustomer3", "name": "Joseph Doe", "email": "test@novalnet.de", "phone": "999999999", "phone_country_code": "+65" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "off_session", "off_session": null, "capture_on": null, "capture_method": "manual", "payment_method": "card", "payment_method_data": { "card": { "last4": "1091", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "400000", "card_extended_bin": null, "card_exp_month": "12", "card_exp_year": "2025", "card_holder_name": null, "payment_checks": null, "authentication_data": null }, "billing": { "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" } }, "payment_token": null, "shipping": null, "billing": null, "order_details": null, "email": "test@novalnet.de", "name": null, "phone": null, "return_url": "https://abc.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_QGM2AC1GkymhTRUGFudi/merchant_1735909365/pay_QGM2AC1GkymhTRUGFudi_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": null, "connector_metadata": null, "feature_metadata": null, "reference_id": null, "payment_link": null, "profile_id": "pro_Vqjv2CX86ySHR7gnmg1V", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_WnPQDTHYEHh1JW99nYVj", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-01-06T06:07:52.139Z", "fingerprint": null, "browser_info": { "language": null, "time_zone": null, "ip_address": "::1", "user_agent": null, "color_depth": null, "java_enabled": null, "screen_width": null, "accept_header": null, "screen_height": null, "java_script_enabled": null }, "payment_method_id": "pm_TFQeOwfCGu3STWcdJ5pU", "payment_method_status": "inactive", "updated": "2025-01-06T05:53:01.837Z", "charges": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null } ``` Payments MIT request ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_BxHQLlnzzHJZx9Ld4IvQmJ*******LccVrQcbKTQ2BAxGyjt5' \ --data-raw '{ "recurring_details": { "type": "payment_method_id", "data": "pm_TFQeOwfCGu3STWcdJ5pU" }, "authentication_type": "three_ds", "customer": { "id": "StripeCustomer3", "email": "guest@example.com" }, "description": "This is the test payment made through Mule API", "currency": "EUR", "amount": 16, "confirm": true, "capture_method": "automatic", "off_session": true, "metadata": { "businessUnit": "ZG_GL_Group", "country": "US", "clientId": "N/A", "productName": "Travel insurance", "orderReference": "order-040724-001" } }' ``` Payment MIT Response ``` { "payment_id": "pay_UWy1LMkXuSvsnrX1trk5", "merchant_id": "merchant_1735909365", "status": "succeeded", "amount": 16, "net_amount": 16, "shipping_cost": null, "amount_capturable": 0, "amount_received": 16, "connector": "novalnet", "client_secret": "pay_UWy1LMkXuSvsnr*****y5S64dkSx3kfoOaOH", "created": "2025-01-06T06:06:15.038Z", "currency": "EUR", "customer_id": "StripeCustomer3", "customer": { "id": "StripeCustomer3", "name": null, "email": "guest@example.com", "phone": null, "phone_country_code": null }, "description": "This is the test payment made through Mule API", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": true, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "1091", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "400000", "card_extended_bin": null, "card_exp_month": "12", "card_exp_year": "2025", "card_holder_name": "Max Mustermann", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": null, "order_details": null, "email": "guest@example.com", "name": 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": { "customer_id": "StripeCustomer3", "created_at": 1736143575, "expires": 1736147175, "secret": "epk_b9b7b8e716754fcb894e737654bf9215" }, "manual_retry_allowed": false, "connector_transaction_id": "15133400010302056", "frm_message": null, "metadata": { "country": "US", "clientId": "N/A", "productName": "Travel insurance", "businessUnit": "ZG_GL_Group", "orderReference": "order-040724-001" }, "connector_metadata": null, "feature_metadata": null, "reference_id": "15133400010302056", "payment_link": null, "profile_id": "pro_Vqjv2CX86ySHR7gnmg1V", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_WnPQDTHYEHh1JW99nYVj", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-01-06T06:21:15.038Z", "fingerprint": null, "browser_info": null, "payment_method_id": "pm_TFQeOwfCGu3STWcdJ5pU", "payment_method_status": "active", "updated": "2025-01-06T06:06:16.951Z", "split_payments": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": "RcB2w22w00a02c-R22******0uBB18sBZ02c00aVZ18sT10k" } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/payment_methods.rs` - `crates/api_models/src/payouts.rs` **2. Database Layer (Queries & Schema)** - `crates/diesel_models/src/payment_method.rs` **3. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/mandates.rs` - `crates/hyperswitch_domain_models/src/merchant_connector_account.rs` - `crates/hyperswitch_domain_models/src/payment_methods.rs` - ... and 1 more files **4. Core Business Logic** - `crates/router/src/core/payment_methods.rs` - `crates/router/src/core/payment_methods/cards.rs` - `crates/router/src/core/payments.rs` - ... and 10 more files **5. External Connector Integration** - `crates/hyperswitch_connectors/src/utils.rs` - `crates/router/tests/connectors/utils.rs` **6. Type Definitions** - `crates/router/src/types/transformers.rs` **7. Other** - `api-reference-v2/openapi_spec.json` - `api-reference/openapi_spec.json` **Code Patterns Applied:** - Define new data structures (12 changes) - Implement new functions (45 changes) - Extend existing types with new fields (173 changes) - Add conditional logic for feature flags or filtering (9 changes) **Detailed Identifier Changes:** Commit 8d8ebe90: Files to modify: **crates/api_models/src/payment_methods.rs** Add: - function: private::from - function: private::from - function: private::deserialize_connector_mandate_details - struct: pub::PayoutsMandateReference - struct: pub::PayoutsMandateReferenceRecord - struct: pub::CommonMandateReference - impl: impl From<CommonMandateReference> for PaymentsMandateReference - impl: impl From<PaymentsMandateReference> for CommonMandateReference **crates/api_models/src/payouts.rs** Modify existing code **crates/diesel_models/src/payment_method.rs** Add: - function: private::deref - function: private::deref_mut - function: pub::get_mandate_details_value - function: private::to_sql - function: private::from_sql - function: private::from - struct: pub::PayoutsMandateReferenceRecord - struct: pub::PayoutsMandateReference - struct: pub::CommonMandateReference - impl: impl std::ops::Deref for PayoutsMandateReference - impl: impl std::ops::DerefMut for PayoutsMandateReference - impl: impl CommonMandateReference - impl: impl diesel::serialize::ToSql<diesel::sql_types::Jsonb, diesel::pg::Pg> for CommonMandateReference - impl: impl diesel::deserialize::FromSql<diesel::sql_types::Jsonb, DB> for CommonMandateReference - impl: impl From<PaymentsMandateReference> for CommonMandateReference **crates/hyperswitch_connectors/src/utils.rs** Add: - function: private::get_connector_payout_id - function: private::get_connector_transfer_method_id - trait: pub::PayoutFulfillRequestData - impl: impl PayoutFulfillRequestData for hyperswitch_domain_models::router_request_types::PayoutsData **crates/hyperswitch_domain_models/src/mandates.rs** Add: - function: private::deref - function: private::deref_mut - function: private::deref - function: private::deref_mut - function: pub::get_mandate_details_value - function: private::from - function: private::from - function: private::from - function: private::from - function: private::from - function: private::from - function: private::from - function: private::from - function: private::from - function: private::from - function: private::from - function: private::from - struct: pub::PaymentsMandateReferenceRecord - struct: pub::PaymentsMandateReferenceRecord - struct: pub::PayoutsMandateReferenceRecord - struct: pub::PayoutsMandateReference - struct: pub::PaymentsMandateReference - struct: pub::CommonMandateReference - impl: impl std::ops::Deref for PayoutsMandateReference - impl: impl std::ops::DerefMut for PayoutsMandateReference - impl: impl std::ops::Deref for PaymentsMandateReference - impl: impl std::ops::DerefMut for PaymentsMandateReference - impl: impl CommonMandateReference - impl: impl From<diesel_models::CommonMandateReference> for CommonMandateReference - impl: impl From<CommonMandateReference> for diesel_models::CommonMandateReference - impl: impl From<diesel_models::PayoutsMandateReference> for PayoutsMandateReference - impl: impl From<PayoutsMandateReference> for diesel_models::PayoutsMandateReference - impl: impl From<diesel_models::PaymentsMandateReference> for PaymentsMandateReference - impl: impl From<PaymentsMandateReference> for diesel_models::PaymentsMandateReference - impl: impl From<diesel_models::PayoutsMandateReferenceRecord> for PayoutsMandateReferenceRecord - impl: impl From<PayoutsMandateReferenceRecord> for diesel_models::PayoutsMandateReferenceRecord - impl: impl From<diesel_models::PaymentsMandateReferenceRecord> for PaymentsMandateReferenceRecord - impl: impl From<PaymentsMandateReferenceRecord> for diesel_models::PaymentsMandateReferenceRecord - impl: impl From<diesel_models::PaymentsMandateReferenceRecord> for PaymentsMandateReferenceRecord - impl: impl From<PaymentsMandateReferenceRecord> for diesel_models::PaymentsMandateReferenceRecord **crates/hyperswitch_domain_models/src/merchant_connector_account.rs** Modify existing code **crates/hyperswitch_domain_models/src/payment_methods.rs** Add: - function: pub::get_common_mandate_reference - function: pub::get_common_mandate_reference - function: private::get_payment_method_with_mandate_data - function: private::test_get_common_mandate_reference_payments_only - function: private::test_get_common_mandate_reference_empty_details - function: private::test_get_common_mandate_reference_payouts_only - function: private::test_get_common_mandate_reference_invalid_data - function: private::test_get_common_mandate_reference_with_payments_and_payouts_details - mod: private::tests **crates/hyperswitch_domain_models/src/router_request_types.rs** Modify existing code **crates/router/src/core/payment_methods.rs** Modify existing code **crates/router/src/core/payment_methods/cards.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_response.rs** Modify existing code **crates/router/src/core/payments/routing.rs** Modify existing code **crates/router/src/core/payments/tokenization.rs** Modify existing code **crates/router/src/core/payouts.rs** Modify existing code **crates/router/src/core/payouts/helpers.rs** Add: - function: pub::should_create_connector_transfer_method **crates/router/src/core/payouts/transformers.rs** Modify existing code **crates/router/src/core/payouts/validator.rs** Modify existing code **crates/router/src/core/utils.rs** Modify existing code **crates/router/src/core/webhooks/incoming.rs** Modify existing code **crates/router/src/types/transformers.rs** Add: - function: private::foreign_from - impl: impl ForeignFrom<&api_models::payouts::PayoutMethodData> for api_models::enums::PayoutType **crates/router/tests/connectors/utils.rs** Modify existing code Commit 940c0203: Files to modify: **crates/api_models/src/payment_methods.rs** Add: - function: private::from - function: private::from - function: private::deserialize_connector_mandate_details - struct: pub::PayoutsMandateReference - struct: pub::PayoutsMandateReferenceRecord - struct: pub::CommonMandateReference - impl: impl From<CommonMandateReference> for PaymentsMandateReference - impl: impl From<PaymentsMandateReference> for CommonMandateReference **crates/api_models/src/payouts.rs** Modify existing code **crates/diesel_models/src/payment_method.rs** Add: - function: private::deref - function: private::deref_mut - function: pub::get_mandate_details_value - function: private::to_sql - function: private::from_sql - function: private::from - struct: pub::PayoutsMandateReferenceRecord - struct: pub::PayoutsMandateReference - struct: pub::CommonMandateReference - impl: impl std::ops::Deref for PayoutsMandateReference - impl: impl std::ops::DerefMut for PayoutsMandateReference - impl: impl CommonMandateReference - impl: impl diesel::serialize::ToSql<diesel::sql_types::Jsonb, diesel::pg::Pg> for CommonMandateReference - impl: impl diesel::deserialize::FromSql<diesel::sql_types::Jsonb, DB> for CommonMandateReference - impl: impl From<PaymentsMandateReference> for CommonMandateReference **crates/hyperswitch_connectors/src/utils.rs** Add: - function: private::get_connector_payout_id - function: private::get_connector_transfer_method_id - trait: pub::PayoutFulfillRequestData - impl: impl PayoutFulfillRequestData for hyperswitch_domain_models::router_request_types::PayoutsData **crates/hyperswitch_domain_models/src/mandates.rs** Add: - function: private::deref - function: private::deref_mut - function: private::deref - function: private::deref_mut - function: pub::get_mandate_details_value - function: private::from - function: private::from - function: private::from - function: private::from - function: private::from - function: private::from - function: private::from - function: private::from - function: private::from - function: private::from - function: private::from - function: private::from - struct: pub::PaymentsMandateReferenceRecord - struct: pub::PaymentsMandateReferenceRecord - struct: pub::PayoutsMandateReferenceRecord - struct: pub::PayoutsMandateReference - struct: pub::PaymentsMandateReference - struct: pub::CommonMandateReference - impl: impl std::ops::Deref for PayoutsMandateReference - impl: impl std::ops::DerefMut for PayoutsMandateReference - impl: impl std::ops::Deref for PaymentsMandateReference - impl: impl std::ops::DerefMut for PaymentsMandateReference - impl: impl CommonMandateReference - impl: impl From<diesel_models::CommonMandateReference> for CommonMandateReference - impl: impl From<CommonMandateReference> for diesel_models::CommonMandateReference - impl: impl From<diesel_models::PayoutsMandateReference> for PayoutsMandateReference - impl: impl From<PayoutsMandateReference> for diesel_models::PayoutsMandateReference - impl: impl From<diesel_models::PaymentsMandateReference> for PaymentsMandateReference - impl: impl From<PaymentsMandateReference> for diesel_models::PaymentsMandateReference - impl: impl From<diesel_models::PayoutsMandateReferenceRecord> for PayoutsMandateReferenceRecord - impl: impl From<PayoutsMandateReferenceRecord> for diesel_models::PayoutsMandateReferenceRecord - impl: impl From<diesel_models::PaymentsMandateReferenceRecord> for PaymentsMandateReferenceRecord - impl: impl From<PaymentsMandateReferenceRecord> for diesel_models::PaymentsMandateReferenceRecord - impl: impl From<diesel_models::PaymentsMandateReferenceRecord> for PaymentsMandateReferenceRecord - impl: impl From<PaymentsMandateReferenceRecord> for diesel_models::PaymentsMandateReferenceRecord **crates/hyperswitch_domain_models/src/merchant_connector_account.rs** Modify existing code **crates/hyperswitch_domain_models/src/payment_methods.rs** Add: - function: pub::get_common_mandate_reference - function: pub::get_common_mandate_reference - function: private::get_payment_method_with_mandate_data - function: private::test_get_common_mandate_reference_payments_only - function: private::test_get_common_mandate_reference_empty_details - function: private::test_get_common_mandate_reference_payouts_only - function: private::test_get_common_mandate_reference_invalid_data - function: private::test_get_common_mandate_reference_with_payments_and_payouts_details - mod: private::tests **crates/hyperswitch_domain_models/src/router_request_types.rs** Modify existing code **crates/router/src/core/payment_methods.rs** Modify existing code **crates/router/src/core/payment_methods/cards.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_response.rs** Modify existing code **crates/router/src/core/payments/routing.rs** Modify existing code **crates/router/src/core/payments/tokenization.rs** Modify existing code **crates/router/src/core/payouts.rs** Modify existing code **crates/router/src/core/payouts/helpers.rs** Add: - function: pub::should_create_connector_transfer_method **crates/router/src/core/payouts/transformers.rs** Modify existing code **crates/router/src/core/payouts/validator.rs** Modify existing code **crates/router/src/core/utils.rs** Modify existing code **crates/router/src/core/webhooks/incoming.rs** Modify existing code **crates/router/src/types/transformers.rs** Add: - function: private::foreign_from - impl: impl ForeignFrom<&api_models::payouts::PayoutMethodData> for api_models::enums::PayoutType **crates/router/tests/connectors/utils.rs** Modify existing code
{"pr_number": 6687, "pr_title": "refactor(core): add recurring customer support for nomupay payouts.", "merged_at": "2025-02-05T14:28:03Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/payment_methods.rs", "crates/api_models/src/payouts.rs"], "database": ["crates/diesel_models/src/payment_method.rs"], "domain": ["crates/hyperswitch_domain_models/src/mandates.rs", "crates/hyperswitch_domain_models/src/merchant_connector_account.rs", "crates/hyperswitch_domain_models/src/payment_methods.rs", "crates/hyperswitch_domain_models/src/router_request_types.rs"], "core_business": ["crates/router/src/core/payment_methods.rs", "crates/router/src/core/payment_methods/cards.rs", "crates/router/src/core/payments.rs", "crates/router/src/core/payments/helpers.rs", "crates/router/src/core/payments/operations/payment_response.rs", "crates/router/src/core/payments/routing.rs", "crates/router/src/core/payments/tokenization.rs", "crates/router/src/core/payouts.rs", "crates/router/src/core/payouts/helpers.rs", "crates/router/src/core/payouts/transformers.rs", "crates/router/src/core/payouts/validator.rs", "crates/router/src/core/utils.rs", "crates/router/src/core/webhooks/incoming.rs"], "connectors": ["crates/hyperswitch_connectors/src/utils.rs", "crates/router/tests/connectors/utils.rs"], "types": ["crates/router/src/types/transformers.rs"], "other": ["api-reference-v2/openapi_spec.json", "api-reference/openapi_spec.json"]}, "change_types": {"structs_added": 12, "functions_added": 45, "fields_added": 173, "imports_added": 18, "conditionals_added": 9}, "has_identifier_data": true, "commits_matched": 2, "match_method": "pr_number"}
feat(webhooks): adyen - consume and update connector's network_transaction_id in payment_methods ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Hotfix for https://github.com/juspay/hyperswitch/pull/6738 ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Database Layer (Queries & Schema)** - `crates/diesel_models/src/payment_method.rs` **2. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/router_flow_types/webhooks.rs` **3. Core Business Logic** - `crates/router/src/core/webhooks/incoming.rs` **4. External Connector Integration** - `crates/router/src/connector/adyen.rs` - `crates/router/src/connector/adyen/transformers.rs` - `crates/router/src/services/connector_integration_interface.rs` **5. Other** - `crates/hyperswitch_interfaces/src/webhooks.rs` **Code Patterns Applied:** - Define new data structures (1 changes) - Implement new functions (5 changes) - Extend existing types with new fields (27 changes) - Add conditional logic for feature flags or filtering (3 changes) **Detailed Identifier Changes:** Commit 67627683: Files to modify: **crates/diesel_models/src/payment_method.rs** Modify existing code **crates/hyperswitch_domain_models/src/router_flow_types/webhooks.rs** Add: - function: pub::new - function: pub::get_id - struct: pub::ConnectorNetworkTxnId - impl: impl ConnectorNetworkTxnId **crates/hyperswitch_interfaces/src/webhooks.rs** Add: - function: private::get_network_txn_id **crates/router/src/connector/adyen.rs** Add: - function: private::get_network_txn_id **crates/router/src/connector/adyen/transformers.rs** Modify existing code **crates/router/src/core/webhooks/incoming.rs** Modify existing code **crates/router/src/services/connector_integration_interface.rs** Add: - function: private::get_network_txn_id
{"pr_number": 6759, "pr_title": "feat(webhooks): adyen - consume and update connector's network_transaction_id in payment_methods", "merged_at": "2024-12-06T09:24:30Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"database": ["crates/diesel_models/src/payment_method.rs"], "domain": ["crates/hyperswitch_domain_models/src/router_flow_types/webhooks.rs"], "core_business": ["crates/router/src/core/webhooks/incoming.rs"], "connectors": ["crates/router/src/connector/adyen.rs", "crates/router/src/connector/adyen/transformers.rs", "crates/router/src/services/connector_integration_interface.rs"], "other": ["crates/hyperswitch_interfaces/src/webhooks.rs"]}, "change_types": {"structs_added": 1, "functions_added": 5, "fields_added": 27, "imports_added": 1, "conditionals_added": 3}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(connector): [BRAINTREE] Added fix for Braintree Creds Identifier ## 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 --> When MCA Create is not done for Braintree, and connector creds are passed in Payment Intent Request, then Complete Authorize Flow fails. This PR is for fixing 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). --> Issue Link: https://github.com/juspay/hyperswitch/issues/7506 ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> **Postman Tests** **1. Payment Intent Create (Without Braintree MCA Create)** -Request ``` curl --location 'http://localhost:8080/vs/v1/payment_intents' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --header 'User-Agent: helloMozilla/5.0 (Linux; Android 12; SM-S906N Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/80.0.3987.119 Mobile Safari/537.36' \ --header 'api-key: dev_cAhKiY0z6BCPtxdTZKiuoGXNfbk49QwuMRPJudoj4P5gWR24zvL1BniBwqBBP7SL' \ --data-urlencode 'amount=1200' \ --data-urlencode 'currency=USD' \ --data-urlencode 'confirm=true' \ --data-urlencode 'payment_method_data%5Btype%5D=card' \ --data-urlencode 'payment_method_data%5Bcard%5D%5Bnumber%5D=5200000000001096' \ --data-urlencode 'payment_method_data%5Bcard%5D%5Bexp_month%5D=10' \ --data-urlencode 'payment_method_data%5Bcard%5D%5Bexp_year%5D=26' \ --data-urlencode 'payment_method_data%5Bcard%5D%5Bcvc%5D=123' \ --data-urlencode 'connector%5B%5D=braintree' \ --data-urlencode 'capture_method=automatic' \ --data-urlencode 'customer=sahkal' \ --data-urlencode 'statementDescriptorSuffix=merchant_101' \ --data-urlencode 'metadata%5BorderId%5D=1677581650' \ --data-urlencode 'payment_method_options%5Bcard%5D%5Brequest_three_d_secure%5D=any' \ --data-urlencode 'description=Card Payment' \ --data-urlencode 'return_url=https://google.com' \ --data-urlencode 'merchant_connector_details%5Bencoded_data%5D=eyJhbGciOiJSU0EtT0FFUC0yNTYiLCJlbmMiOiJBMjU2R0NNIn0.2Ef5oJ8MdVY9wdMdVVYHhrjUfY-NzgUc5oN7rKR3IG9jzYWkc9my0bMVQ31H2GjHQGBRuNzR0y-OfzFBHpmpSxA6qt5c-PFs2HaIEV69tXml6u6FcKtPvsMxVTRIiMMN1dJTwxKm9kqBMsXE6rpokDkKOJTU1-33Lz7v0VAT2KsZo7zNc4Tp0SI_tLaBwos4N-Ihws4PGbNy6CkEId0tTArJMg2y7utl759DAnUwwjgNNebMNUa9qAAIX6zCrn0U4n7NGyrpBbKqOu4Cd7sYeysP_jKjE12FexXHcEwHwUZTa453q-DvvvKlbfoACgGjE9ceBMr8kF1d1EnyS2J4DA.Wp1spmaGnWhvvCqY.X5I79LC8PC5AHQy6bT0JCNPrsvqc51iVWu1O5487ihDmCCkwC4eBXgm5STkYtNfttbMHD6-SimAVmtqD0AmhCUoJ7h0qQbcZt4XdB89gH5pdZvaSsmozlYxMG64jvGkXfp22aQZf-SwpcRWslP5CmFGTJDT7OgJTNBOZuoA6tbFIyxoXUh1L6Km4DuJA2dbKPRsw_Cg_5O869Wg5ghQmEtqHToirWLbwtZN32phRLt6L.GooLyxP-9xhU-vvi2vRGdA' \ --data-urlencode 'merchant_connector_details%5Bcreds_identifier%5D=azharamin_noon_1efwedxqwd' \ --data-urlencode 'id=154107184321542' \ --data-urlencode 'payment_method_data%5Bbilling_details%5D%5Bname%5D=Joseph Doe' \ --data-urlencode 'payment_method_data%5Bbilling_details%5D%5Bemail%5D=sahkalplanet@gmail.com' \ --data-urlencode 'payment_method_data%5Bbilling_details%5D%5Baddress%5D%5Bcity%5D=siliguri' \ --data-urlencode 'payment_method_data%5Bbilling_details%5D%5Baddress%5D%5Bcountry%5D=IN' \ --data-urlencode 'payment_method_data%5Bbilling_details%5D%5Baddress%5D%5Bstate%5D=westbengal' \ --data-urlencode 'payment_method_data%5Bbilling_details%5D%5Baddress%5D%5Bline1%5D=pritilata' \ --data-urlencode 'payment_method_data%5Bbilling_details%5D%5Baddress%5D%5Bzip%5D=734006' \ --data-urlencode 'metadata%5Bmerchant_id%5D=sahkal' \ --data-urlencode 'metadata%5Beuler_merchant_id%5D=global_installment' \ --data-urlencode 'connector_metadata%5Bnoon%5D%5Border_category%5D=pay' \ --data-urlencode 'payment_method_data%5Bcard%5D%5Bholder_name%5D=Joseph Doe' \ --data-urlencode 'connector_metadata%5Bbraintree%5D%5Bmerchant_account_id%5D=juspay' \ --data-urlencode 'connector_metadata%5Bbraintree%5D%5Bmerchant_config_currency%5D=USD' ``` -Response ``` { "id": "154107184321542", "object": "payment_intent", "amount": 1200, "amount_received": null, "amount_capturable": 1200, "currency": "usd", "status": "requires_action", "client_secret": "154107184321542_secret_HE2P7xcJNdGJr061tYZh", "created": 1741828281, "customer": "sahkal", "refunds": null, "mandate": null, "metadata": { "orderId": "1677581650", "merchant_id": "sahkal", "euler_merchant_id": "global_installment" }, "charges": { "object": "list", "data": [], "has_more": false, "total_count": 0, "url": "http://placeholder" }, "connector": "braintree", "description": "Card Payment", "mandate_data": null, "setup_future_usage": null, "off_session": null, "authentication_type": "three_ds", "next_action": { "type": "redirect_to_url", "redirect_to_url": { "return_url": "https://google.com/", "url": "http://localhost:8080/payments/redirect/154107184321542/postman_merchant_GHAction_174568/154107184321542_1" } }, "cancellation_reason": null, "payment_method": "card", "payment_method_data": { "card": { "last4": "1096", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "520000", "card_extended_bin": null, "card_exp_month": "10", "card_exp_year": "26", "card_holder_name": "Joseph Doe", "payment_checks": null, "authentication_data": null } }, "shipping": null, "billing": { "address": { "city": "siliguri", "country": "IN", "line1": "pritilata", "line2": null, "line3": null, "zip": null, "state": "westbengal", "first_name": null, "last_name": null }, "phone": { "number": null, "country_code": "IN" }, "email": "sahkalplanet@gmail.com" }, "capture_on": null, "payment_token": null, "email": null, "phone": null, "statement_descriptor_suffix": null, "statement_descriptor_name": null, "capture_method": "automatic", "name": null, "last_payment_error": null, "connector_transaction_id": null } ``` **2. Payment Create (Normal Hyperswitch Flow)** -Request ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_cAhKiY0z6BCPtxdTZKiuoGXNfbk49QwuMRPJudoj4P5gWR24zvL1BniBwqBBP7SL' \ --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_QLFSd62pZGRWHmzJl9V1", "merchant_id": "postman_merchant_GHAction_174568", "status": "requires_customer_action", "amount": 2500, "net_amount": 2500, "shipping_cost": null, "amount_capturable": 2500, "amount_received": null, "connector": "braintree", "client_secret": "pay_QLFSd62pZGRWHmzJl9V1_secret_1lRAyjj7PewghQLE5bMm", "created": "2025-03-13T01:13:16.662Z", "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_QLFSd62pZGRWHmzJl9V1/postman_merchant_GHAction_174568/pay_QLFSd62pZGRWHmzJl9V1_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": 1741828396, "expires": 1741831996, "secret": "epk_beff18305e9f49bda8a0b9e2a77b249e" }, "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_1tsuB1vmUFHSgf5OavLc", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_iQuV3uVZfTRA8dJJg53p", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-03-13T01:28:16.662Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2025-03-13T01:13:18.053Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": "manual" } ``` **2. PSync** -Request ``` curl --location 'http://localhost:8080/payments/pay_QLFSd62pZGRWHmzJl9V1' \ --header 'Accept: application/json' \ --header 'api-key: dev_cAhKiY0z6BCPtxdTZKiuoGXNfbk49QwuMRPJudoj4P5gWR24zvL1BniBwqBBP7SL' ``` -Response ``` { "payment_id": "pay_QLFSd62pZGRWHmzJl9V1", "merchant_id": "postman_merchant_GHAction_174568", "status": "succeeded", "amount": 2500, "net_amount": 2500, "shipping_cost": null, "amount_capturable": 0, "amount_received": 2500, "connector": "braintree", "client_secret": "pay_QLFSd62pZGRWHmzJl9V1_secret_1lRAyjj7PewghQLE5bMm", "created": "2025-03-13T01:13:16.662Z", "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": "dHJhbnNhY3Rpb25fNGMyNnRlN3I", "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_1tsuB1vmUFHSgf5OavLc", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_iQuV3uVZfTRA8dJJg53p", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-03-13T01:28:16.662Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2025-03-13T01:14:51.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" } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Core Business Logic** - `crates/router/src/core/payments.rs` - `crates/router/src/core/payments/helpers.rs` - `crates/router/src/core/payments/operations/payment_complete_authorize.rs` - ... and 1 more files **2. Other** - `crates/router/src/routes/app.rs` - `crates/router/src/routes/payments.rs` **Code Patterns Applied:** - Implement new functions (1 changes) - Extend existing types with new fields (15 changes) **Detailed Identifier Changes:** Commit a161f247: Files to modify: **crates/router/src/core/payments.rs** Modify existing code **crates/router/src/core/payments/helpers.rs** Modify existing code **crates/router/src/core/payments/operations/payment_complete_authorize.rs** Modify existing code **crates/router/src/core/payments/transformers.rs** Modify existing code **crates/router/src/routes/app.rs** Modify existing code **crates/router/src/routes/payments.rs** Add: - function: pub::payments_complete_authorize_redirect_with_creds_identifier
{"pr_number": 7501, "pr_title": "fix(connector): [BRAINTREE] Added fix for Braintree Creds Identifier", "merged_at": "2025-03-18T07:24:37Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"core_business": ["crates/router/src/core/payments.rs", "crates/router/src/core/payments/helpers.rs", "crates/router/src/core/payments/operations/payment_complete_authorize.rs", "crates/router/src/core/payments/transformers.rs"], "other": ["crates/router/src/routes/app.rs", "crates/router/src/routes/payments.rs"]}, "change_types": {"functions_added": 1, "fields_added": 15}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor(connector): [AUTHORIZEDOTNET,CHECKOUT,NOON,OPAYO,OPENNODE,PAYME,TRUSTPAY] Move to crate hyperswitch_connectors ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Connector code for following connectors is moved to crate hyperswitch_connectors: 1. Authorizedotnet 2. Checkout 3. Noon 4. Opayo 5. Opennode 6. Payme 7. Trustpay ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 8. `crates/router/src/configs` 9. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with 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: 1. Authorizedotnet: Request: ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_iw0orxxuFdrOK8YhJcydsioKlCF7H7KpOnVuMuHUrguioxj2VF8sWmQMQxY0JiCP' \ --data '{ "amount": 1234, "currency": "USD", "confirm": true, "customer_id": "Strustomewwr", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4111111111111111", "card_exp_month": "02", "card_exp_year": "35", "card_holder_name": "John Doe", "card_cvc": "123" } }, "billing": { "address": { "first_name": "John", "last_name": "Doe", "line1": "Harrison Street", "city": "San Francisco", "state": "California", "zip": "94016", "country": "US" } } }' ``` Response: ``` { "payment_id": "pay_NTKPvCOA83RxATYwUEML", "merchant_id": "merchant_1739965475", "status": "succeeded", "amount": 1234, "net_amount": 1234, "shipping_cost": null, "amount_capturable": 0, "amount_received": 1234, "connector": "authorizedotnet", "client_secret": "pay_NTKPvCOA83RxATYwUEML_secret_x6VvCbiEYBuG1xJz5QtS", "created": "2025-02-19T11:44:55.640Z", "currency": "USD", "customer_id": "Strustomewwr", "customer": { "id": "Strustomewwr", "name": null, "email": null, "phone": null, "phone_country_code": null }, "description": null, "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": null, "payment_method": "card", "payment_method_data": { "card": { "last4": "1111", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "411111", "card_extended_bin": null, "card_exp_month": "02", "card_exp_year": "35", "card_holder_name": "John Doe", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": { "city": "San Francisco", "country": "US", "line1": "Harrison Street", "line2": null, "line3": null, "zip": "94016", "state": "California", "first_name": "John", "last_name": "Doe" }, "phone": null, "email": null }, "order_details": null, "email": null, "name": null, "phone": null, "return_url": null, "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "Strustomewwr", "created_at": 1739965495, "expires": 1739969095, "secret": "epk_964fd20b81424e4cb218bfd6955bad28" }, "manual_retry_allowed": false, "connector_transaction_id": "80038084966", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "80038084966", "payment_link": null, "profile_id": "pro_m1ZIYld62oCMpVb2mZF4", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_lOmPUSsDf0jhXVu5D4bk", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-02-19T11:59:55.640Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2025-02-19T11:44:56.601Z", "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. Checkout: Request: ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_EcOvo2bY7exbj3HZvKcc9eBEQh0sTWhdb9XllXzeyR34COWjyceSvgre83lar98m' \ --data-raw '{ "amount": 6540, "currency": "USD", "amount_to_capture": 6540, "confirm": true, "customer": { "id": "customer123", "name": "John Doe", "email": "customer@gmail.com", "phone": "9999999999", "phone_country_code": "+1" }, "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" } } }' ``` Response: ``` { "payment_id": "pay_eG31UaIOfXYynw7kGw7I", "merchant_id": "merchant_1739967275", "status": "processing", "amount": 6540, "net_amount": 6540, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": "checkout", "client_secret": "pay_eG31UaIOfXYynw7kGw7I_secret_3b4Be6hMGKkdUxeQGtvM", "created": "2025-02-19T12:15:38.315Z", "currency": "USD", "customer_id": "customer123", "customer": { "id": "customer123", "name": "John Doe", "email": "customer@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": null, "capture_on": null, "capture_method": null, "payment_method": "card", "payment_method_data": { "card": { "last4": "4242", "card_type": "CREDIT", "card_network": "Visa", "card_issuer": "STRIPE PAYMENTS UK LIMITED", "card_issuing_country": "UNITEDKINGDOM", "card_isin": "424242", "card_extended_bin": null, "card_exp_month": "10", "card_exp_year": "25", "card_holder_name": "joseph Doe", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": null, "order_details": null, "email": "customer@gmail.com", "name": "John Doe", "phone": "9999999999", "return_url": null, "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "customer123", "created_at": 1739967338, "expires": 1739970938, "secret": "epk_b9c23b298a244427b2a02e87fa4cd9ee" }, "manual_retry_allowed": false, "connector_transaction_id": "pay_y52oqz2tyzrehmvp25die4sys4", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "pay_eG31UaIOfXYynw7kGw7I_1", "payment_link": null, "profile_id": "pro_VPjrrsIRpgLb6sR9r935", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_cmPedn73d3sfYYNmO1tl", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-02-19T12:30:38.315Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2025-02-19T12:15:38.907Z", "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. Trustpay: Request: ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_WNFVKoFFLT5r8MI8D69o4HNS8TICauK1XdoYuRpl48YvsLHHf2BMXx7FBveCWcZ2' \ --data-raw '{ "amount": 6540, "currency": "USD", "amount_to_capture": 6540, "confirm": true, "customer": { "id": "customer123", "name": "John Doe", "email": "customer@gmail.com", "phone": "9999999999", "phone_country_code": "+1" }, "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4242424242424242", "card_exp_month": "10", "card_exp_year": "25", "card_holder_name": "joseph Doe", "card_cvc": "123" }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "guest@example.com" } }, "browser_info": { "user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36", "accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8", "language": "nl-NL", "color_depth": 24, "screen_height": 723, "screen_width": 1536, "time_zone": 0, "java_enabled": true, "java_script_enabled": true, "ip_address": "128.0.0.1" } }' ``` Response: ``` { "payment_id": "pay_OWCdhDlkbVpPdexLw5Df", "merchant_id": "merchant_1739967484", "status": "succeeded", "amount": 6540, "net_amount": 6540, "shipping_cost": null, "amount_capturable": 0, "amount_received": 6540, "connector": "trustpay", "client_secret": "pay_OWCdhDlkbVpPdexLw5Df_secret_AuPot04zR4o0fapNW8ur", "created": "2025-02-19T12:19:07.964Z", "currency": "USD", "customer_id": "customer123", "customer": { "id": "customer123", "name": "John Doe", "email": "customer@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": null, "capture_on": null, "capture_method": null, "payment_method": "card", "payment_method_data": { "card": { "last4": "4242", "card_type": "CREDIT", "card_network": "Visa", "card_issuer": "STRIPE PAYMENTS UK LIMITED", "card_issuing_country": "UNITEDKINGDOM", "card_isin": "424242", "card_extended_bin": null, "card_exp_month": "10", "card_exp_year": "25", "card_holder_name": "joseph Doe", "payment_checks": null, "authentication_data": null }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "guest@example.com" } }, "payment_token": null, "shipping": null, "billing": null, "order_details": null, "email": "customer@gmail.com", "name": "John Doe", "phone": "9999999999", "return_url": null, "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "customer123", "created_at": 1739967547, "expires": 1739971147, "secret": "epk_208d075137534073924e75a358ee07cb" }, "manual_retry_allowed": false, "connector_transaction_id": "4eV-S6rQqjp1r36TQSKtVQ", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": null, "payment_link": null, "profile_id": "pro_hyYjWoDvIjnPdUq5grML", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_nEVkHtIrNTr41zxFGE0G", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-02-19T12:34:07.964Z", "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-02-19T12:19:09.738Z", "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" } ``` 4. Payme: Request: ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_E2IW3T2ZwjTylzyQWYUeAb0JYy2UkDevaJnt6ViPMuHUHvGdke9C4LHUKKkBb6UA' \ --data-raw '{ "amount": 6540, "currency": "AED", "amount_to_capture": 6540, "confirm": true, "customer": { "id": "customer123", "name": "John Doe", "email": "customer@gmail.com", "phone": "9999999999", "phone_country_code": "+1" }, "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4242424242424242", "card_exp_month": "10", "card_exp_year": "25", "card_holder_name": "joseph Doe", "card_cvc": "123" }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "guest@example.com" } }, "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" }, "order_details": [ { "product_name": "test", "quantity": 1, "amount": 10 } ], "connector_metadata": { "noon": { "order_category": "pay" } }, "description": "Its my first payment request" }' ``` Response: ``` { "payment_id": "pay_ds031tLF7fWuzjdi5OoG", "merchant_id": "merchant_1739967893", "status": "requires_customer_action", "amount": 6540, "net_amount": 6540, "shipping_cost": null, "amount_capturable": 6540, "amount_received": null, "connector": "noon", "client_secret": "pay_ds031tLF7fWuzjdi5OoG_secret_M2bY0A9wxAdBzrhdPvxL", "created": "2025-02-19T12:26:11.049Z", "currency": "AED", "customer_id": "customer123", "customer": { "id": "customer123", "name": "John Doe", "email": "customer@gmail.com", "phone": "9999999999", "phone_country_code": "+1" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": null, "payment_method": "card", "payment_method_data": { "card": { "last4": "4242", "card_type": "CREDIT", "card_network": "Visa", "card_issuer": "STRIPE PAYMENTS UK LIMITED", "card_issuing_country": "UNITEDKINGDOM", "card_isin": "424242", "card_extended_bin": null, "card_exp_month": "10", "card_exp_year": "25", "card_holder_name": "joseph Doe", "payment_checks": null, "authentication_data": null }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "guest@example.com" } }, "payment_token": null, "shipping": null, "billing": null, "order_details": [ { "brand": null, "amount": 10, "category": null, "quantity": 1, "tax_rate": null, "product_id": null, "product_name": "test", "product_type": null, "sub_category": null, "product_img_link": null, "product_tax_code": null, "total_tax_amount": null, "requires_shipping": null } ], "email": "customer@gmail.com", "name": "John Doe", "phone": "9999999999", "return_url": null, "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": { "type": "redirect_to_url", "redirect_to_url": "http://localhost:8080/payments/redirect/pay_ds031tLF7fWuzjdi5OoG/merchant_1739967893/pay_ds031tLF7fWuzjdi5OoG_1" }, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "customer123", "created_at": 1739967971, "expires": 1739971571, "secret": "epk_0985c754474d4ad8b5093b7a666cc0e2" }, "manual_retry_allowed": null, "connector_transaction_id": "506855205636", "frm_message": null, "metadata": null, "connector_metadata": { "apple_pay": null, "airwallex": null, "noon": { "order_category": "pay" } }, "feature_metadata": null, "reference_id": "pay_ds031tLF7fWuzjdi5OoG_1", "payment_link": null, "profile_id": "pro_miLgRp2EXezmGeltvfkm", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_mk47JET4fgYqKdYMgvnv", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-02-19T12:41:11.049Z", "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-02-19T12:26:14.084Z", "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. Core Business Logic** - `crates/router/src/core/payments/connector_integration_v2_impls.rs` - `crates/router/src/core/payments/flows.rs` **2. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors.rs` - `crates/router/src/connector/authorizedotnet.rs` - `crates/router/src/connector/authorizedotnet/transformers.rs` - ... and 17 more files **Code Patterns Applied:** - Define new data structures (1 changes) - Implement new functions (57 changes) - Extend existing types with new fields (719 changes) - Add conditional logic for feature flags or filtering (8 changes) **Detailed Identifier Changes:** Commit 241653bd: Files to modify: **crates/hyperswitch_connectors/src/connectors.rs** Add: - mod: pub::authorizedotnet - mod: pub::checkout - mod: pub::noon - mod: pub::opayo - mod: pub::opennode - mod: pub::payme - mod: pub::trustpay **crates/hyperswitch_connectors/src/default_implementations.rs** Modify existing code **crates/hyperswitch_connectors/src/default_implementations_v2.rs** Modify existing code **crates/hyperswitch_connectors/src/types.rs** Modify existing code **crates/hyperswitch_connectors/src/utils.rs** Add: - function: pub::get_mandate_details - function: pub::collect_values_by_removing_signature - function: pub::collect_and_sort_values_by_removing_signature **crates/router/src/connector.rs** Remove: - mod: pub::authorizedotnet - mod: pub::checkout - mod: pub::noon - mod: pub::opayo - mod: pub::opennode - mod: pub::payme - mod: pub::trustpay **crates/router/src/core/payments/connector_integration_v2_impls.rs** Modify existing code **crates/router/src/core/payments/flows.rs** Modify existing code
{"pr_number": 7235, "pr_title": "refactor(connector): [AUTHORIZEDOTNET,CHECKOUT,NOON,OPAYO,OPENNODE,PAYME,TRUSTPAY] Move to crate hyperswitch_connectors", "merged_at": "2025-03-04T07:12:31Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"core_business": ["crates/router/src/core/payments/connector_integration_v2_impls.rs", "crates/router/src/core/payments/flows.rs"], "connectors": ["crates/hyperswitch_connectors/src/connectors.rs", "crates/router/src/connector/authorizedotnet.rs", "crates/router/src/connector/authorizedotnet/transformers.rs", "crates/router/src/connector/checkout.rs", "crates/router/src/connector/checkout/transformers.rs", "crates/router/src/connector/noon.rs", "crates/router/src/connector/noon/transformers.rs", "crates/router/src/connector/opayo.rs", "crates/router/src/connector/opayo/transformers.rs", "crates/router/src/connector/opennode.rs", "crates/router/src/connector/opennode/transformers.rs", "crates/router/src/connector/payme.rs", "crates/router/src/connector/payme/transformers.rs", "crates/router/src/connector/trustpay.rs", "crates/router/src/connector/trustpay/transformers.rs", "crates/hyperswitch_connectors/src/default_implementations.rs", "crates/hyperswitch_connectors/src/default_implementations_v2.rs", "crates/hyperswitch_connectors/src/types.rs", "crates/hyperswitch_connectors/src/utils.rs", "crates/router/src/connector.rs"]}, "change_types": {"structs_added": 1, "functions_added": 57, "fields_added": 719, "imports_added": 72, "conditionals_added": 8}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(router): Fixed stack over flow for session call in authentication connectors ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix ## Description <!-- Describe your changes in detail --> Fixed stack over flow for session call in authentication connectors ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> Currently when we are doing session call for authentication connectors stack is overflowing since the function `list_enabled_connector_accounts_by_profile_id` is calling itself recursively in implementation of kafka store. ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Setup Click to Pay and do session call should provide proper response than 503 ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I 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. Other** - `crates/router/src/db/kafka_store.rs` **Detailed Identifier Changes:** Commit 19337226: Files to modify: **crates/router/src/db/kafka_store.rs** Modify existing code
{"pr_number": 7983, "pr_title": "fix(router): Fixed stack over flow for session call in authentication connectors", "merged_at": "2025-05-08T10:10:33Z", "intent": {"feature_type": "authentication", "action": "add_feature", "entities": ["connector", "session"]}, "hierarchy": {"other": ["crates/router/src/db/kafka_store.rs"]}, "change_types": {}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor: Payment Attempt as mandatory field in PaymentStatusData ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Currently, we have two endpoints for retrieving payment information in v2: - GET /payments/:id - GET /payments/:id:/get-intent The endpoint /payments/{payment_id} is called after confirmation, at which point a payment attempt always exists. Currently, payment_attempt in PaymentStatusData is stored as an optional field requiring implementation for get_payment_attempt(). This PR refactors the PaymentStatusData struct to make payment_attempt a required field ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> 1. Payments Create 2. Payments Confirm 3. Payments Retrieve ``` curl --location 'http://localhost:8080/v2/payments/12345_pay_0196fd5c3d7a7502a39002fd8ce86a03?force_sync=true' \ --header 'x-profile-id: pro_zpak30UxH06EvzDWoXsW' \ --header 'Authorization: api-key=dev_Qi7ZsoVS4uccUf9Zy3pbS3eqvHjledzayfBn3i74bic6JHGMXNGpuY4wwN1xEMoQ' \ --data '' ``` Response ``` { "id": "12345_pay_0196fd5c3d7a7502a39002fd8ce86a03", "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-05-23T13:36:42.987Z", "payment_method_data": { "billing": null }, "payment_method_type": "card", "payment_method_subtype": "credit", "connector_transaction_id": "pi_3RRvmED5R7gDAGff0qqjNSfu", "connector_reference_id": null, "merchant_connector_id": "mca_8S2I5IjIiW6MnlXUleeZ", "browser_info": null, "error": null, "shipping": { "address": { "city": "Karwar", "country": null, "line1": null, "line2": null, "line3": null, "zip": "581301", "state": "Karnataka", "first_name": "John", "last_name": "Dough" }, "phone": null, "email": "example@example.com" }, "billing": { "address": { "city": null, "country": null, "line1": null, "line2": null, "line3": null, "zip": null, "state": null, "first_name": "John", "last_name": "Dough" }, "phone": null, "email": "example@example.com" }, "attempts": null, "connector_token_details": { "token": "pm_1RRvmED5R7gDAGffXf71G5j2", "connector_token_request_reference_id": "waAfJPIqPwCZbPN4xC" }, "payment_method_id": null, "next_action": null, "return_url": "https://google.com/success", "authentication_type": "no_three_ds", "authentication_type_applied": null, "is_iframe_redirection_enabled": null } ``` 1. Payments Create 2. Payments Retrieve ``` curl --location 'http://localhost:8080/v2/payments/12345_pay_01970c2d2a3c71e19ac6e9d20e9b5cb5?force_sync=true' \ --header 'x-profile-id: pro_3gDRiJh3bRKWv7ba0NYE' \ --header 'Authorization: api-key=dev_O5tsf4SGjEusjWDUE56oLxR8HIGNrQJoA4Rxp8LpNYFFNxoxo8j74KexSKWmeRbs' \ --data '' ``` Response ``` { "error": { "type": "invalid_request", "message": "This Payment could not be PaymentGet because it has a status of requires_payment_method. The expected state is requires_capture, requires_customer_action, requires_merchant_action, processing, succeeded, failed, partially_captured_and_capturable, partially_captured, cancelled", "code": "IR_14" } } ``` 3. Payments Retrieve (get-intent) ``` curl --location 'http://localhost:8080/v2/payments/12345_pay_01970c2d2a3c71e19ac6e9d20e9b5cb5/get-intent' \ --header 'x-profile-id: pro_3gDRiJh3bRKWv7ba0NYE' \ --header 'Authorization: api-key=dev_O5tsf4SGjEusjWDUE56oLxR8HIGNrQJoA4Rxp8LpNYFFNxoxo8j74KexSKWmeRbs' \ --data '' ``` Response ``` { "id": "12345_pay_01970c2d2a3c71e19ac6e9d20e9b5cb5", "status": "requires_payment_method", "amount_details": { "order_amount": 100, "currency": "USD", "shipping_cost": null, "order_tax_amount": null, "external_tax_calculation": "skip", "surcharge_calculation": "skip", "surcharge_amount": null, "tax_on_surcharge": null }, "client_secret": null, "profile_id": "pro_3gDRiJh3bRKWv7ba0NYE", "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-05-26T10:54:36.032Z", "frm_metadata": null, "request_external_three_ds_authentication": "Skip" } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] 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.rs` - `crates/hyperswitch_domain_models/src/router_data.rs` **2. Core Business Logic** - `crates/router/src/core/payments.rs` - `crates/router/src/core/payments/operations/payment_get.rs` - `crates/router/src/core/payments/operations/payment_response.rs` - ... and 4 more files **Code Patterns Applied:** - Extend existing types with new fields (15 changes) - Add conditional logic for feature flags or filtering (1 changes) **Detailed Identifier Changes:** Commit eb15fa11: Files to modify: **crates/hyperswitch_domain_models/src/payments.rs** Modify existing code **crates/hyperswitch_domain_models/src/router_data.rs** Modify existing code **crates/router/src/core/payments.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** Modify existing code **crates/router/src/core/payments/transformers.rs** Modify existing code **crates/router/src/core/revenue_recovery.rs** Modify existing code **crates/router/src/core/revenue_recovery/types.rs** Modify existing code **crates/router/src/core/webhooks/incoming_v2.rs** Modify existing code
{"pr_number": 8126, "pr_title": "refactor: Payment Attempt as mandatory field in PaymentStatusData", "merged_at": "2025-05-29T10:25:00Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"domain": ["crates/hyperswitch_domain_models/src/payments.rs", "crates/hyperswitch_domain_models/src/router_data.rs"], "core_business": ["crates/router/src/core/payments.rs", "crates/router/src/core/payments/operations/payment_get.rs", "crates/router/src/core/payments/operations/payment_response.rs", "crates/router/src/core/payments/transformers.rs", "crates/router/src/core/revenue_recovery.rs", "crates/router/src/core/revenue_recovery/types.rs", "crates/router/src/core/webhooks/incoming_v2.rs"]}, "change_types": {"fields_added": 15, "conditionals_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor(connector): implement amount converter framework for bambora, dlocal and opennode ## 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)? --> <details> <summary>Bambora</summary> ```curl curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_X7YiQra0pw308aiMUpDB8tsFscJ9oUtqszZgqOXaUnYDuCKyWLa905wrzoXUDVgf' \ --data-raw '{ "amount": 1000, "currency": "USD", "confirm": true, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 1000, "customer_id": "BamboraCustomer", "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": "4874970686672022", "card_exp_month": "10", "card_exp_year": "25", "card_holder_name": "John Doe", "card_cvc": "123" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" }, "browser_info": { "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,/;q=0.8", "language": "nl-NL", "color_depth": 24, "ip_address": "127.2.2.0", "screen_height": 723, "screen_width": 1536, "time_zone": 0, "java_enabled": true, "java_script_enabled": true } }' ``` ```json { "payment_id": "pay_0TsexoRuQkiRaTo2GjHA", "merchant_id": "postman_merchant_GHAction_5e163b28-1ff9-4a7e-8645-4640a7b8fea7", "status": "succeeded", "amount": 1000, "net_amount": 1000, "shipping_cost": null, "amount_capturable": 0, "amount_received": 1000, "connector": "bambora", "client_secret": "pay_0TsexoRuQkiRaTo2GjHA_secret_79EpKXXHhl9Q6E46U5d1", "created": "2025-08-08T18:52:18.023Z", "currency": "USD", "customer_id": "BamboraCustomer", "customer": { "id": "BamboraCustomer", "name": "John Doe", "email": "guest@example.com", "phone": "999999999", "phone_country_code": "+1" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "2022", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "487497", "card_extended_bin": null, "card_exp_month": "10", "card_exp_year": "25", "card_holder_name": "John Doe", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": 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": "BamboraCustomer", "created_at": 1754679138, "expires": 1754682738, "secret": "epk_864d2ede7dda489a89ceeacc85335f25" }, "manual_retry_allowed": false, "connector_transaction_id": "10005907", "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_0TsexoRuQkiRaTo2GjHA_1", "payment_link": null, "profile_id": "pro_oAcsl9XhGyHurRkYA1u5", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_JntgCHq0YbFnYPHMBVss", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-08-08T19:07:18.023Z", "fingerprint": null, "browser_info": { "language": "nl-NL", "time_zone": 0, "ip_address": "127.2.2.0", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "color_depth": 24, "java_enabled": true, "screen_width": 1536, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,/;q=0.8", "screen_height": 723, "java_script_enabled": true }, "payment_channel": null, "payment_method_id": null, "network_transaction_id": null, "payment_method_status": null, "updated": "2025-08-08T18:52:40.959Z", "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="1410" height="162" alt="image" src="https://github.com/user-attachments/assets/721b2d66-e4ff-44ec-9f87-b1ca1ec6a417" /> </details> <details> <summary>DLocal</summary> ```curl curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_r4Iw8OHQTklxTXM5bNcyQLidELid3oJ0wQAOFMzXNzeBtaHYFBXjiSdhN45FFJKq' \ --data-raw '{ "amount": 60000, "currency": "BRL", "confirm": true, "capture_method": "automatic", "capture_on": "2024-09-10T10:11:12Z", "amount_to_capture": 60000, "customer_id": "jsdhfgbds", "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": "debit", "payment_method_data": { "card": { "card_number": "4242424242424242", "card_exp_month": "02", "card_exp_year": "37", "card_holder_name": "joseph Doe", "card_cvc": "999" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "BR", "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": "BR", "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" }, "routing": { "type": "single", "data": "dlocal" } }' ``` ```json { "payment_id": "pay_LL5CUXMHzkFh9FqqVbps", "merchant_id": "postman_merchant_GHAction_c8bab2e3-7d2a-461e-b5e8-21f8c7a1bcaa", "status": "succeeded", "amount": 60000, "net_amount": 60000, "shipping_cost": null, "amount_capturable": 0, "amount_received": 60000, "connector": "dlocal", "client_secret": "pay_LL5CUXMHzkFh9FqqVbps_secret_tz7mGKrWAnJgomYNrLYL", "created": "2025-08-08T18:54:40.583Z", "currency": "BRL", "customer_id": "jsdhfgbds", "customer": { "id": "jsdhfgbds", "name": "John Doe", "email": "guest@example.com", "phone": "999999999", "phone_country_code": "+1" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "4242", "card_type": "CREDIT", "card_network": "Visa", "card_issuer": "STRIPE PAYMENTS UK LIMITED", "card_issuing_country": "UNITEDKINGDOM", "card_isin": "424242", "card_extended_bin": null, "card_exp_month": "02", "card_exp_year": "37", "card_holder_name": "joseph Doe", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": "BR", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "billing": { "address": { "city": "San Fransico", "country": "BR", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": 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": "jsdhfgbds", "created_at": 1754679280, "expires": 1754682880, "secret": "epk_e141e812f12b44648d67ba98ab6efaa8" }, "manual_retry_allowed": false, "connector_transaction_id": "T-413100-b56c9b2f-7692-4402-a863-492736b94263", "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_LL5CUXMHzkFh9FqqVbps_1", "payment_link": null, "profile_id": "pro_A5sLYzk1yuuc3yZRYOl1", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_IdG2wgseDjsXAXzcwnGP", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-08-08T19:09:40.583Z", "fingerprint": null, "browser_info": null, "payment_channel": null, "payment_method_id": null, "network_transaction_id": null, "payment_method_status": null, "updated": "2025-08-08T18:54:41.989Z", "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="1412" height="171" alt="image" src="https://github.com/user-attachments/assets/1d069d3a-26c8-493d-b370-6f8e2337db51" /> </details> <details> <summary>Opennode</summary> ```curl curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'Accept-Language: ja' \ --header 'api-key: dev_ecAzD6wCRTJ9vle4P8dSItXfE8hyWMx5ZInf03wYUoDE9YuOnbOU4ppvw24R12HP' \ --data-raw '{ "amount": 10400, "currency": "USD", "confirm": true, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 10400, "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_data": { "card": { "card_number": "4111111111111111", "card_exp_month": "01", "card_exp_year": "2030", "card_holder_name": "joseph Doe", "card_cvc": "100" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "PiX" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "PiX" } }, "browser_info": { "ip_address": "192.168.0.1", "user_agent": "MY LAPTOP RUNS ON m0z://a" }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } }' ``` ```json { "payment_id": "pay_eGoiOIHHKtPZ8fVoO2VV", "merchant_id": "spriteMerchantBornAt1754656024", "status": "succeeded", "amount": 10400, "net_amount": 10400, "shipping_cost": null, "amount_capturable": 0, "amount_received": 10400, "connector": "barclaycard", "client_secret": "pay_eGoiOIHHKtPZ8fVoO2VV_secret_LRzK0h8I2TxEh2MihMZ3", "created": "2025-08-08T18:57:23.338Z", "currency": "USD", "customer_id": "StripeCustomer", "customer": { "id": "StripeCustomer", "name": "John Doe", "email": "guest@example.com", "phone": "999999999", "phone_country_code": "+1" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "1111", "card_type": "CREDIT", "card_network": "Visa", "card_issuer": "JP Morgan", "card_issuing_country": "INDIA", "card_isin": "411111", "card_extended_bin": null, "card_exp_month": "01", "card_exp_year": "2030", "card_holder_name": "joseph Doe", "payment_checks": { "eci": null, "cavv": null, "eci_raw": null, "avs_response": { "code": "Y", "codeRaw": "Y" }, "approval_code": "831000", "card_verification": { "resultCode": "M", "resultCodeRaw": "M" }, "consumer_authentication_response": { "code": "2", "codeRaw": "2" } }, "authentication_data": { "acs_transaction_id": null, "system_trace_audit_number": "036063", "retrieval_reference_number": "522018036063" } }, "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": "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": "StripeCustomer", "created_at": 1754679443, "expires": 1754683043, "secret": "epk_a362fc52c7c74ee8ae9216fb75fea20d" }, "manual_retry_allowed": false, "connector_transaction_id": "7546794453876784303812", "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_eGoiOIHHKtPZ8fVoO2VV_1", "payment_link": null, "profile_id": "pro_zdyJ6MbtU1anAIfbiSim", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_P2TahMotR8ucEv5vaKDr", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-08-08T19:12:23.338Z", "fingerprint": null, "browser_info": { "ip_address": "192.168.0.1", "user_agent": "MY LAPTOP RUNS ON m0z://a" }, "payment_channel": null, "payment_method_id": null, "network_transaction_id": null, "payment_method_status": null, "updated": "2025-08-08T18:57:29.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 } ``` <img width="1411" height="218" alt="image" src="https://github.com/user-attachments/assets/c409666c-513e-4e38-8d7b-fd5ce989104f" /> </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_eGoiOIHHKtPZ8fVoO2VV", "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_LUIGMnLUptJjsDfPDETC", "payment_id": "pay_eGoiOIHHKtPZ8fVoO2VV", "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-08T18:58:31.816Z", "updated_at": "2025-08-08T18:58:35.667Z", "connector": "barclaycard", "profile_id": "pro_zdyJ6MbtU1anAIfbiSim", "merchant_connector_id": "mca_P2TahMotR8ucEv5vaKDr", "split_refunds": null, "issuer_error_code": null, "issuer_error_message": null } ``` <img width="1409" height="60" alt="image" src="https://github.com/user-attachments/assets/c9d3d3e3-aced-45b8-beb2-c7c96853f6d9" /> </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/bambora.rs` - `crates/hyperswitch_connectors/src/connectors/bambora/transformers.rs` - `crates/hyperswitch_connectors/src/connectors/dlocal.rs` - ... and 7 more files **Code Patterns Applied:** - Define new data structures (3 changes) - Implement new functions (6 changes) - Extend existing types with new fields (18 changes) **Detailed Identifier Changes:** Commit 96f92531: Files to modify: **crates/hyperswitch_connectors/src/connectors/bambora.rs** Remove: - struct: pub::Bambora Add: - function: pub::new - struct: pub::Bambora - impl: impl Bambora **crates/hyperswitch_connectors/src/connectors/bambora/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/dlocal.rs** Remove: - struct: pub::Dlocal Add: - function: pub::new - struct: pub::Dlocal - impl: impl Dlocal **crates/hyperswitch_connectors/src/connectors/dlocal/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/opennode.rs** Remove: - struct: pub::Opennode Add: - function: pub::new - struct: pub::Opennode - impl: impl Opennode **crates/hyperswitch_connectors/src/connectors/opennode/transformers.rs** Modify existing code **crates/router/src/types/api/connector_mapping.rs** Modify existing code **crates/router/tests/connectors/bambora.rs** Modify existing code **crates/router/tests/connectors/dlocal.rs** Modify existing code **crates/router/tests/connectors/opennode.rs** Modify existing code
{"pr_number": 8883, "pr_title": "refactor(connector): implement amount converter framework for bambora, dlocal and opennode ", "merged_at": "2025-08-18T14:41:34Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/bambora.rs", "crates/hyperswitch_connectors/src/connectors/bambora/transformers.rs", "crates/hyperswitch_connectors/src/connectors/dlocal.rs", "crates/hyperswitch_connectors/src/connectors/dlocal/transformers.rs", "crates/hyperswitch_connectors/src/connectors/opennode.rs", "crates/hyperswitch_connectors/src/connectors/opennode/transformers.rs", "crates/router/src/types/api/connector_mapping.rs", "crates/router/tests/connectors/bambora.rs", "crates/router/tests/connectors/dlocal.rs", "crates/router/tests/connectors/opennode.rs"]}, "change_types": {"structs_added": 3, "functions_added": 6, "fields_added": 18, "imports_added": 8}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(webhook): add filter by event class and type ## 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 --> Webhook events can be filtered based on a list of event classes and event types. This PR also changes the endpoints `/events/{merchant_id}` and `/events/profile/list` to POST request. ### Additional Changes - [x] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> This feature enhances the API by allowing merchants to filter webhook events with a list of event classes and event types. Additionally, validation ensures that only valid event class-event type combinations are used. ## How did you test 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/merchant_1743589499' \ --header 'Content-Type: application/json' \ --header 'api-key: test_admin' \ --data '{}' ``` - Response ``` { "events": [ { "event_id": "evt_0195f62f824f7f53af13fede684998df", "merchant_id": "merchant_1743589499", "profile_id": "pro_zi0qJ2I57xmpho8jpUYR", "object_id": "pay_MvGzXvaQxCJUZZ7EAKIn", "event_type": "payment_failed", "event_class": "payments", "is_delivery_successful": false, "initial_attempt_id": "evt_0195f62f824f7f53af13fede684998df", "created": "2025-04-02T11:07:43.567Z" }, { "event_id": "evt_0195f6099a3e7dc08e246ccc04057684", "merchant_id": "merchant_1743589499", "profile_id": "pro_zi0qJ2I57xmpho8jpUYR", "object_id": "pay_H463bjSirmF62tjviY9Q", "event_type": "payment_succeeded", "event_class": "payments", "is_delivery_successful": false, "initial_attempt_id": "evt_0195f6099a3e7dc08e246ccc04057684", "created": "2025-04-02T10:26:19.326Z" } ], "total_count": 2 } ``` - List initial delivery attempts with filters ``` curl --location 'http://localhost:8080/events/merchant_1743589499' \ --header 'Content-Type: application/json' \ --header 'api-key: test_admin' \ --data '{ "created_after": "2025-01-01T00:00:00Z", "created_before": "2026-01-31T23:59:59Z", "limit": 0, "offset": 0, "object_id": "{{object_id}}", "profile_id": "pro_zi0qJ2I57xmpho8jpUYR", "event_classes": ["refunds", "payments"], "event_types": ["payment_succeeded"], "is_delivered": true }' ``` - Response ``` { "events": [ { "event_id": "evt_0195f6099a3e7dc08e246ccc04057684", "merchant_id": "merchant_1743589499", "profile_id": "pro_zi0qJ2I57xmpho8jpUYR", "object_id": "pay_H463bjSirmF62tjviY9Q", "event_type": "payment_succeeded", "event_class": "payments", "is_delivery_successful": false, "initial_attempt_id": "evt_0195f6099a3e7dc08e246ccc04057684", "created": "2025-04-02T10:26:19.326Z" } ], "total_count": 1 } ``` - List initial delivery attempts using JWT Authentication ``` curl --location 'http://localhost:8080/events/profile/list' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiZDk1NTcyN2ItYjY1Zi1hNjUwOWVmYmI0NGIiLCJtZXJjaGFudF9pZCI6Im1lcmNoYW50XzE3NDM1ODk0OTkiLCJyb2xlX2lkIjoib3JnX2FkbWluIiwiZXhwIjoxNzQzNjg0NzU0LCJvcmdfaWQiOiJwcm9femtWalRHN1kwY0FVNHJNcjRBM3QiLCJwcm9maWxlX2lkIjoicHJvX3ppMHFKMkk1N3htcGhvOGpwVVlSIiwidGVuYW50X2lkIjoicHVibGljIn0.xhs7FWIU6vuqZ2O0X3e1bt4U6m2BtELJzyxUeONSIPo' \ --header 'Cookie: login_token=eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiZDk1NTcyN2ItYjY1Zi1hNjUwOWVmYmI0NGIiLCJtZXJjaGFudF9pZCI6Im1lcmNoYW50XzE3NDM1ODk0OTkiLCJyb2xlX2lkIjoib3JnX2FkbWluIiwiZXhwIjoxNzQzNjg0NzU0LCJvcmdfaWQiOiJwcm9femtWalRHN1kwY0FVNHJNcjRBM3QiLCJwcm9maWxlX2lkIjoicHJvX3ppMHFKMkk1N3htcGhvOGpwVVlSIiwidGVuYW50X2lkIjoicHVibGljIn0.xhs7FWIU6vuqZ2O0X3e1bt4U6m2BtELJzyxUeONSIPo' \ --data '{ "limit": 1 }' ``` - Response ``` { "events": [ { "event_id": "evt_0195f62f824f7f53af13fede684998df", "merchant_id": "merchant_1743589499", "profile_id": "pro_zi0qJ2I57xmpho8jpUYR", "object_id": "pay_MvGzXvaQxCJUZZ7EAKIn", "event_type": "payment_failed", "event_class": "payments", "is_delivery_successful": false, "initial_attempt_id": "evt_0195f62f824f7f53af13fede684998df", "created": "2025-04-02T11:07:43.567Z" } ], "total_count": 2 } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/webhook_events.rs` **2. Database Layer (Queries & Schema)** - `crates/diesel_models/src/query/events.rs` **3. Core Business Logic** - `crates/router/src/core/webhooks/webhook_events.rs` **4. Type Definitions** - `crates/router/src/types/transformers.rs` **5. Other** - `api-reference/openapi_spec.json` - `crates/common_enums/src/enums.rs` - `crates/openapi/src/openapi.rs` - ... and 5 more files **Code Patterns Applied:** - Implement new functions (2 changes) - Extend existing types with new fields (27 changes) - Add conditional logic for feature flags or filtering (6 changes) - Modify database queries (3 changes) **Detailed Identifier Changes:** Commit 989b2c34: Files to modify: **crates/api_models/src/webhook_events.rs** Modify existing code **crates/common_enums/src/enums.rs** Add: - function: pub::event_types - impl: impl EventClass **crates/diesel_models/src/query/events.rs** Modify existing code **crates/openapi/src/openapi.rs** Modify existing code **crates/openapi/src/routes/webhook_events.rs** Modify existing code **crates/router/src/core/webhooks/webhook_events.rs** Add: - function: private::finalize_event_types **crates/router/src/db/events.rs** Modify existing code **crates/router/src/db/kafka_store.rs** Modify existing code **crates/router/src/routes/app.rs** Modify existing code **crates/router/src/routes/webhook_events.rs** Modify existing code **crates/router/src/types/transformers.rs** Modify existing code
{"pr_number": 7275, "pr_title": "feat(webhook): add filter by event class and type", "merged_at": "2025-04-11T10:46:08Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "merchant", "refund"]}, "hierarchy": {"api_models": ["crates/api_models/src/webhook_events.rs"], "database": ["crates/diesel_models/src/query/events.rs"], "core_business": ["crates/router/src/core/webhooks/webhook_events.rs"], "types": ["crates/router/src/types/transformers.rs"], "other": ["api-reference/openapi_spec.json", "crates/common_enums/src/enums.rs", "crates/openapi/src/openapi.rs", "crates/openapi/src/routes/webhook_events.rs", "crates/router/src/db/events.rs", "crates/router/src/db/kafka_store.rs", "crates/router/src/routes/app.rs", "crates/router/src/routes/webhook_events.rs"]}, "change_types": {"functions_added": 2, "fields_added": 27, "imports_added": 10, "conditionals_added": 6, "database_queries": 3}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(connector): [STRIPE] fix stripe mandate ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description - Revert this [PR](https://github.com/juspay/hyperswitch/pull/6855) - Pass `setup_future_usage = None` for ConnectorMandateId and NetworkMandateId. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? 1. Create Merchant 2. Create API KEY 3. Create Stripe connector ``` curl --location 'http://localhost:8080/account/postman_merchant_GHAction_1734681965/connectors' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: test_admin' \ --data '{ "connector_type": "payment_processor", "profile_id": "pro_iprJnfcIANK2ws8xnWhI", "connector_name": "stripe", "connector_account_details": { "auth_type": "HeaderKey", "api_key": "__" }, "test_mode": false, "disabled": false, "payment_methods_enabled": [ { "payment_method": "pay_later", "payment_method_types": [ { "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true, "payment_experience": "redirect_to_url", "payment_method_type": "affirm" } ] }, { "payment_method": "pay_later", "payment_method_types": [ { "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true, "payment_experience": "redirect_to_url", "payment_method_type": "afterpay_clearpay" } ] }, { "payment_method": "pay_later", "payment_method_types": [ { "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true, "payment_experience": "redirect_to_url", "payment_method_type": "klarna" } ] }, { "payment_method": "pay_later", "payment_method_types": [ { "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true, "payment_experience": "invoke_sdk_client", "payment_method_type": "klarna" } ] }, { "payment_method": "bank_redirect", "payment_method_types": [ { "payment_method_type": "ideal", "payment_experience": null, "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_type": "giropay", "payment_experience": null, "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_type": "sofort", "payment_experience": null, "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_type": "eps", "payment_experience": null, "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true } ] }, { "payment_method": "bank_debit", "payment_method_types": [ { "payment_method_type": "ach", "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_type": "becs", "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_type": "sepa", "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true } ] }, { "payment_method": "bank_transfer", "payment_method_types": [ { "payment_method_type": "ach", "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_type": "bacs", "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_type": "sepa", "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true } ] }, { "payment_method": "card", "payment_method_types": [ { "payment_method_type": "credit", "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true, "card_networks": [ "AmericanExpress", "Discover", "Interac", "JCB", "Mastercard", "Visa", "DinersClub", "UnionPay", "RuPay" ] } ] }, { "payment_method": "card", "payment_method_types": [ { "payment_method_type": "debit", "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true, "card_networks": [ "AmericanExpress", "Discover", "Interac", "JCB", "Mastercard", "Visa", "DinersClub", "UnionPay", "RuPay" ] } ] }, { "payment_method": "wallet", "payment_method_types": [ { "payment_method_type": "apple_pay", "payment_experience": "invoke_sdk_client", "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true } ] }, { "payment_method": "wallet", "payment_method_types": [ { "payment_method_type": "google_pay", "payment_experience": "invoke_sdk_client", "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_type": "we_chat_pay", "payment_experience": "invoke_sdk_client", "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true } ] } ], "metadata": { "google_pay": { "allowed_payment_methods": [ { "type": "CARD", "parameters": { "allowed_auth_methods": [ "PAN_ONLY", "CRYPTOGRAM_3DS" ], "allowed_card_networks": [ "AMEX", "DISCOVER", "INTERAC", "JCB", "MASTERCARD", "VISA" ] }, "tokenization_specification": { "type": "PAYMENT_GATEWAY", "parameters": { "gateway": "example", "gateway_merchant_id": "pk_test_51Msk2GAGHc77EJXX78h549SX2uaOnEkUYqBfjcoD05PIpAnDkYxMn8nQ4d19im85NQuX4Z6WDyHaUw2fFTPBWsIY00Wa7oNerO" } } } ], "merchant_info": { "merchant_name": "Narayan Bhat" } }, "apple_pay": { "session_token_data": { "initiative": "web", "certificate": "", "display_name": "applepay", "certificate_keys": "", "initiative_context": "sdk-test-app.netlify.app", "merchant_identifier": "merchant.com.stripe.sang" }, "payment_request_data": { "label": "applepay pvt.ltd", "supported_networks": [ "visa", "masterCard", "amex", "discover" ], "merchant_capabilities": [ "supports3DS" ] } } } }' ``` 4. Create Customer 5. Enable NTID ``` curl --location 'http://localhost:8080/account/postman_merchant_GHAction_1734681965/business_profile/pro_iprJnfcIANK2ws8xnWhI' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: test_admin' \ --data '{ "is_connector_agnostic_mit_enabled": true }' ``` 6. Payment Create ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'Accept-Language: ja' \ --header 'api-key: dev_qILOUpgjqH3hbdxrwstzlnFJD0L14SSdNzGOrKDbtOZFEqRpvJzg7TiggleMHOnz' \ --data-raw '{ "customer_acceptance": null, "setup_future_usage": "off_session", "currency": "USD", "amount": 6500, "authentication_type": "no_three_ds", "customer_id": "cus_1WMNEGiqjuLCQXJL64BK", "capture_method": "automatic", "description": "Joseph First Crypto", "email": "hyperswitch_sdk_demo_id@gmail.com", "profile_id": "pro_iprJnfcIANK2ws8xnWhI", "connector_metadata": { "noon": { "order_category": "applepay" } }, "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } }' ``` 7.list PM for a customer ``` curl --location 'http://localhost:8080/customers/payment_methods?client_secret=pay_Pot19w2IWklIY8Zdci9e_secret_msckr4O1BLNGkOY7EAjQ' \ --header 'Accept: application/json' \ --header 'api-key: pk_dev_0139f3ccb0494e959a4df8ceb8b07fbc' ``` Response ``` { "customer_payment_methods": [ { "payment_token": "token_gaP8kf82RteJe7iNyyzs", "payment_method_id": "pm_wE02Lr7fNXwUGaXQ1BiC", "customer_id": "cus_1WMNEGiqjuLCQXJL64BK", "payment_method": "card", "payment_method_type": "debit", "payment_method_issuer": null, "payment_method_issuer_code": null, "recurring_enabled": true, "installment_payment_enabled": false, "payment_experience": [ "redirect_to_url" ], "card": { "scheme": null, "issuer_country": null, "last4_digits": "4242", "expiry_month": "10", "expiry_year": "50", "card_token": null, "card_holder_name": "morino", "card_fingerprint": null, "nick_name": null, "card_network": null, "card_isin": "424242", "card_issuer": null, "card_type": null, "saved_to_locker": true }, "metadata": null, "created": "2024-12-20T08:06:07.307Z", "bank": null, "surcharge_details": null, "requires_cvv": false, "last_used_at": "2024-12-20T08:06:11.041Z", "default_payment_method_set": true, "billing": { "address": { "city": "New York", "country": "US", "line1": "123 Main Street Apt 4B", "line2": "123 Main Street Apt 4B", "line3": "123 Main Street Apt 4B", "zip": "10001", "state": "New York", "first_name": "morino", "last_name": null }, "phone": null, "email": null } } ], "is_guest_customer": false } ``` 8. paymnet confirm (MIT-PMID) ``` curl --location 'http://localhost:8080/payments/pay_Pot19w2IWklIY8Zdci9e/confirm' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_qILOUpgjqH3hbdxrwstzlnFJD0L14SSdNzGOrKDbtOZFEqRpvJzg7TiggleMHOnz' \ --data '{ "profile_id": "pro_iprJnfcIANK2ws8xnWhI", "amount": 7000, "currency": "USD", "confirm": true, "capture_method": "automatic", "customer_id": "cus_1WMNEGiqjuLCQXJL64BK", "return_url": "https://hyperswitch.io", "recurring_details": { "type": "payment_method_id", "data": "pm_wE02Lr7fNXwUGaXQ1BiC" }, "off_session": true, "billing": { "address": { "first_name": "John", "last_name": "Doe", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US" }, "phone": { "number": "9123456789", "country_code": "+91" } }, "browser_info": { "ip_address": "129.0.0.1", "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "language": "en-US", "color_depth": 32, "screen_height": 1117, "screen_width": 1728, "time_zone": -330, "java_enabled": true, "java_script_enabled": true } }' ``` Response ``` { "payment_id": "pay_Pot19w2IWklIY8Zdci9e", "merchant_id": "postman_merchant_GHAction_1734681965", "status": "succeeded", "amount": 6500, "net_amount": 6500, "shipping_cost": null, "amount_capturable": 0, "amount_received": 6500, "connector": "stripe", "client_secret": "pay_Pot19w2IWklIY8Zdci9e_secret_msckr4O1BLNGkOY7EAjQ", "created": "2024-12-20T08:12:00.298Z", "currency": "USD", "customer_id": "cus_1WMNEGiqjuLCQXJL64BK", "customer": { "id": "cus_1WMNEGiqjuLCQXJL64BK", "name": "John Doe", "email": "hyperswitch_sdk_demo_id@gmail.com", "phone": "999999999", "phone_country_code": "+65" }, "description": "Joseph First Crypto", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "off_session", "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "4242", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "424242", "card_extended_bin": null, "card_exp_month": "10", "card_exp_year": "50", "card_holder_name": "morino", "payment_checks": { "cvc_check": null, "address_line1_check": "pass", "address_postal_code_check": "pass" }, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "John", "last_name": "Doe" }, "phone": { "number": "9123456789", "country_code": "+91" }, "email": null }, "order_details": null, "email": "hyperswitch_sdk_demo_id@gmail.com", "name": "John Doe", "phone": "999999999", "return_url": "https://hyperswitch.io/", "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "debit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": null, "manual_retry_allowed": false, "connector_transaction_id": "pi_3QY1JdEOqOywnAIx1WuFU78T", "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2019-09-10T10:11:12Z", "new_customer": "true" }, "connector_metadata": { "apple_pay": null, "airwallex": null, "noon": { "order_category": "applepay" } }, "feature_metadata": null, "reference_id": "pi_3QY1JdEOqOywnAIx1WuFU78T", "payment_link": null, "profile_id": "pro_iprJnfcIANK2ws8xnWhI", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_K3vxJ0wdLtkya4PMCoCy", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2024-12-20T08:27:00.298Z", "fingerprint": null, "browser_info": { "language": "en-US", "time_zone": -330, "ip_address": "129.0.0.1", "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36", "color_depth": 32, "java_enabled": true, "screen_width": 1728, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 1117, "java_script_enabled": true }, "payment_method_id": "pm_wE02Lr7fNXwUGaXQ1BiC", "payment_method_status": "active", "updated": "2024-12-20T08:12:10.416Z", "split_payments": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null } ``` 9. Payment create ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'Accept-Language: ja' \ --header 'api-key: dev_tPRMqr7DaBlAPnluXjLw4Y7aA3A6ylsrS7ZuTAxPQNwwyr5ocp0NwzYKmPGGPJho' \ --data-raw '{ "customer_acceptance": null, "setup_future_usage": "off_session", "currency": "USD", "amount": 6500, "authentication_type": "no_three_ds", "customer_id": "cus_1WMNEGiqjuLCQXJL64BK", "capture_method": "automatic", "description": "Joseph First Crypto", "email": "hyperswitch_sdk_demo_id@gmail.com", "profile_id": "pro_iprJnfcIANK2ws8xnWhI", "connector_metadata": { "noon": { "order_category": "applepay" } }, "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } }' ``` 10. List payment method for a customer ``` curl --location 'http://localhost:8080/customers/payment_methods?client_secret=pay_URniJoADP0OxGr3uMFB5_secret_N1h6iyWVlCkxbbWS73oQ' \ --header 'Accept: application/json' \ --header 'api-key: pk_dev_b1f42086801d4d08bfd3f504ad818c86' ``` 11.Payment confirm (MIT-token) ``` curl --location 'http://localhost:8080/payments/pay_Pot19w2IWklIY8Zdci9e/confirm' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: pk_dev_b1f42086801d4d08bfd3f504ad818c86' \ --data '{ "client_secret": "_", "profile_id": "pro_iprJnfcIANK2ws8xnWhI", "payment_method": "card", "payment_token": "token_gaP8kf82RteJe7iNyyzs", "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "john", "last_name": "doe" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "john", "last_name": "doe" } }, "browser_info": { "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "language": "en-US", "color_depth": 32, "screen_height": 1117, "screen_width": 1728, "time_zone": -330, "java_enabled": true, "java_script_enabled": true, "ip_address": "127.0.0.1" } }' ``` response ``` { "payment_id": "pay_RjY0jXFE8Xar83PI8Chi", "merchant_id": "postman_merchant_GHAction_1734606213", "status": "succeeded", "amount": 6500, "net_amount": 6500, "shipping_cost": null, "amount_capturable": 0, "amount_received": 6500, "connector": "stripe", "client_secret": "pay_RjY0jXFE8Xar83PI8Chi_secret_mEVWBGUNPRq86unP86by", "created": "2024-12-19T13:42:38.281Z", "currency": "USD", "customer_id": "cus_qvJuiZpsZp0tyO91SzVu", "customer": { "id": "cus_qvJuiZpsZp0tyO91SzVu", "name": "John Doe", "email": "hyperswitch_sdk_demo_id@gmail.com", "phone": "999999999", "phone_country_code": "+65" }, "description": "Joseph First Crypto", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "off_session", "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "4242", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "424242", "card_extended_bin": null, "card_exp_month": "10", "card_exp_year": "50", "card_holder_name": "morino", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": "token_4kowz49reGMiVCsl7RtO", "shipping": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "john", "last_name": "doe" }, "phone": null, "email": null }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "john", "last_name": "doe" }, "phone": null, "email": null }, "order_details": null, "email": "hyperswitch_sdk_demo_id@gmail.com", "name": "John Doe", "phone": "999999999", "return_url": null, "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "debit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": null, "manual_retry_allowed": false, "connector_transaction_id": "pi_3QXk01EOqOywnAIx15jAcdAC", "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2019-09-10T10:11:12Z", "new_customer": "true" }, "connector_metadata": { "apple_pay": null, "airwallex": null, "noon": { "order_category": "applepay" } }, "feature_metadata": null, "reference_id": "pi_3QXk01EOqOywnAIx15jAcdAC", "payment_link": null, "profile_id": "pro_keF9gI6O2yVuvWUaqQNW", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_p2LE8wJaSteDl2w5GUx7", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2024-12-19T13:57:38.281Z", "fingerprint": null, "browser_info": { "language": "en-US", "time_zone": -330, "ip_address": "127.0.0.1", "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36", "color_depth": 32, "java_enabled": true, "screen_width": 1728, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 1117, "java_script_enabled": true }, "payment_method_id": "pm_lkBZNj9fkhdg8DunXWUn", "payment_method_status": "active", "updated": "2024-12-19T13:42:46.314Z", "split_payments": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null } ``` Adyen cypress test 1. Connector Agnostic NTID <img width="670" alt="image" src="https://github.com/user-attachments/assets/daeb4ede-a4fe-4a64-8e62-638349347dec" /> 2. Save card flow <img width="643" alt="image" src="https://github.com/user-attachments/assets/63b1e32d-d82a-4ab1-ba71-e0755f55d953" /> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Core Business Logic** - `crates/router/src/core/payments/transformers.rs` **2. External Connector Integration** - `crates/router/src/connector/stripe/transformers.rs` **Code Patterns Applied:** - Extend existing types with new fields (3 changes) **Detailed Identifier Changes:** Commit 9f2ce05b: Files to modify: **crates/router/src/connector/stripe/transformers.rs** Modify existing code **crates/router/src/core/payments/transformers.rs** Modify existing code
{"pr_number": 6899, "pr_title": "fix(connector): [STRIPE] fix stripe mandate", "merged_at": "2024-12-20T10:59:46Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"core_business": ["crates/router/src/core/payments/transformers.rs"], "connectors": ["crates/router/src/connector/stripe/transformers.rs"]}, "change_types": {"fields_added": 3}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat: scheme error code and messages in payments api response ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description This PR introduces - - Core functionality to read and store raw acquirer responses for `payment` and `refund` operations. - Read raw acquirer response from connector integration - Store in `PaymentAttempt` and `Refund` tables - Updates Adyen connector integration to read raw acquirer response. - Exposes these fields in `/payments` and `/refunds` API response. Described in #7467 ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context Helps HS consumer look at issuer specific error responses - these can be enabled on demand from connector's end. ## How did you test it? Not possible to test raw acquirer codes in connector sandbox env. Can only be enabled and tested in production. ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/payments.rs` - `crates/api_models/src/refunds.rs` **2. Database Layer (Queries & Schema)** - `crates/diesel_models/src/payment_attempt.rs` - `crates/diesel_models/src/refund.rs` - `crates/diesel_models/src/schema.rs` **3. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/errors/api_error_response.rs` - `crates/hyperswitch_domain_models/src/payments/payment_attempt.rs` - `crates/hyperswitch_domain_models/src/router_data.rs` **4. Core Business Logic** - `crates/router/src/core/payments/access_token.rs` - `crates/router/src/core/payments/operations/payment_response.rs` - `crates/router/src/core/payments/retry.rs` - ... and 3 more files **5. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/aci.rs` - `crates/hyperswitch_connectors/src/connectors/adyen.rs` - `crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs` - ... and 134 more files **6. Utils** - `crates/router/src/utils.rs` **7. Tests** - `crates/router/tests/payments.rs` - `crates/router/tests/payments2.rs` **8. Other** - `api-reference-v2/openapi_spec.json` - `api-reference/openapi_spec.json` - `crates/hyperswitch_interfaces/src/api.rs` - ... and 8 more files **Code Patterns Applied:** - Extend existing types with new fields (792 changes) **Detailed Identifier Changes:** Commit c702535e: Files to modify: **crates/api_models/src/payments.rs** Modify existing code **crates/api_models/src/refunds.rs** Modify existing code **crates/diesel_models/src/payment_attempt.rs** Modify existing code **crates/diesel_models/src/refund.rs** Modify existing code **crates/diesel_models/src/schema.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/airwallex.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/amazonpay.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/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/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/cashtocode.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/cashtocode/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/chargebee.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/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/elavon/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/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/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/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/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/multisafepay/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/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/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/payme.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/payme/transformers.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/payu.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/placetopay.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/razorpay/transformers.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/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/stripebilling.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/taxjar.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/thunes.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/tsys/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/unified_authentication_service.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/worldpay.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/worldpay/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/utils.rs** Modify existing code **crates/hyperswitch_domain_models/src/errors/api_error_response.rs** Modify existing code **crates/hyperswitch_domain_models/src/payments/payment_attempt.rs** Modify existing code **crates/hyperswitch_domain_models/src/router_data.rs** Modify existing code **crates/hyperswitch_interfaces/src/api.rs** Modify existing code **crates/hyperswitch_interfaces/src/connector_integration_v2.rs** Modify existing code **crates/router/src/connector/adyenplatform.rs** Modify existing code **crates/router/src/connector/dummyconnector.rs** Modify existing code **crates/router/src/connector/ebanx.rs** Modify existing code **crates/router/src/connector/gpayments.rs** Modify existing code **crates/router/src/connector/netcetera.rs** Modify existing code **crates/router/src/connector/netcetera/transformers.rs** Modify existing code **crates/router/src/connector/nmi.rs** Modify existing code **crates/router/src/connector/nmi/transformers.rs** Modify existing code **crates/router/src/connector/payone.rs** Modify existing code **crates/router/src/connector/plaid.rs** Modify existing code **crates/router/src/connector/plaid/transformers.rs** Modify existing code **crates/router/src/connector/riskified.rs** Modify existing code **crates/router/src/connector/signifyd.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/threedsecureio.rs** Modify existing code **crates/router/src/connector/threedsecureio/transformers.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/connector/wise.rs** Modify existing code **crates/router/src/core/payments/access_token.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/transformers.rs** Modify existing code **crates/router/src/core/payouts/access_token.rs** Modify existing code **crates/router/src/core/refunds.rs** Modify existing code **crates/router/src/db/refund.rs** Modify existing code **crates/router/src/services/api.rs** Modify existing code **crates/router/src/utils.rs** Modify existing code **crates/router/src/workflows/payment_sync.rs** Modify existing code **crates/router/tests/payments.rs** Modify existing code **crates/router/tests/payments2.rs** Modify existing code **crates/storage_impl/src/mock_db/payment_attempt.rs** Modify existing code **crates/storage_impl/src/payments/payment_attempt.rs** Modify existing code
{"pr_number": 7528, "pr_title": "feat: scheme error code and messages in payments api response", "merged_at": "2025-03-17T15:03:23Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "refund", "connector"]}, "hierarchy": {"api_models": ["crates/api_models/src/payments.rs", "crates/api_models/src/refunds.rs"], "database": ["crates/diesel_models/src/payment_attempt.rs", "crates/diesel_models/src/refund.rs", "crates/diesel_models/src/schema.rs"], "domain": ["crates/hyperswitch_domain_models/src/errors/api_error_response.rs", "crates/hyperswitch_domain_models/src/payments/payment_attempt.rs", "crates/hyperswitch_domain_models/src/router_data.rs"], "core_business": ["crates/router/src/core/payments/access_token.rs", "crates/router/src/core/payments/operations/payment_response.rs", "crates/router/src/core/payments/retry.rs", "crates/router/src/core/payments/transformers.rs", "crates/router/src/core/payouts/access_token.rs", "crates/router/src/core/refunds.rs"], "connectors": ["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/airwallex.rs", "crates/hyperswitch_connectors/src/connectors/amazonpay.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/billwerk.rs", "crates/hyperswitch_connectors/src/connectors/billwerk/transformers.rs", "crates/hyperswitch_connectors/src/connectors/bitpay.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/cashtocode.rs", "crates/hyperswitch_connectors/src/connectors/cashtocode/transformers.rs", "crates/hyperswitch_connectors/src/connectors/chargebee.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/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/elavon/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/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/helcim.rs", "crates/hyperswitch_connectors/src/connectors/hipay.rs", "crates/hyperswitch_connectors/src/connectors/hipay/transformers.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/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/multisafepay/transformers.rs", "crates/hyperswitch_connectors/src/connectors/nexinets.rs", "crates/hyperswitch_connectors/src/connectors/nexixpay.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/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/payme.rs", "crates/hyperswitch_connectors/src/connectors/payme/transformers.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/payu.rs", "crates/hyperswitch_connectors/src/connectors/placetopay.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/razorpay/transformers.rs", "crates/hyperswitch_connectors/src/connectors/recurly.rs", "crates/hyperswitch_connectors/src/connectors/redsys.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/stripebilling.rs", "crates/hyperswitch_connectors/src/connectors/taxjar.rs", "crates/hyperswitch_connectors/src/connectors/thunes.rs", "crates/hyperswitch_connectors/src/connectors/trustpay.rs", "crates/hyperswitch_connectors/src/connectors/trustpay/transformers.rs", "crates/hyperswitch_connectors/src/connectors/tsys/transformers.rs", "crates/hyperswitch_connectors/src/connectors/unified_authentication_service.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/worldpay.rs", "crates/hyperswitch_connectors/src/connectors/worldpay/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/utils.rs", "crates/hyperswitch_interfaces/src/connector_integration_v2.rs", "crates/router/src/connector/adyenplatform.rs", "crates/router/src/connector/dummyconnector.rs", "crates/router/src/connector/ebanx.rs", "crates/router/src/connector/gpayments.rs", "crates/router/src/connector/netcetera.rs", "crates/router/src/connector/netcetera/transformers.rs", "crates/router/src/connector/nmi.rs", "crates/router/src/connector/nmi/transformers.rs", "crates/router/src/connector/payone.rs", "crates/router/src/connector/plaid.rs", "crates/router/src/connector/plaid/transformers.rs", "crates/router/src/connector/riskified.rs", "crates/router/src/connector/signifyd.rs", "crates/router/src/connector/stripe.rs", "crates/router/src/connector/stripe/transformers.rs", "crates/router/src/connector/threedsecureio.rs", "crates/router/src/connector/threedsecureio/transformers.rs", "crates/router/src/connector/utils.rs", "crates/router/src/connector/wellsfargopayout.rs", "crates/router/src/connector/wise.rs"], "utils": ["crates/router/src/utils.rs"], "tests": ["crates/router/tests/payments.rs", "crates/router/tests/payments2.rs"], "other": ["api-reference-v2/openapi_spec.json", "api-reference/openapi_spec.json", "crates/hyperswitch_interfaces/src/api.rs", "crates/router/src/db/refund.rs", "crates/router/src/services/api.rs", "crates/router/src/workflows/payment_sync.rs", "crates/storage_impl/src/mock_db/payment_attempt.rs", "crates/storage_impl/src/payments/payment_attempt.rs", "migrations/2025-03-10-060950_add_issuer_code_and_message_in_payment_attempt/down.sql", "migrations/2025-03-10-060950_add_issuer_code_and_message_in_payment_attempt/up.sql", "v2_migrations/2025-01-13-081847_drop_v1_columns/up.sql"]}, "change_types": {"fields_added": 792}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(metadata): fix nordea metadata again ## 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 --> fixes connector metadata, again. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> /crates/connector_configs/toml/sandbox.toml /crates/connector_configs/toml/development.toml /crates/connector_configs/toml/production.toml ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> some of the things that were to be working did not work as expected which is why this pr had to be raised. should close https://github.com/juspay/hyperswitch/issues/8957 ## How did you test 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="617" height="744" alt="image" src="https://github.com/user-attachments/assets/c7a57cee-d41f-46cc-9263-621b7b6e83e9" /> ## 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`
{"pr_number": 9126, "pr_title": "fix(metadata): fix nordea metadata again", "merged_at": "2025-09-02T11:21:47Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user", "connector"]}, "hierarchy": {"connectors": ["crates/connector_configs/toml/development.toml", "crates/connector_configs/toml/production.toml", "crates/connector_configs/toml/sandbox.toml"]}, "change_types": {}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
feat(refunds_v2): Add refund create 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 is a part of v2 implementation of refunds. This PR contains refunds create core flow, i.e we can be able to create refunds for payments in v2. **Important** We are moving `refunds/transformers.rs` and `refunds/validator.rs` to a separate location because of accessibility to both v1 and v2 refund code. ### Additional Changes - [x] This PR modifies the API contract - [x] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> Merging this PR would add support for creating refunds for payments 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)? --> - Create Payment Intent api call ``` curl --location 'http://localhost:8080/v2/payments/create-intent' \ --header 'api-key: xyz' \ --header 'Content-Type: application/json' \ --header 'x-profile-id: pro_' \ --header 'Authorization: api-key=xyz' \ --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 ```json { "id": "12345_pay_0195d13dd6497c12a3b187039fc4b71e", "status": "requires_payment_method", "amount_details": { "order_amount": 100, "currency": "USD", "shipping_cost": null, "order_tax_amount": null, "external_tax_calculation": "skip", "surcharge_calculation": "skip", "surcharge_amount": null, "tax_on_surcharge": null }, "client_secret": "12345_pay_0195d13dd6497c12a3b187039fc4b71e_secret_0195d13dd6547a938bfe7b97b36203a5", "profile_id": "pro_TujgCYCsvWvO6YNsRAmC", "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-03-26T07:12:25.588Z", "frm_metadata": null, "request_external_three_ds_authentication": "Skip" } ``` - Confirm Intent API call ``` curl --location 'http://localhost:8080/v2/payments/12345_pay_0195d13dd6497c12a3b187039fc4b71e/confirm-intent' \ --header 'x-client-secret: 12345_pay_0195d13dd6497c12a3b187039fc4b71e_secret_0195d13dd6547a938bfe7b97b36203a5' \ --header 'x-profile-id: pro_TujgCYCsvWvO6YNsRAmC' \ --header 'Content-Type: application/json' \ --header 'Authorization: publishable-key=pk_dev_58559cdf90434adcb0b92eeb6a8b633f,client-secret=12345_pay_0195d13dd6497c12a3b187039fc4b71e_secret_0195d13dd6547a938bfe7b97b36203a5' \ --data '{ "payment_method_data": { "card": { "card_number": "4242424242424242", "card_exp_month": "09", "card_exp_year": "25", "card_holder_name": "John Doe", "card_cvc": "100" } }, "payment_method_type": "card", "payment_method_subtype": "credit" }' ``` - Response from the above call ```json { "id": "12345_pay_0195d13dd6497c12a3b187039fc4b71e", "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", "client_secret": "12345_pay_0195d13dd6497c12a3b187039fc4b71e_secret_0195d13dd6547a938bfe7b97b36203a5", "created": "2025-03-26T06:57:25.588Z", "payment_method_data": { "billing": null }, "payment_method_type": "card", "payment_method_subtype": "credit", "connector_transaction_id": "pi_3R6ntzD5R7gDAGff0MYUxZFn", "connector_reference_id": null, "merchant_connector_id": "mca_FhEKUEAUdgv7mVCs3A9U", "browser_info": null, "error": null, "shipping": null, "billing": null, "attempts": null, "connector_token_details": { "token": "pm_1R6ntzD5R7gDAGff07DogD0c", "connector_token_request_reference_id": "oMf8ppmFul0oTqI6Zl" }, "payment_method_id": null, "next_action": null, "return_url": "https://google.com/success", "authentication_type": "no_three_ds", "authentication_type_applied": "no_three_ds" } ``` - Create refund for a successful payment ``` curl --location 'http://localhost:8080/v2/refunds' \ --header 'X-Profile-Id: pro_TujgCYCsvWvO6YNsRAmC' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_kksGlKY14xNypCzsrJIXFCzL3t2j5kUs7ChmloPryJsdRy2RWYljonzPCxJSDmuZ' \ --data '{ "payment_id":"12345_pay_0195d13dd6497c12a3b187039fc4b71e", "merchant_reference_id":"1742972385", "reason":"Paid by mistake", "metadata":{ "foo":"bar" } }' ``` - Response from the above call ```json { "id": "12345_ref_0195d13dfedb7790bc1a84be825e64d5", "payment_id": "12345_pay_0195d13dd6497c12a3b187039fc4b71e", "merchant_reference_id": "1742972256", "amount": 100, "currency": "USD", "status": "succeeded", "reason": "Paid by mistake", "metadata": { "foo": "bar" }, "error_details": { "code": "", "message": "" }, "created_at": "2025-03-26T06:57:35.993Z", "updated_at": "2025-03-26T06:57:36.981Z", "connector": "stripe", "profile_id": "pro_TujgCYCsvWvO6YNsRAmC", "merchant_connector_id": "mca_FhEKUEAUdgv7mVCs3A9U", "connector_refund_reference_id": "12345_ref_0195d13dfedb7790bc1a84be825e64d5" } ``` - Trying the same refund again will give us this response ```json {"error":{"type":"invalid_request","message":"The refund amount exceeds the amount captured","code":"IR_13"}} ``` - What if the payment was failed and we try to refund it. (Invalid card number in confirm intent call) ``` curl --location 'http://localhost:8080/v2/payments/12345_pay_0195d142100474c3bcb32e40935e290d/confirm-intent' \ --header 'x-client-secret: 12345_pay_0195d142100474c3bcb32e40935e290d_secret_0195d14210127d30b524ec0e063b3c0a' \ --header 'x-profile-id: pro_TujgCYCsvWvO6YNsRAmC' \ --header 'Content-Type: application/json' \ --header 'Authorization: publishable-key=pk_dev_58559cdf90434adcb0b92eeb6a8b633f,client-secret=12345_pay_0195d142100474c3bcb32e40935e290d_secret_0195d14210127d30b524ec0e063b3c0a' \ --data '{ "payment_method_data": { "card": { "card_number": "4242424242424242", "card_exp_month": "01", "card_exp_year": "25", "card_holder_name": "John Doe", "card_cvc": "100" } }, "payment_method_type": "card", "payment_method_subtype": "credit" }' ``` - Response from the above call ```json { "id": "12345_pay_0195d142100474c3bcb32e40935e290d", "status": "failed", "amount": { "order_amount": 100, "currency": "USD", "shipping_cost": null, "order_tax_amount": null, "external_tax_calculation": "skip", "surcharge_calculation": "skip", "surcharge_amount": null, "tax_on_surcharge": null, "net_amount": 100, "amount_to_capture": null, "amount_capturable": 0, "amount_captured": null }, "customer_id": null, "connector": "stripe", "client_secret": "12345_pay_0195d142100474c3bcb32e40935e290d_secret_0195d14210127d30b524ec0e063b3c0a", "created": "2025-03-26T07:02:02.514Z", "payment_method_data": { "billing": null }, "payment_method_type": "card", "payment_method_subtype": "credit", "connector_transaction_id": null, "connector_reference_id": null, "merchant_connector_id": "mca_FhEKUEAUdgv7mVCs3A9U", "browser_info": null, "error": { "code": "invalid_expiry_month", "message": "invalid_expiry_month", "unified_code": null, "unified_message": null }, "shipping": null, "billing": null, "attempts": null, "connector_token_details": null, "payment_method_id": null, "next_action": null, "return_url": "https://google.com/success", "authentication_type": "no_three_ds", "authentication_type_applied": "no_three_ds" } ``` - Trying to refund failed payment ``` curl --location 'http://localhost:8080/v2/refunds' \ --header 'X-Profile-Id: pro_TujgCYCsvWvO6YNsRAmC' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_kksGlKY14xNypCzsrJIXFCzL3t2j5kUs7ChmloPryJsdRy2RWYljonzPCxJSDmuZ' \ --data '{ "payment_id":"12345_pay_0195d142100474c3bcb32e40935e290d", "merchant_reference_id":"1742972638", "reason":"Paid by mistake", "metadata":{ "foo":"bar" } }' ``` - Response from the above call ```json { "error": { "type": "invalid_request", "message": "This Payment could not be refund because it has a status of failed. The expected state is succeeded, partially_captured", "code": "IR_14" } } ``` Error case responses - Connector NotImplemented Error (501) ``` { "error": { "type": "invalid_request", "message": "get_url method is not implemented", "code": "IR_00" } } ``` - Connector NotSupported Error (400) ``` { "error": { "type": "invalid_request", "message": "Payment method type not supported", "code": "IR_19", "reason": "Refund is not supported by Stripe" } } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/Cargo.toml` - `crates/api_models/src/events/refund.rs` - `crates/api_models/src/refunds.rs` **2. Database Layer (Queries & Schema)** - `crates/diesel_models/src/query/payment_attempt.rs` - `crates/diesel_models/src/query/refund.rs` - `crates/diesel_models/src/refund.rs` **3. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/payments.rs` - `crates/hyperswitch_domain_models/src/payments/payment_attempt.rs` **4. Core Business Logic** - `crates/router/src/core.rs` - `crates/router/src/core/refunds.rs` - `crates/router/src/core/refunds_v2.rs` - ... and 3 more files **5. Type Definitions** - `crates/common_utils/src/types.rs` - `crates/router/src/types/api/refunds.rs` **6. Configuration Files** - `crates/openapi/Cargo.toml` - `crates/router/Cargo.toml` **7. Other** - `api-reference-v2/openapi_spec.json` - `crates/openapi/src/openapi_v2.rs` - `crates/router/src/db/kafka_store.rs` - ... and 7 more files **Code Patterns Applied:** - Define new data structures (1 changes) - Implement new functions (36 changes) - Extend existing types with new fields (272 changes) - Add conditional logic for feature flags or filtering (3 changes) - Modify database queries (5 changes) **Detailed Identifier Changes:** Commit eabef328: Files to modify: **crates/api_models/src/events/refund.rs** Add: - function: private::get_api_event_type - impl: impl ApiEventMetric for RefundsCreateRequest **crates/api_models/src/refunds.rs** Add: - enum: pub::RefundType **crates/common_utils/src/types.rs** Add: - function: pub::extract_hashed_data **crates/diesel_models/src/query/payment_attempt.rs** Add: - function: pub::find_last_successful_or_partially_captured_attempt_by_payment_id **crates/diesel_models/src/query/refund.rs** Add: - function: pub::find_by_merchant_id_connector_transaction_id **crates/diesel_models/src/refund.rs** Add: - function: pub::build_error_update_for_unified_error_and_message - function: pub::build_error_update_for_integrity_check_failure - function: pub::build_refund_update - struct: pub::RefundCoreWorkflow **crates/hyperswitch_domain_models/src/payments.rs** Add: - function: pub::get_optional_customer_id - function: pub::get_optional_connector_metadata **crates/hyperswitch_domain_models/src/payments/payment_attempt.rs** Modify existing code **crates/openapi/src/openapi_v2.rs** Modify existing code **crates/router/src/core.rs** Add: - mod: pub::refunds_v2 **crates/router/src/core/refunds.rs** Remove: - mod: pub::transformers - mod: pub::validator **crates/router/src/core/refunds_v2.rs** Add: - function: pub::refund_create_core - function: pub::trigger_refund_to_gateway - function: private::call_connector_service - function: private::get_refund_update_object - function: private::get_connector_implementation_error_refund_update - function: private::get_connector_error_refund_update - function: private::get_unified_error_and_message - function: pub::get_refund_update_for_refund_response_data - function: pub::perform_integrity_check - function: private::foreign_from - function: pub::check_refund_integrity - function: pub::validate_and_create_refund - function: private::foreign_try_from - function: pub::schedule_refund_execution - function: pub::refund_to_refund_core_workflow_model - function: pub::add_refund_execute_task - function: pub::add_refund_sync_task - impl: impl ForeignFrom<(&errors::ConnectorError, enums::MerchantStorageScheme)> for Option<storage::RefundUpdate> - impl: impl ForeignTryFrom<storage::Refund> for api::RefundResponse **crates/router/src/core/utils.rs** Add: - mod: pub::refunds_transformers - mod: pub::refunds_validator **crates/router/src/db/kafka_store.rs** Add: - function: private::find_payment_attempt_last_successful_or_partially_captured_attempt_by_payment_id **crates/router/src/db/refund.rs** Add: - function: private::find_refund_by_merchant_id_connector_transaction_id **crates/router/src/lib.rs** Modify existing code **crates/router/src/routes.rs** Modify existing code **crates/router/src/routes/app.rs** Add: - function: pub::server - impl: impl Refunds **crates/router/src/routes/refunds.rs** Add: - function: pub::refunds_create **crates/router/src/types/api/refunds.rs** Modify existing code **crates/storage_impl/src/mock_db/payment_attempt.rs** Add: - function: private::find_payment_attempt_last_successful_or_partially_captured_attempt_by_payment_id **crates/storage_impl/src/payments/payment_attempt.rs** Add: - function: private::find_payment_attempt_last_successful_or_partially_captured_attempt_by_payment_id - function: private::find_payment_attempt_last_successful_or_partially_captured_attempt_by_payment_id
{"pr_number": 7619, "pr_title": "feat(refunds_v2): Add refund create core flow", "merged_at": "2025-04-21T09:19:22Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/Cargo.toml", "crates/api_models/src/events/refund.rs", "crates/api_models/src/refunds.rs"], "database": ["crates/diesel_models/src/query/payment_attempt.rs", "crates/diesel_models/src/query/refund.rs", "crates/diesel_models/src/refund.rs"], "domain": ["crates/hyperswitch_domain_models/src/payments.rs", "crates/hyperswitch_domain_models/src/payments/payment_attempt.rs"], "core_business": ["crates/router/src/core.rs", "crates/router/src/core/refunds.rs", "crates/router/src/core/refunds_v2.rs", "crates/router/src/core/utils.rs", "crates/router/src/core/refunds/transformers.rs", "crates/router/src/core/refunds/validator.rs"], "types": ["crates/common_utils/src/types.rs", "crates/router/src/types/api/refunds.rs"], "config": ["crates/openapi/Cargo.toml", "crates/router/Cargo.toml"], "other": ["api-reference-v2/openapi_spec.json", "crates/openapi/src/openapi_v2.rs", "crates/router/src/db/kafka_store.rs", "crates/router/src/db/refund.rs", "crates/router/src/lib.rs", "crates/router/src/routes.rs", "crates/router/src/routes/app.rs", "crates/router/src/routes/refunds.rs", "crates/storage_impl/src/mock_db/payment_attempt.rs", "crates/storage_impl/src/payments/payment_attempt.rs"]}, "change_types": {"structs_added": 1, "functions_added": 36, "enums_added": 1, "fields_added": 272, "imports_added": 17, "conditionals_added": 3, "database_queries": 5}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(connector): [Nexixpay] handle error code and message in failure 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 --> Nexixpay does not send error_code and error_message in case of failure responses. We will store NO_ERROR_CODE and nexixpay operation result as error_message in this case in our DB. This is sent in outgoing webhooks to the merchants. Possible values of error messages: 1. Declined 2. DeniedByRisk 3. ThreedsFailed 4. Failed ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> Currently error_code and error_message goes null in case of webhooks to merchants for nexixpay. We need to pass NO_ERROR_CODE and nexixpay operation result as error_message as connector doesn't sends us any message or code. ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Curls to test: ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_nRAnqXGtbt60CdOO7rfovzh4MdEAIiaqnWc78AdQIx4yWnDXIKetpkjGFOvwFPcb' \ --data-raw '{ "amount": 3596, "currency": "EUR", "amount_to_capture": 3596, "return_url": "https://google.com", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4742158750987704", "card_exp_month": "12", "card_exp_year": "30", "card_holder_name": "joseph Doe", "card_cvc": "861" } }, "confirm": true, "profile_id": "pro_PBNVTjuDfM7y2MyljTkG", "capture_method": "manual", "capture_on": "2022-09-10T10:11:12Z", "authentication_type": "three_ds", "setup_future_usage": "off_session", "customer": { "id": "customer123", "name": "John Doe", "email": "customer@gmail.com", "phone": "9999999999", "phone_country_code": "+1" }, "customer_id": "customer123", "phone_country_code": "+1", "description": "Its my first payment request", "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" }, "shipping": { "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" }, "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 }' ``` Webhook for failed payment via nexixpay: ``` { "merchant_id": "merchant_1743678217", "event_id": "evt_0195fbf468957b539666947e6762e0af", "event_type": "payment_failed", "content": { "type": "payment_details", "object": { "payment_id": "pay_LOrSTDvs2fs1rntR8Bv7", "merchant_id": "merchant_1743678217", "status": "failed", "amount": 3596, "net_amount": 3596, "shipping_cost": null, "amount_capturable": 3596, "amount_received": null, "connector": "nexixpay", "client_secret": "pay_LOrSTDvs2fs1rntR8Bv7_secret_ZAC52wYDhKokuUvZjKws", "created": "2025-04-03T14:00:35.887Z", "currency": "EUR", "customer_id": "customer123", "customer": { "id": "customer123", "name": "John Doe", "email": "customer@gmail.com", "phone": "9999999999", "phone_country_code": "+1" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "off_session", "off_session": null, "capture_on": null, "capture_method": "manual", "payment_method": "card", "payment_method_data": { "card": { "last4": "7704", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "474215", "card_extended_bin": null, "card_exp_month": "12", "card_exp_year": "30", "card_holder_name": "joseph Doe", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": "token_r5dkurdxxncdiAxecZp2", "shipping": { "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" }, "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": [ { "brand": null, "amount": 3545, "category": null, "quantity": 1, "tax_rate": null, "product_id": null, "product_name": "Apple iphone 15", "product_type": null, "sub_category": null, "product_img_link": null, "product_tax_code": null, "total_tax_amount": null, "requires_shipping": null } ], "email": "customer@gmail.com", "name": "John Doe", "phone": "9999999999", "return_url": "https://google.com/", "authentication_type": "three_ds", "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "next_action": null, "cancellation_reason": null, "error_code": "No error code", "error_message": "ThreedsFailed", "unified_code": "UE_9000", "unified_message": "Something went wrong", "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": null, "manual_retry_allowed": true, "connector_transaction_id": "pay_LOrSTDvs2fs1rntR8Bv7_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_LOrSTDvs2fs1rntR8Bv7_1", "payment_link": null, "profile_id": "pro_9rN5ntPWxQFSDMxRHEZ5", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_bB3eKYzBDOgKte0bcmKl", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-04-03T14:15:35.887Z", "fingerprint": null, "browser_info": { "language": "nl-NL", "time_zone": 0, "ip_address": "128.0.0.1", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "color_depth": 24, "java_enabled": true, "screen_width": 1536, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 723, "java_script_enabled": true }, "payment_method_id": "pm_stzSPzwuoRaFMpPpYb9r", "payment_method_status": "inactive", "updated": "2025-04-03T14:00:53.638Z", "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": "6Hj8lx8blnGI3EMXRX", "card_discovery": "manual", "issuer_error_code": null, "issuer_error_message": null } }, "timestamp": "2025-04-03T14:00:53.654Z" } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/nexixpay/transformers.rs` **Code Patterns Applied:** - Implement new functions (1 changes) - Extend existing types with new fields (80 changes) **Detailed Identifier Changes:** Commit f532b70a: Files to modify: **crates/hyperswitch_connectors/src/connectors/nexixpay/transformers.rs** Add: - function: pub::get_error_response
{"pr_number": 7713, "pr_title": "fix(connector): [Nexixpay] handle error code and message in failure response", "merged_at": "2025-04-04T13:26:49Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/nexixpay/transformers.rs"]}, "change_types": {"functions_added": 1, "fields_added": 80, "imports_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
chore: update the docker for wasm ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [x] Dependency updates - [ ] Documentation - [x] CI/CD ## Description <!-- Describe your changes in detail --> This pull request updates the `docker/wasm-build.Dockerfile` to enhance the build process for WebAssembly (WASM) artifacts. The changes include adding a new dependency (`wasm-opt`) for optimizing WASM files, restructuring the build steps, and improving the overall build pipeline. ### Enhancements to the build process: * Added installation of `wasm-opt` from the Binaryen project to optimize WASM files, including downloading and extracting the necessary binary. (`[docker/wasm-build.DockerfileR6-R38](diffhunk://#diff-fb12383a7990a9ddcc02f154350ee49182ff5603809b9c7d2a90bbbd575b70c3R6-R38)`) * Refactored the `wasm-pack` build step to include optimization with `wasm-opt` after the build process. (`[docker/wasm-build.DockerfileR6-R38](diffhunk://#diff-fb12383a7990a9ddcc02f154350ee49182ff5603809b9c7d2a90bbbd575b70c3R6-R38)`) ### Code cleanup and restructuring: * Consolidated the `wasm-pack` build command into a single `RUN` statement for better readability and maintainability. (`[docker/wasm-build.DockerfileR6-R38](diffhunk://#diff-fb12383a7990a9ddcc02f154350ee49182ff5603809b9c7d2a90bbbd575b70c3R6-R38)`) * Removed redundant comments and unused environment variables to streamline the Dockerfile. (`[docker/wasm-build.DockerfileR6-R38](diffhunk://#diff-fb12383a7990a9ddcc02f154350ee49182ff5603809b9c7d2a90bbbd575b70c3R6-R38)`) ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Configuration Files** - `crates/euclid_wasm/Cargo.toml` **2. Other** - `docker/wasm-build.Dockerfile`
{"pr_number": 8080, "pr_title": "chore: update the docker for wasm", "merged_at": "2025-05-26T07:57:18Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"config": ["crates/euclid_wasm/Cargo.toml"], "other": ["docker/wasm-build.Dockerfile"]}, "change_types": {}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
docs: add new logos for README and API reference ## 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 --> ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with 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 #6782 ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Other** - `api-reference-v2/logo/dark.svg` - `api-reference-v2/logo/light.svg` - `api-reference/logo/dark.svg` - ... and 3 more files
{"pr_number": 6783, "pr_title": "docs: add new logos for README and API reference", "merged_at": "2024-12-10T11:57:39Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"other": ["api-reference-v2/logo/dark.svg", "api-reference-v2/logo/light.svg", "api-reference/logo/dark.svg", "api-reference/logo/light.svg", "docs/imgs/hyperswitch-logo-dark.svg", "docs/imgs/hyperswitch-logo-light.svg"]}, "change_types": {}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
fix: Map attempt_status_unspecified to None instead of Unresolved for HS<>UCS ErrorResponse ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> In UCS when we get None as attempt status we map it to `payments_grpc::PaymentStatus::AttemptStatusUnspecified`. In payments via Unified Connector Service path, when for error responses it returned `attempt_status_unspecified`, it was being mapped to `AttemptStatus::Unresolved` instead of `None`. This prevented the proper failure handling logic from executing, causing payments that should fail to not return the expected failure status. FIX: - Changed the mapping of `payments_grpc::PaymentStatus::AttemptStatusUnspecified` from `Ok(Self::Unresolved)` to `Ok(None)` in case of Errorresponse. - Wrapped Attemptstatus in Ok response and router_data.status is updated in case of Ok response only. - Allows proper failure logic to execute instead of forcing payments to Unresolved state ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context In UCS when we get None as attempt status we map it to `payments_grpc::PaymentStatus::AttemptStatusUnspecified`. In payments via Unified Connector Service path, when for error responses it returned `attempt_status_unspecified`, it was being mapped to `AttemptStatus::Unresolved` instead of `None`. This prevented the proper failure handling logic from executing, causing payments that should fail to not return the expected failure status. <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with 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? Make a payment via UCS for cashtocode which should fail.(Wrong currency/pmt combination EUR+Evoucher) Request ```json { "amount": 1000, "currency": "EUR", "confirm": true, "payment_method_data": "reward", "payment_method_type": "evoucher", "payment_method":"reward", "capture_method": "automatic", "browser_info": { "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.1.2 Safari/605.1.15", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "language": "en-US", "color_depth": 24, "screen_height": 1117, "screen_width": 1728, "time_zone": -330, "java_enabled": true, "java_script_enabled": true }, "customer_id": "cus_5ZiQdWmdv9efuLCPWeoN", "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+1", "description": "Its my first payment request", "authentication_type": "no_three_ds", "return_url": "https://www.google.com", "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "sundari" }, "phone": { "number": "1233456789", "country_code": "+1" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "sundari" }, "phone": { "number": "1233456789", "country_code": "+1" } } } ``` Response ```json { "payment_id": "pay_eOOvKUOzk8dfmIILn2kg", "merchant_id": "merchant_1758217838", "status": "failed", "amount": 1000, "net_amount": 1000, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": "cashtocode", "client_secret": "pay_eOOvKUOzk8dfmIILn2kg_secret_25bCUExuNbcQIyhhU6j2", "created": "2025-09-22T17:14:03.089Z", "currency": "USD", "customer_id": "cus_5ZiQdWmdv9efuLCPWeoN", "customer": { "id": "cus_5ZiQdWmdv9efuLCPWeoN", "name": "John Doe", "email": "guest@example.com", "phone": "999999999", "phone_country_code": "+1" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "reward", "payment_method_data": "reward", "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "sundari", "last_name": null, "origin_zip": null }, "phone": { "number": "1233456789", "country_code": "+1" }, "email": null }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "sundari", "last_name": null, "origin_zip": null }, "phone": { "number": "1233456789", "country_code": "+1" }, "email": null }, "order_details": null, "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "return_url": "https://www.google.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": "\"bad_request\"", "error_message": "Validation errors occured while creating/updating paytoken", "unified_code": "UE_9000", "unified_message": "Something went wrong", "payment_experience": null, "payment_method_type": "evoucher", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "cus_5ZiQdWmdv9efuLCPWeoN", "created_at": 1758561243, "expires": 1758564843, "secret": "epk_1fcce0a1fa2f403f9a63b9e03e153e33" }, "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": "unified_connector_service" }, "reference_id": null, "payment_link": null, "profile_id": "pro_kOI1WKKcE3imNaYJENz3", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_tjMqk5r3abjCMBxp7WAy", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-22T17:29:03.089Z", "fingerprint": null, "browser_info": { "language": "en-US", "time_zone": -330, "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.1.2 Safari/605.1.15", "color_depth": 24, "java_enabled": true, "screen_width": 1728, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 1117, "java_script_enabled": true }, "payment_channel": null, "payment_method_id": null, "network_transaction_id": null, "payment_method_status": null, "updated": "2025-09-22T17:14:04.092Z", "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": "{\"errors\":[{\"message\":\"requestedUrl must be a valid URL\",\"type\":\"Validation error\",\"path\":\"requestedUrl\"},{\"message\":\"cancelUrl must be empty or a valid URL\",\"type\":\"Validation error\",\"path\":\"cancelUrl\"}],\"error\":\"bad_request\",\"error_description\":\"Validation errors occured while creating/updating paytoken\"}", "enable_partial_authorization": null, "enable_overcapture": null, "is_overcapture_enabled": null, "network_details": { "network_advice_code": null } } ``` success case unchanged ```json { "payment_id": "pay_cpaXS8mYQTM0j8WoynYq", "merchant_id": "merchant_1758105428", "status": "succeeded", "amount": 100, "net_amount": 100, "shipping_cost": null, "amount_capturable": 0, "amount_received": 100, "connector": "fiuu", "client_secret": "pay_cpaXS8mYQTM0j8WoynYq_secret_YV89WcIDUTqpzr7FnDA2", "created": "2025-09-22T17:15:24.386Z", "currency": "MYR", "customer_id": "StripeCustomer", "customer": { "id": "StripeCustomer", "name": "John Doe", "email": "guest@example.com", "phone": "999999999", "phone_country_code": "+1" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "1111", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "411111", "card_extended_bin": null, "card_exp_month": "12", "card_exp_year": "2029", "card_holder_name": "Max Mustermann", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": { "address": { "city": "Musterhausen", "country": "MY", "line1": "Musterstr", "line2": "CA", "line3": "CA", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "billing": { "address": { "city": "Musterhausen", "country": "MY", "line1": "1467", "line2": "CA", "line3": "CA", "zip": "12345", "state": "California", "first_name": "Max", "last_name": "Mustermann", "origin_zip": null }, "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": "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": 1758561324, "expires": 1758564924, "secret": "epk_f470436ee1e546399b67d346f0bb3428" }, "manual_retry_allowed": null, "connector_transaction_id": "31048203", "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2019-09-10T10:11:12Z", "new_customer": "true" }, "connector_metadata": null, "feature_metadata": { "redirect_response": null, "search_tags": null, "apple_pay_recurring_details": null, "gateway_system": "unified_connector_service" }, "reference_id": null, "payment_link": null, "profile_id": "pro_YLnpohCCiP6L0NP2H5No", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_renfow5Kuk3DLSsizTH4", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-22T17:30:24.386Z", "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_channel": null, "payment_method_id": null, "network_transaction_id": null, "payment_method_status": null, "updated": "2025-09-22T17:15:25.498Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": "..........", "enable_partial_authorization": null, "enable_overcapture": null, "is_overcapture_enabled": null, "network_details": null } ``` <!-- 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/flows/authorize_flow.rs` - `crates/router/src/core/payments/flows/external_proxy_flow.rs` - `crates/router/src/core/payments/flows/psync_flow.rs` - ... and 3 more files **2. Other** - `crates/router/src/services/api.rs` **Code Patterns Applied:** - Extend existing types with new fields (15 changes) **Detailed Identifier Changes:** Commit e0fa7e9b: Files to modify: **crates/router/src/core/payments/flows/authorize_flow.rs** Modify existing code **crates/router/src/core/payments/flows/external_proxy_flow.rs** Modify existing code **crates/router/src/core/payments/flows/psync_flow.rs** Modify existing code **crates/router/src/core/payments/flows/setup_mandate_flow.rs** Modify existing code **crates/router/src/core/unified_connector_service.rs** Modify existing code **crates/router/src/core/unified_connector_service/transformers.rs** Modify existing code **crates/router/src/services/api.rs** Modify existing code
{"pr_number": 9445, "pr_title": "fix: Map attempt_status_unspecified to None instead of Unresolved for HS<>UCS ErrorResponse", "merged_at": "2025-09-24T16:51:54Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"core_business": ["crates/router/src/core/payments/flows/authorize_flow.rs", "crates/router/src/core/payments/flows/external_proxy_flow.rs", "crates/router/src/core/payments/flows/psync_flow.rs", "crates/router/src/core/payments/flows/setup_mandate_flow.rs", "crates/router/src/core/unified_connector_service.rs", "crates/router/src/core/unified_connector_service/transformers.rs"], "other": ["crates/router/src/services/api.rs"]}, "change_types": {"fields_added": 15}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(revenue_recovery): Introducing new calculate job for card switching and invoice queueing ## 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 --> **CALCULATE WORKFLOW** CALCULATE WORKFLOW When we receive failed webhook and its intent retry count is more than the threshold, it will inserted into calculate job with the schedule time with 1 hour from now, before inserting it will first check the DB for existing entry for CALCULATE_WORKFLOW_{payment_intent}, If found and business_status is CALCULATE_WORKFLOW_QUEUED, then we just update the existing entry with scheduled time with plus hour. If found and business_status is not CALCULATE_WORKFLOW_QUEUED, we do not insert the entry If not found, make a new entry with scheduled time as 1 hour plus from now time and feed token list from payment_intent to tracking_data Introduced one new field in tracking_data Invoice_scheduled_time Option (used as scheduling time in execute workflow and as well as for dashboard purpose) At the scheduled time, consumer picks it up and perform tasks like:- Call a function(best_token_with_time() ) that returns Option<{(token, scheduled_time)}> We pass scheduled time in tracking_data as well as pass in insert_execute_task_to_pt so that we can schedule EXECUTE WORKFLOW at that time, we change calculate flow's the business_status to CALCULATE_WORKFLOW_SCHEDULED and status as Finish also lock the customer of that active token with redis fn call. If we receive None from best_token_with_time(), then we call get_payment_processor_token_with_schedule_time() whose return type is also Option<{PSPstatusdetails}>, if this is Some() then we just requeue it with wait time return by this fn, and add 15 minutes as buffer time and update the business_status as CALCULATE_WORKFLOW_QUEUED, else if it returns None then we mark the invoice as finish and finish the calculate workflow since this is a HARD DECLINE. EXECUTE WORKFLOW When the consumer picks up the execute task, it tries to do payment by calling proxy_api at the scheduled_time, here we have three possibilities for response of payment:- Success:- Update the token with success status and also update calculate_workflow entry’s business_status to CALCULATE_WORKFLOW_COMPLETED and status to Finish and also unlock the customer with redis fn call and change the status of token to success in redis. Failure:- Finish the task by updating the status to Finish and business status to EXECUTE_WORKFLOW_FINISH, increment the retry count by 1 and also unlock the customer with redis fn call, then find the calculate job for the id, and update its the business status to CALCULATE_WORKFLOW_QUEUED and scheduled time to now() + 1 hr Pending:- Will call PSYNC, update the business status of calculate job to CALCULATE_WORKFLOW_PROCESSING PSYNC WORKFLOW When the consumer picks up the psync task, here we have three possibilities:- Success:- Update the token with success status and also update calculate_workflow entry’s business_status to CALCULATE_WORKFLOW_COMPLETED and status to Finish. Failure:- Finish the task by updating the status to Finish and business status to EXECUTE_WORKFLOW_FINISH and also increment the retry count by 1, find the calculate job for the id, and update the business status to CALCULATE_WORKFLOW_QUEUED and scheduled time to now() + 1 hr Pending:- Will call PSYNC, update the business status of calculate job to CALCULATE_WORKFLOW_PROCESSING <img width="1530" height="308" alt="Screenshot 2025-08-13 at 16 42 06" src="https://github.com/user-attachments/assets/bc598e19-4404-4d1f-b736-be73501a5464" /> ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with 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)? --> How to test invoice queuing and card switching: Create a business profile - where the default revenue_recovery_algorithm_type would be Monitoring by default. (Need to update it to Cascading and Smart and test the flows. Create a Payment Processor (worldpayvantiv) ```curl --location 'http://localhost:8080/v2/connector-accounts' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'x-merchant-id: {{}}' \ --header 'x-profile-id: {{}}' \ --header 'Authorization: admin-api-key=test_admin' \ --header 'api-key: {{}}' \ --data ' { "connector_type": "payment_processor", "connector_name": "worldpayvantiv", "connector_account_details": { "auth_type": "SignatureKey", "api_key": "u83996941026920501", "key1": "010193081", "api_secret": "qRfXV7aPcvkX6Fr" }, "payment_methods_enabled": [ { "payment_method_type": "card", "payment_method_subtypes": [ { "payment_method_subtype": "credit", "payment_experience": null, "card_networks": [ "Visa", "Mastercard" ], "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_subtype": "debit", "payment_experience": null, "card_networks": [ "Visa", "Mastercard" ], "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true } ] } ], "frm_configs": null, "connector_webhook_details": { "merchant_secret": "" }, "metadata": { "report_group": "Hello", "merchant_config_currency": "USD" }, "profile_id": "pro_6BnIGqGPytQ3vwObbAw6" }' ``` Create Billing Processor for custom billing ```curl --location 'http://localhost:8080/v2/connector-accounts' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'x-merchant-id: {{}}' \ --header 'x-profile-id: {{}}' \ --header 'Authorization: admin-api-key=test_admin' \ --header 'api-key: {{}}' \ --data '{ "connector_type": "billing_processor", "connector_name": "custombilling", "connector_account_details": { "auth_type": "NoKey" }, "feature_metadata" : { "revenue_recovery" : { "max_retry_count" : 9, "billing_connector_retry_threshold" : 0, "billing_account_reference" :{ "{{connector_mca_id}}" : "{{connector_mca_id}}" }, "switch_payment_method_config" : { "retry_threshold" : 0, "time_threshold_after_creation": 0 } } }, "profile_id": "pro_6BnIGqGPytQ3vwObbAw6" }' ``` Use the payment/recovery api ```curl --location 'http://localhost:8080/v2/payments/recovery' \ --header 'Authorization: api-key=dev_qHo39mf1hdLbY7GW7FOr89FaoCM1NQOdwPddWguUDI3RnsjQKPzG71uZIkuULDQu' \ --header 'x-profile-id: pro_xsbw9tuM9f6whrwaZKC2' \ --header 'x-merchant-id: cloth_seller_2px3Q1TUxtGOvO3Yzm0S' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_qHo39mf1hdLbY7GW7FOr89FaoCM1NQOdwPddWguUDI3RnsjQKPzG71uZIkuULDQu' \ --data '{ "amount_details": { "order_amount": 2250, "currency": "USD" }, "merchant_reference_id": "1234567891", "connector_transaction_id": "43255654", "connector_customer_id": "526755", "error": { "code": "110", "message": "Insufficient Funds" }, "billing": { "address": { "state": "CA", "country": "US" } }, "payment_method_type": "card", "payment_method_sub_type": "credit", "payment_method_data": { "primary_processor_payment_method_token": "2541911049890008", "additional_payment_method_info": { "card_exp_month": "12", "card_exp_year": "25", "last_four_digits": 1997, "card_network": "VISA", "card_issuer": "Wells Fargo NA", "card_type": "credit" } }, "billing_started_at": "2024-05-29T08:10:58Z", "transaction_created_at": "2024-05-29T08:10:58Z", "attempt_status": "failure", "action": "schedule_failed_payment", "billing_merchant_connector_id": "mca_6y5xtQUL2tgnHbjS7Bai", "payment_merchant_connector_id": "mca_OWLpnzoAxkhT1eZVJ3Q3" }' ``` We need to hit recovery api curl multiple times by changing, here merchant reference is invoice_id : "merchant_reference_id": "1234567891", "connector_transaction_id": "43255654", "connector_customer_id": "526755", There should be entry in the process tracker only when the retries exceed the threshold. In the given curl we have kept the retry threshold as 0. Redis will contain keys <img width="721" height="117" alt="Screenshot 2025-08-25 at 18 04 14" src="https://github.com/user-attachments/assets/2ce5a60f-a537-41f3-8c9c-33a510337b77" /> Cascading When the profile is in CASCADING phase, the decider should not be called(gRPC call). It should take the retry date from config and schedule accordingly. Process Tracker entry (Calculate Job) : <img width="688" height="138" alt="Screenshot 2025-08-25 at 18 05 02" src="https://github.com/user-attachments/assets/2a0abbc8-d40f-40bb-adcd-f6ce9e2ed6a2" /> Process Tracker (Execute Job) : <img width="684" height="150" alt="Screenshot 2025-08-25 at 18 05 35" src="https://github.com/user-attachments/assets/689c47b9-3cc9-456c-b212-1b48c3076f07" /> At the scheduled time proxy api is called. <img width="690" height="264" alt="Screenshot 2025-08-25 at 18 06 11" src="https://github.com/user-attachments/assets/1097d92c-64b8-4023-aebc-b140dabcaa72" /> After which if payment is successful- Psync flow triggered <img width="686" height="234" alt="Screenshot 2025-08-25 at 18 07 52" src="https://github.com/user-attachments/assets/6dfa5a86-44f9-415f-84ac-34a5205096ed" /> And end with business_status as global failure on succeeded status in psync call. Smart When the profile is in SMART phase, the decider should be called(gRPC call). Process Tracker entry (Calculate Job) : <img width="687" height="239" alt="Screenshot 2025-08-25 at 18 08 18" src="https://github.com/user-attachments/assets/32d47ab0-4a99-4efe-a25f-71bddaab0da0" /> Process Tracker (Execute Job) : <img width="685" height="248" alt="Screenshot 2025-08-25 at 18 08 40" src="https://github.com/user-attachments/assets/e8a1a97b-45f6-4c8e-83dc-1cc2a79e04de" /> Process Tracker status after Proxy call Process Tracker (Execute Job) : <img width="682" height="236" alt="Screenshot 2025-08-25 at 18 10 07" src="https://github.com/user-attachments/assets/a9b60a59-a4ac-481d-8cba-487e4be582f2" /> Process Tracker (Psync Flow ) <img width="680" height="242" alt="Screenshot 2025-08-25 at 18 10 34" src="https://github.com/user-attachments/assets/f4e741a2-38fb-45c2-aaea-03beef0386ed" /> In psync job, if we get a response as failed from connector The calculate job is reopened . ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] 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/process_tracker.rs` **2. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/payments.rs` **3. Core Business Logic** - `crates/router/src/core/errors.rs` - `crates/router/src/core/revenue_recovery.rs` - `crates/router/src/core/revenue_recovery/types.rs` - ... and 1 more files **4. Type Definitions** - `crates/router/src/types/storage/revenue_recovery.rs` **5. Other** - `crates/router/src/workflows/revenue_recovery.rs` **Code Patterns Applied:** - Implement new functions (9 changes) - Extend existing types with new fields (93 changes) - Add conditional logic for feature flags or filtering (3 changes) - Modify database queries (1 changes) **Detailed Identifier Changes:** Commit 5efe4d97: Files to modify: **crates/diesel_models/src/process_tracker.rs** Modify existing code **crates/hyperswitch_domain_models/src/payments.rs** Add: - function: pub::extract_connector_customer_id_from_payment_intent **crates/router/src/core/errors.rs** Modify existing code **crates/router/src/core/revenue_recovery.rs** Add: - function: pub::upsert_calculate_pcr_task - function: pub::perform_calculate_workflow - function: private::update_calculate_job_schedule_time - function: private::insert_execute_pcr_task_to_pt **crates/router/src/core/revenue_recovery/types.rs** Modify existing code **crates/router/src/core/webhooks/recovery_incoming.rs** Modify existing code **crates/router/src/types/storage/revenue_recovery.rs** Modify existing code **crates/router/src/workflows/revenue_recovery.rs** Modify existing code
{"pr_number": 8848, "pr_title": "feat(revenue_recovery): Introducing new calculate job for card switching and invoice queueing", "merged_at": "2025-08-25T12:56:41Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"database": ["crates/diesel_models/src/process_tracker.rs"], "domain": ["crates/hyperswitch_domain_models/src/payments.rs"], "core_business": ["crates/router/src/core/errors.rs", "crates/router/src/core/revenue_recovery.rs", "crates/router/src/core/revenue_recovery/types.rs", "crates/router/src/core/webhooks/recovery_incoming.rs"], "types": ["crates/router/src/types/storage/revenue_recovery.rs"], "other": ["crates/router/src/workflows/revenue_recovery.rs"]}, "change_types": {"functions_added": 9, "fields_added": 93, "imports_added": 6, "conditionals_added": 3, "database_queries": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(utils): add iso representation for each state for european countries ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> For each countries present in Europe, their states are converted to ISO Standard [Source for standard](https://github.com/juspay/hyperswitch-web/blob/main/src/States.json) Note: A bugfix is present as well for address_id used to fetch billing_address for external authentication ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test 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. API Request/Response Models** - `crates/api_models/src/payments.rs` **2. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/mandates.rs` **3. Core Business Logic** - `crates/router/src/core/payments.rs` **4. External Connector Integration** - `crates/hyperswitch_connectors/src/utils.rs` **5. Configuration Files** - `.typos.toml` **6. Other** - `crates/common_enums/src/enums.rs` **Code Patterns Applied:** - Implement new functions (33 changes) - Extend existing types with new fields (33 changes) **Detailed Identifier Changes:** Commit c337be66: Files to modify: **crates/api_models/src/payments.rs** Modify existing code **crates/common_enums/src/enums.rs** Add: - enum: pub::AlbaniaStatesAbbreviation - enum: pub::AndorraStatesAbbreviation - enum: pub::AustriaStatesAbbreviation - enum: pub::BelarusStatesAbbreviation - enum: pub::BosniaAndHerzegovinaStatesAbbreviation - enum: pub::BulgariaStatesAbbreviation - enum: pub::CroatiaStatesAbbreviation - enum: pub::CzechRepublicStatesAbbreviation - enum: pub::DenmarkStatesAbbreviation - enum: pub::FinlandStatesAbbreviation - enum: pub::FranceStatesAbbreviation - enum: pub::GermanyStatesAbbreviation - enum: pub::GreeceStatesAbbreviation - enum: pub::HungaryStatesAbbreviation - enum: pub::IcelandStatesAbbreviation - enum: pub::IrelandStatesAbbreviation - enum: pub::LatviaStatesAbbreviation - enum: pub::ItalyStatesAbbreviation - enum: pub::LiechtensteinStatesAbbreviation - enum: pub::LithuaniaStatesAbbreviation - enum: pub::MaltaStatesAbbreviation - enum: pub::MoldovaStatesAbbreviation - enum: pub::MonacoStatesAbbreviation - enum: pub::MontenegroStatesAbbreviation - enum: pub::NetherlandsStatesAbbreviation - enum: pub::NorthMacedoniaStatesAbbreviation - enum: pub::NorwayStatesAbbreviation - enum: pub::PolandStatesAbbreviation - enum: pub::PortugalStatesAbbreviation - enum: pub::SpainStatesAbbreviation - enum: pub::SwitzerlandStatesAbbreviation - enum: pub::UnitedKingdomStatesAbbreviation - enum: pub::RomaniaStatesAbbreviation **crates/hyperswitch_connectors/src/utils.rs** Add: - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - impl: impl ForeignTryFrom<String> for GermanyStatesAbbreviation - impl: impl ForeignTryFrom<String> for SpainStatesAbbreviation - impl: impl ForeignTryFrom<String> for ItalyStatesAbbreviation - impl: impl ForeignTryFrom<String> for NorwayStatesAbbreviation - impl: impl ForeignTryFrom<String> for AlbaniaStatesAbbreviation - impl: impl ForeignTryFrom<String> for AndorraStatesAbbreviation - impl: impl ForeignTryFrom<String> for AustriaStatesAbbreviation - impl: impl ForeignTryFrom<String> for RomaniaStatesAbbreviation - impl: impl ForeignTryFrom<String> for PortugalStatesAbbreviation - impl: impl ForeignTryFrom<String> for SwitzerlandStatesAbbreviation - impl: impl ForeignTryFrom<String> for NorthMacedoniaStatesAbbreviation - impl: impl ForeignTryFrom<String> for MontenegroStatesAbbreviation - impl: impl ForeignTryFrom<String> for MonacoStatesAbbreviation - impl: impl ForeignTryFrom<String> for NetherlandsStatesAbbreviation - impl: impl ForeignTryFrom<String> for MoldovaStatesAbbreviation - impl: impl ForeignTryFrom<String> for LithuaniaStatesAbbreviation - impl: impl ForeignTryFrom<String> for LiechtensteinStatesAbbreviation - impl: impl ForeignTryFrom<String> for LatviaStatesAbbreviation - impl: impl ForeignTryFrom<String> for MaltaStatesAbbreviation - impl: impl ForeignTryFrom<String> for BelarusStatesAbbreviation - impl: impl ForeignTryFrom<String> for IrelandStatesAbbreviation - impl: impl ForeignTryFrom<String> for IcelandStatesAbbreviation - impl: impl ForeignTryFrom<String> for HungaryStatesAbbreviation - impl: impl ForeignTryFrom<String> for GreeceStatesAbbreviation - impl: impl ForeignTryFrom<String> for FinlandStatesAbbreviation - impl: impl ForeignTryFrom<String> for DenmarkStatesAbbreviation - impl: impl ForeignTryFrom<String> for CzechRepublicStatesAbbreviation - impl: impl ForeignTryFrom<String> for CroatiaStatesAbbreviation - impl: impl ForeignTryFrom<String> for BulgariaStatesAbbreviation - impl: impl ForeignTryFrom<String> for BosniaAndHerzegovinaStatesAbbreviation - impl: impl ForeignTryFrom<String> for UnitedKingdomStatesAbbreviation **crates/hyperswitch_domain_models/src/mandates.rs** Modify existing code **crates/router/src/core/payments.rs** Modify existing code
{"pr_number": 7273, "pr_title": "feat(utils): add iso representation for each state for european countries", "merged_at": "2025-02-15T15:54:41Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment"]}, "hierarchy": {"api_models": ["crates/api_models/src/payments.rs"], "domain": ["crates/hyperswitch_domain_models/src/mandates.rs"], "core_business": ["crates/router/src/core/payments.rs"], "connectors": ["crates/hyperswitch_connectors/src/utils.rs"], "config": [".typos.toml"], "other": ["crates/common_enums/src/enums.rs"]}, "change_types": {"functions_added": 33, "enums_added": 33, "fields_added": 33}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor(users): update url and text in welcome email ## 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 --> Updated quarterly roadmap and slack invite URL's in `welcome_to_community.html` file which is sent as the email body whenever a user signs 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). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Other** - `crates/router/src/services/email/assets/welcome_to_community.html`
{"pr_number": 9341, "pr_title": "refactor(users): update url and text in welcome email", "merged_at": "2025-09-16T17:53:28Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user"]}, "hierarchy": {"other": ["crates/router/src/services/email/assets/welcome_to_community.html"]}, "change_types": {}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
feat(analytics): refactor and rewrite authentication related analytics ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Hotfix PR Original PR: [https://github.com/juspay/hyperswitch/pull/7433](https://github.com/juspay/hyperswitch/pull/7433) ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/analytics/auth_events.rs` **2. Database Layer (Queries & Schema)** - `crates/analytics/src/query.rs` **3. Core Business Logic** - `crates/analytics/src/auth_events/core.rs` **4. Type Definitions** - `crates/analytics/src/types.rs` **5. Other** - `crates/analytics/src/auth_events/accumulator.rs` - `crates/analytics/src/auth_events/metrics.rs` - `crates/analytics/src/auth_events/metrics/authentication_attempt_count.rs` - ... and 11 more files **Code Patterns Applied:** - Define new data structures (1 changes) - Extend existing types with new fields (40 changes) - Add conditional logic for feature flags or filtering (8 changes) **Detailed Identifier Changes:** Commit 5befefd8: Files to modify: **crates/analytics/src/auth_events/accumulator.rs** Modify existing code **crates/analytics/src/auth_events/core.rs** Modify existing code **crates/analytics/src/auth_events/metrics.rs** Remove: - mod: private::three_ds_sdk_count Add: - mod: private::authentication_count **crates/analytics/src/auth_events/metrics/authentication_attempt_count.rs** Modify existing code **crates/analytics/src/auth_events/metrics/authentication_success_count.rs** Modify existing code **crates/analytics/src/auth_events/metrics/challenge_attempt_count.rs** Modify existing code **crates/analytics/src/auth_events/metrics/challenge_flow_count.rs** Modify existing code **crates/analytics/src/auth_events/metrics/challenge_success_count.rs** Modify existing code **crates/analytics/src/auth_events/metrics/frictionless_flow_count.rs** Modify existing code **crates/analytics/src/auth_events/metrics/frictionless_success_count.rs** Modify existing code **crates/analytics/src/clickhouse.rs** Modify existing code **crates/analytics/src/lib.rs** Modify existing code **crates/analytics/src/query.rs** Modify existing code **crates/analytics/src/sqlx.rs** Modify existing code **crates/analytics/src/types.rs** Modify existing code **crates/api_models/src/analytics/auth_events.rs** Remove: - struct: pub::ThreeDsSdkCount Add: - struct: pub::AuthenticationCount - enum: pub::AuthEventDimensions **crates/router/src/analytics.rs** Modify existing code
{"pr_number": 7448, "pr_title": "feat(analytics): refactor and rewrite authentication related analytics", "merged_at": "2025-03-06T13:15:49Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"api_models": ["crates/api_models/src/analytics/auth_events.rs"], "database": ["crates/analytics/src/query.rs"], "core_business": ["crates/analytics/src/auth_events/core.rs"], "types": ["crates/analytics/src/types.rs"], "other": ["crates/analytics/src/auth_events/accumulator.rs", "crates/analytics/src/auth_events/metrics.rs", "crates/analytics/src/auth_events/metrics/authentication_attempt_count.rs", "crates/analytics/src/auth_events/metrics/three_ds_sdk_count.rs", "crates/analytics/src/auth_events/metrics/authentication_success_count.rs", "crates/analytics/src/auth_events/metrics/challenge_attempt_count.rs", "crates/analytics/src/auth_events/metrics/challenge_flow_count.rs", "crates/analytics/src/auth_events/metrics/challenge_success_count.rs", "crates/analytics/src/auth_events/metrics/frictionless_flow_count.rs", "crates/analytics/src/auth_events/metrics/frictionless_success_count.rs", "crates/analytics/src/clickhouse.rs", "crates/analytics/src/lib.rs", "crates/analytics/src/sqlx.rs", "crates/router/src/analytics.rs"]}, "change_types": {"structs_added": 1, "enums_added": 1, "fields_added": 40, "imports_added": 6, "conditionals_added": 8}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(payment-methods): add filtering logic for payment method list v2 ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description ### Implementation Details The core of this change is the `filter_payment_methods` function, which is designed to be called iteratively for each `PaymentMethodsEnabledForConnector` object. The function's primary responsibility is to decide whether a given payment method should be included in the list of available options presented to the user. It achieves this by executing three sequential sets of logical checks, represented by boolean flags: 1. `request_based_filter` 2. `intent_based_filter` 3. `config_based_filter` A payment method is only added to the final response vector (`resp`) if it successfully passes all three of these filtering stages. #### Filtering Logic Breakdown The filtering logic is composed of several helper functions, each responsible for a specific check: **1. Request-Based Filtering:** These filters operate on parameters directly from the `PaymentMethodsListRequest`. - `filter_recurring_based`: A straightforward check that compares the `recurring_enabled` boolean in the request with the payment method's configuration. - `filter_amount_based`: Validates if the transaction `amount` falls within the `minimum_amount` and `maximum_amount` supported by the payment method. It correctly handles `None` amounts and allows zero-amount transactions to pass. - `filter_card_network_based`: For `Credit` and `Debit` payment methods, this ensures that the card networks specified in the request are a subset of the networks configured for the payment method. **2. Payment Intent-Based Filtering:** These checks are performed only if a `PaymentIntent` object is available for the transaction. - `filter_country_based` & `filter_currency_based`: These functions validate the transaction's country (from `billing_address`) and currency against the payment method's `accepted_countries` and `accepted_currencies` configurations. These configurations support both allow-lists (`EnableOnly`) and deny-lists (`DisableOnly`). - `filter_zero_mandate_based`: This implements specialized logic for zero-amount transactions intended for future use (`setup_future_usage: OffSession`). It consults the `settings.zero_mandates.supported_payment_methods` configuration to verify if the specific payment method type, subtype, and connector are explicitly enabled for zero-value mandates. - `filter_allowed_payment_method_types_based`: Checks if the current payment method's type is included in the `allowed_payment_method_types` list within the `PaymentIntent`. **3. Configuration-Based Filtering:** This stage applies system-wide rules defined in the application settings. - `filter_config_based`: This function retrieves filtering rules from `settings.pm_filters`. It first looks for a configuration block matching the connector name (e.g., `"stripe"`) and falls back to a `"default"` configuration if a connector-specific one is not found. The lookup within this configuration is performed using the `PaymentMethodType`. - `filter_config_country_currency_based`: Once a configuration is found, this helper applies the country and currency rules defined in the corresponding `CurrencyCountryFlowFilter`, ensuring the transaction's context matches the defined constraints. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ### Tested through Postman: #### Create an MCA (Adyen) with below body: #### Scenarios: Case 1: Filter based on country currency: Create a payment intent with country as DE and currency as EUR ``` curl --location '{{baseUrl}}/v2/payments/create-intent' \ --header 'api-key:{{api_key}}' \ --header 'Content-Type: application/json' \ --header 'x-profile-id:{{profile_id}}' \ --header 'Authorization: api-key={{api_key}}' \ --data-raw '{ "amount_details": { "order_amount": 100, "currency": "EUR" }, "capture_method":"automatic", "authentication_type": "no_three_ds", "billing": { "address": { "city": "test", "country": "DE", "line1": "here is some \n there is some \n none is some? \n ", "line2": "there", "line3": "anywhere", "zip": "560095", "state": "SE", "first_name": "Sakil", "last_name": "Mostak" }, "phone": { "number": "1234567890", "country_code": "+1" }, "email": "guest@example.com" } }' ``` Do a payment method list call, following should be the response ``` { "payment_methods_enabled": [ { "payment_method_type": "card", "payment_method_subtype": "credit", "payment_experience": null, "required_fields": [ { "required_field": "payment_method_data.card.card_number", "display_name": "card_number", "field_type": "user_card_number", "value": null }, { "required_field": "payment_method_data.card.card_exp_month", "display_name": "card_exp_month", "field_type": "user_card_expiry_month", "value": null }, { "required_field": "payment_method_data.card.card_exp_year", "display_name": "card_exp_year", "field_type": "user_card_expiry_year", "value": null }, { "required_field": "payment_method_data.card.card_cvc", "display_name": "card_cvc", "field_type": "user_card_cvc", "value": null }, { "required_field": "payment_method_data.billing.address.first_name", "display_name": "card_holder_name", "field_type": "user_full_name", "value": null }, { "required_field": "payment_method_data.billing.address.last_name", "display_name": "card_holder_name", "field_type": "user_full_name", "value": null } ], "surcharge_details": null }, { "payment_method_type": "card", "payment_method_subtype": "debit", "payment_experience": null, "required_fields": [ { "required_field": "payment_method_data.card.card_number", "display_name": "card_number", "field_type": "user_card_number", "value": null }, { "required_field": "payment_method_data.card.card_exp_month", "display_name": "card_exp_month", "field_type": "user_card_expiry_month", "value": null }, { "required_field": "payment_method_data.card.card_exp_year", "display_name": "card_exp_year", "field_type": "user_card_expiry_year", "value": null }, { "required_field": "payment_method_data.card.card_cvc", "display_name": "card_cvc", "field_type": "user_card_cvc", "value": null }, { "required_field": "payment_method_data.billing.address.first_name", "display_name": "card_holder_name", "field_type": "user_full_name", "value": null }, { "required_field": "payment_method_data.billing.address.last_name", "display_name": "card_holder_name", "field_type": "user_full_name", "value": null } ], "surcharge_details": null }, { "payment_method_type": "bank_redirect", "payment_method_subtype": "giropay", "payment_experience": [ "redirect_to_url" ], "required_fields": [], "surcharge_details": null } ], "customer_payment_methods": null } ``` Case 2: Filter based on card_network: Create the following intent ``` curl --location '{{baseUrl}}/v2/payments/create-intent' \ --header 'api-key:{{api_key}}' \ --header 'Content-Type: application/json' \ --header 'x-profile-id:{{profile_id}}' \ --header 'Authorization: api-key={{api_key}}' \ --data-raw '{ "amount_details": { "order_amount": 100, "currency": "EUR" }, "capture_method":"automatic", "authentication_type": "no_three_ds", "billing": { "address": { "city": "test", "country": "DE", "line1": "here is some \n there is some \n none is some? \n ", "line2": "there", "line3": "anywhere", "zip": "560095", "state": "SE", "first_name": "Sakil", "last_name": "Mostak" }, "phone": { "number": "1234567890", "country_code": "+1" }, "email": "guest@example.com" } }' ``` Create a PML request with the following request parameters (card_networks=Visa,AmericanExpress): ``` curl --location '{{baseUrl}}/v2/payments/{{payment_id}}/payment-methods?card_networks=Visa,AmericanExpress' \ --header 'Content-Type: application/json' \ --header 'x-profile-id:{{profile_id}}' \ --header 'Authorization: publishable-key={{publishable_key}},client-secret={{client_secret}}' ``` Following should be the response ``` { "payment_methods_enabled": [ { "payment_method_type": "card", "payment_method_subtype": "debit", "payment_experience": null, "required_fields": [ { "required_field": "payment_method_data.card.card_number", "display_name": "card_number", "field_type": "user_card_number", "value": null }, { "required_field": "payment_method_data.card.card_exp_month", "display_name": "card_exp_month", "field_type": "user_card_expiry_month", "value": null }, { "required_field": "payment_method_data.card.card_exp_year", "display_name": "card_exp_year", "field_type": "user_card_expiry_year", "value": null }, { "required_field": "payment_method_data.card.card_cvc", "display_name": "card_cvc", "field_type": "user_card_cvc", "value": null }, { "required_field": "payment_method_data.billing.address.first_name", "display_name": "card_holder_name", "field_type": "user_full_name", "value": null }, { "required_field": "payment_method_data.billing.address.last_name", "display_name": "card_holder_name", "field_type": "user_full_name", "value": null } ], "surcharge_details": null }, { "payment_method_type": "bank_redirect", "payment_method_subtype": "giropay", "payment_experience": [ "redirect_to_url" ], "required_fields": [], "surcharge_details": null } ], "customer_payment_methods": null } ``` Case 3: Filter based on amount: Create a payment intent with amount=30 and country as NL and currency as EUR ``` curl --location '{{baseUrl}}/v2/payments/create-intent' \ --header 'api-key:{{api_key}}' \ --header 'Content-Type: application/json' \ --header 'x-profile-id:{{profile_id}}' \ --header 'Authorization: api-key={{api_key}}' \ --data-raw '{ "amount_details": { "order_amount": 30, "currency": "EUR" }, "capture_method":"automatic", "authentication_type": "no_three_ds", "billing": { "address": { "city": "test", "country": "NL", "line1": "here is some \n there is some \n none is some? \n ", "line2": "there", "line3": "anywhere", "zip": "560095", "state": "SE", "first_name": "Sakil", "last_name": "Mostak" }, "phone": { "number": "1234567890", "country_code": "+1" }, "email": "guest@example.com" } }' ``` Do a payment method list call, following should be the response ``` { "payment_methods_enabled": [ { "payment_method_type": "card", "payment_method_subtype": "credit", "payment_experience": null, "required_fields": [ { "required_field": "payment_method_data.card.card_number", "display_name": "card_number", "field_type": "user_card_number", "value": null }, { "required_field": "payment_method_data.card.card_exp_month", "display_name": "card_exp_month", "field_type": "user_card_expiry_month", "value": null }, { "required_field": "payment_method_data.card.card_exp_year", "display_name": "card_exp_year", "field_type": "user_card_expiry_year", "value": null }, { "required_field": "payment_method_data.card.card_cvc", "display_name": "card_cvc", "field_type": "user_card_cvc", "value": null }, { "required_field": "payment_method_data.billing.address.first_name", "display_name": "card_holder_name", "field_type": "user_full_name", "value": null }, { "required_field": "payment_method_data.billing.address.last_name", "display_name": "card_holder_name", "field_type": "user_full_name", "value": null } ], "surcharge_details": null }, { "payment_method_type": "card", "payment_method_subtype": "debit", "payment_experience": null, "required_fields": [ { "required_field": "payment_method_data.card.card_number", "display_name": "card_number", "field_type": "user_card_number", "value": null }, { "required_field": "payment_method_data.card.card_exp_month", "display_name": "card_exp_month", "field_type": "user_card_expiry_month", "value": null }, { "required_field": "payment_method_data.card.card_exp_year", "display_name": "card_exp_year", "field_type": "user_card_expiry_year", "value": null }, { "required_field": "payment_method_data.card.card_cvc", "display_name": "card_cvc", "field_type": "user_card_cvc", "value": null }, { "required_field": "payment_method_data.billing.address.first_name", "display_name": "card_holder_name", "field_type": "user_full_name", "value": null }, { "required_field": "payment_method_data.billing.address.last_name", "display_name": "card_holder_name", "field_type": "user_full_name", "value": null } ], "surcharge_details": null }, { "payment_method_type": "bank_redirect", "payment_method_subtype": "ideal", "payment_experience": [ "redirect_to_url" ], "bank_names": [ "bunq", "rabobank", "sns_bank", "abn_amro", "revolut", "van_lanschot", "ing", "knab", "triodos_bank", "nationale_nederlanden", "asn_bank", "n26", "regiobank", "yoursafe" ], "required_fields": [ { "required_field": "payment_method_data.bank_redirect.ideal.bank_name", "display_name": "bank_name", "field_type": "user_bank", "value": null } ], "surcharge_details": null } ], "customer_payment_methods": null } ``` Cretae a payment intent with amount=80 and country as NL and currency as EUR ``` curl --location '{{baseUrl}}/v2/payments/create-intent' \ --header 'api-key:{{api_key}}' \ --header 'Content-Type: application/json' \ --header 'x-profile-id:{{profile_id}}' \ --header 'Authorization: api-key={{api_key}}' \ --data-raw '{ "amount_details": { "order_amount": 80, "currency": "EUR" }, "capture_method":"automatic", "authentication_type": "no_three_ds", "billing": { "address": { "city": "test", "country": "NL", "line1": "here is some \n there is some \n none is some? \n ", "line2": "there", "line3": "anywhere", "zip": "560095", "state": "SE", "first_name": "Sakil", "last_name": "Mostak" }, "phone": { "number": "1234567890", "country_code": "+1" }, "email": "guest@example.com" } }' ``` Do a payment method list call, following should be the response ``` { "payment_methods_enabled": [ { "payment_method_type": "card", "payment_method_subtype": "credit", "payment_experience": null, "required_fields": [ { "required_field": "payment_method_data.card.card_number", "display_name": "card_number", "field_type": "user_card_number", "value": null }, { "required_field": "payment_method_data.card.card_exp_month", "display_name": "card_exp_month", "field_type": "user_card_expiry_month", "value": null }, { "required_field": "payment_method_data.card.card_exp_year", "display_name": "card_exp_year", "field_type": "user_card_expiry_year", "value": null }, { "required_field": "payment_method_data.card.card_cvc", "display_name": "card_cvc", "field_type": "user_card_cvc", "value": null }, { "required_field": "payment_method_data.billing.address.first_name", "display_name": "card_holder_name", "field_type": "user_full_name", "value": null }, { "required_field": "payment_method_data.billing.address.last_name", "display_name": "card_holder_name", "field_type": "user_full_name", "value": null } ], "surcharge_details": null }, { "payment_method_type": "card", "payment_method_subtype": "debit", "payment_experience": null, "required_fields": [ { "required_field": "payment_method_data.card.card_number", "display_name": "card_number", "field_type": "user_card_number", "value": null }, { "required_field": "payment_method_data.card.card_exp_month", "display_name": "card_exp_month", "field_type": "user_card_expiry_month", "value": null }, { "required_field": "payment_method_data.card.card_exp_year", "display_name": "card_exp_year", "field_type": "user_card_expiry_year", "value": null }, { "required_field": "payment_method_data.card.card_cvc", "display_name": "card_cvc", "field_type": "user_card_cvc", "value": null }, { "required_field": "payment_method_data.billing.address.first_name", "display_name": "card_holder_name", "field_type": "user_full_name", "value": null }, { "required_field": "payment_method_data.billing.address.last_name", "display_name": "card_holder_name", "field_type": "user_full_name", "value": null } ], "surcharge_details": null } ], "customer_payment_methods": null } ``` Case 4: Filter based on zero mandates: Create a payment intent with amount=0 and setup_future_usage=off_session ``` curl --location '{{baseUrl}}/v2/payments/create-intent' \ --header 'api-key:{{api_key}}' \ --header 'Content-Type: application/json' \ --header 'x-profile-id:{{profile_id}}' \ --header 'Authorization: api-key={{api_key}}' \ --data-raw '{ "amount_details": { "order_amount": 0, "currency": "EUR" }, "capture_method":"automatic", "authentication_type": "no_three_ds", "setup_future_usage": "off_session", "billing": { "address": { "city": "test", "country": "BE", "line1": "here is some \n there is some \n none is some? \n ", "line2": "there", "line3": "anywhere", "zip": "560095", "state": "SE", "first_name": "Sakil", "last_name": "Mostak" }, "phone": { "number": "1234567890", "country_code": "+1" }, "email": "guest@example.com" } }' ``` Do a payment method list call, following should be the response ``` { "payment_methods_enabled": [ { "payment_method_type": "card", "payment_method_subtype": "credit", "payment_experience": null, "required_fields": [ { "required_field": "payment_method_data.card.card_number", "display_name": "card_number", "field_type": "user_card_number", "value": null }, { "required_field": "payment_method_data.card.card_exp_month", "display_name": "card_exp_month", "field_type": "user_card_expiry_month", "value": null }, { "required_field": "payment_method_data.card.card_exp_year", "display_name": "card_exp_year", "field_type": "user_card_expiry_year", "value": null }, { "required_field": "payment_method_data.card.card_cvc", "display_name": "card_cvc", "field_type": "user_card_cvc", "value": null }, { "required_field": "payment_method_data.billing.address.first_name", "display_name": "card_holder_name", "field_type": "user_full_name", "value": null }, { "required_field": "payment_method_data.billing.address.last_name", "display_name": "card_holder_name", "field_type": "user_full_name", "value": null } ], "surcharge_details": null }, { "payment_method_type": "card", "payment_method_subtype": "debit", "payment_experience": null, "required_fields": [ { "required_field": "payment_method_data.card.card_number", "display_name": "card_number", "field_type": "user_card_number", "value": null }, { "required_field": "payment_method_data.card.card_exp_month", "display_name": "card_exp_month", "field_type": "user_card_expiry_month", "value": null }, { "required_field": "payment_method_data.card.card_exp_year", "display_name": "card_exp_year", "field_type": "user_card_expiry_year", "value": null }, { "required_field": "payment_method_data.card.card_cvc", "display_name": "card_cvc", "field_type": "user_card_cvc", "value": null }, { "required_field": "payment_method_data.billing.address.first_name", "display_name": "card_holder_name", "field_type": "user_full_name", "value": null }, { "required_field": "payment_method_data.billing.address.last_name", "display_name": "card_holder_name", "field_type": "user_full_name", "value": null } ], "surcharge_details": null }, { "payment_method_type": "bank_redirect", "payment_method_subtype": "bancontact_card", "payment_experience": [ "redirect_to_url" ], "required_fields": [ { "required_field": "payment_method_data.bank_redirect.bancontact_card.card_number", "display_name": "card_number", "field_type": "user_card_number", "value": null }, { "required_field": "payment_method_data.bank_redirect.bancontact_card.card_exp_month", "display_name": "card_exp_month", "field_type": "user_card_expiry_month", "value": null }, { "required_field": "payment_method_data.bank_redirect.bancontact_card.card_exp_year", "display_name": "card_exp_year", "field_type": "user_card_expiry_year", "value": null }, { "required_field": "payment_method_data.billing.address.first_name", "display_name": "card_holder_name", "field_type": "user_full_name", "value": null }, { "required_field": "payment_method_data.billing.address.last_name", "display_name": "card_holder_name", "field_type": "user_full_name", "value": null } ], "surcharge_details": null } ], "customer_payment_methods": null } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/Cargo.toml` - `crates/api_models/src/events/payment.rs` - `crates/api_models/src/payment_methods.rs` - ... and 1 more files **2. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/merchant_connector_account.rs` **3. Core Business Logic** - `crates/router/src/core/payment_methods/cards.rs` - `crates/router/src/core/payments/payment_methods.rs` **4. Type Definitions** - `crates/router/src/types/api/payment_methods.rs` **5. Configuration Files** - `config/payment_required_fields_v2.toml` **6. Other** - `Cargo.lock` - `api-reference/v2/openapi_spec_v2.json` - `crates/openapi/src/openapi_v2.rs` - ... and 4 more files **Code Patterns Applied:** - Define new data structures (4 changes) - Implement new functions (15 changes) - Extend existing types with new fields (63 changes) - Add conditional logic for feature flags or filtering (3 changes) **Detailed Identifier Changes:** Commit 2e137716: Files to modify: **crates/api_models/src/events/payment.rs** Add: - function: private::get_api_event_type - impl: impl ApiEventMetric for ListMethodsForPaymentMethodsRequest **crates/api_models/src/payment_methods.rs** Remove: - struct: pub::PaymentMethodListRequest Add: - struct: pub::ListMethodsForPaymentMethodsRequest **crates/api_models/src/payments.rs** Remove: - struct: pub::PaymentMethodsListRequest Add: - struct: pub::ListMethodsForPaymentsRequest **crates/hyperswitch_domain_models/src/merchant_connector_account.rs** Modify existing code **crates/openapi/src/openapi_v2.rs** Modify existing code **crates/router/src/core/payment_methods/cards.rs** Remove: - function: pub::filter_payment_methods **crates/router/src/core/payments/payment_methods.rs** Remove: - struct: private::RequiredFieldsInput - struct: private::FlattenedPaymentMethodsEnabled Add: - function: private::get_required_fields - function: pub::filter_payment_methods - function: private::filter_country_based - function: private::filter_currency_based - function: private::filter_config_based - function: private::filter_config_country_currency_based - function: private::filter_recurring_based - function: private::filter_amount_based - function: private::filter_zero_mandate_based - function: private::filter_allowed_payment_method_types_based - function: private::filter_card_network_based - struct: private::RequiredFieldsInput - struct: private::FlattenedPaymentMethodsEnabled - trait: private::GetRequiredFields - impl: impl GetRequiredFields for settings::RequiredFields **crates/router/src/routes/payment_methods.rs** Modify existing code **crates/router/src/routes/payments.rs** Modify existing code **crates/router/src/services/api.rs** Modify existing code **crates/router/src/services/authentication.rs** Modify existing code **crates/router/src/types/api/payment_methods.rs** Modify existing code
{"pr_number": 8606, "pr_title": "feat(payment-methods): add filtering logic for payment method list v2", "merged_at": "2025-08-05T08:19:29Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "user"]}, "hierarchy": {"api_models": ["crates/api_models/Cargo.toml", "crates/api_models/src/events/payment.rs", "crates/api_models/src/payment_methods.rs", "crates/api_models/src/payments.rs"], "domain": ["crates/hyperswitch_domain_models/src/merchant_connector_account.rs"], "core_business": ["crates/router/src/core/payment_methods/cards.rs", "crates/router/src/core/payments/payment_methods.rs"], "types": ["crates/router/src/types/api/payment_methods.rs"], "config": ["config/payment_required_fields_v2.toml"], "other": ["Cargo.lock", "api-reference/v2/openapi_spec_v2.json", "crates/openapi/src/openapi_v2.rs", "crates/router/src/routes/payment_methods.rs", "crates/router/src/routes/payments.rs", "crates/router/src/services/api.rs", "crates/router/src/services/authentication.rs"]}, "change_types": {"structs_added": 4, "functions_added": 15, "fields_added": 63, "imports_added": 9, "conditionals_added": 3}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(router): fix retry_count and add validation for process_tracker ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [x] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This PR will fix the bug where the `retry_count` was stuck at 0 and will add validation for entry in `process_tracker` only when `payment_retry_count` exceeds the `billing_connector_retry_threshold`. Also fixed record back flow by implementing `get_amount` in `paymentAttempt` and `to_old_router_data`. ### 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). --> Earlier the retry_count was stuck at 0 and was not increasing, since updated payment intent was not being passing, which i have fixed in this PR ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> processor connector:- ``` curl --location 'http://localhost:8080/v2/connector-accounts' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'x-merchant-id: cloth_seller_zGNfgyxN4qmF1d1vMub6' \ --header 'x-profile-id: pro_wliXUgjC5fpgAvv1xx95' \ --header 'Authorization: admin-api-key=test_admin' \ --header 'api-key: test_admin' \ --data '{ "connector_type": "payment_processor", "connector_name": "stripe", "connector_account_details": { "auth_type": "HeaderKey", "api_key": "" }, "connector_webhook_details": { "merchant_secret": "" }, "profile_id": "pro_wliXUgjC5fpgAvv1xx95" } ``` billing connector:- ``` curl --location 'http://localhost:8080/v2/connector-accounts' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'x-merchant-id: cloth_seller_dP04VgNJyGDLY2HCxTMO' \ --header 'x-profile-id: pro_jYsTEwV8iGGBDXvuEaof' \ --header 'Authorization: admin-api-key=test_admin' \ --header 'api-key: test_admin' \ --data '{ "connector_type": "billing_processor", "connector_name": "stripebilling", "connector_account_details": { "auth_type": "HeaderKey", "api_key": "" }, "connector_label": "stripebilling_business", "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" }, "feature_metadata": { "revenue_recovery": { "max_retry_count": 15, "billing_connector_retry_threshold": 2, "billing_account_reference": { "mca_eKLOIz45vQujwc3KCBoh": "stripebilling" } } }, "frm_configs": null, "connector_webhook_details": { "merchant_secret": "" }, "profile_id": "pro_jYsTEwV8iGGBDXvuEaof" } ``` Process_tracker table:- <img width="1327" alt="Screenshot 2025-04-03 at 14 15 56" src="https://github.com/user-attachments/assets/4ed11897-8afa-4435-b572-28eeef4dfa2d" /> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] 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/lib.rs` - `crates/hyperswitch_domain_models/src/merchant_connector_account.rs` - `crates/hyperswitch_domain_models/src/payments.rs` - ... and 4 more files **3. Core Business Logic** - `crates/router/src/core/errors.rs` - `crates/router/src/core/payments.rs` - `crates/router/src/core/payments/operations/payment_attempt_record.rs` - ... and 4 more files **4. Type Definitions** - `crates/router/src/types/storage/revenue_recovery.rs` **5. Other** - `api-reference-v2/openapi_spec.json` - `crates/common_enums/src/enums.rs` - `crates/hyperswitch_interfaces/src/conversion_impls.rs` - ... and 1 more files **Code Patterns Applied:** - Define new data structures (1 changes) - Implement new functions (7 changes) - Extend existing types with new fields (58 changes) **Detailed Identifier Changes:** Commit 6ef71051: Files to modify: **crates/api_models/src/payments.rs** Add: - struct: pub::PaymentAttemptRecordResponse **crates/common_enums/src/enums.rs** Modify existing code **crates/hyperswitch_domain_models/src/lib.rs** Modify existing code **crates/hyperswitch_domain_models/src/merchant_connector_account.rs** Add: - function: pub::get_retry_threshold **crates/hyperswitch_domain_models/src/payments.rs** Modify existing code **crates/hyperswitch_domain_models/src/payments/payment_attempt.rs** Modify existing code **crates/hyperswitch_domain_models/src/payments/payment_intent.rs** Modify existing code **crates/hyperswitch_domain_models/src/revenue_recovery.rs** Modify existing code **crates/hyperswitch_domain_models/src/router_data.rs** Modify existing code **crates/hyperswitch_interfaces/src/conversion_impls.rs** Modify existing code **crates/openapi/src/openapi_v2.rs** Modify existing code **crates/router/src/core/errors.rs** Modify existing code **crates/router/src/core/payments.rs** Modify existing code **crates/router/src/core/payments/operations/payment_attempt_record.rs** Modify existing code **crates/router/src/core/payments/transformers.rs** Add: - function: private::generate_response - function: private::foreign_from - function: private::foreign_from - function: private::foreign_from - impl: impl GenerateResponse<api_models::payments::PaymentAttemptRecordResponse> for hyperswitch_domain_models::payments::PaymentAttemptRecordData<F> - impl: impl ForeignFrom<diesel_models::types::RedirectResponse> for api_models::payments::RedirectResponse - impl: impl ForeignFrom<&diesel_models::types::BillingConnectorPaymentDetails> for api_models::payments::BillingConnectorPaymentDetails - impl: impl ForeignFrom<&diesel_models::types::FeatureMetadata> for api_models::payments::FeatureMetadata **crates/router/src/core/revenue_recovery.rs** Modify existing code **crates/router/src/core/revenue_recovery/types.rs** Modify existing code **crates/router/src/core/webhooks/recovery_incoming.rs** Modify existing code **crates/router/src/types/storage/revenue_recovery.rs** Modify existing code
{"pr_number": 7614, "pr_title": "fix(router): fix retry_count and add validation for process_tracker", "merged_at": "2025-04-09T09:56:59Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "merchant", "user"]}, "hierarchy": {"api_models": ["crates/api_models/src/payments.rs"], "domain": ["crates/hyperswitch_domain_models/src/lib.rs", "crates/hyperswitch_domain_models/src/merchant_connector_account.rs", "crates/hyperswitch_domain_models/src/payments.rs", "crates/hyperswitch_domain_models/src/payments/payment_attempt.rs", "crates/hyperswitch_domain_models/src/payments/payment_intent.rs", "crates/hyperswitch_domain_models/src/revenue_recovery.rs", "crates/hyperswitch_domain_models/src/router_data.rs"], "core_business": ["crates/router/src/core/errors.rs", "crates/router/src/core/payments.rs", "crates/router/src/core/payments/operations/payment_attempt_record.rs", "crates/router/src/core/payments/transformers.rs", "crates/router/src/core/revenue_recovery.rs", "crates/router/src/core/revenue_recovery/types.rs", "crates/router/src/core/webhooks/recovery_incoming.rs"], "types": ["crates/router/src/types/storage/revenue_recovery.rs"], "other": ["api-reference-v2/openapi_spec.json", "crates/common_enums/src/enums.rs", "crates/hyperswitch_interfaces/src/conversion_impls.rs", "crates/openapi/src/openapi_v2.rs"]}, "change_types": {"structs_added": 1, "functions_added": 7, "fields_added": 58}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor: Move CustomerAcceptance to common_types ## 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 --> - Moved `CustomerAcceptance`, `AcceptanceType`, `OnlineMandate` to `common_types` - Removed unnecessary conversions from the code - Changed `payment_attempt` domain model and diesel model in v2 to use strict type ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with 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 #8298 ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> V1 Payments Create + Confirm Request: ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_YYBHtW1Ed85InL1L2TfWTZRUY7LCQxWotVQnOt5WjlMF6pMzEakhdpCzkj1AYaIa' \ --data-raw '{ "amount": 180000, "currency": "EUR", "confirm": true, "capture_method": "automatic", "customer_id": "klarna", "capture_on": "2022-09-10T10:11:12Z", "authentication_type": "three_ds", "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment request", "return_url": "https://google.com", "statement_descriptor_name": "Juspay", "statement_descriptor_suffix": "Router", "setup_future_usage": "off_session", "business_country": "NL", "payment_method": "bank_redirect", "payment_method_type": "ideal", "payment_method_data": { "bank_redirect": { "ideal": { "country": "NL", "bank_name": "rabobank", "billing_details": { "billing_name": "John Doe", "email": "guest@example.com" } } } }, "mandate_data": { "customer_acceptance": { "acceptance_type": "online", "accepted_at": "2022-09-10T10:11:12Z", "online": { "ip_address": "123.32.25.123", "user_agent": "Mozilla/5.0 (Linux; Android 12; SM-S906N Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/80.0.3987.119 Mobile Safari/537.36" } }, "mandate_type": { "single_use": { "amount": 6540, "currency": "EUR" } } }, "metadata": { "order_details": { "product_name": "Apple iphone 15", "quantity": 1, "account_name": "transaction_processing" } }, "browser_info": { "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "language": "en-GB", "color_depth": 24, "screen_height": 1117, "screen_width": 1728, "time_zone": -330, "java_enabled": true, "java_script_enabled": true, "device_model": "Macintosh", "os_type": "macOS", "os_version": "10.15.7" } }' ``` Response: ```json { "payment_id": "pay_8LTgSVkhEmehgtu1eIuJ", "merchant_id": "merchant_1750233210", "status": "requires_customer_action", "amount": 180000, "net_amount": 180000, "shipping_cost": null, "amount_capturable": 180000, "amount_received": 0, "connector": "stripe", "client_secret": "pay_8LTgSVkhEmehgtu1eIuJ_secret_kALuNnmlbaNEzyQJkeP5", "created": "2025-06-18T07:53:54.544Z", "currency": "EUR", "customer_id": "klarna", "customer": { "id": "klarna", "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": "man_dotLdCpwGUyqeE3bJhvj", "mandate_data": { "update_mandate_id": null, "customer_acceptance": { "acceptance_type": "online", "accepted_at": "2022-09-10T10:11:12.000Z", "online": { "ip_address": "123.32.25.123", "user_agent": "Mozilla/5.0 (Linux; Android 12; SM-S906N Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/80.0.3987.119 Mobile Safari/537.36" } }, "mandate_type": { "single_use": { "amount": 6540, "currency": "EUR", "start_date": null, "end_date": null, "metadata": null } } }, ... } ``` V2 Payments Confirm Request: ``` curl --location 'http://localhost:8080/v2/payments/12345_pay_0197821d2b14713291386704613637ad/confirm-intent' \ --header 'x-profile-id: pro_GiWMG7VDcuWfIrlReElL' \ --header 'x-client-secret: cs_0197821d2b227603bd66e184fe946484' \ --header 'Authorization: publishable-key=pk_dev_c28ad8ebb32e4f9c8ac1a84f221ec3e4,client-secret=cs_0197821d2b227603bd66e184fe946484' \ --header 'Content-Type: application/json' \ --header 'api-key: pk_dev_c28ad8ebb32e4f9c8ac1a84f221ec3e4' \ --data '{ "payment_method_data": { "card": { "card_number": "4242424242424242", "card_exp_month": "01", "card_exp_year": "26", "card_holder_name": "John Doe", "card_cvc": "123" } }, "payment_method_type": "card", "payment_method_subtype": "card", "customer_acceptance": { "acceptance_type": "online", "accepted_at": "2022-09-10T10:11:12Z", "online": { "ip_address": "123.32.25.123", "user_agent": "Mozilla/5.0 (Linux; Android 12; SM-S906N Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/80.0.3987.119 Mobile Safari/537.36" } } }' ``` Response ```json { "id": "12345_pay_0197821d2b14713291386704613637ad", "status": "succeeded", "amount": { "order_amount": 1000, "currency": "EUR", "shipping_cost": null, "order_tax_amount": null, "external_tax_calculation": "skip", "surcharge_calculation": "skip", "surcharge_amount": null, "tax_on_surcharge": null, "net_amount": 1000, "amount_to_capture": null, "amount_capturable": 0, "amount_captured": 1000 }, "customer_id": "12345_cus_0197821d18d77ee183767e2baec9dc80", "connector": "stripe", "created": "2025-06-18T08:17:19.135Z", "payment_method_data": { "billing": null }, "payment_method_type": "card", "payment_method_subtype": "card", "connector_transaction_id": "pi_3RbHBPCuXDMKrYZe1NDYJ7TC", "connector_reference_id": null, "merchant_connector_id": "mca_uUOvCLZKNXK5LT8Ghr6T", "browser_info": null, "error": null, "shipping": null, "billing": null, "attempts": null, "connector_token_details": { "token": "pm_1RbHBPCuXDMKrYZeHuVQG7NM", "connector_token_request_reference_id": "lRI0TlJZTT5OjItgR2" }, "payment_method_id": "12345_pm_0197821d37f47203a783e419365ff252", "next_action": null, "return_url": "https://google.com/success", "authentication_type": "no_three_ds", "authentication_type_applied": "no_three_ds", "is_iframe_redirection_enabled": null } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] 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/mandates.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/mandates.rs` - `crates/hyperswitch_domain_models/src/payments/payment_attempt.rs` - `crates/hyperswitch_domain_models/src/router_request_types.rs` **4. Core Business Logic** - `crates/router/src/core/mandate.rs` - `crates/router/src/core/mandate/helpers.rs` - `crates/router/src/core/payments.rs` - ... and 13 more files **5. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/stripe/transformers.rs` **6. Type Definitions** - `crates/common_types/Cargo.toml` - `crates/common_types/src/payments.rs` - `crates/router/src/compatibility/stripe/payment_intents/types.rs` - ... and 2 more files **7. Other** - `Cargo.lock` - `api-reference/v1/openapi_spec_v1.json` - `api-reference/v2/openapi_spec_v2.json` - ... and 4 more files **Code Patterns Applied:** - Define new data structures (2 changes) - Implement new functions (7 changes) - Extend existing types with new fields (30 changes) **Detailed Identifier Changes:** Commit 44d93e57: Files to modify: **crates/api_models/src/mandates.rs** Modify existing code **crates/api_models/src/payments.rs** Remove: - struct: pub::CustomerAcceptance - struct: pub::OnlineMandate - enum: pub::AcceptanceType **crates/common_types/src/payments.rs** Add: - function: pub::get_ip_address - function: pub::get_user_agent - function: pub::get_accepted_at - struct: pub::CustomerAcceptance - struct: pub::OnlineMandate - enum: pub::AcceptanceType - impl: impl CustomerAcceptance - impl: impl masking::SerializableSecret for CustomerAcceptance **crates/diesel_models/src/payment_attempt.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/stripe/transformers.rs** Modify existing code **crates/hyperswitch_domain_models/src/mandates.rs** Remove: - function: private::from - function: private::from - function: private::from - function: private::from - function: private::from - function: private::from - function: pub::get_ip_address - function: pub::get_user_agent - function: pub::get_accepted_at - struct: pub::CustomerAcceptance - struct: pub::OnlineMandate - enum: pub::AcceptanceType - impl: impl From<ApiCustomerAcceptance> for CustomerAcceptance - impl: impl From<CustomerAcceptance> for ApiCustomerAcceptance - impl: impl From<ApiAcceptanceType> for AcceptanceType - impl: impl From<AcceptanceType> for ApiAcceptanceType - impl: impl From<ApiOnlineMandate> for OnlineMandate - impl: impl From<OnlineMandate> for ApiOnlineMandate - impl: impl CustomerAcceptance **crates/hyperswitch_domain_models/src/payments/payment_attempt.rs** Modify existing code **crates/hyperswitch_domain_models/src/router_request_types.rs** Modify existing code **crates/openapi/src/openapi.rs** Modify existing code **crates/openapi/src/openapi_v2.rs** Modify existing code **crates/router/src/compatibility/stripe/payment_intents/types.rs** Modify existing code **crates/router/src/core/mandate.rs** Modify existing code **crates/router/src/core/mandate/helpers.rs** Modify existing code **crates/router/src/core/payments.rs** Modify existing code **crates/router/src/core/payments/flows.rs** Modify existing code **crates/router/src/core/payments/flows/authorize_flow.rs** Modify existing code **crates/router/src/core/payments/flows/setup_mandate_flow.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_update.rs** Modify existing code **crates/router/src/core/payments/routing.rs** Modify existing code **crates/router/src/core/payments/routing/transformers.rs** Modify existing code **crates/router/src/core/payments/session_operation.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/payments/vault_session.rs** Modify existing code **crates/router/src/services/kafka/payment_attempt.rs** Modify existing code **crates/router/src/services/kafka/payment_attempt_event.rs** Modify existing code **crates/router/src/types/api/payments.rs** Modify existing code **crates/router/src/types/transformers.rs** Modify existing code
{"pr_number": 8299, "pr_title": "refactor: Move CustomerAcceptance to common_types", "merged_at": "2025-06-25T06:30:07Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/mandates.rs", "crates/api_models/src/payments.rs"], "database": ["crates/diesel_models/src/payment_attempt.rs"], "domain": ["crates/hyperswitch_domain_models/src/mandates.rs", "crates/hyperswitch_domain_models/src/payments/payment_attempt.rs", "crates/hyperswitch_domain_models/src/router_request_types.rs"], "core_business": ["crates/router/src/core/mandate.rs", "crates/router/src/core/mandate/helpers.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/setup_mandate_flow.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_update.rs", "crates/router/src/core/payments/routing.rs", "crates/router/src/core/payments/routing/transformers.rs", "crates/router/src/core/payments/session_operation.rs", "crates/router/src/core/payments/tokenization.rs", "crates/router/src/core/payments/transformers.rs", "crates/router/src/core/payments/vault_session.rs"], "connectors": ["crates/hyperswitch_connectors/src/connectors/stripe/transformers.rs"], "types": ["crates/common_types/Cargo.toml", "crates/common_types/src/payments.rs", "crates/router/src/compatibility/stripe/payment_intents/types.rs", "crates/router/src/types/api/payments.rs", "crates/router/src/types/transformers.rs"], "other": ["Cargo.lock", "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/router/src/services/kafka/payment_attempt.rs", "crates/router/src/services/kafka/payment_attempt_event.rs"]}, "change_types": {"structs_added": 2, "functions_added": 7, "enums_added": 1, "fields_added": 30, "imports_added": 22}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
chore(stripe): Eps bank_name should be mandatory ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Make bank_name field for EPS in stripe mandatore ### 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)? --> <details> <summary>Payment Request</summary> ```json { "payment_id": "pay_6W7NAlavGWBsNle4fjCm", "merchant_id": "merchant_1751973151", "status": "requires_payment_method", "amount": 6500, "net_amount": 6500, "amount_capturable": 0, "client_secret": "pay_6W7NAlavGWBsNle4fjCm_secret_cGp7blq0k5NBezW6gCmH", "created": "2025-07-08T11:49:13.894Z", "currency": "EUR", "customer_id": "hyperswitch_sdk_demo_id", "customer": { "id": "hyperswitch_sdk_demo_id", "email": "user@gmail.com" }, "description": "Hello this is description", "setup_future_usage": "on_session", "capture_method": "automatic", "shipping": { "address": { "city": "Banglore", "country": "AT", "line1": "sdsdfsdf", "line2": "hsgdbhd", "line3": "alsksoe", "zip": "571201", "state": "California", "first_name": "John", "last_name": "Doe" }, "phone": { "number": "123456789", "country_code": "+1" } }, "billing": { "address": { "city": "San Fransico", "country": "AT", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "order_details": [ { "amount": 6500, "quantity": 1, "product_name": "Apple iphone 15" } ], "email": "user@gmail.com", "business_label": "default", "ephemeral_key": { "customer_id": "hyperswitch_sdk_demo_id", "created_at": 1751975353, "expires": 1751978953, "secret": "epk_78740ac9b3a7426e9ed57c14c801fb4f" }, "metadata": { "udf1": "value1", "login_date": "2019-09-10T10:11:12Z", "new_customer": "true" }, "connector_metadata": { "noon": { "order_category": "applepay" } }, "profile_id": "pro_2UxGWjdVxvRMEw6zBI2V", "attempt_count": 1, "external_3ds_authentication_attempted": false, "expires_on": "2025-07-08T12:04:13.894Z", "updated": "2025-07-08T11:49:13.908Z", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false } ``` </details> <details> <summary> Supported payment methods has bank_name mandatory </summary> ```json { "redirect_url": "https://google.com/success", "currency": "EUR", "payment_methods": [ { "payment_method": "bank_redirect", "payment_method_types": [ { "payment_method_type": "eps", "bank_names": [ { "bank_name": [ "easybank_ag", "bank_austria", "hypo_tirol_bank_ag", "hypo_alpeadriabank_international_ag", "sparda_bank_wien", "bankhaus_schelhammer_und_schattera_ag", "erste_bank_und_sparkassen", "vr_bank_braunau", "raiffeisen_bankengruppe_osterreich", "volksbank_gruppe", "bankhaus_carl_spangler", "bawag_psk_ag", "hypo_noe_lb_fur_niederosterreich_u_wien", "hypo_bank_burgenland_aktiengesellschaft", "hypo_vorarlberg_bank_ag", "dolomitenbank", "marchfelder_bank", "oberbank_ag", "bks_bank_ag", "arzte_und_apotheker_bank", "btv_vier_lander_bank", "hypo_oberosterreich_salzburg_steiermark", "volkskreditbank_ag", "austrian_anadi_bank_ag", "brull_kallmus_bank_ag", "capital_bank_grawe_gruppe_ag", "schoellerbank_ag" ], "eligible_connectors": ["stripe"] } ], "required_fields": { "billing.address.first_name": { "required_field": "payment_method_data.billing.address.first_name", "display_name": "billing_name", "field_type": "user_full_name", "value": "joseph" }, "payment_method_data.bank_redirect.eps.bank_name": { "required_field": "payment_method_data.bank_redirect.eps.bank_name", "display_name": "bank_name", "field_type": { "user_bank_options": { "options": [ "triodos_bank", "austrian_anadi_bank_ag", "boz", "brull_kallmus_bank_ag", "pbac_z_ipko", "schoellerbank_ag", "hypo_oberosterreich_salzburg_steiermark", "bank_pekao_sa", "bnp_paribas", "asn_bank", "hypo_alpeadriabank_international_ag", "plus_bank", "volkswagen_bank", "sparda_bank_wien", "sns_bank", "hypo_tirol_bank_ag", "knab", "citi", "bunq", "bks_bank_ag", "mbank_mtransfer", "dolomitenbank", "idea_bank", "rabobank", "getin_bank", "raiffeisen_bankengruppe_osterreich", "bankhaus_carl_spangler", "van_lanschot", "envelo_bank", "volkskreditbank_ag", "banki_spbdzielcze", "etransfer_pocztowy24", "btv_vier_lander_bank", "easybank_ag", "bawag_psk_ag", "noble_pay", "capital_bank_grawe_gruppe_ag", "moneyou", "blik", "regiobank", "arzte_und_apotheker_bank", "abn_amro", "marchfelder_bank", "handelsbanken", "erste_bank_und_sparkassen", "volksbank_gruppe", "ing", "bankhaus_schelhammer_und_schattera_ag", "revolut", "bank_austria", "hypo_vorarlberg_bank_ag", "hypo_bank_burgenland_aktiengesellschaft", "vr_bank_braunau", "bank_nowy_bfg_sa", "nest_przelew", "alior_bank", "hypo_noe_lb_fur_niederosterreich_u_wien", "inteligo", "oberbank_ag" ] } } }, "billing.address.last_name": { "required_field": "payment_method_data.billing.address.last_name", "display_name": "billing_name", "field_type": "user_full_name", "value": "Doe" } } } ] } ], "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 } ``` </details> <img width="1728" alt="Screenshot 2025-07-09 at 4 49 05 PM" src="https://github.com/user-attachments/assets/8a6cef3f-df11-411e-89d1-41ad5d1618ac" /> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/enums.rs` **2. External Connector Integration** - `crates/payment_methods/src/configs/payment_connector_required_fields.rs` **3. Other** - `api-reference/v1/openapi_spec_v1.json` - `api-reference/v2/openapi_spec_v2.json` **Code Patterns Applied:** - Extend existing types with new fields (5 changes) **Detailed Identifier Changes:** Commit fffaa53a: Files to modify: **crates/api_models/src/enums.rs** Modify existing code **crates/payment_methods/src/configs/payment_connector_required_fields.rs** Modify existing code
{"pr_number": 8577, "pr_title": "chore(stripe): Eps bank_name should be mandatory", "merged_at": "2025-07-14T10:44:42Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/enums.rs"], "connectors": ["crates/payment_methods/src/configs/payment_connector_required_fields.rs"], "other": ["api-reference/v1/openapi_spec_v1.json", "api-reference/v2/openapi_spec_v2.json"]}, "change_types": {"fields_added": 5}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(core): make parsing optional for connector_wallet_details in session token flow ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> For generating session token for google pay, error was thrown if connector_wallet_details was not present and google pay related data won't be present in session token response thus parsing connector_wallet_details is made optional Note: Hotfix corresponding to PR: https://github.com/juspay/hyperswitch/pull/7365 ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with 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 Postaman: - Create an MCA (Trustpay) with connector_wallet_details as null: ``` { "connector_type": "payment_processor", "connector_name": "trustpay", "connector_label": "trustpay_US_default", "merchant_connector_id": "mca_aIkTJWJcd2m5COTrHbF2", "connector_account_details": { "auth_type": "SignatureKey", "api_key": "{{api_key}}", "key1": "{{key1}}", "api_secret": "{{api_secret}}" }, "payment_methods_enabled": [ { "payment_method": "wallet", "payment_method_types": [ { "payment_method_type": "apple_pay", "payment_experience": "invoke_sdk_client", "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": 0, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": false }, { "payment_method_type": "google_pay", "payment_experience": "invoke_sdk_client", "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": 0, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": false } ] }, { "payment_method": "bank_redirect", "payment_method_types": [ { "payment_method_type": "ideal", "payment_experience": null, "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": 0, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": false }, { "payment_method_type": "giropay", "payment_experience": null, "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": 0, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": false }, { "payment_method_type": "sofort", "payment_experience": null, "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": 0, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": false }, { "payment_method_type": "eps", "payment_experience": null, "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": 0, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": false }, { "payment_method_type": "blik", "payment_experience": null, "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": 0, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": false } ] }, { "payment_method": "card", "payment_method_types": [ { "payment_method_type": "debit", "payment_experience": null, "card_networks": [ "CartesBancaires" ], "accepted_currencies": null, "accepted_countries": null, "minimum_amount": 0, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": false }, { "payment_method_type": "debit", "payment_experience": null, "card_networks": [ "AmericanExpress" ], "accepted_currencies": null, "accepted_countries": null, "minimum_amount": 0, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": false }, { "payment_method_type": "debit", "payment_experience": null, "card_networks": [ "Interac" ], "accepted_currencies": null, "accepted_countries": null, "minimum_amount": 0, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": false }, { "payment_method_type": "debit", "payment_experience": null, "card_networks": [ "Discover" ], "accepted_currencies": null, "accepted_countries": null, "minimum_amount": 0, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": false }, { "payment_method_type": "debit", "payment_experience": null, "card_networks": [ "Visa" ], "accepted_currencies": null, "accepted_countries": null, "minimum_amount": 0, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": false }, { "payment_method_type": "debit", "payment_experience": null, "card_networks": [ "DinersClub" ], "accepted_currencies": null, "accepted_countries": null, "minimum_amount": 0, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": false }, { "payment_method_type": "debit", "payment_experience": null, "card_networks": [ "Mastercard" ], "accepted_currencies": null, "accepted_countries": null, "minimum_amount": 0, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": false }, { "payment_method_type": "debit", "payment_experience": null, "card_networks": [ "JCB" ], "accepted_currencies": null, "accepted_countries": null, "minimum_amount": 0, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": false }, { "payment_method_type": "debit", "payment_experience": null, "card_networks": [ "UnionPay" ], "accepted_currencies": null, "accepted_countries": null, "minimum_amount": 0, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": false }, { "payment_method_type": "credit", "payment_experience": null, "card_networks": [ "Mastercard" ], "accepted_currencies": null, "accepted_countries": null, "minimum_amount": 0, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": false }, { "payment_method_type": "credit", "payment_experience": null, "card_networks": [ "DinersClub" ], "accepted_currencies": null, "accepted_countries": null, "minimum_amount": 0, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": false }, { "payment_method_type": "credit", "payment_experience": null, "card_networks": [ "Visa" ], "accepted_currencies": null, "accepted_countries": null, "minimum_amount": 0, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": false }, { "payment_method_type": "credit", "payment_experience": null, "card_networks": [ "Discover" ], "accepted_currencies": null, "accepted_countries": null, "minimum_amount": 0, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": false }, { "payment_method_type": "credit", "payment_experience": null, "card_networks": [ "AmericanExpress" ], "accepted_currencies": null, "accepted_countries": null, "minimum_amount": 0, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": false }, { "payment_method_type": "credit", "payment_experience": null, "card_networks": [ "CartesBancaires" ], "accepted_currencies": null, "accepted_countries": null, "minimum_amount": 0, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": false }, { "payment_method_type": "credit", "payment_experience": null, "card_networks": [ "UnionPay" ], "accepted_currencies": null, "accepted_countries": null, "minimum_amount": 0, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": false }, { "payment_method_type": "credit", "payment_experience": null, "card_networks": [ "JCB" ], "accepted_currencies": null, "accepted_countries": null, "minimum_amount": 0, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": false }, { "payment_method_type": "credit", "payment_experience": null, "card_networks": [ "Interac" ], "accepted_currencies": null, "accepted_countries": null, "minimum_amount": 0, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": false } ] } ], "connector_webhook_details": null, "metadata": { "apple_pay": {}, "google_pay": { "merchant_info": { "merchant_name": "Trustpay" }, "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": "trustpay", "gateway_merchant_id": "{{gateway_merchant_id}}" } } } ] } }, "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 } ``` - Create a Payment Intent: ``` { "amount": 6540, "currency": "USD", "confirm": false, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 6540, "customer_id": "{{customer_id}}", "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment request", "authentication_type": "no_three_ds", "return_url": "https://duck.com", "billing": { "address": { "city": "test", "country": "HR", "line1": "here is some \n there is some \n none is some? \n ", "line2": "there", "line3": "anywhere", "zip": "560095", "state": "Varaždin County", "first_name": "Sakil", "last_name": "Mostak" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "PiX" } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } } ``` - Do a get call for session token: ``` curl --location '{{baseurl}}/payments/session_tokens' \ --header 'Content-Type: application/json' \ --header 'api-key: {{api_key}}' \ --data '{ "client_secret": "pay_ICAWJ63o2ytbQ0vb3BuW_secret_hE0aFegU5xzyZNWdFXSB", "payment_id": "pay_ICAWJ63o2ytbQ0vb3BuW", "wallets": ["apple_pay", "google_pay"] }' ``` - The response should contain the google pay token data like below: ``` { "payment_id": "pay_ICAWJ63o2ytbQ0vb3BuW", "client_secret": "pay_ICAWJ63o2ytbQ0vb3BuW_secret_hE0aFegU5xzyZNWdFXSB", "session_token": [ { "wallet_name": "google_pay", "merchant_info": { "merchant_name": "Trustpay" }, "shipping_address_required": false, "email_required": false, "shipping_address_parameters": { "phone_number_required": false }, "allowed_payment_methods": [ { "type": "CARD", "parameters": { "allowed_auth_methods": [ "PAN_ONLY", "CRYPTOGRAM_3DS" ], "allowed_card_networks": [ "AMEX", "DISCOVER", "INTERAC", "JCB", "MASTERCARD", "VISA" ], "billing_address_required": false }, "tokenization_specification": { "type": "DIRECT", "parameters": { "gateway": "trustpay", "gateway_merchant_id": "gateway_merchant_id" } } } ], "transaction_info": { "country_code": "HR", "currency_code": "USD", "total_price_status": "Final", "total_price": "65.40" }, "delayed_session_token": false, "connector": "cybersource", "sdk_next_action": { "next_action": "confirm" }, "secrets": null } ] } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Core Business Logic** - `crates/router/src/core/payments/flows/session_flow.rs` **Code Patterns Applied:** - Add conditional logic for feature flags or filtering (1 changes) **Detailed Identifier Changes:** Commit afba0a00: Files to modify: **crates/router/src/core/payments/flows/session_flow.rs** Modify existing code
{"pr_number": 7370, "pr_title": "fix(core): make parsing optional for connector_wallet_details in session token flow", "merged_at": "2025-02-25T13:55:35Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"core_business": ["crates/router/src/core/payments/flows/session_flow.rs"]}, "change_types": {"conditionals_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(vsaas): integrate onboarding flow for vertical saas ## 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 The PR supports onboarding for new VSAAS merchants. - Creating Platform Org - Creation of Platform, and connected merchant accounts - Change List response of merchant and organization list. ### 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 Closes #7889 ## How did you test it? Following Flow: - Signup --> terminate 2FA --> List orgs/merchants --> create Merchant inside standard org --> List merchants/orgs to validate - CreatePlatform --> Swtich to Platform Org --> List merchants/orgs to validate --> Create Merchant inside platform org We can hit the following curls: **Signup** ``` curl --location 'http://localhost:8080/user/signup?token_only=true' \ --header 'x-tenant-id: test' \ --header 'Content-Type: application/json' \ --header 'Cookie: login_token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTY5ZmY1YWQtNjczMC00ZjRhLTg1MGEtYWY5MDU3OTgyMmYzIiwicHVycG9zZSI6InRvdHAiLCJvcmlnaW4iOiJzaWduX3VwIiwicGF0aCI6W10sImV4cCI6MTc0NTY1ODA0MywidGVuYW50X2lkIjoicHVibGljIn0.1lHD7fOM64ZtP0rRaBnp5-oaC6vy411jMu-lsjHAyr0' \ --data-raw '{ "email": "test@juspay.in", "password": "Test@1234" }' ``` Response: ``` {"token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTY5ZmY1YWQtNjczMC00ZjRhLTg1MGEtYWY5MDU3OTgyMmYzIiwicHVycG9zZSI6InRvdHAiLCJvcmlnaW4iOiJzaWduX3VwIiwicGF0aCI6W10sImV4cCI6MTc0NTY1ODA0MywidGVuYW50X2lkIjoicHVibGljIn0.1lHD7fOM64ZtP0rRaBnp5-oaC6vy411jMu-lsjHAyr0","token_type":"totp"} ``` **Terminate 2FA** ``` curl --location 'http://localhost:8080/user/2fa/terminate?skip_two_factor_auth=true' \ --header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTY5ZmY1YWQtNjczMC00ZjRhLTg1MGEtYWY5MDU3OTgyMmYzIiwicHVycG9zZSI6InRvdHAiLCJvcmlnaW4iOiJzaWduX3VwIiwicGF0aCI6W10sImV4cCI6MTc0NTY1ODA0MywidGVuYW50X2lkIjoicHVibGljIn0.1lHD7fOM64ZtP0rRaBnp5-oaC6vy411jMu-lsjHAyr0' \ --header 'Cookie: login_token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTY5ZmY1YWQtNjczMC00ZjRhLTg1MGEtYWY5MDU3OTgyMmYzIiwibWVyY2hhbnRfaWQiOiJtZXJjaGFudF8xNzQ1NDg1MjQyIiwicm9sZV9pZCI6Im9yZ19hZG1pbiIsImV4cCI6MTc0NTY1ODA4MCwib3JnX2lkIjoib3JnXzFUYVFseFFoY3ZLQTZKVkZxSGVoIiwicHJvZmlsZV9pZCI6InByb19xbHhJbFRwZDkwVXZmNDJsVWRHZSIsInRlbmFudF9pZCI6InB1YmxpYyJ9.cJSWGsE__epEWkuLKph8rBHJSvosq_-dfu2bR4dKb1o' ``` Response ``` {"token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTY5ZmY1YWQtNjczMC00ZjRhLTg1MGEtYWY5MDU3OTgyMmYzIiwibWVyY2hhbnRfaWQiOiJtZXJjaGFudF8xNzQ1NDg1MjQyIiwicm9sZV9pZCI6Im9yZ19hZG1pbiIsImV4cCI6MTc0NTY1ODA4MCwib3JnX2lkIjoib3JnXzFUYVFseFFoY3ZLQTZKVkZxSGVoIiwicHJvZmlsZV9pZCI6InByb19xbHhJbFRwZDkwVXZmNDJsVWRHZSIsInRlbmFudF9pZCI6InB1YmxpYyJ9.cJSWGsE__epEWkuLKph8rBHJSvosq_-dfu2bR4dKb1o","token_type":"user_info"} ``` **Create Merchant Account** ``` curl --location 'http://localhost:8080/user/create_merchant' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTY5ZmY1YWQtNjczMC00ZjRhLTg1MGEtYWY5MDU3OTgyMmYzIiwibWVyY2hhbnRfaWQiOiJtZXJjaGFudF8xNzQ1NDg1MjQyIiwicm9sZV9pZCI6Im9yZ19hZG1pbiIsImV4cCI6MTc0NTY1ODA4MCwib3JnX2lkIjoib3JnXzFUYVFseFFoY3ZLQTZKVkZxSGVoIiwicHJvZmlsZV9pZCI6InByb19xbHhJbFRwZDkwVXZmNDJsVWRHZSIsInRlbmFudF9pZCI6InB1YmxpYyJ9.cJSWGsE__epEWkuLKph8rBHJSvosq_-dfu2bR4dKb1o' \ --header 'Cookie: login_token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTY5ZmY1YWQtNjczMC00ZjRhLTg1MGEtYWY5MDU3OTgyMmYzIiwibWVyY2hhbnRfaWQiOiJtZXJjaGFudF8xNzQ1NDg1MjQyIiwicm9sZV9pZCI6Im9yZ19hZG1pbiIsImV4cCI6MTc0NTY1ODA4MCwib3JnX2lkIjoib3JnXzFUYVFseFFoY3ZLQTZKVkZxSGVoIiwicHJvZmlsZV9pZCI6InByb19xbHhJbFRwZDkwVXZmNDJsVWRHZSIsInRlbmFudF9pZCI6InB1YmxpYyJ9.cJSWGsE__epEWkuLKph8rBHJSvosq_-dfu2bR4dKb1o' \ --data '{ "company_name": "in_standard" }' ``` Response: ``` {"merchant_id":"merchant_1745485331","merchant_name":"in_standard","product_type":"orchestration","merchant_account_type":"standard","version":"v1"} ``` **List Orgs** ``` curl --location 'http://localhost:8080/user/list/org' \ --header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiZDM2NzMyMTUtYWU3NS00NGMzLWJiYzEtMGY3YmMxYmYwMjdmIiwibWVyY2hhbnRfaWQiOiJtZXJjaGFudF8xNzEyMjE0NDE5Iiwicm9sZV9pZCI6Im9yZ19hZG1pbiIsImV4cCI6MTcxMjM4NzMyOSwib3JnX2lkIjoib3JnXzhLb2lWNmhrcG9KSGZNcllER1ZhIn0.H2G9oGp_JBoz3k5S7fMvaaJ9T0cG5VtUjM0hU3ltM3g' \ --header 'Cookie: login_token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTY5ZmY1YWQtNjczMC00ZjRhLTg1MGEtYWY5MDU3OTgyMmYzIiwibWVyY2hhbnRfaWQiOiJtZXJjaGFudF8xNzQ1NDg1MjQyIiwicm9sZV9pZCI6Im9yZ19hZG1pbiIsImV4cCI6MTc0NTY1ODA4MCwib3JnX2lkIjoib3JnXzFUYVFseFFoY3ZLQTZKVkZxSGVoIiwicHJvZmlsZV9pZCI6InByb19xbHhJbFRwZDkwVXZmNDJsVWRHZSIsInRlbmFudF9pZCI6InB1YmxpYyJ9.cJSWGsE__epEWkuLKph8rBHJSvosq_-dfu2bR4dKb1o' ``` Response: ``` [{"org_id":"org_1TaQlxQhcvKA6JVFqHeh","org_name":null,"org_type":"standard"}] ``` **List Merchant** ``` curl --location 'http://localhost:8080/user/list/merchant' \ --header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiZDM2NzMyMTUtYWU3NS00NGMzLWJiYzEtMGY3YmMxYmYwMjdmIiwibWVyY2hhbnRfaWQiOiJtZXJjaGFudF8xNzEyMjE0NDE5Iiwicm9sZV9pZCI6Im9yZ19hZG1pbiIsImV4cCI6MTcxMjM4NzMyOSwib3JnX2lkIjoib3JnXzhLb2lWNmhrcG9KSGZNcllER1ZhIn0.H2G9oGp_JBoz3k5S7fMvaaJ9T0cG5VtUjM0hU3ltM3g' \ --header 'Cookie: login_token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTY5ZmY1YWQtNjczMC00ZjRhLTg1MGEtYWY5MDU3OTgyMmYzIiwibWVyY2hhbnRfaWQiOiJtZXJjaGFudF8xNzQ1NDg1MjQyIiwicm9sZV9pZCI6Im9yZ19hZG1pbiIsImV4cCI6MTc0NTY1ODA4MCwib3JnX2lkIjoib3JnXzFUYVFseFFoY3ZLQTZKVkZxSGVoIiwicHJvZmlsZV9pZCI6InByb19xbHhJbFRwZDkwVXZmNDJsVWRHZSIsInRlbmFudF9pZCI6InB1YmxpYyJ9.cJSWGsE__epEWkuLKph8rBHJSvosq_-dfu2bR4dKb1o' ``` Response: ``` [{"merchant_id":"merchant_1745485242","merchant_name":null,"product_type":"orchestration","merchant_account_type":"standard","version":"v1"},{"merchant_id":"merchant_1745485331","merchant_name":"in_standard","product_type":"orchestration","merchant_account_type":"standard","version":"v1"}] ``` **Create Platform Org** ``` curl --location 'http://localhost:8080/user/create_platform' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTY5ZmY1YWQtNjczMC00ZjRhLTg1MGEtYWY5MDU3OTgyMmYzIiwibWVyY2hhbnRfaWQiOiJtZXJjaGFudF8xNzQ1NDg1MjQyIiwicm9sZV9pZCI6Im9yZ19hZG1pbiIsImV4cCI6MTc0NTY1ODA4MCwib3JnX2lkIjoib3JnXzFUYVFseFFoY3ZLQTZKVkZxSGVoIiwicHJvZmlsZV9pZCI6InByb19xbHhJbFRwZDkwVXZmNDJsVWRHZSIsInRlbmFudF9pZCI6InB1YmxpYyJ9.cJSWGsE__epEWkuLKph8rBHJSvosq_-dfu2bR4dKb1o' \ --header 'Cookie: login_token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTY5ZmY1YWQtNjczMC00ZjRhLTg1MGEtYWY5MDU3OTgyMmYzIiwibWVyY2hhbnRfaWQiOiJtZXJjaGFudF8xNzQ1NDg1MjQyIiwicm9sZV9pZCI6Im9yZ19hZG1pbiIsImV4cCI6MTc0NTY1ODA4MCwib3JnX2lkIjoib3JnXzFUYVFseFFoY3ZLQTZKVkZxSGVoIiwicHJvZmlsZV9pZCI6InByb19xbHhJbFRwZDkwVXZmNDJsVWRHZSIsInRlbmFudF9pZCI6InB1YmxpYyJ9.cJSWGsE__epEWkuLKph8rBHJSvosq_-dfu2bR4dKb1o' \ --data '{ "organization_name": "platform" }' ``` Response: status 200 OK, witth reponse containing platform details ``` {"org_id":"org_TgxsZW9EOXksNcMSeaUy","org_name":"platform","org_type":"platform","merchant_id":"merchant_1745575171","merchant_account_type":"platform"} ``` Switch Org ``` curl --location 'http://localhost:8080/user/switch/org' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTY5ZmY1YWQtNjczMC00ZjRhLTg1MGEtYWY5MDU3OTgyMmYzIiwibWVyY2hhbnRfaWQiOiJtZXJjaGFudF8xNzQ1NDg1MjQyIiwicm9sZV9pZCI6Im9yZ19hZG1pbiIsImV4cCI6MTc0NTY1ODA4MCwib3JnX2lkIjoib3JnXzFUYVFseFFoY3ZLQTZKVkZxSGVoIiwicHJvZmlsZV9pZCI6InByb19xbHhJbFRwZDkwVXZmNDJsVWRHZSIsInRlbmFudF9pZCI6InB1YmxpYyJ9.cJSWGsE__epEWkuLKph8rBHJSvosq_-dfu2bR4dKb1o' \ --header 'Cookie: login_token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTY5ZmY1YWQtNjczMC00ZjRhLTg1MGEtYWY5MDU3OTgyMmYzIiwibWVyY2hhbnRfaWQiOiJtZXJjaGFudF8xNzQ1NDg1NDg3Iiwicm9sZV9pZCI6Im9yZ19hZG1pbiIsImV4cCI6MTc0NTY1ODM5OSwib3JnX2lkIjoib3JnXzBFZXE4cU9ETVJGc3NiNGJXa0p5IiwicHJvZmlsZV9pZCI6InByb19QOGc0R0dhbk81dDFiUXczNVQ3aiIsInRlbmFudF9pZCI6InB1YmxpYyJ9.UW9aqcLLXYi_3xOpLCB2vB2ecmMA7M4LHNXorPT0Odc' \ --data '{ "org_id": "org_0Eeq8qODMRFssb4bWkJy" }' ``` Resonse: ``` {"token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTY5ZmY1YWQtNjczMC00ZjRhLTg1MGEtYWY5MDU3OTgyMmYzIiwibWVyY2hhbnRfaWQiOiJtZXJjaGFudF8xNzQ1NDg1NDg3Iiwicm9sZV9pZCI6Im9yZ19hZG1pbiIsImV4cCI6MTc0NTY1ODM5OSwib3JnX2lkIjoib3JnXzBFZXE4cU9ETVJGc3NiNGJXa0p5IiwicHJvZmlsZV9pZCI6InByb19QOGc0R0dhbk81dDFiUXczNVQ3aiIsInRlbmFudF9pZCI6InB1YmxpYyJ9.UW9aqcLLXYi_3xOpLCB2vB2ecmMA7M4LHNXorPT0Odc","token_type":"user_info"} ``` Create Merchant inside Platfrom ``` curl --location 'http://localhost:8080/user/create_merchant' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTY5ZmY1YWQtNjczMC00ZjRhLTg1MGEtYWY5MDU3OTgyMmYzIiwibWVyY2hhbnRfaWQiOiJtZXJjaGFudF8xNzQ1NDg1MjQyIiwicm9sZV9pZCI6Im9yZ19hZG1pbiIsImV4cCI6MTc0NTY1ODA4MCwib3JnX2lkIjoib3JnXzFUYVFseFFoY3ZLQTZKVkZxSGVoIiwicHJvZmlsZV9pZCI6InByb19xbHhJbFRwZDkwVXZmNDJsVWRHZSIsInRlbmFudF9pZCI6InB1YmxpYyJ9.cJSWGsE__epEWkuLKph8rBHJSvosq_-dfu2bR4dKb1o' \ --header 'Cookie: login_token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTY5ZmY1YWQtNjczMC00ZjRhLTg1MGEtYWY5MDU3OTgyMmYzIiwibWVyY2hhbnRfaWQiOiJtZXJjaGFudF8xNzQ1NDg1NDg3Iiwicm9sZV9pZCI6Im9yZ19hZG1pbiIsImV4cCI6MTc0NTY1ODM5OSwib3JnX2lkIjoib3JnXzBFZXE4cU9ETVJGc3NiNGJXa0p5IiwicHJvZmlsZV9pZCI6InByb19QOGc0R0dhbk81dDFiUXczNVQ3aiIsInRlbmFudF9pZCI6InB1YmxpYyJ9.UW9aqcLLXYi_3xOpLCB2vB2ecmMA7M4LHNXorPT0Odc' \ --data '{ "company_name": "in_platform" }' ``` Response: ``` {"merchant_id":"merchant_1745485645","merchant_name":"in_platform","product_type":"orchestration","merchant_account_type":"connected","version":"v1"} ``` List Org Now the list orgs for user will give following response since there are two orgs ``` [{"org_id":"org_0Eeq8qODMRFssb4bWkJy","org_name":"platform","org_type":"platform"},{"org_id":"org_1TaQlxQhcvKA6JVFqHeh","org_name":null,"org_type":"standard"}] ``` List Merchant Inside platform there will be following merchants ``` [{"merchant_id":"merchant_1745485487","merchant_name":null,"product_type":"orchestration","merchant_account_type":"platform","version":"v1"},{"merchant_id":"merchant_1745485645","merchant_name":"in_platform","product_type":"orchestration","merchant_account_type":"connected","version":"v1"}] ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/events/user.rs` - `crates/api_models/src/organization.rs` - `crates/api_models/src/user.rs` **2. Database Layer (Queries & Schema)** - `crates/diesel_models/src/merchant_account.rs` - `crates/diesel_models/src/organization.rs` - `crates/diesel_models/src/schema.rs` - ... and 1 more files **3. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/merchant_account.rs` **4. Core Business Logic** - `crates/router/src/core/admin.rs` - `crates/router/src/core/user.rs` **5. Type Definitions** - `crates/router/src/types/domain/user.rs` - `crates/router/src/types/transformers.rs` - `crates/router_env/src/logger/types.rs` **6. Utils** - `crates/router/src/routes/lock_utils.rs` - `crates/router/src/utils/user.rs` **7. Other** - `crates/common_enums/src/enums.rs` - `crates/common_enums/src/enums/accounts.rs` - `crates/router/src/db/organization.rs` - ... and 4 more files **Code Patterns Applied:** - Define new data structures (2 changes) - Implement new functions (10 changes) - Extend existing types with new fields (87 changes) - Add conditional logic for feature flags or filtering (2 changes) **Detailed Identifier Changes:** Commit cf34be17: Files to modify: **crates/api_models/src/events/user.rs** Modify existing code **crates/api_models/src/organization.rs** Modify existing code **crates/api_models/src/user.rs** Add: - struct: pub::PlatformAccountCreateRequest - struct: pub::PlatformAccountCreateResponse **crates/common_enums/src/enums.rs** Modify existing code **crates/common_enums/src/enums/accounts.rs** Add: - enum: pub::MerchantAccountType - enum: pub::OrganizationType **crates/diesel_models/src/merchant_account.rs** Modify existing code **crates/diesel_models/src/organization.rs** Add: - function: pub::get_organization_type - function: pub::get_organization_type **crates/diesel_models/src/schema.rs** Modify existing code **crates/diesel_models/src/schema_v2.rs** Modify existing code **crates/hyperswitch_domain_models/src/merchant_account.rs** Modify existing code **crates/router/src/core/admin.rs** Modify existing code **crates/router/src/core/user.rs** Add: - function: pub::create_platform_account **crates/router/src/db/organization.rs** Modify existing code **crates/router/src/routes/app.rs** Modify existing code **crates/router/src/routes/lock_utils.rs** Modify existing code **crates/router/src/routes/user.rs** Add: - function: pub::create_platform **crates/router/src/types/domain/user.rs** Add: - function: private::from - function: private::try_from - impl: impl From<user_api::PlatformAccountCreateRequest> for NewUserOrganization - impl: impl TryFrom<user_api::PlatformAccountCreateRequest> for NewUserMerchant **crates/router/src/types/transformers.rs** Modify existing code **crates/router/src/utils/user.rs** Add: - function: pub::generate_env_specific_merchant_id **crates/router_env/src/logger/types.rs** Modify existing code
{"pr_number": 7884, "pr_title": "feat(vsaas): integrate onboarding flow for vertical saas", "merged_at": "2025-05-12T15:02:09Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["merchant", "user", "token"]}, "hierarchy": {"api_models": ["crates/api_models/src/events/user.rs", "crates/api_models/src/organization.rs", "crates/api_models/src/user.rs"], "database": ["crates/diesel_models/src/merchant_account.rs", "crates/diesel_models/src/organization.rs", "crates/diesel_models/src/schema.rs", "crates/diesel_models/src/schema_v2.rs"], "domain": ["crates/hyperswitch_domain_models/src/merchant_account.rs"], "core_business": ["crates/router/src/core/admin.rs", "crates/router/src/core/user.rs"], "types": ["crates/router/src/types/domain/user.rs", "crates/router/src/types/transformers.rs", "crates/router_env/src/logger/types.rs"], "utils": ["crates/router/src/routes/lock_utils.rs", "crates/router/src/utils/user.rs"], "other": ["crates/common_enums/src/enums.rs", "crates/common_enums/src/enums/accounts.rs", "crates/router/src/db/organization.rs", "crates/router/src/routes/app.rs", "crates/router/src/routes/user.rs", "migrations/2025-04-10-095823_add_platform_context_in_organization/down.sql", "migrations/2025-04-10-095823_add_platform_context_in_organization/up.sql"]}, "change_types": {"structs_added": 2, "functions_added": 10, "enums_added": 2, "fields_added": 87, "imports_added": 3, "conditionals_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat: add invoice table ## 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 --> <img width="539" height="305" alt="Screenshot 2025-09-18 at 22 35 30" src="https://github.com/user-attachments/assets/6ef6a861-7bb8-459e-9ac2-99791ec94c21" /> ## Description This PR introduces the **`invoice` table** along with supporting models, queries, schema definitions, and storage interfaces. The goal is to enable **subscription billing and payment tracking** by storing invoices linked to merchants, customers, subscriptions, and connectors. ### Key Features - **New `Invoice` table** with fields for subscription, connector, merchant, customer, amount, currency, status, and metadata. - Added **`InvoiceStatus` enum** to represent invoice lifecycle stages (e.g., `PendingPayment`, `PaymentSucceeded`, `InvoicePaid`, etc.). - Implemented **Diesel models**: `InvoiceNew`, `Invoice`, `InvoiceUpdate`. - Added **storage query methods**: - Insert new invoice - Find invoice by ID - Find invoice by merchant + invoice ID - Update invoice entry - Integrated with **router storage interface** (`InvoiceInterface`). - Added **migrations**: - `up.sql`: creates `invoice` table and indexes (`payment_intent_id`, `subscription_id`, `merchant_id + customer_id`). - `down.sql`: drops indexes and table. --- ## Motivation and Context - Provides a foundation for **subscription billing system** in Hyperswitch. - Supports **payment reconciliation and invoice lifecycle tracking**. - Enables robust query and update flows for invoices tied to subscriptions. --- ## Schema Details **Table: `invoice`** - `id` (PK) - `subscription_id` - `connector_subscription_id` - `merchant_id` - `profile_id` - `merchant_connector_id` - `payment_intent_id` (unique) - `payment_method_id` - `customer_id` - `amount` - `currency` - `status` - `provider_name` - `metadata` - `created_at` - `modified_at` **Indexes** - `idx_payment_intent_id` - `idx_subscription_id` - `idx_merchant_customer` --- ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> This can't be tested as this is only creation of tables and their respective storage models. ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] 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/invoice.rs` - `crates/diesel_models/src/lib.rs` - `crates/diesel_models/src/query.rs` - ... and 3 more files **2. External Connector Integration** - `crates/common_enums/src/connector_enums.rs` **3. Type Definitions** - `crates/router/src/types/storage.rs` - `crates/router/src/types/storage/invoice.rs` **4. Other** - `crates/router/src/db.rs` - `crates/router/src/db/invoice.rs` - `migrations/2025-09-10-101514_add_invoice_table/down.sql` - ... and 1 more files **Code Patterns Applied:** - Define new data structures (3 changes) - Implement new functions (17 changes) - Extend existing types with new fields (72 changes) - Modify database queries (2 changes) **Detailed Identifier Changes:** Commit 61949c55: Files to modify: **crates/common_enums/src/connector_enums.rs** Add: - enum: pub::InvoiceStatus **crates/diesel_models/src/invoice.rs** Add: - function: pub::new - function: pub::new - struct: pub::InvoiceNew - struct: pub::Invoice - struct: pub::InvoiceUpdate - impl: impl InvoiceNew - impl: impl InvoiceUpdate **crates/diesel_models/src/lib.rs** Add: - mod: pub::invoice **crates/diesel_models/src/query.rs** Add: - mod: pub::invoice **crates/diesel_models/src/query/invoice.rs** Add: - function: pub::insert - function: pub::find_invoice_by_id_invoice_id - function: pub::update_invoice_entry - impl: impl InvoiceNew - impl: impl Invoice **crates/diesel_models/src/schema.rs** Modify existing code **crates/diesel_models/src/schema_v2.rs** Modify existing code **crates/router/src/db.rs** Add: - mod: pub::invoice **crates/router/src/db/invoice.rs** Add: - function: private::insert_invoice_entry - function: private::find_invoice_by_invoice_id - function: private::update_invoice_entry - function: private::insert_invoice_entry - function: private::find_invoice_by_invoice_id - function: private::update_invoice_entry - function: private::insert_invoice_entry - function: private::find_invoice_by_invoice_id - function: private::update_invoice_entry - trait: pub::InvoiceInterface - impl: impl InvoiceInterface for Store - impl: impl InvoiceInterface for MockDb - impl: impl InvoiceInterface for KafkaStore **crates/router/src/types/storage.rs** Add: - mod: pub::invoice **crates/router/src/types/storage/invoice.rs** Modify existing code
{"pr_number": 9348, "pr_title": "feat: add invoice table", "merged_at": "2025-09-23T16:29:59Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"database": ["crates/diesel_models/src/invoice.rs", "crates/diesel_models/src/lib.rs", "crates/diesel_models/src/query.rs", "crates/diesel_models/src/query/invoice.rs", "crates/diesel_models/src/schema.rs", "crates/diesel_models/src/schema_v2.rs"], "connectors": ["crates/common_enums/src/connector_enums.rs"], "types": ["crates/router/src/types/storage.rs", "crates/router/src/types/storage/invoice.rs"], "other": ["crates/router/src/db.rs", "crates/router/src/db/invoice.rs", "migrations/2025-09-10-101514_add_invoice_table/down.sql", "migrations/2025-09-10-101514_add_invoice_table/up.sql"]}, "change_types": {"structs_added": 3, "functions_added": 17, "enums_added": 1, "fields_added": 72, "imports_added": 17, "database_queries": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(payment_methods): add payment-methods/filter endpoint to list countries and currencies for connector payment method in v2 ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [X] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Add the payment method filter route to the V2 PaymentMethods implementation which list all available countries and currencies based on connector and payment method type. ### Additional Changes - [X] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Request: ``` curl --location 'http://localhost:8080/v2/payment-methods/filter?connector=stripe&paymentMethodType=debit' \ --header 'Authorization: api-key=dev_4DIYNBJfJIQ2Tr1wLavfp48BJvXLtHmBWdkkALwWj6U91DAjP7h2RfQmhnDMATmB' \ --header 'x-profile-id: pro_9dDVfbJRfEb7o7qxBatP' \ --header 'api-key: dev_4DIYNBJfJIQ2Tr1wLavfp48BJvXLtHmBWdkkALwWj6U91DAjP7h2RfQmhnDMATmB' \ --data '' ``` Response: ``` { "currencies": [ "QAR", "BMD", "ERN", "ETB", "ILS", "MOP", "STN", "TND", "SRD", "TOP", "JMD", "BHD", "SSP", "BRL", "COP", "KMF", "PEN", "SLE", "TZS", "KZT", "CUP", "MDL", "XCD", "BGN", "NIO", "BTN", "MXN", "FKP", "CLF", "OMR", "GHS", "DZD", "BSD", "SEK", "VND", "ZAR", "VES", "DOP", "RON", "BND", "PGK", "SVC", "HTG", "KWD", "TMT", "SBD", "AED", "HKD", "CRC", "DKK", "TTD", "TWD", "UGX", "SLL", "FJD", "ZWL", "ANG", "JPY", "CNY", "DJF", "PLN", "BBD", "WST", "PHP", "PKR", "MVR", "LSL", "HRK", "UZS", "NAD", "KRW", "RUB", "TJS", "TRY", "BWP", "KHR", "BZD", "YER", "CDF", "NOK", "IDR", "MAD", "MMK", "MZN", "BAM", "JOD", "XOF", "NZD", "KES", "BIF", "MUR", "IRR", "UAH", "XPF", "THB", "AWG", "GBP", "GMD", "INR", "MYR", "PAB", "BDT", "HNL", "PYG", "CZK", "GEL", "ISK", "GTQ", "CAD", "KPW", "MWK", "NGN", "SYP", "LAK", "RWF", "KGS", "MKD", "MNT", "HUF", "LYD", "SCR", "XAF", "AOA", "NPR", "CLP", "MRU", "SDG", "STD", "ARS", "SAR", "AUD", "SZL", "VUV", "CVE", "ALL", "RSD", "AFN", "ZMW", "AMD", "MGA", "LRD", "BOB", "AZN", "CUC", "KYD", "BYN", "USD", "EUR", "SGD", "SHP", "SOS", "GYD", "GIP", "GNF", "EGP", "CHF", "LBP", "UYU", "LKR", "IQD" ], "countries": [ { "code": "GU", "name": "Guam" }, { "code": "AW", "name": "Aruba" }, { "code": "HR", "name": "Croatia" }, { "code": "TD", "name": "Chad" }, { "code": "TM", "name": "Turkmenistan" }, { "code": "GB", "name": "UnitedKingdomOfGreatBritainAndNorthernIreland" }, { "code": "CL", "name": "Chile" }, { "code": "LK", "name": "SriLanka" }, { "code": "SI", "name": "Slovenia" }, { "code": "PA", "name": "Panama" }, { "code": "NE", "name": "Niger" }, { "code": "AZ", "name": "Azerbaijan" }, { "code": "MQ", "name": "Martinique" }, { "code": "BY", "name": "Belarus" }, { "code": "FJ", "name": "Fiji" }, { "code": "PY", "name": "Paraguay" }, { "code": "HK", "name": "HongKong" }, { "code": "UZ", "name": "Uzbekistan" }, { "code": "DE", "name": "Germany" }, { "code": "CX", "name": "ChristmasIsland" }, { "code": "BB", "name": "Barbados" }, { "code": "DJ", "name": "Djibouti" }, { "code": "GP", "name": "Guadeloupe" }, { "code": "CR", "name": "CostaRica" }, { "code": "ZM", "name": "Zambia" }, { "code": "ST", "name": "SaoTomeAndPrincipe" }, { "code": "BA", "name": "BosniaAndHerzegovina" }, { "code": "NI", "name": "Nicaragua" }, { "code": "SO", "name": "Somalia" }, { "code": "PR", "name": "PuertoRico" }, { "code": "SC", "name": "Seychelles" }, { "code": "KR", "name": "KoreaRepublic" }, { "code": "FM", "name": "MicronesiaFederatedStates" }, { "code": "DO", "name": "DominicanRepublic" }, { "code": "MO", "name": "Macao" }, { "code": "JP", "name": "Japan" }, { "code": "MH", "name": "MarshallIslands" }, { "code": "AQ", "name": "Antarctica" }, { "code": "CD", "name": "CongoDemocraticRepublic" }, { "code": "NA", "name": "Namibia" }, { "code": "TV", "name": "Tuvalu" }, { "code": "EE", "name": "Estonia" }, { "code": "ML", "name": "Mali" }, { "code": "IS", "name": "Iceland" }, { "code": "SR", "name": "Suriname" }, { "code": "UM", "name": "UnitedStatesMinorOutlyingIslands" }, { "code": "SB", "name": "SolomonIslands" }, { "code": "RO", "name": "Romania" }, { "code": "CI", "name": "CotedIvoire" }, { "code": "MD", "name": "MoldovaRepublic" }, { "code": "GS", "name": "SouthGeorgiaAndTheSouthSandwichIslands" }, { "code": "PF", "name": "FrenchPolynesia" }, { "code": "GE", "name": "Georgia" }, { "code": "JE", "name": "Jersey" }, { "code": "SK", "name": "Slovakia" }, { "code": "ID", "name": "Indonesia" }, { "code": "NR", "name": "Nauru" }, { "code": "CO", "name": "Colombia" }, { "code": "GR", "name": "Greece" }, { "code": "KW", "name": "Kuwait" }, { "code": "TH", "name": "Thailand" }, { "code": "KI", "name": "Kiribati" }, { "code": "BN", "name": "BruneiDarussalam" }, { "code": "WS", "name": "Samoa" }, { "code": "AI", "name": "Anguilla" }, { "code": "TC", "name": "TurksAndCaicosIslands" }, { "code": "BG", "name": "Bulgaria" }, { "code": "RS", "name": "Serbia" }, { "code": "BW", "name": "Botswana" }, { "code": "KM", "name": "Comoros" }, { "code": "SN", "name": "Senegal" }, { "code": "TR", "name": "Turkey" }, { "code": "SL", "name": "SierraLeone" }, { "code": "MC", "name": "Monaco" }, { "code": "BL", "name": "SaintBarthelemy" }, { "code": "GL", "name": "Greenland" }, { "code": "KG", "name": "Kyrgyzstan" }, { "code": "MT", "name": "Malta" }, { "code": "VA", "name": "HolySee" }, { "code": "AS", "name": "AmericanSamoa" }, { "code": "TJ", "name": "Tajikistan" }, { "code": "TN", "name": "Tunisia" }, { "code": "IT", "name": "Italy" }, { "code": "CV", "name": "CaboVerde" }, { "code": "IN", "name": "India" }, { "code": "ME", "name": "Montenegro" }, { "code": "LR", "name": "Liberia" }, { "code": "AE", "name": "UnitedArabEmirates" }, { "code": "TK", "name": "Tokelau" }, { "code": "IQ", "name": "Iraq" }, { "code": "FO", "name": "FaroeIslands" }, { "code": "MW", "name": "Malawi" }, { "code": "SY", "name": "SyrianArabRepublic" }, { "code": "CA", "name": "Canada" }, { "code": "GF", "name": "FrenchGuiana" }, { "code": "ER", "name": "Eritrea" }, { "code": "MY", "name": "Malaysia" }, { "code": "VG", "name": "VirginIslandsBritish" }, { "code": "RE", "name": "Reunion" }, { "code": "JM", "name": "Jamaica" }, { "code": "AF", "name": "Afghanistan" }, { "code": "MN", "name": "Mongolia" }, { "code": "CW", "name": "Curacao" }, { "code": "IE", "name": "Ireland" }, { "code": "CG", "name": "Congo" }, { "code": "NG", "name": "Nigeria" }, { "code": "VC", "name": "SaintVincentAndTheGrenadines" }, { "code": "TO", "name": "Tonga" }, { "code": "LU", "name": "Luxembourg" }, { "code": "TL", "name": "TimorLeste" }, { "code": "MF", "name": "SaintMartinFrenchpart" }, { "code": "AT", "name": "Austria" }, { "code": "ET", "name": "Ethiopia" }, { "code": "SX", "name": "SintMaartenDutchpart" }, { "code": "GT", "name": "Guatemala" }, { "code": "TF", "name": "FrenchSouthernTerritories" }, { "code": "KP", "name": "KoreaDemocraticPeoplesRepublic" }, { "code": "LC", "name": "SaintLucia" }, { "code": "BT", "name": "Bhutan" }, { "code": "SM", "name": "SanMarino" }, { "code": "QA", "name": "Qatar" }, { "code": "DM", "name": "Dominica" }, { "code": "BJ", "name": "Benin" }, { "code": "GA", "name": "Gabon" }, { "code": "YT", "name": "Mayotte" }, { "code": "KZ", "name": "Kazakhstan" }, { "code": "LV", "name": "Latvia" }, { "code": "GG", "name": "Guernsey" }, { "code": "CH", "name": "Switzerland" }, { "code": "HM", "name": "HeardIslandAndMcDonaldIslands" }, { "code": "AG", "name": "AntiguaAndBarbuda" }, { "code": "WF", "name": "WallisAndFutuna" }, { "code": "CC", "name": "CocosKeelingIslands" }, { "code": "ZW", "name": "Zimbabwe" }, { "code": "IL", "name": "Israel" }, { "code": "TG", "name": "Togo" }, { "code": "MG", "name": "Madagascar" }, { "code": "NP", "name": "Nepal" }, { "code": "GW", "name": "GuineaBissau" }, { "code": "PW", "name": "Palau" }, { "code": "LY", "name": "Libya" }, { "code": "FI", "name": "Finland" }, { "code": "AR", "name": "Argentina" }, { "code": "TT", "name": "TrinidadAndTobago" }, { "code": "FR", "name": "France" }, { "code": "MS", "name": "Montserrat" }, { "code": "IO", "name": "BritishIndianOceanTerritory" }, { "code": "TW", "name": "TaiwanProvinceOfChina" }, { "code": "EC", "name": "Ecuador" }, { "code": "NO", "name": "Norway" }, { "code": "MZ", "name": "Mozambique" }, { "code": "GH", "name": "Ghana" }, { "code": "HU", "name": "Hungary" }, { "code": "CU", "name": "Cuba" }, { "code": "LI", "name": "Liechtenstein" }, { "code": "MU", "name": "Mauritius" }, { "code": "EG", "name": "Egypt" }, { "code": "MX", "name": "Mexico" }, { "code": "MV", "name": "Maldives" }, { "code": "BE", "name": "Belgium" }, { "code": "VN", "name": "Vietnam" }, { "code": "NU", "name": "Niue" }, { "code": "CY", "name": "Cyprus" }, { "code": "GQ", "name": "EquatorialGuinea" }, { "code": "SD", "name": "Sudan" }, { "code": "LT", "name": "Lithuania" }, { "code": "BD", "name": "Bangladesh" }, { "code": "NL", "name": "Netherlands" }, { "code": "BH", "name": "Bahrain" }, { "code": "AX", "name": "AlandIslands" }, { "code": "BR", "name": "Brazil" }, { "code": "AM", "name": "Armenia" }, { "code": "UY", "name": "Uruguay" }, { "code": "MP", "name": "NorthernMarianaIslands" }, { "code": "NZ", "name": "NewZealand" }, { "code": "GY", "name": "Guyana" }, { "code": "CZ", "name": "Czechia" }, { "code": "AU", "name": "Australia" }, { "code": "SH", "name": "SaintHelenaAscensionAndTristandaCunha" }, { "code": "HT", "name": "Haiti" }, { "code": "SA", "name": "SaudiArabia" }, { "code": "CM", "name": "Cameroon" }, { "code": "JO", "name": "Jordan" }, { "code": "UA", "name": "Ukraine" }, { "code": "BV", "name": "BouvetIsland" }, { "code": "GI", "name": "Gibraltar" }, { "code": "GD", "name": "Grenada" }, { "code": "UG", "name": "Uganda" }, { "code": "TZ", "name": "TanzaniaUnitedRepublic" }, { "code": "DZ", "name": "Algeria" }, { "code": "PM", "name": "SaintPierreAndMiquelon" }, { "code": "ZA", "name": "SouthAfrica" }, { "code": "OM", "name": "Oman" }, { "code": "KY", "name": "CaymanIslands" }, { "code": "LS", "name": "Lesotho" }, { "code": "ES", "name": "Spain" }, { "code": "MM", "name": "Myanmar" }, { "code": "AO", "name": "Angola" }, { "code": "EH", "name": "WesternSahara" }, { "code": "IR", "name": "IranIslamicRepublic" }, { "code": "HN", "name": "Honduras" }, { "code": "KH", "name": "Cambodia" }, { "code": "KE", "name": "Kenya" }, { "code": "MK", "name": "MacedoniaTheFormerYugoslavRepublic" }, { "code": "AL", "name": "Albania" }, { "code": "US", "name": "UnitedStatesOfAmerica" }, { "code": "YE", "name": "Yemen" }, { "code": "DK", "name": "Denmark" }, { "code": "MR", "name": "Mauritania" }, { "code": "SG", "name": "Singapore" }, { "code": "CN", "name": "China" }, { "code": "IM", "name": "IsleOfMan" }, { "code": "PH", "name": "Philippines" }, { "code": "SZ", "name": "Swaziland" }, { "code": "BO", "name": "BoliviaPlurinationalState" }, { "code": "CF", "name": "CentralAfricanRepublic" }, { "code": "PE", "name": "Peru" }, { "code": "BQ", "name": "BonaireSintEustatiusAndSaba" }, { "code": "SV", "name": "ElSalvador" }, { "code": "NC", "name": "NewCaledonia" }, { "code": "VU", "name": "Vanuatu" }, { "code": "MA", "name": "Morocco" }, { "code": "SS", "name": "SouthSudan" }, { "code": "BZ", "name": "Belize" }, { "code": "PS", "name": "PalestineState" }, { "code": "CK", "name": "CookIslands" }, { "code": "BF", "name": "BurkinaFaso" }, { "code": "FK", "name": "FalklandIslandsMalvinas" }, { "code": "SJ", "name": "SvalbardAndJanMayen" }, { "code": "VE", "name": "VenezuelaBolivarianRepublic" }, { "code": "BI", "name": "Burundi" }, { "code": "PT", "name": "Portugal" }, { "code": "VI", "name": "VirginIslandsUS" }, { "code": "PG", "name": "PapuaNewGuinea" }, { "code": "RU", "name": "RussianFederation" }, { "code": "AD", "name": "Andorra" }, { "code": "NF", "name": "NorfolkIsland" }, { "code": "LB", "name": "Lebanon" }, { "code": "GM", "name": "Gambia" }, { "code": "BM", "name": "Bermuda" }, { "code": "BS", "name": "Bahamas" }, { "code": "KN", "name": "SaintKittsAndNevis" }, { "code": "PN", "name": "Pitcairn" }, { "code": "PL", "name": "Poland" }, { "code": "SE", "name": "Sweden" }, { "code": "RW", "name": "Rwanda" }, { "code": "PK", "name": "Pakistan" }, { "code": "GN", "name": "Guinea" }, { "code": "LA", "name": "LaoPeoplesDemocraticRepublic" } ] } ``` Request with JWT Authentication: ``` curl --location 'http://localhost:8081/v2/payment-methods/filter?connector=stripe&paymentMethodType=debit' \ --header 'x-profile-id: pro_vJRG8ITXZXHXQuoHA59p' \ --header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNjIwY2E1NzAtY2I1Ni00YTUwLTk4MTctODEzYzEyNjljOWUwIiwibWVyY2hhbnRfaWQiOiJtZXJjaGFudF8xNzU1NTkyMzYyIiwicm9sZV9pZCI6InByb2ZpbGVfdmlld19vbmx5IiwiZXhwIjoxNzU1NzY1NjI3LCJvcmdfaWQiOiJvcmdfelFiZUprcUlPWWhMUTNmeDVMOHQiLCJwcm9maWxlX2lkIjoicHJvX3ZKUkc4SVRYWlhIWFF1b0hBNTlwIiwidGVuYW50X2lkIjoicHVibGljIn0.9DafPc6vkoO8K-JLHxetMmmDYQDek35-HV8zrVe5QTg' \ --data '' ``` Respone: ``` { "currencies": [ "ERN", "LSL", "MMK", "LKR", "THB", "SHP", "FKP", "XCD", "NIO", "GIP", "RWF", "CUP", "OMR", "UYU", "GTQ", "GNF", "FJD", "GBP", "KMF", "ILS", "ETB", "SYP", "GHS", "GMD", "MUR", "BSD", "KRW", "MZN", "TMT", "TOP", "SBD", "KGS", "UGX", "UZS", "YER", "RUB", "TZS", "COP", "PYG", "NAD", "SSP", "GYD", "CHF", "KWD", "MYR", "PKR", "SAR", "WST", "EGP", "BAM", "QAR", "XOF", "DZD", "SZL", "CZK", "VND", "SCR", "IDR", "ANG", "LAK", "DJF", "TTD", "HUF", "PLN", "VES", "ALL", "MRU", "ZMW", "STN", "ZWL", "AFN", "NOK", "ISK", "AED", "EUR", "MVR", "CRC", "GEL", "TND", "XAF", "KHR", "IRR", "JOD", "CNY", "CVE", "AWG", "CUC", "NGN", "STD", "MXN", "LYD", "SRD", "BWP", "CDF", "KPW", "SEK", "PGK", "AMD", "NZD", "BOB", "CAD", "NPR", "PEN", "SDG", "MNT", "AZN", "MOP", "BDT", "CLF", "BMD", "BTN", "PAB", "USD", "BGN", "HNL", "DKK", "ZAR", "AOA", "TJS", "VUV", "BHD", "BZD", "TRY", "HKD", "ARS", "BND", "HTG", "LRD", "MGA", "SVC", "SLL", "KES", "HRK", "SLE", "RON", "MKD", "MDL", "UAH", "BIF", "KYD", "BBD", "BRL", "CLP", "SOS", "JPY", "RSD", "INR", "MWK", "AUD", "PHP", "IQD", "LBP", "MAD", "XPF", "JMD", "DOP", "TWD", "KZT", "SGD", "BYN" ], "countries": [ { "code": "VU", "name": "Vanuatu" }, { "code": "AI", "name": "Anguilla" }, { "code": "UA", "name": "Ukraine" }, { "code": "PW", "name": "Palau" }, { "code": "FR", "name": "France" }, { "code": "TO", "name": "Tonga" }, { "code": "JO", "name": "Jordan" }, { "code": "ZW", "name": "Zimbabwe" }, { "code": "KZ", "name": "Kazakhstan" }, { "code": "AW", "name": "Aruba" }, { "code": "GY", "name": "Guyana" }, { "code": "KE", "name": "Kenya" }, { "code": "LS", "name": "Lesotho" }, { "code": "NP", "name": "Nepal" }, { "code": "US", "name": "UnitedStatesOfAmerica" }, { "code": "ER", "name": "Eritrea" }, { "code": "LY", "name": "Libya" }, { "code": "GW", "name": "GuineaBissau" }, { "code": "GP", "name": "Guadeloupe" }, { "code": "NO", "name": "Norway" }, { "code": "TM", "name": "Turkmenistan" }, { "code": "BY", "name": "Belarus" }, { "code": "KH", "name": "Cambodia" }, { "code": "KW", "name": "Kuwait" }, { "code": "JM", "name": "Jamaica" }, { "code": "MQ", "name": "Martinique" }, { "code": "CY", "name": "Cyprus" }, { "code": "TH", "name": "Thailand" }, { "code": "CF", "name": "CentralAfricanRepublic" }, { "code": "PH", "name": "Philippines" }, { "code": "IO", "name": "BritishIndianOceanTerritory" }, { "code": "FK", "name": "FalklandIslandsMalvinas" }, { "code": "EH", "name": "WesternSahara" }, { "code": "TC", "name": "TurksAndCaicosIslands" }, { "code": "KN", "name": "SaintKittsAndNevis" }, { "code": "MW", "name": "Malawi" }, { "code": "UY", "name": "Uruguay" }, { "code": "SI", "name": "Slovenia" }, { "code": "HN", "name": "Honduras" }, { "code": "PT", "name": "Portugal" }, { "code": "RO", "name": "Romania" }, { "code": "BF", "name": "BurkinaFaso" }, { "code": "GH", "name": "Ghana" }, { "code": "KP", "name": "KoreaDemocraticPeoplesRepublic" }, { "code": "CC", "name": "CocosKeelingIslands" }, { "code": "BE", "name": "Belgium" }, { "code": "BT", "name": "Bhutan" }, { "code": "CG", "name": "Congo" }, { "code": "SX", "name": "SintMaartenDutchpart" }, { "code": "CL", "name": "Chile" }, { "code": "DM", "name": "Dominica" }, { "code": "TF", "name": "FrenchSouthernTerritories" }, { "code": "MZ", "name": "Mozambique" }, { "code": "PL", "name": "Poland" }, { "code": "YE", "name": "Yemen" }, { "code": "MX", "name": "Mexico" }, { "code": "AS", "name": "AmericanSamoa" }, { "code": "TG", "name": "Togo" }, { "code": "OM", "name": "Oman" }, { "code": "CH", "name": "Switzerland" }, { "code": "AD", "name": "Andorra" }, { "code": "WS", "name": "Samoa" }, { "code": "TN", "name": "Tunisia" }, { "code": "GG", "name": "Guernsey" }, { "code": "SD", "name": "Sudan" }, { "code": "CD", "name": "CongoDemocraticRepublic" }, { "code": "CM", "name": "Cameroon" }, { "code": "CU", "name": "Cuba" }, { "code": "SY", "name": "SyrianArabRepublic" }, { "code": "BM", "name": "Bermuda" }, { "code": "PR", "name": "PuertoRico" }, { "code": "PK", "name": "Pakistan" }, { "code": "BI", "name": "Burundi" }, { "code": "ET", "name": "Ethiopia" }, { "code": "BJ", "name": "Benin" }, { "code": "AQ", "name": "Antarctica" }, { "code": "CX", "name": "ChristmasIsland" }, { "code": "IE", "name": "Ireland" }, { "code": "VI", "name": "VirginIslandsUS" }, { "code": "PM", "name": "SaintPierreAndMiquelon" }, { "code": "GQ", "name": "EquatorialGuinea" }, { "code": "IM", "name": "IsleOfMan" }, { "code": "SA", "name": "SaudiArabia" }, { "code": "BZ", "name": "Belize" }, { "code": "CO", "name": "Colombia" }, { "code": "MT", "name": "Malta" }, { "code": "AU", "name": "Australia" }, { "code": "EE", "name": "Estonia" }, { "code": "NR", "name": "Nauru" }, { "code": "KR", "name": "KoreaRepublic" }, { "code": "AZ", "name": "Azerbaijan" }, { "code": "NG", "name": "Nigeria" }, { "code": "TW", "name": "TaiwanProvinceOfChina" }, { "code": "UZ", "name": "Uzbekistan" }, { "code": "IS", "name": "Iceland" }, { "code": "BQ", "name": "BonaireSintEustatiusAndSaba" }, { "code": "MG", "name": "Madagascar" }, { "code": "MC", "name": "Monaco" }, { "code": "LK", "name": "SriLanka" }, { "code": "NF", "name": "NorfolkIsland" }, { "code": "MM", "name": "Myanmar" }, { "code": "GS", "name": "SouthGeorgiaAndTheSouthSandwichIslands" }, { "code": "LI", "name": "Liechtenstein" }, { "code": "CZ", "name": "Czechia" }, { "code": "TK", "name": "Tokelau" }, { "code": "GI", "name": "Gibraltar" }, { "code": "PS", "name": "PalestineState" }, { "code": "SG", "name": "Singapore" }, { "code": "SM", "name": "SanMarino" }, { "code": "AG", "name": "AntiguaAndBarbuda" }, { "code": "ZA", "name": "SouthAfrica" }, { "code": "YT", "name": "Mayotte" }, { "code": "MP", "name": "NorthernMarianaIslands" }, { "code": "RW", "name": "Rwanda" }, { "code": "HK", "name": "HongKong" }, { "code": "HT", "name": "Haiti" }, { "code": "PA", "name": "Panama" }, { "code": "PN", "name": "Pitcairn" }, { "code": "LT", "name": "Lithuania" }, { "code": "VA", "name": "HolySee" }, { "code": "MF", "name": "SaintMartinFrenchpart" }, { "code": "LC", "name": "SaintLucia" }, { "code": "GE", "name": "Georgia" }, { "code": "BB", "name": "Barbados" }, { "code": "BD", "name": "Bangladesh" }, { "code": "VN", "name": "Vietnam" }, { "code": "AX", "name": "AlandIslands" }, { "code": "TJ", "name": "Tajikistan" }, { "code": "GU", "name": "Guam" }, { "code": "FJ", "name": "Fiji" }, { "code": "BS", "name": "Bahamas" }, { "code": "PG", "name": "PapuaNewGuinea" }, { "code": "IQ", "name": "Iraq" }, { "code": "UG", "name": "Uganda" }, { "code": "MN", "name": "Mongolia" }, { "code": "GM", "name": "Gambia" }, { "code": "UM", "name": "UnitedStatesMinorOutlyingIslands" }, { "code": "NZ", "name": "NewZealand" }, { "code": "JE", "name": "Jersey" }, { "code": "SC", "name": "Seychelles" }, { "code": "IT", "name": "Italy" }, { "code": "RE", "name": "Reunion" }, { "code": "GF", "name": "FrenchGuiana" }, { "code": "TD", "name": "Chad" }, { "code": "NC", "name": "NewCaledonia" }, { "code": "CV", "name": "CaboVerde" }, { "code": "SL", "name": "SierraLeone" }, { "code": "GT", "name": "Guatemala" }, { "code": "KY", "name": "CaymanIslands" }, { "code": "ID", "name": "Indonesia" }, { "code": "SR", "name": "Suriname" }, { "code": "WF", "name": "WallisAndFutuna" }, { "code": "LA", "name": "LaoPeoplesDemocraticRepublic" }, { "code": "TT", "name": "TrinidadAndTobago" }, { "code": "NA", "name": "Namibia" }, { "code": "ZM", "name": "Zambia" }, { "code": "SN", "name": "Senegal" }, { "code": "MA", "name": "Morocco" }, { "code": "NL", "name": "Netherlands" }, { "code": "NI", "name": "Nicaragua" }, { "code": "KG", "name": "Kyrgyzstan" }, { "code": "MY", "name": "Malaysia" }, { "code": "TR", "name": "Turkey" }, { "code": "NE", "name": "Niger" }, { "code": "MH", "name": "MarshallIslands" }, { "code": "LR", "name": "Liberia" }, { "code": "FI", "name": "Finland" }, { "code": "MD", "name": "MoldovaRepublic" }, { "code": "ME", "name": "Montenegro" }, { "code": "AL", "name": "Albania" }, { "code": "HM", "name": "HeardIslandAndMcDonaldIslands" }, { "code": "FM", "name": "MicronesiaFederatedStates" }, { "code": "CR", "name": "CostaRica" }, { "code": "CW", "name": "Curacao" }, { "code": "SO", "name": "Somalia" }, { "code": "MK", "name": "MacedoniaTheFormerYugoslavRepublic" }, { "code": "TZ", "name": "TanzaniaUnitedRepublic" }, { "code": "RS", "name": "Serbia" }, { "code": "KM", "name": "Comoros" }, { "code": "VG", "name": "VirginIslandsBritish" }, { "code": "AM", "name": "Armenia" }, { "code": "BH", "name": "Bahrain" }, { "code": "BL", "name": "SaintBarthelemy" }, { "code": "NU", "name": "Niue" }, { "code": "LU", "name": "Luxembourg" }, { "code": "MO", "name": "Macao" }, { "code": "BA", "name": "BosniaAndHerzegovina" }, { "code": "AF", "name": "Afghanistan" }, { "code": "EG", "name": "Egypt" }, { "code": "CK", "name": "CookIslands" }, { "code": "CA", "name": "Canada" }, { "code": "SZ", "name": "Swaziland" }, { "code": "ML", "name": "Mali" }, { "code": "BR", "name": "Brazil" }, { "code": "LV", "name": "Latvia" }, { "code": "TL", "name": "TimorLeste" }, { "code": "BG", "name": "Bulgaria" }, { "code": "AT", "name": "Austria" }, { "code": "KI", "name": "Kiribati" }, { "code": "IR", "name": "IranIslamicRepublic" }, { "code": "MV", "name": "Maldives" }, { "code": "RU", "name": "RussianFederation" }, { "code": "VE", "name": "VenezuelaBolivarianRepublic" }, { "code": "AE", "name": "UnitedArabEmirates" }, { "code": "VC", "name": "SaintVincentAndTheGrenadines" }, { "code": "MS", "name": "Montserrat" }, { "code": "AO", "name": "Angola" }, { "code": "PY", "name": "Paraguay" }, { "code": "BV", "name": "BouvetIsland" }, { "code": "DO", "name": "DominicanRepublic" }, { "code": "SH", "name": "SaintHelenaAscensionAndTristandaCunha" }, { "code": "ES", "name": "Spain" }, { "code": "AR", "name": "Argentina" }, { "code": "LB", "name": "Lebanon" }, { "code": "PF", "name": "FrenchPolynesia" }, { "code": "IL", "name": "Israel" }, { "code": "DJ", "name": "Djibouti" }, { "code": "DZ", "name": "Algeria" }, { "code": "TV", "name": "Tuvalu" }, { "code": "MU", "name": "Mauritius" }, { "code": "JP", "name": "Japan" }, { "code": "DK", "name": "Denmark" }, { "code": "SE", "name": "Sweden" }, { "code": "CN", "name": "China" }, { "code": "PE", "name": "Peru" }, { "code": "BW", "name": "Botswana" }, { "code": "SV", "name": "ElSalvador" }, { "code": "CI", "name": "CotedIvoire" }, { "code": "HR", "name": "Croatia" }, { "code": "SK", "name": "Slovakia" }, { "code": "GD", "name": "Grenada" }, { "code": "SS", "name": "SouthSudan" }, { "code": "BO", "name": "BoliviaPlurinationalState" }, { "code": "QA", "name": "Qatar" }, { "code": "HU", "name": "Hungary" }, { "code": "SB", "name": "SolomonIslands" }, { "code": "BN", "name": "BruneiDarussalam" }, { "code": "GB", "name": "UnitedKingdomOfGreatBritainAndNorthernIreland" }, { "code": "GL", "name": "Greenland" }, { "code": "ST", "name": "SaoTomeAndPrincipe" }, { "code": "GR", "name": "Greece" }, { "code": "FO", "name": "FaroeIslands" }, { "code": "SJ", "name": "SvalbardAndJanMayen" }, { "code": "IN", "name": "India" }, { "code": "EC", "name": "Ecuador" }, { "code": "MR", "name": "Mauritania" }, { "code": "GA", "name": "Gabon" }, { "code": "DE", "name": "Germany" }, { "code": "GN", "name": "Guinea" } ] } ``` Closes #8977 ## Checklist <!-- Put an `x` in the boxes that apply --> - [X] I formatted the code `cargo +nightly fmt --all` - [X] I addressed lints thrown by `cargo clippy` - [X] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Other** - `crates/router/src/routes/app.rs` - `crates/router/src/routes/payment_methods.rs` **Code Patterns Applied:** - Implement new functions (1 changes) - Extend existing types with new fields (7 changes) **Detailed Identifier Changes:** Commit 6016377a: Files to modify: **crates/router/src/routes/app.rs** Modify existing code **crates/router/src/routes/payment_methods.rs** Add: - function: pub::list_countries_currencies_for_connector_payment_method
{"pr_number": 8978, "pr_title": "feat(payment_methods): add payment-methods/filter endpoint to list countries and currencies for connector payment method in v2", "merged_at": "2025-08-22T13:26:14Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "connector"]}, "hierarchy": {"other": ["crates/router/src/routes/app.rs", "crates/router/src/routes/payment_methods.rs"]}, "change_types": {"functions_added": 1, "fields_added": 7}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
docs: add initial authentication page ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [x] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. Doc update on admin apis If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Other** - `api-reference/docs.json` - `api-reference/essentials/authentication.mdx`
{"pr_number": 8719, "pr_title": "docs: add initial authentication page", "merged_at": "2025-07-28T09:57:35Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"other": ["api-reference/docs.json", "api-reference/essentials/authentication.mdx"]}, "change_types": {}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
ci(nix): update om command invocation ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [x] CI/CD ## Description Updates `om` CLI invocation based on this PR - https://github.com/juspay/omnix/pull/417 ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding 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 fixes CI Nix workflow for GitHub actions which is run as a part of PR checks. ## How did you test it? In this PR - CI Nix workflow should not fail. ## 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** - `.github/workflows/nix.yaml`
{"pr_number": 7259, "pr_title": "ci(nix): update om command invocation", "merged_at": "2025-02-14T10:53:13Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"other": [".github/workflows/nix.yaml"]}, "change_types": {}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}