prompt
stringlengths
83
247k
response
stringlengths
121
36.1k
metadata
stringlengths
314
42.3k
feat(connector): [payload] introduce no-3ds 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 --> This PR introduces the below given flows for Payload connector: - [x] Cards (No 3DS) - [x] PSync - [x] Void - [x] Refunds - [x] AVS Checks - [x] Cypress Connector does not support 3DS transactions. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> New connector. Closes #8527 ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Running Cypress will be a pain as the connector marks automatic capture payments as `duplicate` eventually `failing` the payment if done within 15 second time span. Curls: <details> <summary>Authorize 3DS</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_ojBKSaGCsEr3lo3NumPRA8oytAaoUkFZBfbdQ2XJyzFqzYzbQFOgQqgBCOVqeTCB' \ --data-raw '{ "amount": 10400, "currency": "USD", "confirm": false, "capture_method": "manual", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 10400, "customer_id": "customer", "email": "guesjhvghht@example.com", "phone": "999999999", "phone_country_code": "+1", "description": "Its my first payment request", "authentication_type": "three_ds", "return_url": "https://duck.com", "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US" , "first_name": "PiX" , "last_name": "THE" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "PiX" } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" }, "browser_info": { "color_depth": 24, "java_enabled": true, "java_script_enabled": true, "language": "en-GB", "screen_height": 720, "screen_width": 1280, "time_zone": -330, "ip_address": "208.127.127.193", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0" } }' ``` ```json { "payment_id": "pay_dBN3ZKKNj7sCIjt0qYRH", "merchant_id": "postman_merchant_GHAction_1751615211", "status": "requires_payment_method", "amount": 10400, "net_amount": 10400, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": null, "client_secret": "pay_dBN3ZKKNj7sCIjt0qYRH_secret_9e4dJN8io2oIY6qNiNf5", "created": "2025-07-04T08:38:12.557Z", "currency": "USD", "customer_id": "customer", "customer": { "id": "customer", "name": null, "email": "guesjhvghht@example.com", "phone": "999999999", "phone_country_code": "+1" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "manual", "payment_method": null, "payment_method_data": null, "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "PiX", "last_name": null }, "phone": null, "email": null }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "PiX", "last_name": "THE" }, "phone": null, "email": null }, "order_details": null, "email": "guesjhvghht@example.com", "name": null, "phone": "999999999", "return_url": "https://duck.com/", "authentication_type": "three_ds", "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": null, "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "customer", "created_at": 1751618292, "expires": 1751621892, "secret": "epk_4f9fe3bf5dc94b57819620a7d3c0918a" }, "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_GXv0G95IHPxJokca7ece", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": null, "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-07-04T08:53:12.557Z", "fingerprint": null, "browser_info": { "language": "en-GB", "time_zone": -330, "ip_address": "208.127.127.193", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0", "color_depth": 24, "java_enabled": true, "screen_width": 1280, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 720, "java_script_enabled": true }, "payment_method_id": null, "payment_method_status": null, "updated": "2025-07-04T08:38:12.568Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": null, "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null } ``` </details> <details> <summary>Confirm 3DS</summary> ```curl curl --location 'http://Localhost:8080/payments/pay_dBN3ZKKNj7sCIjt0qYRH/confirm' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: pk_dev_852ccab463694df1a50337317c37c05c' \ --data '{ "payment_method": "card", "payment_method_data": { "card": { "card_number": "4242424242424242", "card_exp_month": "10", "card_exp_year": "25", "card_holder_name": "Joseph Doe", "card_cvc": "123" } }, "client_secret": "pay_dBN3ZKKNj7sCIjt0qYRH_secret_9e4dJN8io2oIY6qNiNf5" }' ``` ```json { "error": { "type": "invalid_request", "message": "Payment method type not supported", "code": "IR_19", "reason": "Cards 3DS is not supported by Payload" } } ``` </details> <details> <summary>Authorize No 3DS</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_ojBKSaGCsEr3lo3NumPRA8oytAaoUkFZBfbdQ2XJyzFqzYzbQFOgQqgBCOVqeTCB' \ --data-raw '{ "amount": 10400, "currency": "USD", "confirm": false, "capture_method": "manual", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 10400, "customer_id": "customer", "email": "guesjhvghht@example.com", "phone": "999999999", "phone_country_code": "+1", "description": "Its my first payment request", "authentication_type": "no_three_ds", "return_url": "https://duck.com", "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US" , "first_name": "PiX" , "last_name": "THE" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "PiX" } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" }, "browser_info": { "color_depth": 24, "java_enabled": true, "java_script_enabled": true, "language": "en-GB", "screen_height": 720, "screen_width": 1280, "time_zone": -330, "ip_address": "208.127.127.193", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0" } }' ``` ```json { "payment_id": "pay_oG45Z9ZE9KVNSlDE5kEU", "merchant_id": "postman_merchant_GHAction_1751615211", "status": "requires_payment_method", "amount": 10400, "net_amount": 10400, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": null, "client_secret": "pay_oG45Z9ZE9KVNSlDE5kEU_secret_FEs1MMwoHyFsb8L8joG3", "created": "2025-07-04T08:39:58.524Z", "currency": "USD", "customer_id": "customer", "customer": { "id": "customer", "name": null, "email": "guesjhvghht@example.com", "phone": "999999999", "phone_country_code": "+1" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "manual", "payment_method": null, "payment_method_data": null, "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "PiX", "last_name": null }, "phone": null, "email": null }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "PiX", "last_name": "THE" }, "phone": null, "email": null }, "order_details": null, "email": "guesjhvghht@example.com", "name": null, "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": null, "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "customer", "created_at": 1751618398, "expires": 1751621998, "secret": "epk_0f9fd59624604cfcae9b1340ad176710" }, "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_GXv0G95IHPxJokca7ece", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": null, "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-07-04T08:54:58.524Z", "fingerprint": null, "browser_info": { "language": "en-GB", "time_zone": -330, "ip_address": "208.127.127.193", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0", "color_depth": 24, "java_enabled": true, "screen_width": 1280, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 720, "java_script_enabled": true }, "payment_method_id": null, "payment_method_status": null, "updated": "2025-07-04T08:39:58.537Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": null, "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null } ``` </details> <details> <summary>Confirm</summary> ```curl curl --location 'http://Localhost:8080/payments/pay_oG45Z9ZE9KVNSlDE5kEU/confirm' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: pk_dev_852ccab463694df1a50337317c37c05c' \ --data '{ "payment_method": "card", "payment_method_data": { "card": { "card_number": "4242424242424242", "card_exp_month": "10", "card_exp_year": "25", "card_holder_name": "Joseph Doe", "card_cvc": "123" } }, "client_secret": "pay_oG45Z9ZE9KVNSlDE5kEU_secret_FEs1MMwoHyFsb8L8joG3" }' ``` ```json { "payment_id": "pay_oG45Z9ZE9KVNSlDE5kEU", "merchant_id": "postman_merchant_GHAction_1751615211", "status": "requires_capture", "amount": 10400, "net_amount": 10400, "shipping_cost": null, "amount_capturable": 10400, "amount_received": null, "connector": "payload", "client_secret": "pay_oG45Z9ZE9KVNSlDE5kEU_secret_FEs1MMwoHyFsb8L8joG3", "created": "2025-07-04T08:39:58.524Z", "currency": "USD", "customer_id": "customer", "customer": { "id": "customer", "name": null, "email": "guesjhvghht@example.com", "phone": "999999999", "phone_country_code": "+1" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "manual", "payment_method": "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": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "PiX", "last_name": null }, "phone": null, "email": null }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "PiX", "last_name": "THE" }, "phone": null, "email": null }, "order_details": null, "email": "guesjhvghht@example.com", "name": null, "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": "txn_3epWFzMKsIMDjAdQApgOe", "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2019-09-10T10:11:12Z", "new_customer": "true" }, "connector_metadata": null, "feature_metadata": null, "reference_id": "PL-LS0-6XQ-OCT", "payment_link": null, "profile_id": "pro_GXv0G95IHPxJokca7ece", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_QfDIuUKUfARzzR3l0Q4n", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-07-04T08:54:58.524Z", "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-07-04T08:40:09.253Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null } ``` </details> <details> <summary>Capture</summary> ```curl curl --location 'http://Localhost:8080/payments/pay_oG45Z9ZE9KVNSlDE5kEU/capture' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_ojBKSaGCsEr3lo3NumPRA8oytAaoUkFZBfbdQ2XJyzFqzYzbQFOgQqgBCOVqeTCB' \ --data '{ "amount_to_capture": 10400, "statement_descriptor_name": "Joseph", "statement_descriptor_suffix": "JS" }' ``` ```json { "payment_id": "pay_oG45Z9ZE9KVNSlDE5kEU", "merchant_id": "postman_merchant_GHAction_1751615211", "status": "succeeded", "amount": 10400, "net_amount": 10400, "shipping_cost": null, "amount_capturable": 0, "amount_received": 10400, "connector": "payload", "client_secret": "pay_oG45Z9ZE9KVNSlDE5kEU_secret_FEs1MMwoHyFsb8L8joG3", "created": "2025-07-04T08:39:58.524Z", "currency": "USD", "customer_id": "customer", "customer": { "id": "customer", "name": null, "email": "guesjhvghht@example.com", "phone": "999999999", "phone_country_code": "+1" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "manual", "payment_method": "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": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "PiX", "last_name": null }, "phone": null, "email": null }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "PiX", "last_name": "THE" }, "phone": null, "email": null }, "order_details": null, "email": "guesjhvghht@example.com", "name": null, "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": "txn_3epWFzMKsIMDjAdQApgOe", "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2019-09-10T10:11:12Z", "new_customer": "true" }, "connector_metadata": null, "feature_metadata": null, "reference_id": "PL-LS0-6XQ-OCT", "payment_link": null, "profile_id": "pro_GXv0G95IHPxJokca7ece", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_QfDIuUKUfARzzR3l0Q4n", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-07-04T08:54:58.524Z", "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-07-04T08:41:34.623Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null } ``` </details> <details> <summary>PSync</summary> ```curl curl --location 'http://Localhost:8080/payments/pay_oG45Z9ZE9KVNSlDE5kEU?force_sync=true' \ --header 'Accept: application/json' \ --header 'api-key: dev_ojBKSaGCsEr3lo3NumPRA8oytAaoUkFZBfbdQ2XJyzFqzYzbQFOgQqgBCOVqeTCB' ``` ```json { "payment_id": "pay_oG45Z9ZE9KVNSlDE5kEU", "merchant_id": "postman_merchant_GHAction_1751615211", "status": "succeeded", "amount": 10400, "net_amount": 10400, "shipping_cost": null, "amount_capturable": 0, "amount_received": 10400, "connector": "payload", "client_secret": "pay_oG45Z9ZE9KVNSlDE5kEU_secret_FEs1MMwoHyFsb8L8joG3", "created": "2025-07-04T08:39:58.524Z", "currency": "USD", "customer_id": "customer", "customer": { "id": "customer", "name": null, "email": "guesjhvghht@example.com", "phone": "999999999", "phone_country_code": "+1" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "manual", "payment_method": "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": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "PiX", "last_name": null }, "phone": null, "email": null }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "PiX", "last_name": "THE" }, "phone": null, "email": null }, "order_details": null, "email": "guesjhvghht@example.com", "name": null, "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": "txn_3epWFzMKsIMDjAdQApgOe", "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2019-09-10T10:11:12Z", "new_customer": "true" }, "connector_metadata": null, "feature_metadata": null, "reference_id": "PL-LS0-6XQ-OCT", "payment_link": null, "profile_id": "pro_GXv0G95IHPxJokca7ece", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_QfDIuUKUfARzzR3l0Q4n", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-07-04T08:54:58.524Z", "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-07-04T08:41:34.623Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null } ``` </details> <details> <summary>Refund</summary> ```curl curl --location 'http://Localhost:8080/refunds' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_ojBKSaGCsEr3lo3NumPRA8oytAaoUkFZBfbdQ2XJyzFqzYzbQFOgQqgBCOVqeTCB' \ --data '{ "payment_id": "pay_oG45Z9ZE9KVNSlDE5kEU", "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_zEyDe7aksCgcYsvZDivv", "payment_id": "pay_oG45Z9ZE9KVNSlDE5kEU", "amount": 600, "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-07-04T08:42:07.233Z", "updated_at": "2025-07-04T08:42:08.116Z", "connector": "payload", "profile_id": "pro_GXv0G95IHPxJokca7ece", "merchant_connector_id": "mca_QfDIuUKUfARzzR3l0Q4n", "split_refunds": null, "issuer_error_code": null, "issuer_error_message": null } ``` </details> <details> <summary>Retrieve</summary> ```curl curl --location 'http://Localhost:8080/refunds/ref_zEyDe7aksCgcYsvZDivv' \ --header 'Accept: application/json' \ --header 'api-key: dev_ojBKSaGCsEr3lo3NumPRA8oytAaoUkFZBfbdQ2XJyzFqzYzbQFOgQqgBCOVqeTCB' ``` ```json { "refund_id": "ref_zEyDe7aksCgcYsvZDivv", "payment_id": "pay_oG45Z9ZE9KVNSlDE5kEU", "amount": 600, "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-07-04T08:42:07.233Z", "updated_at": "2025-07-04T08:42:08.116Z", "connector": "payload", "profile_id": "pro_GXv0G95IHPxJokca7ece", "merchant_connector_id": "mca_QfDIuUKUfARzzR3l0Q4n", "split_refunds": null, "issuer_error_code": null, "issuer_error_message": null } ``` </details> <details> <summary>Merchant Payment Methods List</summary> ```curl curl --location 'http://Localhost:8080/account/payment_methods?client_secret=pay_sTHSF5DAnYQbkieTlWLf_secret_tsJjXuEgleLsBp0Ku8NH' \ --header 'Accept: application/json' \ --header 'api-key: pk_dev_987a41163e3044679cd16d6293365850' ``` ```json { "redirect_url": "https://duck.com/", "currency": "USD", "payment_methods": [ { "payment_method": "card", "payment_method_types": [ { "payment_method_type": "credit", "payment_experience": null, "card_networks": [ { "card_network": "Mastercard", "surcharge_details": null, "eligible_connectors": [ "payload" ] }, { "card_network": "DinersClub", "surcharge_details": null, "eligible_connectors": [ "payload" ] }, { "card_network": "Interac", "surcharge_details": null, "eligible_connectors": [ "payload" ] }, { "card_network": "AmericanExpress", "surcharge_details": null, "eligible_connectors": [ "payload" ] }, { "card_network": "Discover", "surcharge_details": null, "eligible_connectors": [ "payload" ] }, { "card_network": "UnionPay", "surcharge_details": null, "eligible_connectors": [ "payload" ] }, { "card_network": "Visa", "surcharge_details": null, "eligible_connectors": [ "payload" ] }, { "card_network": "JCB", "surcharge_details": null, "eligible_connectors": [ "payload" ] }, { "card_network": "RuPay", "surcharge_details": null, "eligible_connectors": [ "payload" ] } ], "bank_names": null, "bank_debits": null, "bank_transfers": null, "required_fields": { "email": { "required_field": "email", "display_name": "email", "field_type": "user_email_address", "value": "guesjhvghht@example.com" }, "payment_method_data.card.card_cvc": { "required_field": "payment_method_data.card.card_cvc", "display_name": "card_cvc", "field_type": "user_card_cvc", "value": null }, "billing.address.last_name": { "required_field": "payment_method_data.billing.address.last_name", "display_name": "card_holder_name", "field_type": "user_full_name", "value": "THE" }, "payment_method_data.card.card_exp_year": { "required_field": "payment_method_data.card.card_exp_year", "display_name": "card_exp_year", "field_type": "user_card_expiry_year", "value": null }, "billing.address.line1": { "required_field": "payment_method_data.billing.address.line1", "display_name": "line1", "field_type": "user_address_line1", "value": "1467" }, "billing.address.city": { "required_field": "payment_method_data.billing.address.city", "display_name": "city", "field_type": "user_address_city", "value": "San Fransico" }, "payment_method_data.card.card_exp_month": { "required_field": "payment_method_data.card.card_exp_month", "display_name": "card_exp_month", "field_type": "user_card_expiry_month", "value": null }, "payment_method_data.card.card_number": { "required_field": "payment_method_data.card.card_number", "display_name": "card_number", "field_type": "user_card_number", "value": null }, "billing.address.zip": { "required_field": "payment_method_data.billing.address.zip", "display_name": "zip", "field_type": "user_address_pincode", "value": "94122" }, "billing.address.first_name": { "required_field": "payment_method_data.billing.address.first_name", "display_name": "card_holder_name", "field_type": "user_full_name", "value": "PiX" }, "billing.address.country": { "required_field": "payment_method_data.billing.address.country", "display_name": "country", "field_type": { "user_address_country": { "options": [ "ALL" ] } }, "value": "US" }, "billing.address.state": { "required_field": "payment_method_data.billing.address.state", "display_name": "state", "field_type": "user_address_state", "value": "California" } }, "surcharge_details": null, "pm_auth_connector": null }, { "payment_method_type": "debit", "payment_experience": null, "card_networks": [ { "card_network": "UnionPay", "surcharge_details": null, "eligible_connectors": [ "payload" ] }, { "card_network": "DinersClub", "surcharge_details": null, "eligible_connectors": [ "payload" ] }, { "card_network": "Interac", "surcharge_details": null, "eligible_connectors": [ "payload" ] }, { "card_network": "AmericanExpress", "surcharge_details": null, "eligible_connectors": [ "payload" ] }, { "card_network": "RuPay", "surcharge_details": null, "eligible_connectors": [ "payload" ] }, { "card_network": "Visa", "surcharge_details": null, "eligible_connectors": [ "payload" ] }, { "card_network": "Mastercard", "surcharge_details": null, "eligible_connectors": [ "payload" ] }, { "card_network": "JCB", "surcharge_details": null, "eligible_connectors": [ "payload" ] }, { "card_network": "Discover", "surcharge_details": null, "eligible_connectors": [ "payload" ] } ], "bank_names": null, "bank_debits": null, "bank_transfers": null, "required_fields": { "email": { "required_field": "email", "display_name": "email", "field_type": "user_email_address", "value": "guesjhvghht@example.com" }, "payment_method_data.card.card_cvc": { "required_field": "payment_method_data.card.card_cvc", "display_name": "card_cvc", "field_type": "user_card_cvc", "value": null }, "billing.address.last_name": { "required_field": "payment_method_data.billing.address.last_name", "display_name": "card_holder_name", "field_type": "user_full_name", "value": "THE" }, "payment_method_data.card.card_exp_year": { "required_field": "payment_method_data.card.card_exp_year", "display_name": "card_exp_year", "field_type": "user_card_expiry_year", "value": null }, "billing.address.line1": { "required_field": "payment_method_data.billing.address.line1", "display_name": "line1", "field_type": "user_address_line1", "value": "1467" }, "billing.address.city": { "required_field": "payment_method_data.billing.address.city", "display_name": "city", "field_type": "user_address_city", "value": "San Fransico" }, "payment_method_data.card.card_exp_month": { "required_field": "payment_method_data.card.card_exp_month", "display_name": "card_exp_month", "field_type": "user_card_expiry_month", "value": null }, "payment_method_data.card.card_number": { "required_field": "payment_method_data.card.card_number", "display_name": "card_number", "field_type": "user_card_number", "value": null }, "billing.address.zip": { "required_field": "payment_method_data.billing.address.zip", "display_name": "zip", "field_type": "user_address_pincode", "value": "94122" }, "billing.address.first_name": { "required_field": "payment_method_data.billing.address.first_name", "display_name": "card_holder_name", "field_type": "user_full_name", "value": "PiX" }, "billing.address.country": { "required_field": "payment_method_data.billing.address.country", "display_name": "country", "field_type": { "user_address_country": { "options": [ "ALL" ] } }, "value": "US" }, "billing.address.state": { "required_field": "payment_method_data.billing.address.state", "display_name": "state", "field_type": "user_address_state", "value": "California" } }, "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 } ``` </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 <!-- @coderabbitai ignore -->
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Core Business Logic** - `crates/router/src/core/connector_validation.rs` **2. External Connector Integration** - `crates/common_enums/src/connector_enums.rs` - `crates/connector_configs/src/connector.rs` - `crates/hyperswitch_connectors/src/connectors/payload.rs` - ... and 4 more files **3. Type Definitions** - `crates/router/src/types/api.rs` - `crates/router/src/types/transformers.rs` **4. Tests** - `cypress-tests/cypress/e2e/configs/Payment/Payload.js` - `cypress-tests/cypress/e2e/configs/Payment/Utils.js` **5. Other** - `api-reference/v1/openapi_spec_v1.json` - `api-reference/v2/openapi_spec_v2.json` **Code Patterns Applied:** - Define new data structures (11 changes) - Implement new functions (12 changes) - Extend existing types with new fields (629 changes) - Add conditional logic for feature flags or filtering (1 changes) **Detailed Identifier Changes:** Commit baad3f6a: 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/payload.rs** Remove: - impl: impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Payload 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 ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Payload - mod: private::requests - mod: private::responses **crates/hyperswitch_connectors/src/connectors/payload/requests.rs** Add: - struct: pub::BillingAddress - struct: pub::PayloadCardsRequestData - struct: pub::PayloadCard - struct: pub::PayloadCancelRequest - struct: pub::PayloadCaptureRequest - struct: pub::PayloadRefundRequest - enum: pub::PayloadPaymentsRequest - enum: pub::TransactionTypes **crates/hyperswitch_connectors/src/connectors/payload/responses.rs** Add: - struct: pub::PayloadCardsResponseData - struct: pub::PayloadCardResponse - struct: pub::RefundsLedger - struct: pub::PayloadRefundResponse - struct: pub::PayloadErrorResponse - enum: pub::PayloadPaymentStatus - enum: pub::PayloadPaymentsResponse - enum: pub::AvsResponse - enum: pub::RefundStatus **crates/hyperswitch_connectors/src/connectors/payload/transformers.rs** Remove: - struct: pub::PayloadPaymentsRequest - struct: pub::PayloadCard - struct: pub::PayloadPaymentsResponse - struct: pub::RefundResponse - struct: pub::PayloadErrorResponse - enum: pub::PayloadPaymentStatus Add: - function: private::from - function: private::from - function: private::try_from - impl: impl From<(StringMajorUnit, T)> for PayloadRouterData<T> - impl: impl From<responses::PayloadPaymentStatus> for common_enums::AttemptStatus **crates/payment_methods/src/configs/payment_connector_required_fields.rs** Modify existing code **crates/router/src/core/connector_validation.rs** Modify existing code **crates/router/src/types/api.rs** Modify existing code **crates/router/src/types/transformers.rs** Modify existing code
{"pr_number": 8545, "pr_title": "feat(connector): [payload] introduce no-3ds cards", "merged_at": "2025-07-05T15:10:04Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"core_business": ["crates/router/src/core/connector_validation.rs"], "connectors": ["crates/common_enums/src/connector_enums.rs", "crates/connector_configs/src/connector.rs", "crates/hyperswitch_connectors/src/connectors/payload.rs", "crates/hyperswitch_connectors/src/connectors/payload/requests.rs", "crates/hyperswitch_connectors/src/connectors/payload/responses.rs", "crates/hyperswitch_connectors/src/connectors/payload/transformers.rs", "crates/payment_methods/src/configs/payment_connector_required_fields.rs"], "types": ["crates/router/src/types/api.rs", "crates/router/src/types/transformers.rs"], "tests": ["cypress-tests/cypress/e2e/configs/Payment/Payload.js", "cypress-tests/cypress/e2e/configs/Payment/Utils.js"], "other": ["api-reference/v1/openapi_spec_v1.json", "api-reference/v2/openapi_spec_v2.json"]}, "change_types": {"structs_added": 11, "functions_added": 12, "enums_added": 6, "fields_added": 629, "imports_added": 9, "conditionals_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(router): Add webhooks for network tokenization ## 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 webhooks for network tokenization - added support to process webhooks from token service. - verify webhooks updates the pan and network token metadata ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> This cannot be tested unless we get real-time webhooks from CardNetwork. ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced support for network tokenization webhooks, including a new dedicated endpoint for network token requestor reference webhooks. - Added new webhook event types and metadata update flows for payment methods linked to network tokens. - Enhanced validation and configuration options for network tokenization services, including webhook source verification. - Exposed new data structures and API responses for handling network token and card metadata updates. - Added callback mapper integration to link webhook callbacks with merchant, payment method, and customer data. - **Bug Fixes** - Improved validation to ensure all required secrets, including webhook verification keys, are present for network tokenization services. - **Documentation** - Expanded public API surface and type exports to support new webhook and callback mapping features. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
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/webhooks.rs` **2. Database Layer (Queries & Schema)** - `crates/diesel_models/src/callback_mapper.rs` **3. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/callback_mapper.rs` **4. Core Business Logic** - `crates/router/src/core/payment_methods.rs` - `crates/router/src/core/payments/tokenization.rs` - `crates/router/src/core/webhooks.rs` - ... and 2 more files **5. Type Definitions** - `crates/common_types/src/callback_mapper.rs` - `crates/common_types/src/lib.rs` - `crates/router/src/types/domain.rs` - ... and 2 more files **6. Utils** - `crates/common_utils/src/events.rs` - `crates/router/src/routes/lock_utils.rs` **7. Configuration Files** - `crates/router/src/configs/secrets_transformers.rs` - `crates/router/src/configs/settings.rs` - `crates/router/src/configs/validations.rs` **8. Other** - `crates/common_enums/src/enums.rs` - `crates/router/src/db.rs` - `crates/router/src/db/callback_mapper.rs` - ... and 3 more files **Code Patterns Applied:** - Define new data structures (5 changes) - Implement new functions (27 changes) - Extend existing types with new fields (117 changes) **Detailed Identifier Changes:** Commit ec6d0e4d: Files to modify: **crates/api_models/src/payment_methods.rs** Add: - function: private::from - impl: impl From<(Card, Option<common_enums::CardNetwork>)> for CardDetail **crates/api_models/src/webhooks.rs** Modify existing code **crates/common_enums/src/enums.rs** Add: - enum: pub::CallbackMapperIdType **crates/common_types/src/callback_mapper.rs** Add: - function: pub::get_network_token_webhook_details - enum: pub::CallbackMapperData - impl: impl CallbackMapperData **crates/common_types/src/lib.rs** Add: - mod: pub::callback_mapper **crates/common_utils/src/events.rs** Modify existing code **crates/diesel_models/src/callback_mapper.rs** Modify existing code **crates/hyperswitch_domain_models/src/callback_mapper.rs** Add: - function: pub::new - impl: impl CallbackMapper **crates/router/src/configs/secrets_transformers.rs** Modify existing code **crates/router/src/configs/settings.rs** Modify existing code **crates/router/src/configs/validations.rs** Modify existing code **crates/router/src/core/payment_methods.rs** Modify existing code **crates/router/src/core/payments/tokenization.rs** Modify existing code **crates/router/src/core/webhooks.rs** Add: - mod: private::network_tokenization_incoming **crates/router/src/core/webhooks/incoming.rs** Add: - function: pub::network_token_incoming_webhooks_wrapper - function: private::network_token_incoming_webhooks_core **crates/router/src/core/webhooks/network_tokenization_incoming.rs** Add: - function: private::get_network_token_requestor_ref_id - function: pub::get_response_data - function: pub::fetch_merchant_id_payment_method_id_customer_id_from_callback_mapper - function: pub::get_network_token_resource_object - function: private::decrypt_payment_method_data - function: private::update_payment_method - function: private::decrypt_payment_method_data - function: private::update_payment_method - function: pub::new - function: pub::verify_webhook_source - function: pub::handle_metadata_update - function: private::from - function: private::get_inner - function: pub::fetch_merchant_account_for_network_token_webhooks - function: pub::fetch_payment_method_for_network_token_webhooks - struct: pub::Authorization - struct: pub::PaymentMethodCreateWrapper - enum: pub::NetworkTokenWebhookResponse - trait: pub::NetworkTokenWebhookResponseExt - impl: impl NetworkTokenWebhookResponse - impl: impl NetworkTokenWebhookResponseExt for pm_types::PanMetadataUpdateBody - impl: impl NetworkTokenWebhookResponseExt for pm_types::NetworkTokenMetaDataUpdateBody - impl: impl Authorization - impl: impl From<(&api::payment_methods::CardDetail, &domain::PaymentMethod)> for PaymentMethodCreateWrapper - impl: impl PaymentMethodCreateWrapper **crates/router/src/db.rs** Modify existing code **crates/router/src/db/callback_mapper.rs** Add: - function: private::insert_call_back_mapper - function: private::find_call_back_mapper_by_id - impl: impl CallbackMapperInterface for MockDb **crates/router/src/routes/app.rs** Modify existing code **crates/router/src/routes/lock_utils.rs** Modify existing code **crates/router/src/routes/webhooks.rs** Add: - function: pub::receive_network_token_requestor_incoming_webhook **crates/router/src/types/domain.rs** Remove: - mod: private::callback_mapper Add: - mod: pub::callback_mapper **crates/router/src/types/payment_methods.rs** Add: - function: pub::is_update_required - struct: pub::NetworkTokenRequestorData - struct: pub::NetworkTokenMetaDataUpdateBody - struct: pub::PanMetadataUpdateBody - impl: impl NetworkTokenRequestorData **crates/router_env/src/logger/types.rs** Modify existing code **crates/storage_impl/src/callback_mapper.rs** Modify existing code
{"pr_number": 6695, "pr_title": "feat(router): Add webhooks for network tokenization ", "merged_at": "2025-06-26T09:44:47Z", "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/webhooks.rs"], "database": ["crates/diesel_models/src/callback_mapper.rs"], "domain": ["crates/hyperswitch_domain_models/src/callback_mapper.rs"], "core_business": ["crates/router/src/core/payment_methods.rs", "crates/router/src/core/payments/tokenization.rs", "crates/router/src/core/webhooks.rs", "crates/router/src/core/webhooks/incoming.rs", "crates/router/src/core/webhooks/network_tokenization_incoming.rs"], "types": ["crates/common_types/src/callback_mapper.rs", "crates/common_types/src/lib.rs", "crates/router/src/types/domain.rs", "crates/router/src/types/payment_methods.rs", "crates/router_env/src/logger/types.rs"], "utils": ["crates/common_utils/src/events.rs", "crates/router/src/routes/lock_utils.rs"], "config": ["crates/router/src/configs/secrets_transformers.rs", "crates/router/src/configs/settings.rs", "crates/router/src/configs/validations.rs"], "other": ["crates/common_enums/src/enums.rs", "crates/router/src/db.rs", "crates/router/src/db/callback_mapper.rs", "crates/router/src/routes/app.rs", "crates/router/src/routes/webhooks.rs", "crates/storage_impl/src/callback_mapper.rs"]}, "change_types": {"structs_added": 5, "functions_added": 27, "enums_added": 3, "fields_added": 117, "imports_added": 21}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor(analytics): default config for forex_enabled ## 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 --> Currently, if the `forex_enabled` feature flag is not present as an ENV, it is leading to deserialization errors. Modified it in such a way to assume the default value (false) if the ENV is not present. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> Fix deserialization errors for analytics ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Removed the `forex_enabled` feature flag from local envs, and replicated the error <img width="806" alt="Screenshot 2025-04-02 at 2 34 43 PM" src="https://github.com/user-attachments/assets/b275cc79-1fad-4ee7-81a5-acaf780e771c" /> Need to remove the env `forex_enabled` during deployment, and then test out the analytics section.. Tested on local, by removing the `forex_enabled` env and checking the analytics API calls, worked as expected <img width="638" alt="image" src="https://github.com/user-attachments/assets/56ba5d51-ff1c-4d42-8401-ea00e7bc6d22" /> Curl: ```bash curl --location 'http://localhost:8080/analytics/v1/org/metrics/payments' \ --header 'Accept: */*' \ --header 'Accept-Language: en-US,en;q=0.9' \ --header 'Connection: keep-alive' \ --header 'Content-Type: application/json' \ --header 'Origin: http://localhost:9000' \ --header 'Referer: http://localhost:9000/' \ --header 'Sec-Fetch-Dest: empty' \ --header 'Sec-Fetch-Mode: cors' \ --header 'Sec-Fetch-Site: same-site' \ --header 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36' \ --header 'api-key: hyperswitch' \ --header 'authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiM2RlMDFhYWYtOWVkMi00YTY5LTg3YWItNWU1YmI2ZWFiNGQ5IiwibWVyY2hhbnRfaWQiOiJtZXJjaGFudF8xNzQyMjEyMzQxIiwicm9sZV9pZCI6Im9yZ19hZG1pbiIsImV4cCI6MTc0Mjk4MDgyOCwib3JnX2lkIjoib3JnX3pMQmRNTnpLaDZrNmhiT2tockdJIiwicHJvZmlsZV9pZCI6InByb19LWnhHZ21rUHFkMldQdXBFa2psWCIsInRlbmFudF9pZCI6InB1YmxpYyJ9.aD185AZEOcIjHnLnZZ9GJ2ujSHIdRPbPtrYhzNo0V4M' \ --header 'sec-ch-ua: "Chromium";v="128", "Not;A=Brand";v="24", "Google Chrome";v="128"' \ --header 'sec-ch-ua-mobile: ?0' \ --header 'sec-ch-ua-platform: "macOS"' \ --data '[ { "timeRange": { "startTime": "2025-03-01T18:30:00Z", "endTime": "2025-03-31T09:22:00Z" }, "source": "BATCH", "metrics": [ "payment_processed_amount" ], "timeSeries": { "granularity": "G_ONEDAY" }, "delta": true } ]' ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Other** - `crates/analytics/src/lib.rs` **Detailed Identifier Changes:** Commit 11f7804b: Files to modify: **crates/analytics/src/lib.rs** Modify existing code
{"pr_number": 7695, "pr_title": "refactor(analytics): default config for forex_enabled", "merged_at": "2025-04-03T10:44:19Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "user"]}, "hierarchy": {"other": ["crates/analytics/src/lib.rs"]}, "change_types": {}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(router): add capability to force challenge for 3DS Payments through Netcetera and send few optional fields ## 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 capability to force challenge for 3DS Payments through Netcetera and send few optional fields 1. Profile level enablement `force_3ds_challenge` which would request netcetera for challenge flow 2. Send few optional fields like trans_type, which can potentially be required on PROD (Because docs says, it maybe required in some markets) ### 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` 3. `crates/router/src/configs` 4. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Tested Manually Perform a External 3DS payment by enabling force_3ds_challenge at profile level, and observe ThreeDSRequestorChallengeInd being sent "04" to netcetera connector CURL ``` curl --location '{{BASE_URL}}/payments/{{PAYMENT_ID}}/3ds/authentication' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: {{PUBLISHABLE_KEY}}' \ --data '{ "client_secret": "pay_SiyzAZBqOJgLShX0Kjxw_secret_vEfMKRmj8ovnvxVYJdqK", "device_channel": "BRW", "threeds_method_comp_ind": "Y" }' ``` Response ``` { "trans_status": "C", "acs_url": "https://ndm-prev.3dss-non-prod.cloud.netcetera.com/acs/challenge", "challenge_request": "eyJtZXNzYWdlVHlwZSI6IkNSZXEiLCJ0aHJlZURTU2VydmVyVHJhbnNJRCI6IjRjY2M5ZGRkLWMxZGMtNGMyNy04YzAyLTg5NmE2MzI5MWMzZCIsImFjc1RyYW5zSUQiOiI5MWM0MWZjOS0zZDI1LTQ0OGItODA4MS1mMDkxOTg3NmM1ZTQiLCJjaGFsbGVuZ2VXaW5kb3dTaXplIjoiMDUiLCJtZXNzYWdlVmVyc2lvbiI6IjIuMy4xIn0", "acs_reference_number": "3DS_LOA_ACS_201_13579", "acs_trans_id": "91c41fc9-3d25-448b-8081-f0919876c5e4", "three_dsserver_trans_id": "4ccc9ddd-c1dc-4c27-8c02-896a63291c3d", "acs_signed_content": null, "three_ds_requestor_url": "https://google.com/" } ``` ![image](https://github.com/user-attachments/assets/26122650-b371-4149-9d4b-e4c2d03e9293) ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] 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` - `crates/hyperswitch_domain_models/src/router_request_types/authentication.rs` **4. Core Business Logic** - `crates/router/src/core/admin.rs` - `crates/router/src/core/authentication.rs` - `crates/router/src/core/authentication/transformers.rs` - ... and 1 more files **5. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs` - `crates/router/src/connector/netcetera/netcetera_types.rs` - `crates/router/src/connector/netcetera/transformers.rs` **6. Type Definitions** - `crates/common_utils/src/types.rs` - `crates/router/src/types/api/admin.rs` **7. Other** - `migrations/2025-03-04-105454_add_force_3ds_challenge_column_to_business_profile/down.sql` - `migrations/2025-03-04-105454_add_force_3ds_challenge_column_to_business_profile/up.sql` **Code Patterns Applied:** - Implement new functions (4 changes) - Extend existing types with new fields (56 changes) - Add conditional logic for feature flags or filtering (1 changes) **Detailed Identifier Changes:** Commit 957a2285: Files to modify: **crates/api_models/src/admin.rs** Modify existing code **crates/common_utils/src/types.rs** Add: - function: pub::get_minor **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_connectors/src/connectors/cybersource/transformers.rs** Modify existing code **crates/hyperswitch_domain_models/src/business_profile.rs** Modify existing code **crates/hyperswitch_domain_models/src/router_request_types/authentication.rs** Modify existing code **crates/router/src/connector/netcetera/netcetera_types.rs** Remove: - function: private::from - impl: impl From<Option<common_enums::ScaExemptionType>> for ThreeDSRequestor Add: - function: private::get_version_checked - function: pub::new - function: private::try_from - enum: pub::SchemeId - impl: impl SingleOrListElement<T> - impl: impl ThreeDSRequestor - impl: impl TryFrom<common_enums::CardNetwork> for SchemeId **crates/router/src/connector/netcetera/transformers.rs** Remove: - function: private::try_from - enum: pub::SchemeId - impl: impl TryFrom<common_enums::CardNetwork> for SchemeId **crates/router/src/core/admin.rs** Modify existing code **crates/router/src/core/authentication.rs** Modify existing code **crates/router/src/core/authentication/transformers.rs** Modify existing code **crates/router/src/core/payments.rs** Modify existing code **crates/router/src/types/api/admin.rs** Modify existing code
{"pr_number": 7429, "pr_title": "feat(router): add capability to force challenge for 3DS Payments through Netcetera and send few optional fields", "merged_at": "2025-03-06T13:37:46Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "user", "connector"]}, "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", "crates/hyperswitch_domain_models/src/router_request_types/authentication.rs"], "core_business": ["crates/router/src/core/admin.rs", "crates/router/src/core/authentication.rs", "crates/router/src/core/authentication/transformers.rs", "crates/router/src/core/payments.rs"], "connectors": ["crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs", "crates/router/src/connector/netcetera/netcetera_types.rs", "crates/router/src/connector/netcetera/transformers.rs"], "types": ["crates/common_utils/src/types.rs", "crates/router/src/types/api/admin.rs"], "other": ["migrations/2025-03-04-105454_add_force_3ds_challenge_column_to_business_profile/down.sql", "migrations/2025-03-04-105454_add_force_3ds_challenge_column_to_business_profile/up.sql"]}, "change_types": {"functions_added": 4, "enums_added": 1, "fields_added": 56, "imports_added": 1, "conditionals_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor(ucs): introduce dedicated gRPC header type and enhance lineage ID handling ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This PR refactors the gRPC header handling for the Unified Connector Service (UCS) by introducing a dedicated header type, `GrpcHeadersUcs`. This change enhances the specificity and robustness of header management for UCS interactions. Key changes include: - **New `GrpcHeadersUcs` Struct**: A new struct, `GrpcHeadersUcs`, has been introduced in `crates/external_services/src/grpc_client.rs`. It specifically caters to UCS needs and includes `tenant_id`, `lineage_ids`, and `external_vault_proxy_metadata` fields, utilizing the `TypedBuilder` pattern for instantiation. - **Enhanced UCS Header Construction**: The `build_unified_connector_service_grpc_headers` function in `crates/external_services/src/grpc_client/unified_connector_service.rs` now accepts `GrpcHeadersUcs`. It includes new logic to properly URL-encode and inject `lineage_ids` into the gRPC metadata, using a newly added constant `UCS_LINEAGE_IDS`. - **Updated UCS Client Methods**: All relevant methods in `UnifiedConnectorServiceClient` have been updated to accept `GrpcHeadersUcs` instead of the generic `GrpcHeaders`. - **Router Flow Updates**: Calls within various payment flows (`authorize_flow.rs`, `external_proxy_flow.rs`, `psync_flow.rs`, `setup_mandate_flow.rs`) and the core UCS module (`unified_connector_service.rs`) have been updated to use the new `state.get_grpc_headers_ucs()` method and adapt to the `GrpcHeadersUcs` builder pattern. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with 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 primary motivation for this change is to create a clear separation between general gRPC headers and those specifically required by the Unified Connector Service. The previous implementation used a generic `GrpcHeaders` struct for UCS, which was not ideal as UCS has specific requirements, notably for `lineage_ids`. This refactoring allows for: - **Improved Clarity and Maintainability**: By having a dedicated struct for UCS headers, the code becomes easier to understand and maintain. - **Type Safety**: Ensures that UCS-specific header fields like `lineage_ids` are correctly handled where needed. - **Enhanced Functionality**: Facilitates the proper encoding and inclusion of `lineage_ids` in gRPC metadata, which is crucial for UCS 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)? --> This change was primarily a refactoring effort. The existing test suite should cover the functionality, as the external behavior of UCS calls remains the same. The changes were verified by: - Ensuring the code compiles without errors. - Reviewing the modified logic for header construction and injection to confirm correctness. lineage_merchant_id is being populated in UCS events. <img width="2408" height="1200" alt="image" src="https://github.com/user-attachments/assets/bc7f8713-166e-4d1c-abb7-ed07c1cc801d" />
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 2 more files **2. External Connector Integration** - `crates/external_services/src/grpc_client/unified_connector_service.rs` **3. Configuration Files** - `crates/external_services/Cargo.toml` **4. Other** - `Cargo.lock` - `crates/external_services/src/grpc_client.rs` - `crates/external_services/src/lib.rs` - ... and 1 more files **Code Patterns Applied:** - Define new data structures (2 changes) - Implement new functions (3 changes) - Extend existing types with new fields (12 changes) - Add conditional logic for feature flags or filtering (2 changes) **Detailed Identifier Changes:** Commit 876ea3f6: Files to modify: **crates/external_services/src/grpc_client.rs** Add: - function: pub::new - function: pub::get_url_encoded_string - struct: pub::GrpcHeadersUcs - struct: pub::LineageIds - impl: impl LineageIds **crates/external_services/src/grpc_client/unified_connector_service.rs** Modify existing code **crates/external_services/src/lib.rs** Modify existing code **crates/router/src/core/payments/flows/authorize_flow.rs** Modify existing code **crates/router/src/core/payments/flows/external_proxy_flow.rs** Modify existing code **crates/router/src/core/payments/flows/psync_flow.rs** Modify existing code **crates/router/src/core/payments/flows/setup_mandate_flow.rs** Modify existing code **crates/router/src/core/unified_connector_service.rs** Modify existing code **crates/router/src/routes/app.rs** Add: - function: pub::get_grpc_headers_ucs
{"pr_number": 9275, "pr_title": "refactor(ucs): introduce dedicated gRPC header type and enhance lineage ID handling", "merged_at": "2025-09-09T10:05:31Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "merchant", "user"]}, "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"], "connectors": ["crates/external_services/src/grpc_client/unified_connector_service.rs"], "config": ["crates/external_services/Cargo.toml"], "other": ["Cargo.lock", "crates/external_services/src/grpc_client.rs", "crates/external_services/src/lib.rs", "crates/router/src/routes/app.rs"]}, "change_types": {"structs_added": 2, "functions_added": 3, "fields_added": 12, "imports_added": 4, "conditionals_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(euclid_wasm): add wasm changes for payout webhooks ## 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 --> Add wasm field to collect merchant secret for payout webhook integration ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Needs to be tested with dashboard ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] 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": 9524, "pr_title": "feat(euclid_wasm): add wasm changes for payout webhooks", "merged_at": "2025-09-24T06:58:53Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["merchant", "webhook"]}, "hierarchy": {"connectors": ["crates/connector_configs/toml/development.toml", "crates/connector_configs/toml/production.toml", "crates/connector_configs/toml/sandbox.toml"]}, "change_types": {}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
feat(core): Update payment methods api ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> We need to make update payment methods API which can update the fields of the records in payment methods table. It will consume a CSV file which will have batch update entries. Currently it should only update connector_mandate_id, network_transaction_id and mandate_status. ### 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). --> Frequent DB updates on payment methods table due to ongoing migrations of 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)? --> ``` curl --location 'http://localhost:8080/payment_methods/update-batch' \ --header 'api-key: test_admin' \ --form 'file=@"/Users/mrudul.vajpayee/Downloads/update_sample.csv"' \ --form 'merchant_id="merchant_1756355489"' ``` Sample output: ``` [ { "payment_method_id": "pm_RsWnXeiOhlaVseKdk0Mm", "status": "active", "network_transaction_id": "063AF598E0A5C5", "connector_mandate_details": { "payouts": { "mca_SbUFb1h4NfixAWFaLQeT": { "transfer_method_id": "ARM-678ab3997b16cb7cd" } }, "mca_Qwuqfidvy2Lk2y0PbvFa": { "mandate_metadata": null, "payment_method_type": "google_pay", "connector_mandate_id": "2D5D6F0E961E639BE063AF598E0A9A32", "connector_mandate_status": "active", "original_payment_authorized_amount": 20000, "original_payment_authorized_currency": "EUR", "connector_mandate_request_reference_id": "ytlaTEEjkONzieVl0k" }, "mca_xHIYFXMCUsYTZIZ1rwgY": { "mandate_metadata": null, "payment_method_type": null, "connector_mandate_id": "6D981A0542DDF0EBE063AF598E0A5C5E", "connector_mandate_status": null, "original_payment_authorized_amount": null, "original_payment_authorized_currency": null, "connector_mandate_request_reference_id": null } }, "update_status": "Success", "line_number": 1 }, { "payment_method_id": "pm_RsWnXeiOhlaVseKdk0Mm", "status": "active", "network_transaction_id": "063AF598E0A5C5", "connector_mandate_details": { "payouts": { "mca_SbUFb1h4NfixAWFaLQeT": { "transfer_method_id": "ARM-678ab3997b16cb7cd" } }, "mca_Qwuqfidvy2Lk2y0PbvFa": { "mandate_metadata": null, "payment_method_type": "google_pay", "connector_mandate_id": "2D5D6F0E961E639BE063AF598E0A9A32", "connector_mandate_status": "active", "original_payment_authorized_amount": 20000, "original_payment_authorized_currency": "EUR", "connector_mandate_request_reference_id": "ytlaTEEjkONzieVl0k" }, "mca_xHIYFXMCUsYTZIZ1rwgY": { "mandate_metadata": null, "payment_method_type": null, "connector_mandate_id": "6D981A0542DDF0EBE063AF598E0A5C5E", "connector_mandate_status": null, "original_payment_authorized_amount": null, "original_payment_authorized_currency": null, "connector_mandate_request_reference_id": null } }, "update_status": "Success", "line_number": 2 }, { "payment_method_id": "pm_RsWnXeiOhlaVseKdk0Mm", "status": "active", "network_transaction_id": "063AF598E0A5C5", "connector_mandate_details": { "payouts": { "mca_SbUFb1h4NfixAWFaLQeT": { "transfer_method_id": "ARM-678ab3997b16cb7cd" } }, "mca_Qwuqfidvy2Lk2y0PbvFa": { "mandate_metadata": null, "payment_method_type": "google_pay", "connector_mandate_id": "2D5D6F0E961E639BE063AF598E0A9A32", "connector_mandate_status": "active", "original_payment_authorized_amount": 20000, "original_payment_authorized_currency": "EUR", "connector_mandate_request_reference_id": "ytlaTEEjkONzieVl0k" }, "mca_xHIYFXMCUsYTZIZ1rwgY": { "mandate_metadata": null, "payment_method_type": null, "connector_mandate_id": "6D981A0542DDF0EBE063AF598E0A5C5E", "connector_mandate_status": null, "original_payment_authorized_amount": null, "original_payment_authorized_currency": null, "connector_mandate_request_reference_id": null } }, "update_status": "Success", "line_number": 3 } ] ``` [update_sample.csv](https://github.com/user-attachments/files/22072833/update_sample.csv) ## Checklist <!-- Put 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. Database Layer (Queries & Schema)** - `crates/diesel_models/src/payment_method.rs` **3. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/payment_methods.rs` **4. Core Business Logic** - `crates/router/src/core/payment_methods.rs` - `crates/router/src/core/payment_methods/migration.rs` **5. Type Definitions** - `crates/router_env/src/logger/types.rs` **6. Utils** - `crates/router/src/routes/lock_utils.rs` **7. Other** - `crates/router/src/routes/app.rs` - `crates/router/src/routes/payment_methods.rs` **Code Patterns Applied:** - Define new data structures (4 changes) - Implement new functions (6 changes) - Extend existing types with new fields (80 changes) - Add conditional logic for feature flags or filtering (4 changes) **Detailed Identifier Changes:** Commit 64511365: Files to modify: **crates/api_models/src/payment_methods.rs** Add: - function: private::from - struct: pub::PaymentMethodRecordUpdateResponse - struct: pub::UpdatePaymentMethodRecord - struct: pub::PaymentMethodUpdateResponse - enum: pub::UpdateStatus - impl: impl From<PaymentMethodUpdateResponseType> for PaymentMethodUpdateResponse **crates/diesel_models/src/payment_method.rs** Modify existing code **crates/hyperswitch_domain_models/src/payment_methods.rs** Modify existing code **crates/router/src/core/payment_methods.rs** Add: - mod: pub::migration **crates/router/src/core/payment_methods/migration.rs** Add: - function: pub::update_payment_methods - function: pub::update_payment_method_record - function: private::parse_update_csv - function: pub::validate_and_get_payment_method_records - struct: pub::PaymentMethodsUpdateForm - impl: impl PaymentMethodsUpdateForm **crates/router/src/routes/app.rs** Modify existing code **crates/router/src/routes/lock_utils.rs** Modify existing code **crates/router/src/routes/payment_methods.rs** Add: - function: pub::update_payment_methods **crates/router_env/src/logger/types.rs** Modify existing code
{"pr_number": 9075, "pr_title": "feat(core): Update payment methods api", "merged_at": "2025-09-02T12:50:03Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "merchant", "user"]}, "hierarchy": {"api_models": ["crates/api_models/src/payment_methods.rs"], "database": ["crates/diesel_models/src/payment_method.rs"], "domain": ["crates/hyperswitch_domain_models/src/payment_methods.rs"], "core_business": ["crates/router/src/core/payment_methods.rs", "crates/router/src/core/payment_methods/migration.rs"], "types": ["crates/router_env/src/logger/types.rs"], "utils": ["crates/router/src/routes/lock_utils.rs"], "other": ["crates/router/src/routes/app.rs", "crates/router/src/routes/payment_methods.rs"]}, "change_types": {"structs_added": 4, "functions_added": 6, "enums_added": 1, "fields_added": 80, "imports_added": 14, "conditionals_added": 4}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor(core): add cache redaction for cgraph ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This pull request enhances cache management for connector creation by introducing a new mechanism to invalidate related cache entries whenever a new connector is added. The main change is the addition of the `redact_cgraph_cache` function, which ensures that outdated cgraph cache data is cleared for the relevant merchant and profile, preventing stale data issues. **Cache invalidation improvements:** * Added the `redact_cgraph_cache` function in `crates/router/src/core/routing/helpers.rs` to invalidate both payouts and payments cgraph cache entries for a given merchant and profile. This function uses Redis and publishes cache invalidation events. * Integrated the `redact_cgraph_cache` call into the connector creation flow in `crates/router/src/core/admin.rs`, ensuring cache is redacted whenever a new connector is created. * Imported the `redact_cgraph_cache` helper function in `crates/router/src/core/admin.rs` to enable its usage in the admin logic. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> Required for cache redaction. ## How did you test 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 wise connector with sepa enabled. 2. Create/confirm a sepa payout link. ``` curl --location 'http://localhost:8080/payouts/create' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_7ac45zCz3UdpgVnwr0KrU5eT7kFYgIvuR6rtHT2gwj9zRqMZDvI5XMFXhWu7RX85' \ --data-raw '{ "amount": 4500, "currency": "USD", "customer_id": "cus_jtJ8WHTHnsguskpiorEt", "email": "payout_customer@example.com", "name": "Doest John", "phone": "6168205366", "phone_country_code": "+1", "description": "Its my first payout request", "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "NY", "zip": "94122", "country": "US", "first_name": "John", "last_name": "Doe" }, "phone": { "number": "6168205366", "country_code": "1" } }, "entity_type": "Individual", "recurring": false, "metadata": { "ref": "123" }, "confirm": false, "auto_fulfill": false, "payout_link": true, "payout_link_config": { "logo": "https://hyperswitch.io/favicon.ico", "merchant_name": "Hyperswitch", "theme": "#4285F4", "test_mode": true, "form_layout": "tabs" } }' ``` 3. create adyen mca with card. 4. Create/confirm a card payout link(it should be processed with adyen and not wise). ``` curl --location 'http://localhost:8080/payouts/create' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_7ac45zCz3UdpgVnwr0KrU5eT7kFYgIvuR6rtHT2gwj9zRqMZDvI5XMFXhWu7RX85' \ --data-raw '{ "amount": 4500, "currency": "USD", "customer_id": "cus_jtJ8WHTHnsguskpiorEt", "email": "payout_customer@example.com", "name": "Doest John", "phone": "6168205366", "phone_country_code": "+1", "description": "Its my first payout request", "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "NY", "zip": "94122", "country": "US", "first_name": "John", "last_name": "Doe" }, "phone": { "number": "6168205366", "country_code": "1" } }, "entity_type": "Individual", "recurring": false, "metadata": { "ref": "123" }, "confirm": false, "auto_fulfill": false, "payout_link": true, "payout_link_config": { "logo": "https://hyperswitch.io/favicon.ico", "merchant_name": "Hyperswitch", "theme": "#4285F4", "test_mode": true, "form_layout": "tabs" } }' ``` ## 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/admin.rs` - `crates/router/src/core/routing/helpers.rs` - `crates/router/src/core/subscription.rs` **Code Patterns Applied:** - Implement new functions (1 changes) - Extend existing types with new fields (3 changes) **Detailed Identifier Changes:** Commit 654ffe47: Files to modify: **crates/router/src/core/admin.rs** Modify existing code **crates/router/src/core/routing/helpers.rs** Add: - function: pub::redact_cgraph_cache **crates/router/src/core/subscription.rs** Remove: - impl: impl SubscriptionWithHandler<'a> Add: - impl: impl SubscriptionWithHandler<'_>
{"pr_number": 9629, "pr_title": "refactor(core): add cache redaction for cgraph", "merged_at": "2025-10-01T08:33:13Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"core_business": ["crates/router/src/core/admin.rs", "crates/router/src/core/routing/helpers.rs", "crates/router/src/core/subscription.rs"]}, "change_types": {"functions_added": 1, "fields_added": 3, "imports_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): [ARCHIPEL] fix Mastercard scheme string for Applepay payments yments ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description There was a typo while populating scheme for Archipel Applepay payments - this PR fixes it. Impact - Due to this typo Applepay payments were failing using Mastercard, with this fix Applepay payments will work. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR 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)? --> **_call /payments for Applepay using Mastercard via Archipel_** ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_VXrUjYPz3bmPwhdGFpQ35Wc3LphojFSTYZHvohSqepoRfIsfrRsfmEN9qMdej9Qx' \ --data-raw '{ "amount": 600, "amount_to_capture": 600, "payment_type": "normal", "currency": "USD", "confirm": true, "capture_method": "automatic", "authentication_type": "three_ds", "payment_method": "wallet", "payment_method_type": "apple_pay", "payment_method_data": { "wallet": { "apple_pay": { "payment_data": "eyJkYXRhIjoiNGtWNVgwM1lGaUlDbm91MjVtZXgvRHRBOEJGeXlteUtON3F0ajJodC9iLzdnV3VIN0JpZTlpOElvZmZhai9jY0ExZ0xZdHdORGwxZEZRVFl6VUdSTjhOSXlsODNORlUxUmx0MTBGR2c5cG1KV251cVBJK3owekt1ZGd6alJQeERsYjR0NzF0N05vVDU1Y2hEem9jV1dXa05QaXlkQ1ZYZzdkY0xaR2dCemVYMnp1Sk05NmU2ZDhKODVZK1laSFNnQW1SVmpkQm56NkQveVM4NCtoQ3dYcW4xS1RTQ3N2RUFXUlhCelo3cnZRc1MvR0VZeWNoc1Vyd3RYcVNGZzFQR2VLWVJYNFE0Z1VMRUNOMTBLeS94Kzc0bWszRjdiM2JuWVk5aW1LZ0g1b1lhQkVoTWVUQUJwVGZYcFN1QWQ5Nmt3NmtSckVTQkFEbTZmRFVRS3hHL29tWSs0U3JyeGR4Q0o0OHR4U3RyTmZwUGZMajFoMmZhQy9WZENIVWhpR0tvbko5OEU5VVdJUDdlaTZoOFhnPT0iLCJzaWduYXR1cmUiOiJNSUFHQ1NxR1NJYjNEUUVIQXFDQU1JQUNBUUV4RFRBTEJnbGdoa2dCWlFNRUFnRXdnQVlKS29aSWh2Y05BUWNCQUFDZ2dEQ0NBK1F3Z2dPTG9BTUNBUUlDQ0ZuWW9ieXE5T1BOTUFvR0NDcUdTTTQ5QkFNQ01Ib3hMakFzQmdOVkJBTU1KVUZ3Y0d4bElFRndjR3hwWTJGMGFXOXVJRWx1ZEdWbmNtRjBhVzl1SUVOQklDMGdSek14SmpBa0JnTlZCQXNNSFVGd2NHeGxJRU5sY25ScFptbGpZWFJwYjI0Z1FYVjBhRzl5YVhSNU1STXdFUVlEVlFRS0RBcEJjSEJzWlNCSmJtTXVNUXN3Q1FZRFZRUUdFd0pWVXpBZUZ3MHlNVEEwTWpBeE9UTTNNREJhRncweU5qQTBNVGt4T1RNMk5UbGFNR0l4S0RBbUJnTlZCQU1NSDJWall5MXpiWEF0WW5KdmEyVnlMWE5wWjI1ZlZVTTBMVk5CVGtSQ1QxZ3hGREFTQmdOVkJBc01DMmxQVXlCVGVYTjBaVzF6TVJNd0VRWURWUVFLREFwQmNIQnNaU0JKYm1NdU1Rc3dDUVlEVlFRR0V3SlZVekJaTUJNR0J5cUdTTTQ5QWdFR0NDcUdTTTQ5QXdFSEEwSUFCSUl3L2F2RG5QZGVJQ3hRMlp0RkV1WTM0cWtCM1d5ejRMSE5TMUpubVBqUFRyM29HaVdvd2g1TU05M09qaXFXd3Zhdm9aTURSY1RvZWtRbXpwVWJFcFdqZ2dJUk1JSUNEVEFNQmdOVkhSTUJBZjhFQWpBQU1COEdBMVVkSXdRWU1CYUFGQ1B5U2NSUGsrVHZKK2JFOWloc1A2SzcvUzVMTUVVR0NDc0dBUVVGQndFQkJEa3dOekExQmdnckJnRUZCUWN3QVlZcGFIUjBjRG92TDI5amMzQXVZWEJ3YkdVdVkyOXRMMjlqYzNBd05DMWhjSEJzWldGcFkyRXpNREl3Z2dFZEJnTlZIU0FFZ2dFVU1JSUJFRENDQVF3R0NTcUdTSWIzWTJRRkFUQ0IvakNCd3dZSUt3WUJCUVVIQWdJd2diWU1nYk5TWld4cFlXNWpaU0J2YmlCMGFHbHpJR05sY25ScFptbGpZWFJsSUdKNUlHRnVlU0J3WVhKMGVTQmhjM04xYldWeklHRmpZMlZ3ZEdGdVkyVWdiMllnZEdobElIUm9aVzRnWVhCd2JHbGpZV0pzWlNCemRHRnVaR0Z5WkNCMFpYSnRjeUJoYm1RZ1kyOXVaR2wwYVc5dWN5QnZaaUIxYzJVc0lHTmxjblJwWm1sallYUmxJSEJ2YkdsamVTQmhibVFnWTJWeWRHbG1hV05oZEdsdmJpQndjbUZqZEdsalpTQnpkR0YwWlcxbGJuUnpMakEyQmdnckJnRUZCUWNDQVJZcWFIUjBjRG92TDNkM2R5NWhjSEJzWlM1amIyMHZZMlZ5ZEdsbWFXTmhkR1ZoZFhSb2IzSnBkSGt2TURRR0ExVWRId1F0TUNzd0thQW5vQ1dHSTJoMGRIQTZMeTlqY213dVlYQndiR1V1WTI5dEwyRndjR3hsWVdsallUTXVZM0pzTUIwR0ExVWREZ1FXQkJRQ0pEQUxtdTd0UmpHWHBLWmFLWjVDY1lJY1JUQU9CZ05WSFE4QkFmOEVCQU1DQjRBd0R3WUpLb1pJaHZkalpBWWRCQUlGQURBS0JnZ3Foa2pPUFFRREFnTkhBREJFQWlCMG9iTWsyMEpKUXczVEoweFFkTVNBalpvZlNBNDZoY1hCTmlWbU1sKzhvd0lnYVRhUVU2djFDMXBTK2ZZQVRjV0tyV3hRcDlZSWFEZVE0S2M2MEI1SzJZRXdnZ0x1TUlJQ2RhQURBZ0VDQWdoSmJTKy9PcGphbHpBS0JnZ3Foa2pPUFFRREFqQm5NUnN3R1FZRFZRUUREQkpCY0hCc1pTQlNiMjkwSUVOQklDMGdSek14SmpBa0JnTlZCQXNNSFVGd2NHeGxJRU5sY25ScFptbGpZWFJwYjI0Z1FYVjBhRzl5YVhSNU1STXdFUVlEVlFRS0RBcEJjSEJzWlNCSmJtTXVNUXN3Q1FZRFZRUUdFd0pWVXpBZUZ3MHhOREExTURZeU16UTJNekJhRncweU9UQTFNRFl5TXpRMk16QmFNSG94TGpBc0JnTlZCQU1NSlVGd2NHeGxJRUZ3Y0d4cFkyRjBhVzl1SUVsdWRHVm5jbUYwYVc5dUlFTkJJQzBnUnpNeEpqQWtCZ05WQkFzTUhVRndjR3hsSUVObGNuUnBabWxqWVhScGIyNGdRWFYwYUc5eWFYUjVNUk13RVFZRFZRUUtEQXBCY0hCc1pTQkpibU11TVFzd0NRWURWUVFHRXdKVlV6QlpNQk1HQnlxR1NNNDlBZ0VHQ0NxR1NNNDlBd0VIQTBJQUJQQVhFWVFaMTJTRjFScGVKWUVIZHVpQW91L2VlNjVONEkzOFM1UGhNMWJWWmxzMXJpTFFsM1lOSWs1N3VnajlkaGZPaU10MnUyWnd2c2pvS1lUL1ZFV2pnZmN3Z2ZRd1JnWUlLd1lCQlFVSEFRRUVPakE0TURZR0NDc0dBUVVGQnpBQmhpcG9kSFJ3T2k4dmIyTnpjQzVoY0hCc1pTNWpiMjB2YjJOemNEQTBMV0Z3Y0d4bGNtOXZkR05oWnpNd0hRWURWUjBPQkJZRUZDUHlTY1JQaytUdkorYkU5aWhzUDZLNy9TNUxNQThHQTFVZEV3RUIvd1FGTUFNQkFmOHdId1lEVlIwakJCZ3dGb0FVdTdEZW9WZ3ppSnFraXBuZXZyM3JyOXJMSktzd053WURWUjBmQkRBd0xqQXNvQ3FnS0lZbWFIUjBjRG92TDJOeWJDNWhjSEJzWlM1amIyMHZZWEJ3YkdWeWIyOTBZMkZuTXk1amNtd3dEZ1lEVlIwUEFRSC9CQVFEQWdFR01CQUdDaXFHU0liM1kyUUdBZzRFQWdVQU1Bb0dDQ3FHU000OUJBTUNBMmNBTUdRQ01EclBjb05SRnBteGh2czF3MWJLWXIvMEYrM1pEM1ZOb282KzhaeUJYa0szaWZpWTk1dFpuNWpWUVEyUG5lbkMvZ0l3TWkzVlJDR3dvd1YzYkYzek9EdVFaLzBYZkN3aGJaWlB4bkpwZ2hKdlZQaDZmUnVaeTVzSmlTRmhCcGtQQ1pJZEFBQXhnZ0dKTUlJQmhRSUJBVENCaGpCNk1TNHdMQVlEVlFRRERDVkJjSEJzWlNCQmNIQnNhV05oZEdsdmJpQkpiblJsWjNKaGRHbHZiaUJEUVNBdElFY3pNU1l3SkFZRFZRUUxEQjFCY0hCc1pTQkRaWEowYVdacFkyRjBhVzl1SUVGMWRHaHZjbWwwZVRFVE1CRUdBMVVFQ2d3S1FYQndiR1VnU1c1akxqRUxNQWtHQTFVRUJoTUNWVk1DQ0ZuWW9ieXE5T1BOTUFzR0NXQ0dTQUZsQXdRQ0FhQ0JrekFZQmdrcWhraUc5dzBCQ1FNeEN3WUpLb1pJaHZjTkFRY0JNQndHQ1NxR1NJYjNEUUVKQlRFUEZ3MHlOVEEyTWpNeE1UQTVNalphTUNnR0NTcUdTSWIzRFFFSk5ERWJNQmt3Q3dZSllJWklBV1VEQkFJQm9Rb0dDQ3FHU000OUJBTUNNQzhHQ1NxR1NJYjNEUUVKQkRFaUJDQ0o3OEpWWllYc3BlWVRxVlRNazA4Ull6SlVvQ29oSjVHOW1vL2dxczFGeVRBS0JnZ3Foa2pPUFFRREFnUklNRVlDSVFDNEtobVFJdWRRUmpPYnVGc0xGLzU0WWZCaHVIbFNzRkU1NXRDV2R2V0hCZ0loQVBUdVN5MUgwNGRJaERxbCtZZUFkWWpJejR2WWFrTWRBeWUxSWkxeTJVbWJBQUFBQUFBQSIsImhlYWRlciI6eyJwdWJsaWNLZXlIYXNoIjoiMVlTbEwwWUo3cE84ZThHWVVhZFN0dXRWRUdRNU5LS2N2aHJOd2IvRE9nOD0iLCJlcGhlbWVyYWxQdWJsaWNLZXkiOiJNRmt3RXdZSEtvWkl6ajBDQVFZSUtvWkl6ajBEQVFjRFFnQUVkSlNWc3NlMFFTNkswQXhIRHE2TDBMTUFEOEhXa0ZHeU9zdlBQZEtxOTQwdkM1bnY5QjlZQlEwb0QxejhEWnNJNFNuOUVCcUhJTVVNY1JxL1RUSHp6Zz09IiwidHJhbnNhY3Rpb25JZCI6IjFiYThjM2VlNDY4ZjBkODA1NDYzYjQ5MzI3ZjgzMjVmZGViZWUxYmNjYTE2NWRiMzFkNTFkZGM4OTI1NDQyM2UifSwidmVyc2lvbiI6IkVDX3YxIn0=", "payment_method": { "display_name": "MasterCard 0049", "network": "MasterCard", "type": "credit" }, "transaction_identifier": "1ba8c3ee468f0d805463b49327f8325fdebee1bcca165db31d51ddc89254423e" } }, "billing": null }, "email": "john_doe@gmail.com", "name": "John Doe", "phone": "8056594427", "phone_country_code": "+91", "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 Doe", "statement_descriptor_suffix": "JS" }' ``` ### BEFORE (Payment was failing) <img width="1170" alt="Screenshot 2025-06-24 at 4 55 32 PM" src="https://github.com/user-attachments/assets/ca2ccf39-1532-469b-8a64-01228da34d6e" /> ### AFTER (Payment succeeds) <img width="1170" alt="Screenshot 2025-06-24 at 4 44 23 PM" src="https://github.com/user-attachments/assets/d90c6120-bb66-4510-9979-7fd517d7a184" /> ## Checklist <!-- Put an `x` in the boxes that apply --> - [X] I formatted the code `cargo +nightly fmt --all` - [X] I addressed lints thrown by `cargo clippy` - [X] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/archipel/transformers.rs` **Detailed Identifier Changes:** Commit 2a06f776: Files to modify: **crates/hyperswitch_connectors/src/connectors/archipel/transformers.rs** Modify existing code
{"pr_number": 8450, "pr_title": "feat(connector): [ARCHIPEL] fix Mastercard scheme string for Applepay payments", "merged_at": "2025-06-24T13:45:21Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "user", "card"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/archipel/transformers.rs"]}, "change_types": {}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(opensearch): add additional global search filters and create sessionizer indexes for local ## 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 --> Global search has two components: - Free flow search, wherein search takes place across all fields available to search upon - Search on a specific field based on the field filter In this PR, additional filters have been added for global search to search on a specific field. A list of values can be provided for every filter field which will be added to the query in order to extract responses from opensearch / elasticsearch. Existing filters (fields): - payment_method - currency - status - customer_email - search_tags New filters added (fields): - connector - payment_method_type - card_network - card_last_4 - payment_id ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> Enhance search experience on global search using filters ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> The following filters can be used to be searched upon: - connector - payment_method_type - card_network - card_last_4 - payment_id Hit the following curl for the `/search` API ```bash curl --location 'http://localhost:8080/analytics/v1/search' \ --header 'Accept: */*' \ --header 'Accept-Language: en-US,en;q=0.9' \ --header 'Connection: keep-alive' \ --header 'Content-Type: application/json' \ --header 'Origin: http://localhost:9000' \ --header 'Referer: http://localhost:9000/' \ --header 'Sec-Fetch-Dest: empty' \ --header 'Sec-Fetch-Mode: cors' \ --header 'Sec-Fetch-Site: same-site' \ --header 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36' \ --header 'api-key: hyperswitch' \ --header 'authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTQ5ZTNkMmItMTY5Yi00NzUzLWJmNTQtZDcxMTM2YjRiN2JkIiwibWVyY2hhbnRfaWQiOiJtZXJjaGFudF8xNzI2MDQ2MzI4Iiwicm9sZV9pZCI6Im9yZ19hZG1pbiIsImV4cCI6MTcyOTI0ODM1MCwib3JnX2lkIjoib3JnX1ZwU0hPanNZZkR2YWJWWUpnQ0FKIiwicHJvZmlsZV9pZCI6InByb192NXNGb0hlODBPZWlVbElvbm9jTSJ9.TQD6wYkiTXlTvPW3-mH8FzEP1d7hXw9SmWgjVMH7flk' \ --header 'sec-ch-ua: "Not/A)Brand";v="8", "Chromium";v="126", "Google Chrome";v="126"' \ --header 'sec-ch-ua-mobile: ?0' \ --header 'sec-ch-ua-platform: "macOS"' \ --data '{ "query": "merchant_1726046328", "filters": { "payment_method": [ "card" ] }, "timeRange": { "startTime": "2024-09-13T00:30:00Z", "endTime": "2024-10-18T21:45:00Z" } }' ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] 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/search.rs` **2. Configuration Files** - `config/config.example.toml` - `config/deployments/env_specific.toml` - `config/development.toml` - ... and 2 more files **3. Other** - `crates/analytics/src/opensearch.rs` - `crates/analytics/src/search.rs` - `crates/router/src/consts/opensearch.rs` **Code Patterns Applied:** - Extend existing types with new fields (45 changes) - Add conditional logic for feature flags or filtering (20 changes) **Detailed Identifier Changes:** Commit 2e6cd6d3: Files to modify: **crates/analytics/src/opensearch.rs** Modify existing code **crates/analytics/src/search.rs** Modify existing code **crates/api_models/src/analytics/search.rs** Modify existing code **crates/router/src/consts/opensearch.rs** Modify existing code
{"pr_number": 6352, "pr_title": "feat(opensearch): add additional global search filters and create sessionizer indexes for local", "merged_at": "2024-10-19T14:22:39Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/analytics/search.rs"], "config": ["config/config.example.toml", "config/deployments/env_specific.toml", "config/development.toml", "config/docker_compose.toml", "config/vector.yaml"], "other": ["crates/analytics/src/opensearch.rs", "crates/analytics/src/search.rs", "crates/router/src/consts/opensearch.rs"]}, "change_types": {"fields_added": 45, "conditionals_added": 20}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(connector): [globalpay] handle edge case where currency comes as empty upon payment decline ## 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 edge case with GlobalPay where, upon payment decline, we get a deserialization error and that is because `currency` field is not expected to be empty but rather a valid `Currency` enum. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> closes https://github.com/juspay/hyperswitch/issues/7813 ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> cards: ```txt // successful cards "card_number": "4012001038488884", "card_number": "4222000006285344", "card_number": "4012001037167778", "card_number": "4222000005218627", "card_number": "4222000009719489", // failure cards "card_number": "4242420000000091", "card_number": "5100000000000131", ``` create a payment: ```curl curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_5WtyfFxKHentO9ERR1HP8qrlIPzPP5s1Khs2G2q7mZBl1zJDOUFC3ZNzPcQtfynW' \ --data-raw '{ "amount": 1000, "currency": "USD", "confirm": true, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 1000, "customer_id": "StripeCustomer", "email": "abcdef123@gmail.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment request", "authentication_type": "three_ds", "return_url": "https://google.com", "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4242420000000091", "card_exp_month": "10", "card_exp_year": "25", "card_holder_name": "joseph Doe", "card_cvc": "101" } }, "billing": { "address": { "country": "US" } } }' ``` ```json { "payment_id": "pay_9iWUNJmnm8Le4l8iZCV9", "merchant_id": "postman_merchant_GHAction_95a905d4-93fe-42b4-b125-c1ddafa26313", "status": "failed", "amount": 1000, "net_amount": 1000, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": "globalpay", "client_secret": "pay_9iWUNJmnm8Le4l8iZCV9_secret_RyifkSKcDrOFEEqC0OZ7", "created": "2025-04-15T09:21:39.674Z", "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": "0091", "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": { "address": { "city": null, "country": "US", "line1": null, "line2": null, "line3": null, "zip": null, "state": null, "first_name": null, "last_name": null }, "phone": null, "email": null }, "order_details": null, "email": "abcdef123@gmail.com", "name": "John Doe", "phone": "999999999", "return_url": "https://google.com/", "authentication_type": "three_ds", "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "next_action": null, "cancellation_reason": null, "error_code": "111", "error_message": "(111)[ test system ] Strong Customer Authentication Required", "unified_code": "UE_9000", "unified_message": "Something went wrong", "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "StripeCustomer", "created_at": 1744708899, "expires": 1744712499, "secret": "epk_24e7b6b84ca647aaa39a01fbdf5c0f42" }, "manual_retry_allowed": true, "connector_transaction_id": "TRN_uRk00jWtySUhGnJD4e7mZhEQQwZ6vF_Le4l8iZCV9_1", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": null, "payment_link": null, "profile_id": "pro_I2x5oXH0EQeuMaAZSe6G", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_NN71g0D5WXMeggXKXhBM", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-04-15T09:36:39.674Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2025-04-15T09:21:41.821Z", "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": "111", "issuer_error_message": "(111)[ test system ] Strong Customer Authentication Required" } ``` payment now fails with valid error message when `failure` cards are used. previously, we would get a 5xx: ``` {"error":{"type":"api","message":"Something went wrong","code":"HE_00"}} ├╴at crates/router/src/services/api.rs:806:14 │ ├─▶ {"error":{"type":"server_not_available","code":"HE_00","message":"Something went wrong"}} │ ╰╴at crates/router/src/core/errors/utils.rs:281:17 │ ├─▶ Failed to deserialize connector response │ ╰╴at crates/hyperswitch_connectors/src/connectors/globalpay.rs:757:14 │ ├─▶ Failed to parse struct: Globalpay PaymentsResponse │ ├╴at /router/crates/common_utils/src/ext_traits.rs:175:14 │ ╰╴Unable to parse hyperswitch_connectors::connectors::globalpay::response::GlobalpayPaymentsResponse from bytes b"{\"id\":\"TRN_dsWF5Tk8k8m1ylUC4Fz3319DPwyUt0_mCSfvURrUj_1\",\"time_created\":\"2025-04-14T14:43:41.794Z\",\"type\":\"SALE\",\"status\":\"DECLINED\",\"channel\":\"CNP\",\"capture_mode\":\"AUTO\",\"amount\":\"\",\"currency\":\"\",\"country\":\"US\",\"merchant_id\":\"MER_7e3e2c7df34f42819b3edee31022ee3f\",\"merchant_name\":\"Sandbox_merchant_3\",\"account_id\":\"TRA_c9967ad7d8ec4b46b6dd44a61cde9a91\",\"account_name\":\"transaction_processing\",\"reference\":\"pay_gO7eiUCttdmCSfvURrUj_1\",\"payment_method\":{\"result\":\"111\",\"message\":\"(111)[ test system ] Strong Customer Authentication Required\",\"entry_mode\":\"ECOM\",\"authentication\":{\"cavv_result\":\"\"},\"card\":{\"funding\":\"CREDIT\",\"brand\":\"MASTERCARD\",\"masked_number_last4\":\"XXXXXXXXXXXX0131\",\"authcode\":\"\",\"brand_reference\":\"YWLv8HtAwSh6aG8F\",\"brand_time_created\":\"\",\"tag_response\":\"\",\"cvv_result\":\"MATCHED\",\"avs_address_result\":\"MATCHED\",\"avs_postal_code_result\":\"MATCHED\",\"avs_action\":\"\",\"provider\":{\"result\":\"111\",\"cvv_result\":\"M\",\"avs_address_result\":\"M\",\"avs_postal_code_result\":\"M\"}}},\"risk_assessment\":[{\"mode\":\"ACTIVE\",\"result\":\"ACCEPTED\",\"rules\":[{\"reference\":\"0c93a6c9-7649-4822-b5ea-1efa356337fd\",\"description\":\"Cardholder Name Rule\",\"mode\":\"ACTIVE\",\"result\":\"ACCEPTED\"},{\"reference\":\"a539d51a-abc1-4fff-a38e-b34e00ad0cc3\",\"description\":\"CardNumber block\",\"mode\":\"ACTIVE\",\"result\":\"ACCEPTED\"},{\"reference\":\"d023a19e-6985-4fda-bb9b-5d4e0dedbb1e\",\"description\":\"Amount test\",\"mode\":\"ACTIVE\",\"result\":\"ACCEPTED\"}]}],\"currency_conversion\":{\"payer_amount\":\"\",\"payer_currency\":\"\",\"exchange_rate\":\"\",\"margin_rate_percentage\":\"\",\"commission_percentage\":\"\",\"exchange_rate_source\":\"\",\"exchange_rate_time_created\":\"\"},\"batch_id\":\"\",\"action\":{\"id\":\"ACT_dsWF5Tk8k8m1ylUC4Fz3319DPwyUt0\",\"type\":\"AUTHORIZE\",\"time_created\":\"2025-04-14T14:43:41.794Z\",\"result_code\":\"DECLINED\",\"app_id\":\"OXKlGGm6ecZLIqMyRgPHRfMxdUAiEcp8\",\"app_name\":\"rotate_again\"}}" │ ╰─▶ unknown variant ``, expected one of `AED`, `AFN`, `ALL`, `AMD`, `ANG`, `AOA`, `ARS`, `AUD`, `AWG`, `AZN`, `BAM`, `BBD`, `BDT`, `BGN`, `BHD`, `BIF`, `BMD`, `BND`, `BOB`, `BRL`, `BSD`, `BTN`, `BWP`, `BYN`, `BZD`, `CAD`, `CDF`, `CHF`, `CLF`, `CLP`, `CNY`, `COP`, `CRC`, `CUC`, `CUP`, `CVE`, `CZK`, `DJF`, `DKK`, `DOP`, `DZD`, `EGP`, `ERN`, `ETB`, `EUR`, `FJD`, `FKP`, `GBP`, `GEL`, `GHS`, `GIP`, `GMD`, `GNF`, `GTQ`, `GYD`, `HKD`, `HNL`, `HRK`, `HTG`, `HUF`, `IDR`, `ILS`, `INR`, `IQD`, `IRR`, `ISK`, `JMD`, `JOD`, `JPY`, `KES`, `KGS`, `KHR`, `KMF`, `KPW`, `KRW`, `KWD`, `KYD`, `KZT`, `LAK`, `LBP`, `LKR`, `LRD`, `LSL`, `LYD`, `MAD`, `MDL`, `MGA`, `MKD`, `MMK`, `MNT`, `MOP`, `MRU`, `MUR`, `MVR`, `MWK`, `MXN`, `MYR`, `MZN`, `NAD`, `NGN`, `NIO`, `NOK`, `NPR`, `NZD`, `OMR`, `PAB`, `PEN`, `PGK`, `PHP`, `PKR`, `PLN`, `PYG`, `QAR`, `RON`, `RSD`, `RUB`, `RWF`, `SAR`, `SBD`, `SCR`, `SDG`, `SEK`, `SGD`, `SHP`, `SLE`, `SLL`, `SOS`, `SRD`, `SSP`, `STD`, `STN`, `SVC`, `SYP`, `SZL`, `THB`, `TJS`, `TMT`, `TND`, `TOP`, `TRY`, `TTD`, `TWD`, `TZS`, `UAH`, `UGX`, `USD`, `UYU`, `UZS`, `VES`, `VND`, `VUV`, `WST`, `XAF`, `XCD`, `XOF`, `XPF`, `YER`, `ZAR`, `ZMW`, `ZWL` at line 1 column 195 ╰╴at /router/crates/common_utils/src/ext_traits.rs:175:14 ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] 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/globalpay/response.rs` - `crates/hyperswitch_connectors/src/utils.rs` **Code Patterns Applied:** - Implement new functions (1 changes) - Extend existing types with new fields (2 changes) **Detailed Identifier Changes:** Commit 689e738f: Files to modify: **crates/hyperswitch_connectors/src/connectors/globalpay/response.rs** Modify existing code **crates/hyperswitch_connectors/src/utils.rs** Add: - function: pub::deserialize_optional_currency
{"pr_number": 7812, "pr_title": "fix(connector): [globalpay] handle edge case where currency comes as empty upon payment decline", "merged_at": "2025-04-17T13:23:44Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/globalpay/response.rs", "crates/hyperswitch_connectors/src/utils.rs"]}, "change_types": {"functions_added": 1, "fields_added": 2, "imports_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix: Update routing_approach for 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 --> Fixes routing approach updation for wallets flow ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> 1. make wallet payment and check for `routing_approach` column in payment_attempt ApplePay payment create - ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_BNOaWRzwyZ3hMAbhRNtp9t6Mx7ZSVyK5gPvd1bavl0FWehvrHlre1eMifYA244TE' \ --data-raw '{ "amount": 650, "currency": "USD", "confirm": false, "business_country": "US", "business_label": "default", "amount_to_capture": 650, "customer_id": "cu_1751271429", "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "setup_future_usage": "off_session", "authentication_type": "no_three_ds", "return_url": "https://google.com", "email": "something@gmail.com", "name": "Joseph Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment request", "statement_descriptor_name": "Juspay", "statement_descriptor_suffix": "Router", "payment_method": "wallet", "payment_method_type": "apple_pay", "billing": { "address": { "line1": "1467", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "customer_acceptance": { "acceptance_type": "offline", "accepted_at": "1963-05-03T04:07:52.723Z", "online": { "ip_address": "in sit", "user_agent": "amet irure esse" } }, "payment_method_data": { "wallet": { "apple_pay": { "payment_data": "eyJkYXRhIjogInR1OHlCcFY3MHJ5WFpSTUJqaEt3T2VtTGhrbHlPREIzNVVLdnpNUDVFRk50eW9OMUdtK2pRRkZnaTF1T0t3WmJQZUUwdmxVUnJIeU5vQkhLOUZSY1pmYzJVL2cydytHbExweWxVcEQwc2VXdU9rRTZYb1E1SHFsZ085bFZRclZacHZsNmFndHdVYU5Cc2pqWTB0Q1F1SHRMRHQzQWI4c2pJdWhpL1g1cFNYakM0ak5PdUoxRkdJKy9CS016OHBNdUZGMkUvbmJWenhNQjhoT1lDWjlUVGdFZlN3Z3VwbE9SaFY5dFV1by9VVFhFUG40cGljNVpPYUR6WnB6Z1BuK0d1V2JVVExuL0h5Rk9MQW5xc3pNZzFkdklHcjd3c0pWRE1LUzJIdHZ5VzA2QXUzNGVSZGxkaEVWbFhnYWNDcWFualVwZlJBcVhod2VtQjNwd2p4bFBUMkxrcUE3VzJwWnNLNkF1Z0lwUi9tMTUwazFRRjl3d1AwVTF6YkpBbGc5bE9VL1IyRlVZR1BKRUZ4ay92SWowL3ZiYnkvcE96L0RBY1ZRd3NGek9UbUk9IiwKICAgICAgInNpZ25hdHVyZSI6ICJNSUFHQ1NxR1NJYjNEUUVIQXFDQU1JQUNBUUV4RFRBTEJnbGdoa2dCWlFNRUFnRXdnQVlKS29aSWh2Y05BUWNCQUFDZ2dEQ0NBK1F3Z2dPTG9BTUNBUUlDQ0ZuWW9ieXE5T1BOTUFvR0NDcUdTTTQ5QkFNQ01Ib3hMakFzQmdOVkJBTU1KVUZ3Y0d4bElFRndjR3hwWTJGMGFXOXVJRWx1ZEdWbmNtRjBhVzl1SUVOQklDMGdSek14SmpBa0JnTlZCQXNNSFVGd2NHeGxJRU5sY25ScFptbGpZWFJwYjI0Z1FYVjBhRzl5YVhSNU1STXdFUVlEVlFRS0RBcEJjSEJzWlNCSmJtTXVNUXN3Q1FZRFZRUUdFd0pWVXpBZUZ3MHlNVEEwTWpBeE9UTTNNREJhRncweU5qQTBNVGt4T1RNMk5UbGFNR0l4S0RBbUJnTlZCQU1NSDJWall5MXpiWEF0WW5KdmEyVnlMWE5wWjI1ZlZVTTBMVk5CVGtSQ1QxZ3hGREFTQmdOVkJBc01DMmxQVXlCVGVYTjBaVzF6TVJNd0VRWURWUVFLREFwQmNIQnNaU0JKYm1NdU1Rc3dDUVlEVlFRR0V3SlZVekJaTUJNR0J5cUdTTTQ5QWdFR0NDcUdTTTQ5QXdFSEEwSUFCSUl3L2F2RG5QZGVJQ3hRMlp0RkV1WTM0cWtCM1d5ejRMSE5TMUpubVBqUFRyM29HaVdvd2g1TU05M09qaXFXd3Zhdm9aTURSY1RvZWtRbXpwVWJFcFdqZ2dJUk1JSUNEVEFNQmdOVkhSTUJBZjhFQWpBQU1COEdBMVVkSXdRWU1CYUFGQ1B5U2NSUGsrVHZKK2JFOWloc1A2SzcvUzVMTUVVR0NDc0dBUVVGQndFQkJEa3dOekExQmdnckJnRUZCUWN3QVlZcGFIUjBjRG92TDI5amMzQXVZWEJ3YkdVdVkyOXRMMjlqYzNBd05DMWhjSEJzWldGcFkyRXpNREl3Z2dFZEJnTlZIU0FFZ2dFVU1JSUJFRENDQVF3R0NTcUdTSWIzWTJRRkFUQ0IvakNCd3dZSUt3WUJCUVVIQWdJd2diWU1nYk5TWld4cFlXNWpaU0J2YmlCMGFHbHpJR05sY25ScFptbGpZWFJsSUdKNUlHRnVlU0J3WVhKMGVTQmhjM04xYldWeklHRmpZMlZ3ZEdGdVkyVWdiMllnZEdobElIUm9aVzRnWVhCd2JHbGpZV0pzWlNCemRHRnVaR0Z5WkNCMFpYSnRjeUJoYm1RZ1kyOXVaR2wwYVc5dWN5QnZaaUIxYzJVc0lHTmxjblJwWm1sallYUmxJSEJ2YkdsamVTQmhibVFnWTJWeWRHbG1hV05oZEdsdmJpQndjbUZqZEdsalpTQnpkR0YwWlcxbGJuUnpMakEyQmdnckJnRUZCUWNDQVJZcWFIUjBjRG92TDNkM2R5NWhjSEJzWlM1amIyMHZZMlZ5ZEdsbWFXTmhkR1ZoZFhSb2IzSnBkSGt2TURRR0ExVWRId1F0TUNzd0thQW5vQ1dHSTJoMGRIQTZMeTlqY213dVlYQndiR1V1WTI5dEwyRndjR3hsWVdsallUTXVZM0pzTUIwR0ExVWREZ1FXQkJRQ0pEQUxtdTd0UmpHWHBLWmFLWjVDY1lJY1JUQU9CZ05WSFE4QkFmOEVCQU1DQjRBd0R3WUpLb1pJaHZkalpBWWRCQUlGQURBS0JnZ3Foa2pPUFFRREFnTkhBREJFQWlCMG9iTWsyMEpKUXczVEoweFFkTVNBalpvZlNBNDZoY1hCTmlWbU1sKzhvd0lnYVRhUVU2djFDMXBTK2ZZQVRjV0tyV3hRcDlZSWFEZVE0S2M2MEI1SzJZRXdnZ0x1TUlJQ2RhQURBZ0VDQWdoSmJTKy9PcGphbHpBS0JnZ3Foa2pPUFFRREFqQm5NUnN3R1FZRFZRUUREQkpCY0hCc1pTQlNiMjkwSUVOQklDMGdSek14SmpBa0JnTlZCQXNNSFVGd2NHeGxJRU5sY25ScFptbGpZWFJwYjI0Z1FYVjBhRzl5YVhSNU1STXdFUVlEVlFRS0RBcEJjSEJzWlNCSmJtTXVNUXN3Q1FZRFZRUUdFd0pWVXpBZUZ3MHhOREExTURZeU16UTJNekJhRncweU9UQTFNRFl5TXpRMk16QmFNSG94TGpBc0JnTlZCQU1NSlVGd2NHeGxJRUZ3Y0d4cFkyRjBhVzl1SUVsdWRHVm5jbUYwYVc5dUlFTkJJQzBnUnpNeEpqQWtCZ05WQkFzTUhVRndjR3hsSUVObGNuUnBabWxqWVhScGIyNGdRWFYwYUc5eWFYUjVNUk13RVFZRFZRUUtEQXBCY0hCc1pTQkpibU11TVFzd0NRWURWUVFHRXdKVlV6QlpNQk1HQnlxR1NNNDlBZ0VHQ0NxR1NNNDlBd0VIQTBJQUJQQVhFWVFaMTJTRjFScGVKWUVIZHVpQW91L2VlNjVONEkzOFM1UGhNMWJWWmxzMXJpTFFsM1lOSWs1N3VnajlkaGZPaU10MnUyWnd2c2pvS1lUL1ZFV2pnZmN3Z2ZRd1JnWUlLd1lCQlFVSEFRRUVPakE0TURZR0NDc0dBUVVGQnpBQmhpcG9kSFJ3T2k4dmIyTnpjQzVoY0hCc1pTNWpiMjB2YjJOemNEQTBMV0Z3Y0d4bGNtOXZkR05oWnpNd0hRWURWUjBPQkJZRUZDUHlTY1JQaytUdkorYkU5aWhzUDZLNy9TNUxNQThHQTFVZEV3RUIvd1FGTUFNQkFmOHdId1lEVlIwakJCZ3dGb0FVdTdEZW9WZ3ppSnFraXBuZXZyM3JyOXJMSktzd053WURWUjBmQkRBd0xqQXNvQ3FnS0lZbWFIUjBjRG92TDJOeWJDNWhjSEJzWlM1amIyMHZZWEJ3YkdWeWIyOTBZMkZuTXk1amNtd3dEZ1lEVlIwUEFRSC9CQVFEQWdFR01CQUdDaXFHU0liM1kyUUdBZzRFQWdVQU1Bb0dDQ3FHU000OUJBTUNBMmNBTUdRQ01EclBjb05SRnBteGh2czF3MWJLWXIvMEYrM1pEM1ZOb282KzhaeUJYa0szaWZpWTk1dFpuNWpWUVEyUG5lbkMvZ0l3TWkzVlJDR3dvd1YzYkYzek9EdVFaLzBYZkN3aGJaWlB4bkpwZ2hKdlZQaDZmUnVaeTVzSmlTRmhCcGtQQ1pJZEFBQXhnZ0dITUlJQmd3SUJBVENCaGpCNk1TNHdMQVlEVlFRRERDVkJjSEJzWlNCQmNIQnNhV05oZEdsdmJpQkpiblJsWjNKaGRHbHZiaUJEUVNBdElFY3pNU1l3SkFZRFZRUUxEQjFCY0hCc1pTQkRaWEowYVdacFkyRjBhVzl1SUVGMWRHaHZjbWwwZVRFVE1CRUdBMVVFQ2d3S1FYQndiR1VnU1c1akxqRUxNQWtHQTFVRUJoTUNWVk1DQ0ZuWW9ieXE5T1BOTUFzR0NXQ0dTQUZsQXdRQ0FhQ0JrekFZQmdrcWhraUc5dzBCQ1FNeEN3WUpLb1pJaHZjTkFRY0JNQndHQ1NxR1NJYjNEUUVKQlRFUEZ3MHlOREV5TVRJd09ESTFNalphTUNnR0NTcUdTSWIzRFFFSk5ERWJNQmt3Q3dZSllJWklBV1VEQkFJQm9Rb0dDQ3FHU000OUJBTUNNQzhHQ1NxR1NJYjNEUUVKQkRFaUJDQmZHSHBFQ2RnOWQ0YWl0VTlDRndSTGVEYXNZSDRMdUNuQjIvZHd2VFE2SWpBS0JnZ3Foa2pPUFFRREFnUkdNRVFDSUhnK3dKd25RdlJuZEdIN1UrL1hVb094c21VRVI2a2RqQ0RQNStTajF4eXpBaUJydEdIUGtWUXB1VEFHeDQ5SllEUFl5MzdhUDhoeGxtK1VjRThzVWFFa0V3QUFBQUFBQUE9PSIsCiAgICAgICJoZWFkZXIiOiB7CiAgICAgICAgInB1YmxpY0tleUhhc2giOiAiMkNnWTU3TERJVFVEMHFSN0R3eUhsdVRtMTIyQnowOXNhczJCVVorRUU5VT0iLAogICAgICAgICJlcGhlbWVyYWxQdWJsaWNLZXkiOiAiTUZrd0V3WUhLb1pJemowQ0FRWUlLb1pJemowREFRY0RRZ0FFQmN1VGNHRGl0V1B3UVE5SFZ0d1dEZmRkZDlhelJ3VFJlL00zVUNSb3NHaEhhUklQUnNoZWp2ZWpaL0Z4MlFiamVYRmNRSnVra0creUdYUmlnTDR2MUE9PSIsCiAgICAgICAgInRyYW5zYWN0aW9uSWQiOiAiNzAwOTVhMWFjMTZkNGQ4NzAyODQ0ZDdjZDJhZGVkZWMxZmQyMzA0YTFkNmU3OTBhZWVmOWJjYzA5MmZkYjk2MSIKICAgICAgfSwKICAgICAgInZlcnNpb24iOiAiRUNfdjEifQ==", "payment_method": { "display_name": "Discover 9319", "network": "Discover", "type": "credit" }, "transaction_identifier": "c635c5b3af900d7bd81fecd7028f1262f9d030754ee65ec7afd988a678194751" } } } }' ``` Payment method list - ``` curl --location 'http://localhost:8080/account/payment_methods?client_secret=pay_mgPMJsvP0EXSt7fDSmIF_secret_TbYn03eKtktMmmjUMTKe' \ --header 'Accept: application/json' \ --header 'api-key: pk_dev_bc5af669d7594cb7aaf277fc6b6c60dc' ``` Routing approach after this - <img width="850" alt="image" src="https://github.com/user-attachments/assets/4d637044-03e0-4c34-ab7c-abbe60a700fc" /> test straight_through routing - ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_BNOaWRzwyZ3hMAbhRNtp9t6Mx7ZSVyK5gPvd1bavl0FWehvrHlre1eMifYA244TE' \ --data-raw '{ "amount": 6540, "currency": "USD", "confirm": true, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 6540, "customer_id": "StripeCustomer", "profile_id": "pro_EfD8EtQQSPZxXStG6B7x", "email": "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", "routing": { "type": "single", "data": {"connector": "stripe", "merchant_connector_id": "mca_SdftCCtpClu32qA6oijC"} }, "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4242424242424242", "card_exp_month": "03", "card_exp_year": "30", "card_holder_name": "joseph Doe", "card_cvc": "737" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "NL", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" }, "browser_info": { "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "language": "nl-NL", "color_depth": 24, "screen_height": 723, "screen_width": 1536, "time_zone": 0, "java_enabled": true, "java_script_enabled": true, "ip_address": "127.0.0.1" } }' ``` DB - <img width="852" alt="image" src="https://github.com/user-attachments/assets/6fa08603-19af-485b-bce2-9266b3419749" /> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Database Layer (Queries & Schema)** - `crates/diesel_models/src/payment_attempt.rs` **2. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/payments/payment_attempt.rs` **3. Core Business Logic** - `crates/router/src/core/payment_methods/cards.rs` - `crates/router/src/core/payments.rs` - `crates/router/src/core/payments/operations/payment_create.rs` - ... and 1 more files **4. Other** - `crates/common_enums/src/enums.rs` - `migrations/2025-06-27-120507_update_routing_approach/down.sql` - `migrations/2025-06-27-120507_update_routing_approach/up.sql` **Code Patterns Applied:** - Extend existing types with new fields (5 changes) - Add conditional logic for feature flags or filtering (1 changes) - Modify database queries (3 changes) **Detailed Identifier Changes:** Commit c275e13c: Files to modify: **crates/common_enums/src/enums.rs** Modify existing code **crates/diesel_models/src/payment_attempt.rs** Modify existing code **crates/hyperswitch_domain_models/src/payments/payment_attempt.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/operations/payment_create.rs** Modify existing code **crates/router/src/core/payments/routing.rs** Modify existing code
{"pr_number": 8490, "pr_title": "fix: Update routing_approach for session_token flow", "merged_at": "2025-07-03T07:24:26Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"database": ["crates/diesel_models/src/payment_attempt.rs"], "domain": ["crates/hyperswitch_domain_models/src/payments/payment_attempt.rs"], "core_business": ["crates/router/src/core/payment_methods/cards.rs", "crates/router/src/core/payments.rs", "crates/router/src/core/payments/operations/payment_create.rs", "crates/router/src/core/payments/routing.rs"], "other": ["crates/common_enums/src/enums.rs", "migrations/2025-06-27-120507_update_routing_approach/down.sql", "migrations/2025-06-27-120507_update_routing_approach/up.sql"]}, "change_types": {"fields_added": 5, "conditionals_added": 1, "database_queries": 3}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(migration): add connector_customer updation support to batch PM update API ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Added `connector_customer_id` support to batch payment method update API. When provided in CSV with `merchant_connector_ids`, stores it in customer's `connector_customer` field and returns in response. __Key format:__ - Payout processors: `{profile_id}_{connector_name}` - Others: `merchant_connector_id` ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context Enables updating connector customer IDs via batch CSV upload during payment method migration. ## How did you test it? <details> <summary>Migrate tokens for a payment connector</summary> cURL curl --location --request POST 'http://localhost:8080/payment_methods/migrate-batch' \ --header 'api-key: test_admin' \ --form 'merchant_id="merchant_1760102182"' \ --form 'merchant_connector_id="mca_ekDs6xZjViLRqMHF5w4f"' \ --form 'file=@"tokens__migrate.csv"' Response [ { "line_number": 1, "payment_method_id": "pm_7RCBjfnizaxPbXotdgf9", "payment_method": "card", "payment_method_type": "credit", "customer_id": "cus_f4DIwBHr7etboEDAL0wx2", "migration_status": "Success", "card_number_masked": "429318 xxxx 0008", "card_migrated": null, "network_token_migrated": true, "connector_mandate_details_migrated": true, "network_transaction_id_migrated": true } ] Expecation - Connector's mandate token was migrated for payment processor - Connector's customer reference was migrated for payment processor </details> <details> <summary>Migrate tokens for a payment connector</summary> cURL curl --location --request POST 'http://localhost:8080/payment_methods/update-batch' \ --header 'api-key: test_admin' \ --form 'merchant_id="merchant_1760102182"' \ --form 'merchant_connector_id="mca_XnG1VPWBeMFhS5J0bmfX"' \ --form 'file=@"tokens__update.csv"' Response [ { "payment_method_id": "pm_7RCBjfnizaxPbXotdgf9", "status": "active", "network_transaction_id": "512560415387748", "connector_mandate_details": { "payouts": { "mca_prhB5Vcj6ocYEGjU1CH6": { "transfer_method_id": "ZFD4C6QDLMVFDXT5" } }, "mca_ekDs6xZjViLRqMHF5w4f": { "mandate_metadata": null, "payment_method_type": "credit", "connector_mandate_id": "ZFD4C6QDLMVFDXT5", "connector_mandate_status": null, "original_payment_authorized_amount": null, "original_payment_authorized_currency": null, "connector_mandate_request_reference_id": null } }, "update_status": "Success", "updated_payment_method_data": false, "connector_customer": { "mca_ekDs6xZjViLRqMHF5w4f": "cus_f4DIwBHr7etboEDAL0wx2", "pro_UigCllpRkKL7rOesk3eT_adyenplatform": "sajkgnjsangkjnsajkngksa" }, "line_number": 1 } ] Expectation - Connector's mandate token was updated for payout processor - Connector's customer reference was updated for payout processor </details> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/payment_methods.rs` **2. Core Business Logic** - `crates/router/src/core/payment_methods/migration.rs` **Code Patterns Applied:** - Implement new functions (1 changes) - Extend existing types with new fields (11 changes) - Add conditional logic for feature flags or filtering (1 changes) **Detailed Identifier Changes:** Commit c4720c80: Files to modify: **crates/api_models/src/payment_methods.rs** Modify existing code **crates/router/src/core/payment_methods/migration.rs** Add: - function: private::build_connector_customer_update
{"pr_number": 9791, "pr_title": "feat(migration): add connector_customer updation support to batch PM update API", "merged_at": "2025-10-11T13:30:20Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/payment_methods.rs"], "core_business": ["crates/router/src/core/payment_methods/migration.rs"]}, "change_types": {"functions_added": 1, "fields_added": 11, "imports_added": 2, "conditionals_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
ci(cypress): add bambora connector ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [x] CI/CD ## Description Add Bambora connector to cypress test suits ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding 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 Enhancement ## How did you test it? Cypress Failures: 1. The psync call after the confirm call throws a 500 error when the status is requires_capture. 2. 3ds payments silently falling back to no-3ds(Should throw validation) ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Tests** - `cypress-tests/cypress/e2e/configs/Payment/Bambora.js` - `cypress-tests/cypress/e2e/configs/Payment/Utils.js` **Code Patterns Applied:** - Extend existing types with new fields (464 changes)
{"pr_number": 8400, "pr_title": "ci(cypress): add bambora connector", "merged_at": "2025-06-25T09:49:13Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "connector"]}, "hierarchy": {"tests": ["cypress-tests/cypress/e2e/configs/Payment/Bambora.js", "cypress-tests/cypress/e2e/configs/Payment/Utils.js"]}, "change_types": {"fields_added": 464}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
fix(wasm): [FISERV] Added GooglePay Payment Method Type ## 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 --> Added GooglePay as a payment method type under wallets in config files ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/connector_configs/toml/development.toml` - `crates/connector_configs/toml/production.toml` - `crates/connector_configs/toml/sandbox.toml`
{"pr_number": 8832, "pr_title": "fix(wasm): [FISERV] Added GooglePay Payment Method Type", "merged_at": "2025-08-06T07:42:36Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment"]}, "hierarchy": {"connectors": ["crates/connector_configs/toml/development.toml", "crates/connector_configs/toml/production.toml", "crates/connector_configs/toml/sandbox.toml"]}, "change_types": {}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
fix(connector): [BRAINTREE] Changed Attempt Status Mapping for Braintree ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> HOTFIX: https://github.com/juspay/hyperswitch/pull/7471 Changed the Attempt Status Mapping of `SubmittedForSettlement` and `SettlementPending` 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). --> Issue Link: https://github.com/juspay/hyperswitch/issues/7472 ## How did you test 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 Payment (AutoCapture)** -Request ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_ekPGg1GI2tBzBI98TAEWKy1FHsIxlwJVA7L9mNtIZPs3UpODWkCzDpUDE2dFM46T' \ --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_hYJdApy6q8OT0GtFPABl", "merchant_id": "postman_merchant_GHAction_e5df8f0f-fb19-466e-9a99-d823823a6903", "status": "requires_customer_action", "amount": 2500, "net_amount": 2500, "shipping_cost": null, "amount_capturable": 2500, "amount_received": null, "connector": "braintree", "client_secret": "pay_hYJdApy6q8OT0GtFPABl_secret_A7ufMzE2HZOSeygaSOmD", "created": "2025-03-10T11:51:31.336Z", "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_hYJdApy6q8OT0GtFPABl/postman_merchant_GHAction_e5df8f0f-fb19-466e-9a99-d823823a6903/pay_hYJdApy6q8OT0GtFPABl_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": 1741607491, "expires": 1741611091, "secret": "epk_fb5c83ed19434ae4bae82b3467ce3dab" }, "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_7Gok9MiuK8INR4GaonVo", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_BmvFPXpGhBGtxOKNQ9CY", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-03-10T12:06:31.336Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2025-03-10T11:51:33.825Z", "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_hYJdApy6q8OT0GtFPABl' \ --header 'Accept: application/json' \ --header 'api-key: dev_ekPGg1GI2tBzBI98TAEWKy1FHsIxlwJVA7L9mNtIZPs3UpODWkCzDpUDE2dFM46T' ``` -Response ``` { "payment_id": "pay_hYJdApy6q8OT0GtFPABl", "merchant_id": "postman_merchant_GHAction_e5df8f0f-fb19-466e-9a99-d823823a6903", "status": "succeeded", "amount": 2500, "net_amount": 2500, "shipping_cost": null, "amount_capturable": 0, "amount_received": 2500, "connector": "braintree", "client_secret": "pay_hYJdApy6q8OT0GtFPABl_secret_A7ufMzE2HZOSeygaSOmD", "created": "2025-03-10T11:51:31.336Z", "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": "dHJhbnNhY3Rpb25fcHBzZHQ5dmQ", "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_7Gok9MiuK8INR4GaonVo", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_BmvFPXpGhBGtxOKNQ9CY", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-03-10T12:06:31.336Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2025-03-10T11:51:59.696Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": "manual" } ``` **3. CIT** -Request ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_ekPGg1GI2tBzBI98TAEWKy1FHsIxlwJVA7L9mNtIZPs3UpODWkCzDpUDE2dFM46T' \ --data-raw '{ "amount": 1650, "currency": "USD", "confirm": true, "customer_id": "customer123", "setup_future_usage": "off_session", "authentication_type": "three_ds", "payment_method_type": "debit", "payment_method": "card", "payment_method_data": { "card": { "card_number": "5200000000001096", "card_exp_month": "03", "card_exp_year": "30", "card_holder_name": "joseph Doe", "card_cvc": "737" } }, "billing": { "address": { "first_name": "joseph", "last_name": "Doe" } }, "email": "something@example.com", "customer_acceptance": { "acceptance_type": "offline" } }' ``` -Response ``` { "payment_id": "pay_KBOPJsZlEw535w5l73M0", "merchant_id": "postman_merchant_GHAction_e5df8f0f-fb19-466e-9a99-d823823a6903", "status": "requires_customer_action", "amount": 1650, "net_amount": 1650, "shipping_cost": null, "amount_capturable": 1650, "amount_received": null, "connector": "braintree", "client_secret": "pay_KBOPJsZlEw535w5l73M0_secret_DqOaltGsxi41h0T3sYKA", "created": "2025-03-10T11:52:33.914Z", "currency": "USD", "customer_id": "customer123", "customer": { "id": "customer123", "name": null, "email": "something@example.com", "phone": null, "phone_country_code": null }, "description": null, "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "off_session", "off_session": null, "capture_on": null, "capture_method": null, "payment_method": "card", "payment_method_data": { "card": { "last4": "1096", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "520000", "card_extended_bin": null, "card_exp_month": "03", "card_exp_year": "30", "card_holder_name": "joseph Doe", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": { "city": null, "country": null, "line1": null, "line2": null, "line3": null, "zip": null, "state": null, "first_name": "joseph", "last_name": "Doe" }, "phone": null, "email": null }, "order_details": null, "email": "something@example.com", "name": null, "phone": null, "return_url": null, "authentication_type": "three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": { "type": "redirect_to_url", "redirect_to_url": "http://localhost:8080/payments/redirect/pay_KBOPJsZlEw535w5l73M0/postman_merchant_GHAction_e5df8f0f-fb19-466e-9a99-d823823a6903/pay_KBOPJsZlEw535w5l73M0_1" }, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "debit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "customer123", "created_at": 1741607553, "expires": 1741611153, "secret": "epk_c9d3479f0d864de1bffdd770239b4990" }, "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_7Gok9MiuK8INR4GaonVo", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_BmvFPXpGhBGtxOKNQ9CY", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-03-10T12:07:33.913Z", "fingerprint": null, "browser_info": null, "payment_method_id": "pm_cvaZra9OH2u9zLswzrYb", "payment_method_status": "inactive", "updated": "2025-03-10T11:52:35.087Z", "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. MIT** -Request ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_ekPGg1GI2tBzBI98TAEWKy1FHsIxlwJVA7L9mNtIZPs3UpODWkCzDpUDE2dFM46T' \ --data '{ "amount": 179, "currency": "USD", "confirm": true, "customer_id": "customer123", "recurring_details": { "type": "payment_method_id", "data": "pm_cvaZra9OH2u9zLswzrYb" }, "off_session": true }' ``` -Response ``` { "payment_id": "pay_Guzu7VLXJ56WRrco8Mgd", "merchant_id": "postman_merchant_GHAction_e5df8f0f-fb19-466e-9a99-d823823a6903", "status": "succeeded", "amount": 179, "net_amount": 179, "shipping_cost": null, "amount_capturable": 0, "amount_received": 179, "connector": "braintree", "client_secret": "pay_Guzu7VLXJ56WRrco8Mgd_secret_YpCWnGkbFS3K7xXsAK6Z", "created": "2025-03-10T11:53:18.080Z", "currency": "USD", "customer_id": "customer123", "customer": { "id": "customer123", "name": null, "email": "something@example.com", "phone": null, "phone_country_code": null }, "description": null, "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": true, "capture_on": null, "capture_method": null, "payment_method": "card", "payment_method_data": { "card": { "last4": "1096", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "520000", "card_extended_bin": null, "card_exp_month": "03", "card_exp_year": "30", "card_holder_name": "joseph Doe", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": null, "order_details": null, "email": "something@example.com", "name": null, "phone": null, "return_url": null, "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "debit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "customer123", "created_at": 1741607598, "expires": 1741611198, "secret": "epk_9f5c5a0dd8bd473b873df611b6c0e184" }, "manual_retry_allowed": false, "connector_transaction_id": "dHJhbnNhY3Rpb25fMnNncWhjbmE", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": null, "payment_link": null, "profile_id": "pro_7Gok9MiuK8INR4GaonVo", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_BmvFPXpGhBGtxOKNQ9CY", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-03-10T12:08:18.080Z", "fingerprint": null, "browser_info": null, "payment_method_id": "pm_cvaZra9OH2u9zLswzrYb", "payment_method_status": "active", "updated": "2025-03-10T11:53:18.925Z", "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": "cGF5bWVudG1ldGhvZF9jY19idGY1dGFzcg", "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/braintree/transformers.rs` **Detailed Identifier Changes:** Commit f3c8e0ed: Files to modify: **crates/hyperswitch_connectors/src/connectors/braintree/transformers.rs** Modify existing code
{"pr_number": 7516, "pr_title": "fix(connector): [BRAINTREE] Changed Attempt Status Mapping for Braintree", "merged_at": "2025-03-13T09:29:01Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/braintree/transformers.rs"]}, "change_types": {}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connectors): [Paysafe] implement non-3DS card mandates ## 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 --> Adds support for non threeds card mandates > Note: Multiple mandates cannot be created with the same customer and same payment method. This is also the reason why cypress test is not added - for the same customer id and payment method CIT will fail and hence MITs cannot be tested ## How did you test 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 mandate with card non-3ds cards ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_KpZNvnar9rCNujQ66e0bg27IPsqiFppklmFtpZ5I4zPeoSBokhD8OmQ7WAmQPRhI' \ --data-raw '{ "amount": 100, "currency": "USD", "confirm": true, "capture_method": "automatic", "email": "hello@123.com", "customer_id": "cus_004", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4111111111111111", "card_exp_month": "03", "card_exp_year": "30", "card_cvc": "737" } }, "customer_acceptance": { "acceptance_type": "online", "accepted_at": "2025-03-27T13:56:49.848Z", "online": { "ip_address": null, "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.3 Safari/605.1.15" } }, "setup_future_usage": "off_session", "browser_info": { "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "language": "nl-NL", "color_depth": 24, "screen_height": 723, "screen_width": 1536, "time_zone": 0, "java_enabled": true, "java_script_enabled": true, "ip_address": "13.232.74.226" }, "billing": { "address": { "zip": "560095", "country": "CA", "first_name": "Sakil", "last_name": "Mostak", "line1": "Fasdf", "line2": "Fasdf", "city": "Fasdf" } } }' ``` Response ``` { "payment_id": "pay_aP1dCSuF2VVucq2xpSoC", "merchant_id": "postman_merchant_GHAction_5eb5fcc5-5e2c-4549-b651-332497ec158b", "status": "succeeded", "amount": 100, "net_amount": 100, "shipping_cost": null, "amount_capturable": 0, "amount_received": 100, "connector": "paysafe", "client_secret": "pay_aP1dCSuF2VVucq2xpSoC_secret_mUlrShi8maILTM8ZGV3E", "created": "2025-09-25T09:56:29.040Z", "currency": "USD", "customer_id": "cus_004", "customer": { "id": "cus_004", "name": null, "email": "hello@123.com", "phone": null, "phone_country_code": null }, "description": null, "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "off_session", "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "1111", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "411111", "card_extended_bin": null, "card_exp_month": "03", "card_exp_year": "30", "card_holder_name": null, "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": { "city": "Fasdf", "country": "CA", "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@123.com", "name": null, "phone": null, "return_url": null, "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "cus_004", "created_at": 1758794189, "expires": 1758797789, "secret": "epk_79b602d671e14c3f9634562bdbb63f2d" }, "manual_retry_allowed": null, "connector_transaction_id": "5a63c4a9-24b7-44cc-96ee-7a83032783c0", "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_Fa5NR745tv9hvfhGT7rg", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_y1eIRpAWLkFOdwJRlcsw", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-25T10:11:29.040Z", "fingerprint": null, "browser_info": { "language": "nl-NL", "time_zone": 0, "ip_address": "13.232.74.226", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "color_depth": 24, "java_enabled": true, "screen_width": 1536, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 723, "java_script_enabled": true }, "payment_channel": null, "payment_method_id": "pm_dX6Fbex22SeTGe2szfZo", "network_transaction_id": null, "payment_method_status": "active", "updated": "2025-09-25T09:56:32.860Z", "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": "Cmg3jQytsePtAtk--5a63c4a9-24b7-44cc-96ee-7a83032783c0", "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null, "enable_partial_authorization": null, "enable_overcapture": null, "is_overcapture_enabled": null, "network_details": null } ``` MIT ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_KpZNvnar9rCNujQ66e0bg27IPsqiFppklmFtpZ5I4zPeoSBokhD8OmQ7WAmQPRhI' \ --data '{ "amount": 10000, "currency": "USD", "off_session": true, "confirm": true, "capture_method": "automatic", "recurring_details": { "type": "payment_method_id", "data": "pm_dX6Fbex22SeTGe2szfZo" }, "customer_id": "cus_004" , "browser_info": { "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "language": "nl-NL", "color_depth": 24, "screen_height": 723, "screen_width": 1536, "time_zone": 0, "java_enabled": true, "java_script_enabled": true, "ip_address": "13.232.74.226" } }' ``` Response ``` { "payment_id": "pay_rzsYLib6bQj7aJeqfUo5", "merchant_id": "postman_merchant_GHAction_5eb5fcc5-5e2c-4549-b651-332497ec158b", "status": "succeeded", "amount": 10000, "net_amount": 10000, "shipping_cost": null, "amount_capturable": 0, "amount_received": 10000, "connector": "paysafe", "client_secret": "pay_rzsYLib6bQj7aJeqfUo5_secret_GfXEKY46RvyChm5gBoDl", "created": "2025-09-25T09:59:21.330Z", "currency": "USD", "customer_id": "cus_004", "customer": { "id": "cus_004", "name": null, "email": "hello@123.com", "phone": null, "phone_country_code": null }, "description": null, "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": true, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "1111", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "411111", "card_extended_bin": null, "card_exp_month": "03", "card_exp_year": "30", "card_holder_name": "Sakil Mostak", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": null, "order_details": null, "email": "hello@123.com", "name": null, "phone": null, "return_url": null, "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "cus_004", "created_at": 1758794361, "expires": 1758797961, "secret": "epk_aa8e9eafc68e4f4c99d72cd9cff2268e" }, "manual_retry_allowed": null, "connector_transaction_id": "a56ab112-ed3e-4bcf-a74d-c12dbed48e56", "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_Fa5NR745tv9hvfhGT7rg", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_y1eIRpAWLkFOdwJRlcsw", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-25T10:14:21.330Z", "fingerprint": null, "browser_info": { "language": "nl-NL", "time_zone": 0, "ip_address": "13.232.74.226", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "color_depth": 24, "java_enabled": true, "screen_width": 1536, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 723, "java_script_enabled": true }, "payment_channel": null, "payment_method_id": "pm_dX6Fbex22SeTGe2szfZo", "network_transaction_id": null, "payment_method_status": "active", "updated": "2025-09-25T09:59:23.316Z", "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": "Cmg3jQytsePtAtk--5a63c4a9-24b7-44cc-96ee-7a83032783c0", "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null, "enable_partial_authorization": null, "enable_overcapture": null, "is_overcapture_enabled": null, "network_details": null } ``` <img width="613" height="485" alt="Screenshot 2025-10-09 at 12 17 27 PM" src="https://github.com/user-attachments/assets/3c3ed202-d475-4188-845e-0dc6aa7f3013" /> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/paysafe.rs` - `crates/hyperswitch_connectors/src/connectors/paysafe/transformers.rs` - `crates/hyperswitch_connectors/src/default_implementations.rs` - ... and 2 more files **2. Tests** - `config/deployments/integration_test.toml` **3. Configuration Files** - `config/deployments/production.toml` - `config/deployments/sandbox.toml` - `config/development.toml` **Code Patterns Applied:** - Define new data structures (7 changes) - Implement new functions (25 changes) - Extend existing types with new fields (99 changes) - Add conditional logic for feature flags or filtering (5 changes) **Detailed Identifier Changes:** Commit 35a20f8e: Files to modify: **crates/hyperswitch_connectors/src/connectors/paysafe.rs** Add: - function: private::validate_mandate_payment - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::get_request_body - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::should_call_connector_customer - impl: impl api::ConnectorCustomer for Paysafe - impl: impl ConnectorIntegration<CreateConnectorCustomer, ConnectorCustomerData, PaymentsResponseData> for Paysafe **crates/hyperswitch_connectors/src/connectors/paysafe/transformers.rs** Add: - function: private::try_from - function: private::new_customer_initiated_transaction - function: private::new_merchant_initiated_transaction - function: private::try_from - function: private::try_from - struct: pub::PaysafeCustomerDetails - struct: pub::PaysafeBillingDetails - struct: pub::PaysafeStoredCredential - struct: pub::PaysafeMandateMetadata - struct: pub::PaysafeCustomerResponse - enum: pub::PaysafeUsage - enum: pub::MandateOccurence - enum: pub::PaysafeStoredCredentialType - impl: impl TryFrom<&ConnectorCustomerRouterData> for PaysafeCustomerDetails - impl: impl PaysafeStoredCredential - impl: impl TryFrom<&PaymentsAuthorizeRouterData> for PaysafeMandateData - impl: impl TryFrom<ResponseRouterData<F, PaysafeCustomerResponse, T, PaymentsResponseData>> for RouterData<F, T, PaymentsResponseData> **crates/hyperswitch_connectors/src/default_implementations.rs** Modify existing code **crates/hyperswitch_connectors/src/utils.rs** Add: - function: private::get_optional_billing_state_code - function: private::get_connector_mandate_data - function: private::get_connector_mandate_id - function: private::is_customer_initiated_mandate_payment **crates/payment_methods/src/configs/payment_connector_required_fields.rs** Modify existing code
{"pr_number": 9560, "pr_title": "feat(connectors): [Paysafe] implement non-3DS card mandates", "merged_at": "2025-10-09T08:26:14Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/paysafe.rs", "crates/hyperswitch_connectors/src/connectors/paysafe/transformers.rs", "crates/hyperswitch_connectors/src/default_implementations.rs", "crates/hyperswitch_connectors/src/utils.rs", "crates/payment_methods/src/configs/payment_connector_required_fields.rs"], "tests": ["config/deployments/integration_test.toml"], "config": ["config/deployments/production.toml", "config/deployments/sandbox.toml", "config/development.toml"]}, "change_types": {"structs_added": 7, "functions_added": 25, "enums_added": 3, "fields_added": 99, "conditionals_added": 5}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(connector): [TRUSTPAY] Consuming Amount in PSync Response ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Currently, we are not consuming amount in BankRedirectSyncResponse. Hence during a force PSync, the status is getting updated but the amount is not being updated since we arent consuming that and there's no integrity check on the PSync response. It is only there for 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 Ref Doc : https://doc.trustpay.eu/aapi?_gl=1*7duol*_gcl_au*MTAzMDIwODQyMS4xNzQ5NTI5Mjg2&_ga=2.31332159.1618624945.1750787990-221210422.1741632166#v3-pay-information-refunded-amount If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> Refer to this [PR](https://github.com/juspay/hyperswitch/pull/8096) to test integrity checks ## How did you test it? 1. Payments Create - SEPA Bank Transfer cURL : ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_UjG0A5N42XsMC1ynfCB6G2tLpTUSao4Nimi2JsSBbMoqDX9ScIXKLFoaTUFvSr4I' \ --header 'Cookie: PHPSESSID=0b47db9d7de94c37b6b272087a9f2fa7' \ --data-raw '{ "amount": 1000, "currency": "EUR", "connector": [ "trustpay" ], "confirm": true, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 1000, "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": {} }, "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" } } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" }, "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_AkuyIahbg6XuIeBKZscR", "merchant_id": "merchant_1750829070", "status": "requires_customer_action", "amount": 1000, "net_amount": 1000, "shipping_cost": null, "amount_capturable": 1000, "amount_received": null, "connector": "trustpay", "client_secret": "pay_AkuyIahbg6XuIeBKZscR_secret_BkHuMeFJaAGr8FNZhL48", "created": "2025-06-25T06:02:13.104Z", "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": { "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 } }, "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": 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_AkuyIahbg6XuIeBKZscR/merchant_1750829070/pay_AkuyIahbg6XuIeBKZscR_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": 1750831333, "expires": 1750834933, "secret": "epk_b03a4fcdc68245ba83f2fbbd9894ba5a" }, "manual_retry_allowed": null, "connector_transaction_id": "4867776786", "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_VCKVoh5v4b1Xcj0MS6v8", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_ZQQ0lVzWxvnyMSCxX9jE", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-06-25T06:17:13.104Z", "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-06-25T06:02:16.487Z", "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 } ``` On confirming the payment in redirect, do a PSync cURL : ``` curl --location 'http://localhost:8080/payments/pay_AkuyIahbg6XuIeBKZscR?force_sync=true&expand_captures=true&expand_attempts=true' \ --header 'Accept: application/json' \ --header 'api-key: dev_UjG0A5N42XsMC1ynfCB6G2tLpTUSao4Nimi2JsSBbMoqDX9ScIXKLFoaTUFvSr4I' \ --header 'Cookie: PHPSESSID=0b47db9d7de94c37b6b272087a9f2fa7' ``` Response : ``` { "payment_id": "pay_AkuyIahbg6XuIeBKZscR", "merchant_id": "merchant_1750829070", "status": "processing", "amount": 1000, "net_amount": 1000, "shipping_cost": null, "amount_capturable": 1000, "amount_received": null, "connector": "trustpay", "client_secret": "pay_AkuyIahbg6XuIeBKZscR_secret_BkHuMeFJaAGr8FNZhL48", "created": "2025-06-25T06:02:13.104Z", "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, "attempts": [ { "attempt_id": "pay_AkuyIahbg6XuIeBKZscR_1", "status": "authorizing", "amount": 1000, "order_tax_amount": null, "currency": "EUR", "connector": "trustpay", "error_message": null, "payment_method": "bank_transfer", "connector_transaction_id": "4867776786", "capture_method": "automatic", "authentication_type": "three_ds", "created_at": "2025-06-25T06:02:13.104Z", "modified_at": "2025-06-25T06:02:23.351Z", "cancellation_reason": null, "mandate_id": null, "error_code": null, "payment_token": null, "connector_metadata": null, "payment_experience": null, "payment_method_type": "sepa_bank_transfer", "reference_id": null, "unified_code": null, "unified_message": null, "client_source": null, "client_version": null } ], "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "bank_transfer", "payment_method_data": { "bank_transfer": { "sepa": {} }, "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 } }, "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": 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": "4867776786", "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_VCKVoh5v4b1Xcj0MS6v8", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_ZQQ0lVzWxvnyMSCxX9jE", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-06-25T06:17:13.104Z", "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-06-25T06:02:36.809Z", "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 } ``` Now when force PSync will be done or we will receive Incoming Webhooks from connector, we will get an integrity check error if there's a discrepancy between the amount/currency field sent in request and received in the connector ``` { "error": { "type": "api", "message": "Integrity Check Failed! as data mismatched for amount expected 1000 but found 100", "code": "IE_00", "connector_transaction_id": "4786802084" } } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/trustpay.rs` - `crates/hyperswitch_connectors/src/connectors/trustpay/transformers.rs` **Code Patterns Applied:** - Extend existing types with new fields (7 changes) **Detailed Identifier Changes:** Commit 537d1755: Files to modify: **crates/hyperswitch_connectors/src/connectors/trustpay.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/trustpay/transformers.rs** Modify existing code
{"pr_number": 8455, "pr_title": "fix(connector): [TRUSTPAY] Consuming Amount in PSync Response", "merged_at": "2025-06-26T14:38:11Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/trustpay.rs", "crates/hyperswitch_connectors/src/connectors/trustpay/transformers.rs"]}, "change_types": {"fields_added": 7}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
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 --> Keeping the pr title of [pr](https://github.com/juspay/hyperswitch/pull/6918) to get the hotfix pr checked pass. https://github.com/juspay/hyperswitch/pull/6918 /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_aN57oRXcLr1mHaA0rgEm' \ --header 'api-key: dev_xaZ8h3fUz4jtHv2PvY3rUG4TT6gqwt4e3WlbbBiXoTNd8Qa9Xj9mikmLU7LNXoBt' \ --data '{ "connector_id": "mca_OJpAfYFQGmrFJFNHZlXJ", "connector_resource_id": "pi_3QZCtfEOqOywnAIx0U9MQsTk", "data": { "refund": { "amount": 50, "currency": "USD" }}, "type": "refund" }' ``` ``` { "id": "relay_oEX76VqhTuCiAiXqdALZ", "status": "success", "connector_resource_id": "pi_3QZCtfEOqOywnAIx0U9MQsTk", "error": null, "connector_reference_id": "re_3QZCtfEOqOywnAIx0BVy5n4o", "connector_id": "mca_OJpAfYFQGmrFJFNHZlXJ", "profile_id": "pro_aN57oRXcLr1mHaA0rgEm", "type": "refund", "data": { "refund": { "amount": 50, "currency": "USD", "reason": null } } } ``` -> retrieve ``` curl --location 'http://localhost:8080/relay/relay_oEX76VqhTuCiAiXqdALZ?force_sync=true' \ --header 'Content-Type: application/json' \ --header 'X-Idempotency-Key: <x-idempotency-key>' \ --header 'X-Profile-Id: pro_aN57oRXcLr1mHaA0rgEm' \ --header 'api-key: dev_xaZ8h3fUz4jtHv2PvY3rUG4TT6gqwt4e3WlbbBiXoTNd8Qa9Xj9mikmLU7LNXoBt' \ --data '' ``` ``` { "id": "relay_oEX76VqhTuCiAiXqdALZ", "status": "success", "connector_resource_id": "pi_3QZCtfEOqOywnAIx0U9MQsTk", "error": null, "connector_reference_id": "re_3QZCtfEOqOywnAIx0BVy5n4o", "connector_id": "mca_OJpAfYFQGmrFJFNHZlXJ", "profile_id": "pro_aN57oRXcLr1mHaA0rgEm", "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/lib.rs` - `crates/api_models/src/relay.rs` **2. Database Layer (Queries & Schema)** - `crates/diesel_models/src/enums.rs` - `crates/diesel_models/src/lib.rs` - `crates/diesel_models/src/query.rs` - ... and 4 more files **3. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/lib.rs` - `crates/hyperswitch_domain_models/src/merchant_connector_account.rs` - `crates/hyperswitch_domain_models/src/relay.rs` **4. Core Business Logic** - `crates/router/src/core.rs` - `crates/router/src/core/relay.rs` - `crates/router/src/core/relay/utils.rs` **5. Type Definitions** - `crates/router_env/src/logger/types.rs` **6. Utils** - `crates/common_utils/src/id_type.rs` - `crates/common_utils/src/id_type/relay.rs` - `crates/router/src/routes/lock_utils.rs` **7. Other** - `api-reference/api-reference/relay/relay--retrieve.mdx` - `api-reference/api-reference/relay/relay.mdx` - `api-reference/mint.json` - ... and 14 more files **Code Patterns Applied:** - Define new data structures (12 changes) - Implement new functions (42 changes) - Extend existing types with new fields (321 changes) - Add conditional logic for feature flags or filtering (3 changes) - Modify database queries (2 changes) **Detailed Identifier Changes:** Commit 1be28d3a: Files to modify: **crates/api_models/src/lib.rs** Add: - mod: pub::relay **crates/api_models/src/relay.rs** Add: - struct: pub::RelayRequest - struct: pub::RelayRefundRequest - struct: pub::RelayResponse - struct: pub::RelayError - struct: pub::RelayRetrieveRequest - struct: pub::RelayRetrieveBody - enum: pub::RelayData - impl: impl common_utils::events::ApiEventMetric for RelayRequest - impl: impl common_utils::events::ApiEventMetric for RelayResponse - impl: impl common_utils::events::ApiEventMetric for RelayRetrieveRequest - impl: impl common_utils::events::ApiEventMetric for RelayRetrieveBody **crates/common_enums/src/enums.rs** Add: - function: private::from - function: private::from - enum: pub::RelayStatus - enum: pub::RelayType - impl: impl From<RefundStatus> for RelayStatus - impl: impl From<RelayStatus> for RefundStatus **crates/common_utils/src/id_type.rs** Add: - mod: private::relay **crates/common_utils/src/id_type/relay.rs** Modify existing code **crates/diesel_models/src/enums.rs** Modify existing code **crates/diesel_models/src/lib.rs** Add: - mod: pub::relay **crates/diesel_models/src/query.rs** Add: - mod: pub::relay **crates/diesel_models/src/query/relay.rs** Add: - function: pub::insert - function: pub::update - function: pub::find_by_id - impl: impl RelayNew - impl: impl Relay **crates/diesel_models/src/relay.rs** Add: - struct: pub::Relay - struct: pub::RelayNew - struct: pub::RelayUpdateInternal **crates/diesel_models/src/schema.rs** Modify existing code **crates/diesel_models/src/schema_v2.rs** Modify existing code **crates/hyperswitch_domain_models/src/lib.rs** Add: - mod: pub::relay **crates/hyperswitch_domain_models/src/merchant_connector_account.rs** Add: - function: pub::get_connector_account_details - function: pub::get_connector_test_mode - function: pub::get_connector_test_mode **crates/hyperswitch_domain_models/src/relay.rs** Add: - function: pub::new - function: private::from - function: pub::from - function: private::from - function: private::from - function: private::convert - function: private::convert_back - function: private::construct_new - struct: pub::Relay - struct: pub::RelayRefundData - enum: pub::RelayData - enum: pub::RelayUpdate - impl: impl Relay - impl: impl From<api_models::relay::RelayData> for RelayData - impl: impl RelayUpdate - impl: impl From<Relay> for api_models::relay::RelayResponse - impl: impl From<RelayUpdate> for RelayUpdateInternal - impl: impl super::behaviour::Conversion for Relay **crates/openapi/src/openapi.rs** Modify existing code **crates/openapi/src/routes.rs** Add: - mod: pub::relay **crates/openapi/src/routes/relay.rs** Add: - function: pub::relay - function: pub::relay_retrieve **crates/router/src/core.rs** Add: - mod: pub::relay **crates/router/src/core/relay.rs** Add: - function: pub::relay - function: pub::relay_refund - function: pub::validate_relay_refund_request - function: pub::validate_relay_refund_data - function: pub::relay_retrieve - function: private::should_call_connector_for_relay_refund_status - function: pub::sync_relay_refund_with_gateway - mod: pub::utils **crates/router/src/core/relay/utils.rs** Add: - function: pub::construct_relay_refund_router_data **crates/router/src/db.rs** Add: - mod: pub::relay **crates/router/src/db/relay.rs** Add: - function: private::insert_relay - function: private::update_relay - function: private::find_relay_by_id - function: private::insert_relay - function: private::update_relay - function: private::find_relay_by_id - function: private::insert_relay - function: private::update_relay - function: private::find_relay_by_id - trait: pub::RelayInterface - impl: impl RelayInterface for Store - impl: impl RelayInterface for MockDb - impl: impl RelayInterface for KafkaStore **crates/router/src/lib.rs** Modify existing code **crates/router/src/routes.rs** Add: - mod: pub::relay **crates/router/src/routes/app.rs** Add: - function: pub::server - struct: pub::Relay - impl: impl Relay **crates/router/src/routes/lock_utils.rs** Modify existing code **crates/router/src/routes/relay.rs** Add: - function: pub::relay - function: pub::relay_retrieve **crates/router/src/services/authentication.rs** Modify existing code **crates/router_env/src/logger/types.rs** Modify existing code
{"pr_number": 6924, "pr_title": "feat(router): add /retrieve api for relay", "merged_at": "2024-12-23T17:04:46Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "merchant", "refund"]}, "hierarchy": {"api_models": ["crates/api_models/src/lib.rs", "crates/api_models/src/relay.rs"], "database": ["crates/diesel_models/src/enums.rs", "crates/diesel_models/src/lib.rs", "crates/diesel_models/src/query.rs", "crates/diesel_models/src/query/relay.rs", "crates/diesel_models/src/relay.rs", "crates/diesel_models/src/schema.rs", "crates/diesel_models/src/schema_v2.rs"], "domain": ["crates/hyperswitch_domain_models/src/lib.rs", "crates/hyperswitch_domain_models/src/merchant_connector_account.rs", "crates/hyperswitch_domain_models/src/relay.rs"], "core_business": ["crates/router/src/core.rs", "crates/router/src/core/relay.rs", "crates/router/src/core/relay/utils.rs"], "types": ["crates/router_env/src/logger/types.rs"], "utils": ["crates/common_utils/src/id_type.rs", "crates/common_utils/src/id_type/relay.rs", "crates/router/src/routes/lock_utils.rs"], "other": ["api-reference/api-reference/relay/relay--retrieve.mdx", "api-reference/api-reference/relay/relay.mdx", "api-reference/mint.json", "api-reference/openapi_spec.json", "crates/common_enums/src/enums.rs", "crates/openapi/src/openapi.rs", "crates/openapi/src/routes.rs", "crates/openapi/src/routes/relay.rs", "crates/router/src/db.rs", "crates/router/src/db/relay.rs", "crates/router/src/lib.rs", "crates/router/src/routes.rs", "crates/router/src/routes/app.rs", "crates/router/src/routes/relay.rs", "crates/router/src/services/authentication.rs", "migrations/2024-12-17-141811_add_relay_table/down.sql", "migrations/2024-12-17-141811_add_relay_table/up.sql"]}, "change_types": {"structs_added": 12, "functions_added": 42, "enums_added": 5, "fields_added": 321, "imports_added": 47, "conditionals_added": 3, "database_queries": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
docs: Updated next steps after deployment setup on Readme ## 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 --> Updated next steps after deployment setup on Readme ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> Updated next steps after deployment setup on Readme closes : #7685 7685 ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Other** - `README.md`
{"pr_number": 7686, "pr_title": "docs: Updated next steps after deployment setup on Readme", "merged_at": "2025-04-03T03:28:38Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"other": ["README.md"]}, "change_types": {}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
feat(connector): [Novalnet] Integrate Applepay wallet token flow ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [X] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description 1. Integrated ApplePay token flow for Novalnet, decrypt flow is not supported 2. Integrated mandates for ApplePay ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with 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/6731 ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Not able to test flow locally, needs to be tested in sandbox. ## Checklist <!-- Put an `x` in the boxes that apply --> - [X] I formatted the code `cargo +nightly fmt --all` - [X] I addressed lints thrown by `cargo clippy` - [X] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/connector_configs/toml/development.toml` - `crates/connector_configs/toml/production.toml` - `crates/connector_configs/toml/sandbox.toml` - ... and 2 more files **Code Patterns Applied:** - Define new data structures (1 changes) - Extend existing types with new fields (10 changes) **Detailed Identifier Changes:** Commit 1d24b045: Files to modify: **crates/hyperswitch_connectors/src/connectors/novalnet.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/novalnet/transformers.rs** Add: - struct: pub::NovalnetApplePay
{"pr_number": 6409, "pr_title": "feat(connector): [Novalnet] Integrate Applepay wallet token flow", "merged_at": "2024-10-25T10:56:10Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["token"]}, "hierarchy": {"connectors": ["crates/connector_configs/toml/development.toml", "crates/connector_configs/toml/production.toml", "crates/connector_configs/toml/sandbox.toml", "crates/hyperswitch_connectors/src/connectors/novalnet.rs", "crates/hyperswitch_connectors/src/connectors/novalnet/transformers.rs"]}, "change_types": {"structs_added": 1, "fields_added": 10}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor(payment_methods): refactor merchant payment method list for wallets ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description - Earlier we used to support filtering of wallet payment methods for customer pml, if it has been saved by the merchant via off- session payments once , the changes were made in the following [PR](https://github.com/juspay/hyperswitch/pull/4038) - In this PR we are reverting the logic , the decision was taken to show the wallets in merchant pml even though a single entry in customer pml is present for that particular wallets , - internally the decision was taken to allow overriding of the wallets connector mandate id for the customer for off-session 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? - Create MA and an MCA with wallets -Create a payment and Save one wallet (eg: Paypal) - Create a new payment intent - List the Merchant PML again, Paypal would still be there ``` { "redirect_url": "https://google.com/success", "currency": "USD", "payment_methods": [ { "payment_method": "wallet", "payment_method_types": [ { "payment_method_type": "paypal", "payment_experience": [ { "payment_experience_type": "invoke_sdk_client", "eligible_connectors": [ "paypal" ] }, { "payment_experience_type": "redirect_to_url", "eligible_connectors": [ "paypal" ] } ], "card_networks": null, "bank_names": null, "bank_debits": null, "bank_transfers": null, "required_fields": { "shipping.address.first_name": { "required_field": "shipping.address.first_name", "display_name": "shipping_first_name", "field_type": "user_shipping_name", "value": "PiX" }, "shipping.address.last_name": { "required_field": "shipping.address.last_name", "display_name": "shipping_last_name", "field_type": "user_shipping_name", "value": null }, "shipping.address.city": { "required_field": "shipping.address.city", "display_name": "city", "field_type": "user_shipping_address_city", "value": "San Fransico" }, "shipping.address.line1": { "required_field": "shipping.address.line1", "display_name": "line1", "field_type": "user_shipping_address_line1", "value": "1467" }, "shipping.address.country": { "required_field": "shipping.address.country", "display_name": "country", "field_type": { "user_shipping_address_country": { "options": [ "ALL" ] } }, "value": "US" }, "shipping.address.state": { "required_field": "shipping.address.state", "display_name": "state", "field_type": "user_shipping_address_state", "value": "California" }, "shipping.address.zip": { "required_field": "shipping.address.zip", "display_name": "zip", "field_type": "user_shipping_address_pincode", "value": "94122" } }, "surcharge_details": null, "pm_auth_connector": null } ] }, { "payment_method": "card", "payment_method_types": [ { "payment_method_type": "credit", "payment_experience": null, "card_networks": [ { "card_network": "Mastercard", "surcharge_details": null, "eligible_connectors": [ "paypal" ] }, { "card_network": "Visa", "surcharge_details": null, "eligible_connectors": [ "paypal" ] } ], "bank_names": null, "bank_debits": null, "bank_transfers": null, "required_fields": { "payment_method_data.card.card_number": { "required_field": "payment_method_data.card.card_number", "display_name": "card_number", "field_type": "user_card_number", "value": null }, "payment_method_data.card.card_exp_month": { "required_field": "payment_method_data.card.card_exp_month", "display_name": "card_exp_month", "field_type": "user_card_expiry_month", "value": null }, "payment_method_data.card.card_exp_year": { "required_field": "payment_method_data.card.card_exp_year", "display_name": "card_exp_year", "field_type": "user_card_expiry_year", "value": null }, "payment_method_data.card.card_cvc": { "required_field": "payment_method_data.card.card_cvc", "display_name": "card_cvc", "field_type": "user_card_cvc", "value": null } }, "surcharge_details": null, "pm_auth_connector": null }, { "payment_method_type": "debit", "payment_experience": null, "card_networks": [ { "card_network": "Visa", "surcharge_details": null, "eligible_connectors": [ "paypal" ] }, { "card_network": "Mastercard", "surcharge_details": null, "eligible_connectors": [ "paypal" ] } ], "bank_names": null, "bank_debits": null, "bank_transfers": null, "required_fields": { "payment_method_data.card.card_exp_month": { "required_field": "payment_method_data.card.card_exp_month", "display_name": "card_exp_month", "field_type": "user_card_expiry_month", "value": null }, "payment_method_data.card.card_number": { "required_field": "payment_method_data.card.card_number", "display_name": "card_number", "field_type": "user_card_number", "value": null }, "payment_method_data.card.card_exp_year": { "required_field": "payment_method_data.card.card_exp_year", "display_name": "card_exp_year", "field_type": "user_card_expiry_year", "value": null }, "payment_method_data.card.card_cvc": { "required_field": "payment_method_data.card.card_cvc", "display_name": "card_cvc", "field_type": "user_card_cvc", "value": null } }, "surcharge_details": null, "pm_auth_connector": null } ] } ], "mandate_payment": null, "merchant_name": "NewAge Retailer", "show_surcharge_breakup_screen": false, "payment_type": "normal", "request_external_three_ds_authentication": false, "collect_shipping_details_from_wallets": false, "collect_billing_details_from_wallets": false, "is_tax_calculation_enabled": false } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] 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` **2. Other** - `crates/common_enums/src/enums.rs` **Code Patterns Applied:** - Modify database queries (1 changes) **Detailed Identifier Changes:** Commit 48b473de: Files to modify: **crates/common_enums/src/enums.rs** Modify existing code **crates/router/src/core/payment_methods/cards.rs** Modify existing code
{"pr_number": 7866, "pr_title": "refactor(payment_methods): refactor merchant payment method list for wallets", "merged_at": "2025-04-28T08:14:20Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"core_business": ["crates/router/src/core/payment_methods/cards.rs"], "other": ["crates/common_enums/src/enums.rs"]}, "change_types": {"database_queries": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(openapi_v2): add missing struct in openapi v2 This PR adds a missing struct because of which the openapi v2 file that was generated was not valid. The PR which has this error: https://github.com/juspay/hyperswitch/pull/7248
To implement this **unknown** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/payment_methods.rs` **2. Other** - `api-reference-v2/openapi_spec.json` - `api-reference/openapi_spec.json` - `crates/masking/src/cassandra.rs` - ... and 1 more files **Code Patterns Applied:** - Implement new functions (1 changes) - Extend existing types with new fields (2 changes) **Detailed Identifier Changes:** Commit 3cf529c4: Files to modify: **crates/api_models/src/payment_methods.rs** Modify existing code **crates/masking/src/cassandra.rs** Modify existing code **crates/openapi/src/openapi_v2.rs** Modify existing code
{"pr_number": 7383, "pr_title": "fix(openapi_v2): add missing struct in openapi v2", "merged_at": "2025-03-07T13:57:10Z", "intent": {"feature_type": "unknown", "action": "add_feature", "entities": []}, "hierarchy": {"api_models": ["crates/api_models/src/payment_methods.rs"], "other": ["api-reference-v2/openapi_spec.json", "api-reference/openapi_spec.json", "crates/masking/src/cassandra.rs", "crates/openapi/src/openapi_v2.rs"]}, "change_types": {"functions_added": 1, "fields_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor(connector): [Paysafe] fix wasm ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Fix type account_id for ConfigMetadata ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <img width="2254" height="416" alt="Screenshot 2025-09-10 at 4 55 21 PM" src="https://github.com/user-attachments/assets/d153477c-fd22-4f96-aff6-0340bbfc1c29" /> <img width="2384" height="992" alt="Screenshot 2025-09-10 at 4 55 57 PM" src="https://github.com/user-attachments/assets/4c07b386-cfb9-45df-b19c-0f9b1b56c395" /> <img width="2394" height="798" alt="Screenshot 2025-09-10 at 4 56 04 PM" src="https://github.com/user-attachments/assets/64005966-147d-461d-8d3f-289d961cf260" /> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/connector_configs/src/connector.rs` **Code Patterns Applied:** - Extend existing types with new fields (1 changes) **Detailed Identifier Changes:** Commit 6b50c83f: Files to modify: **crates/connector_configs/src/connector.rs** Modify existing code
{"pr_number": 9349, "pr_title": "refactor(connector): [Paysafe] fix wasm", "merged_at": "2025-09-10T17:22:46Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user"]}, "hierarchy": {"connectors": ["crates/connector_configs/src/connector.rs"]}, "change_types": {"fields_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
docs(openapi): Show API version selection dropdown in Mintlify ## 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 --> - Moved both `v1` and `v2` API docs under `api-reference` directory - Renamed `openapi_spec.json` files for v1 and v2 - Updated OpenAPI spec file paths in `openapi` crate - Modified OpenAPI spec path in CI pipeline ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with 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 #8332 ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Executed: ```bash cargo run -p openapi --features v1 ``` and verified `openapi_spec_v1.json` generated How the version dropdown looks like: <img width="599" alt="image" src="https://github.com/user-attachments/assets/41d0c676-9a80-4a7e-ac33-9f56d9f18703" /> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] 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)** - `api-reference/api-reference/schemas/outgoing--webhook.mdx` **2. External Connector Integration** - `api-reference/api-reference/merchant-connector-account/merchant-connector--create.mdx` - `api-reference/api-reference/merchant-connector-account/merchant-connector--delete.mdx` - `api-reference/api-reference/merchant-connector-account/merchant-connector--list.mdx` - ... and 13 more files **3. Configuration Files** - `.github/workflows/validate-openapi-spec.yml` - `api-reference-v2/rust_locker_open_api_spec.yml` - `api-reference/api-reference/routing/routing--activate-config.mdx` - ... and 3 more files **4. Other** - `api-reference-v2/README.md` - `api-reference-v2/assets/images/image.png` - `api-reference-v2/essentials/error_codes.mdx` - ... and 197 more files **Code Patterns Applied:** - Extend existing types with new fields (2 changes) - Add conditional logic for feature flags or filtering (2 changes) **Detailed Identifier Changes:** Commit ce85b838: Files to modify: **crates/openapi/src/main.rs** Modify existing code
{"pr_number": 8333, "pr_title": "docs(openapi): Show API version selection dropdown in Mintlify", "merged_at": "2025-06-13T09:03:06Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user"]}, "hierarchy": {"database": ["api-reference/api-reference/schemas/outgoing--webhook.mdx"], "connectors": ["api-reference/api-reference/merchant-connector-account/merchant-connector--create.mdx", "api-reference/api-reference/merchant-connector-account/merchant-connector--delete.mdx", "api-reference/api-reference/merchant-connector-account/merchant-connector--list.mdx", "api-reference/api-reference/merchant-connector-account/merchant-connector--retrieve.mdx", "api-reference/api-reference/merchant-connector-account/merchant-connector--update.mdx", "api-reference-v2/api-reference/business-profile/merchant-connector--list.mdx", "api-reference-v2/api-reference/business-profile/profile--connector-accounts-list.mdx", "api-reference-v2/api-reference/connector-account/connector-account--create.mdx", "api-reference-v2/api-reference/connector-account/connector-account--delete.mdx", "api-reference-v2/api-reference/connector-account/connector-account--retrieve.mdx", "api-reference-v2/api-reference/connector-account/connector-account--update.mdx", "api-reference-v2/api-reference/merchant-connector-account/connector-account--create.mdx", "api-reference-v2/api-reference/merchant-connector-account/connector-account--retrieve.mdx", "api-reference-v2/api-reference/merchant-connector-account/connector-account--update.mdx", "api-reference-v2/api-reference/merchant-connector-account/merchant-connector--delete.mdx", "api-reference-v2/api-reference/profile/merchant-connector--list.mdx"], "config": [".github/workflows/validate-openapi-spec.yml", "api-reference-v2/rust_locker_open_api_spec.yml", "api-reference/api-reference/routing/routing--activate-config.mdx", "api-reference/api-reference/routing/routing--retrieve-config.mdx", "api-reference/api-reference/routing/routing--retrieve-default-config.mdx", "api-reference/api-reference/routing/routing--update-default-config.mdx"], "other": ["api-reference-v2/README.md", "api-reference-v2/assets/images/image.png", "api-reference-v2/essentials/error_codes.mdx", "api-reference-v2/essentials/go-live.mdx", "api-reference-v2/essentials/rate_limit.mdx", "api-reference-v2/favicon.png", "api-reference-v2/introduction.mdx", "api-reference-v2/logo/dark.svg", "api-reference-v2/logo/light.svg", "api-reference-v2/mint.json", "api-reference/README.md", "api-reference/api-reference/customers/customers--create.mdx", "api-reference/api-reference/customers/customers--delete.mdx", "api-reference/api-reference/customers/customers--list.mdx", "api-reference/api-reference/customers/customers--retrieve.mdx", "api-reference/api-reference/customers/customers--update.mdx", "api-reference/api-reference/disputes/disputes--list.mdx", "api-reference/api-reference/disputes/disputes--retrieve.mdx", "api-reference/api-reference/gsm/gsm--create.mdx", "api-reference/api-reference/gsm/gsm--delete.mdx", "api-reference/api-reference/gsm/gsm--get.mdx", "api-reference/api-reference/gsm/gsm--update.mdx", "api-reference/api-reference/mandates/mandates--retrieve-mandate.mdx", "api-reference/api-reference/mandates/mandates--revoke-mandate.mdx", "api-reference/api-reference/payment-methods/list-payment-methods-for-a-customer.mdx", "api-reference/api-reference/payment-methods/list-payment-methods-for-a-merchant.mdx", "api-reference/api-reference/payment-methods/payment-method--delete.mdx", "api-reference/api-reference/payment-methods/payment-method--retrieve.mdx", "api-reference/api-reference/payment-methods/payment-method--update.mdx", "api-reference/api-reference/payment-methods/paymentmethods--create.mdx", "api-reference/api-reference/payments/payments--cancel.mdx", "api-reference/api-reference/payments/payments--capture.mdx", "api-reference/api-reference/payments/payments--confirm.mdx", "api-reference/api-reference/payments/payments--list.mdx", "api-reference/api-reference/payments/payments--retrieve.mdx", "api-reference/api-reference/payments/payments--session-token.mdx", "api-reference/api-reference/payments/payments--update.mdx", "api-reference/api-reference/payments/payments-link--retrieve.mdx", "api-reference/api-reference/payouts/payouts--cancel.mdx", "api-reference/api-reference/payouts/payouts--confirm.mdx", "api-reference/api-reference/payouts/payouts--create.mdx", "api-reference/api-reference/payouts/payouts--fulfill.mdx", "api-reference/api-reference/payouts/payouts--retrieve.mdx", "api-reference/api-reference/payouts/payouts--update.mdx", "api-reference/api-reference/refunds/refunds--create.mdx", "api-reference/api-reference/refunds/refunds--list.mdx", "api-reference/api-reference/refunds/refunds--retrieve.mdx", "api-reference/api-reference/refunds/refunds--update.mdx", "api-reference/api-reference/relay/relay--retrieve.mdx", "api-reference/api-reference/relay/relay.mdx", "api-reference/docs.json", "api-reference/api-reference/3ds-decision-rule/execute-a-3ds-decision-rule-based-on-the-provided-input.mdx", "api-reference/api-reference/api-key/api-key--create.mdx", "api-reference/api-reference/api-key/api-key--list.mdx", "api-reference/api-reference/api-key/api-key--retrieve.mdx", "api-reference/api-reference/api-key/api-key--revoke.mdx", "api-reference/api-reference/api-key/api-key--update.mdx", "api-reference/api-reference/blocklist/delete-blocklist.mdx", "api-reference/api-reference/blocklist/get-blocklist.mdx", "api-reference/api-reference/blocklist/post-blocklist.mdx", "api-reference/api-reference/blocklist/post-blocklisttoggle.mdx", "api-reference/api-reference/business-profile/business-profile--create.mdx", "api-reference/api-reference/business-profile/business-profile--delete.mdx", "api-reference/api-reference/business-profile/business-profile--list.mdx", "api-reference/api-reference/business-profile/business-profile--retrieve.mdx", "api-reference/api-reference/business-profile/business-profile--update.mdx", "api-reference/api-reference/customer-set-default-payment-method/customers--set-default-payment-method.mdx", "api-reference/v1/customers/customers--create.mdx", "api-reference/v1/customers/customers--delete.mdx", "api-reference/v1/customers/customers--list.mdx", "api-reference/v1/customers/customers--retrieve.mdx", "api-reference/v1/customers/customers--update.mdx", "api-reference/v1/disputes/disputes--list.mdx", "api-reference/v1/disputes/disputes--retrieve.mdx", "api-reference/api-reference/event/events--delivery-attempt-list.mdx", "api-reference/api-reference/event/events--list.mdx", "api-reference/api-reference/event/events--manual-retry.mdx", "api-reference/v1/gsm/gsm--create.mdx", "api-reference/v1/gsm/gsm--delete.mdx", "api-reference/v1/gsm/gsm--get.mdx", "api-reference/v1/gsm/gsm--update.mdx", "api-reference/api-reference/mandates/mandates--customer-mandates-list.mdx", "api-reference/v1/mandates/mandates--retrieve-mandate.mdx", "api-reference/v1/mandates/mandates--revoke-mandate.mdx", "api-reference/api-reference/merchant-account/merchant-account--create.mdx", "api-reference/api-reference/merchant-account/merchant-account--delete.mdx", "api-reference/api-reference/merchant-account/merchant-account--kv-status.mdx", "api-reference/api-reference/merchant-account/merchant-account--retrieve.mdx", "api-reference/api-reference/merchant-account/merchant-account--update.mdx", "api-reference/openapi_spec.json", "api-reference/api-reference/organization/organization--create.mdx", "api-reference/api-reference/organization/organization--retrieve.mdx", "api-reference/api-reference/organization/organization--update.mdx", "api-reference/api-reference/payment-methods/list-customer-saved-payment-methods-for-a-payment.mdx", "api-reference/v1/payment-methods/list-payment-methods-for-a-customer.mdx", "api-reference/v1/payment-methods/list-payment-methods-for-a-merchant.mdx", "api-reference/v1/payment-methods/payment-method--delete.mdx", "api-reference/v1/payment-methods/payment-method--retrieve.mdx", "api-reference/api-reference/payment-methods/payment-method--set-default-payment-method-for-customer.mdx", "api-reference/v1/payment-methods/payment-method--update.mdx", "api-reference/v1/payment-methods/paymentmethods--create.mdx", "api-reference/api-reference/payments/payment--flows.mdx", "api-reference/v1/payments/payments--cancel.mdx", "api-reference/v1/payments/payments--capture.mdx", "api-reference/api-reference/payments/payments--complete-authorize.mdx", "api-reference/v1/payments/payments--confirm.mdx", "api-reference/api-reference/payments/payments--create.mdx", "api-reference/api-reference/payments/payments--external-3ds-authentication.mdx", "api-reference/api-reference/payments/payments--incremental-authorization.mdx", "api-reference/v1/payments/payments--list.mdx", "api-reference/api-reference/payments/payments--post-session-tokens.mdx", "api-reference/v1/payments/payments--retrieve.mdx", "api-reference/v1/payments/payments--session-token.mdx", "api-reference/api-reference/payments/payments--update-metadata.mdx", "api-reference/v1/payments/payments--update.mdx", "api-reference/v1/payments/payments-link--retrieve.mdx", "api-reference/api-reference/payments/setup--instructions.mdx", "api-reference/v1/payouts/payouts--cancel.mdx", "api-reference/v1/payouts/payouts--confirm.mdx", "api-reference/v1/payouts/payouts--create.mdx", "api-reference/api-reference/payouts/payouts--filter.mdx", "api-reference/v1/payouts/payouts--fulfill.mdx", "api-reference/api-reference/payouts/payouts--list-filters.mdx", "api-reference/api-reference/payouts/payouts--list.mdx", "api-reference/v1/payouts/payouts--retrieve.mdx", "api-reference/v1/payouts/payouts--update.mdx", "api-reference/api-reference/poll/poll--retrieve-poll-status.mdx", "api-reference/v1/refunds/refunds--create.mdx", "api-reference/v1/refunds/refunds--list.mdx", "api-reference/v1/refunds/refunds--retrieve.mdx", "api-reference/v1/refunds/refunds--update.mdx", "api-reference/v1/relay/relay--retrieve.mdx", "api-reference/v1/relay/relay.mdx", "api-reference/api-reference/routing/routing--create.mdx", "api-reference/api-reference/routing/routing--deactivate.mdx", "api-reference/api-reference/routing/routing--list.mdx", "api-reference/api-reference/routing/routing--retrieve-default-for-profile.mdx", "api-reference/api-reference/routing/routing--retrieve.mdx", "api-reference/api-reference/routing/routing--update-default-for-profile.mdx", "api-reference-v2/api-reference/api-key/api-key--create.mdx", "api-reference-v2/api-reference/api-key/api-key--list.mdx", "api-reference-v2/api-reference/api-key/api-key--retrieve.mdx", "api-reference-v2/api-reference/api-key/api-key--revoke.mdx", "api-reference-v2/api-reference/api-key/api-key--update.mdx", "api-reference-v2/api-reference/customers/customers--create.mdx", "api-reference-v2/api-reference/customers/customers--delete.mdx", "api-reference-v2/api-reference/customers/customers--list-saved-payment-methods.mdx", "api-reference-v2/api-reference/customers/customers--list.mdx", "api-reference-v2/api-reference/customers/customers--retrieve.mdx", "api-reference-v2/api-reference/customers/customers--update.mdx", "api-reference-v2/api-reference/merchant-account/business-profile--list.mdx", "api-reference-v2/api-reference/merchant-account/merchant-account--create.mdx", "api-reference-v2/api-reference/merchant-account/merchant-account--profile-list.mdx", "api-reference-v2/api-reference/merchant-account/merchant-account--retrieve.mdx", "api-reference-v2/api-reference/merchant-account/merchant-account--update.mdx", "api-reference-v2/openapi_spec.json", "api-reference-v2/api-reference/organization/organization--create.mdx", "api-reference-v2/api-reference/organization/organization--merchant-account--list.mdx", "api-reference-v2/api-reference/organization/organization--retrieve.mdx", "api-reference-v2/api-reference/organization/organization--update.mdx", "api-reference-v2/api-reference/payment-method-session/payment-method-session--confirm-a-payment-method-session.mdx", "api-reference-v2/api-reference/payment-method-session/payment-method-session--create.mdx", "api-reference-v2/api-reference/payment-method-session/payment-method-session--delete-a-saved-payment-method.mdx", "api-reference-v2/api-reference/payment-method-session/payment-method-session--list-payment-methods.mdx", "api-reference-v2/api-reference/payment-method-session/payment-method-session--retrieve.mdx", "api-reference-v2/api-reference/payment-method-session/payment-method-session--update-a-saved-payment-method.mdx", "api-reference-v2/api-reference/payment-methods/list-customer-saved-payment-methods-for-a-payment.mdx", "api-reference-v2/api-reference/payment-methods/list-payment-methods-for-a-customer.mdx", "api-reference-v2/api-reference/payment-methods/list-saved-payment-methods-for-a-customer.mdx", "api-reference-v2/api-reference/payment-methods/payment-method--confirm-intent.mdx", "api-reference-v2/api-reference/payment-methods/payment-method--create-intent.mdx", "api-reference-v2/api-reference/payment-methods/payment-method--create.mdx", "api-reference-v2/api-reference/payment-methods/payment-method--delete.mdx", "api-reference-v2/api-reference/payment-methods/payment-method--payment-methods-list.mdx", "api-reference-v2/api-reference/payment-methods/payment-method--retrieve.mdx", "api-reference-v2/api-reference/payment-methods/payment-method--update.mdx", "api-reference-v2/api-reference/payment-methods/payment-methods--payment-methods-list.mdx", "api-reference-v2/api-reference/payments/payments--confirm-intent.mdx", "api-reference-v2/api-reference/payments/payments--create-and-confirm-intent.mdx", "api-reference-v2/api-reference/payments/payments--create-intent.mdx", "api-reference-v2/api-reference/payments/payments--get-intent.mdx", "api-reference-v2/api-reference/payments/payments--get.mdx", "api-reference-v2/api-reference/payments/payments--list.mdx", "api-reference-v2/api-reference/payments/payments--payment-methods-list.mdx", "api-reference-v2/api-reference/payments/payments--session-token.mdx", "api-reference-v2/api-reference/payments/payments--update-intent.mdx", "api-reference-v2/api-reference/profile/profile--activate-routing-algorithm.mdx", "api-reference-v2/api-reference/profile/profile--create.mdx", "api-reference-v2/api-reference/profile/profile--deactivate-routing-algorithm.mdx", "api-reference-v2/api-reference/profile/profile--retrieve-active-routing-algorithm.mdx", "api-reference-v2/api-reference/profile/profile--retrieve-default-fallback-routing-algorithm.mdx", "api-reference-v2/api-reference/profile/profile--retrieve.mdx", "api-reference-v2/api-reference/profile/profile--update-default-fallback-routing-algorithm.mdx", "api-reference-v2/api-reference/profile/profile--update.mdx", "api-reference-v2/api-reference/proxy/proxy.mdx", "api-reference-v2/api-reference/refunds/refunds--create.mdx", "api-reference-v2/api-reference/routing/routing--create.mdx", "api-reference-v2/api-reference/routing/routing--retrieve.mdx", "api-reference-v2/api-reference/tokenization/tokenization--create.mdx", "crates/openapi/src/main.rs"]}, "change_types": {"fields_added": 2, "conditionals_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): [Loonio] 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 Add template code for Loonio 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? No test required as it is template code ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] 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 (165 changes) **Detailed Identifier Changes:** Commit 5427b07a: Files to modify: **crates/connector_configs/src/connector.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors.rs** Add: - mod: pub::loonio **crates/hyperswitch_connectors/src/connectors/loonio.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::Loonio - impl: impl Loonio - impl: impl api::Payment for Loonio - impl: impl api::PaymentSession for Loonio - impl: impl api::ConnectorAccessToken for Loonio - impl: impl api::MandateSetup for Loonio - impl: impl api::PaymentAuthorize for Loonio - impl: impl api::PaymentSync for Loonio - impl: impl api::PaymentCapture for Loonio - impl: impl api::PaymentVoid for Loonio - impl: impl api::Refund for Loonio - impl: impl api::RefundExecute for Loonio - impl: impl api::RefundSync for Loonio - impl: impl api::PaymentToken for Loonio - impl: impl ConnectorIntegration<PaymentMethodToken, PaymentMethodTokenizationData, PaymentsResponseData> for Loonio - impl: impl ConnectorCommonExt<Flow, Request, Response> for Loonio - impl: impl ConnectorCommon for Loonio - impl: impl ConnectorValidation for Loonio - impl: impl ConnectorIntegration<Session, PaymentsSessionData, PaymentsResponseData> for Loonio - impl: impl ConnectorIntegration<AccessTokenAuth, AccessTokenRequestData, AccessToken> for Loonio - impl: impl ConnectorIntegration<SetupMandate, SetupMandateRequestData, PaymentsResponseData> for Loonio - impl: impl ConnectorIntegration<Authorize, PaymentsAuthorizeData, PaymentsResponseData> for Loonio - impl: impl ConnectorIntegration<PSync, PaymentsSyncData, PaymentsResponseData> for Loonio - impl: impl ConnectorIntegration<Capture, PaymentsCaptureData, PaymentsResponseData> for Loonio - impl: impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Loonio - impl: impl ConnectorIntegration<Execute, RefundsData, RefundsResponseData> for Loonio - impl: impl ConnectorIntegration<RSync, RefundsData, RefundsResponseData> for Loonio - impl: impl webhooks::IncomingWebhook for Loonio - impl: impl ConnectorSpecifications for Loonio - mod: pub::transformers **crates/hyperswitch_connectors/src/connectors/loonio/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::LoonioRouterData - struct: pub::LoonioPaymentsRequest - struct: pub::LoonioCard - struct: pub::LoonioAuthType - struct: pub::LoonioPaymentsResponse - struct: pub::LoonioRefundRequest - struct: pub::RefundResponse - struct: pub::LoonioErrorResponse - enum: pub::LoonioPaymentStatus - enum: pub::RefundStatus - impl: impl From<(StringMinorUnit, T)> for LoonioRouterData<T> - impl: impl TryFrom<&LoonioRouterData<&PaymentsAuthorizeRouterData>> for LoonioPaymentsRequest - impl: impl TryFrom<&ConnectorAuthType> for LoonioAuthType - impl: impl From<LoonioPaymentStatus> for common_enums::AttemptStatus - impl: impl TryFrom<ResponseRouterData<F, LoonioPaymentsResponse, T, PaymentsResponseData>> for RouterData<F, T, PaymentsResponseData> - impl: impl TryFrom<&LoonioRouterData<&RefundsRouterData<F>>> for LoonioRefundRequest - 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/loonio.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::LoonioTest - impl: impl ConnectorActions for LoonioTest - impl: impl utils::Connector for LoonioTest **crates/router/tests/connectors/main.rs** Add: - mod: private::loonio **crates/test_utils/src/connector_auth.rs** Modify existing code
{"pr_number": 9586, "pr_title": "feat(connector): [Loonio] Add template code", "merged_at": "2025-09-30T07:43:16Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["connector"]}, "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/loonio.rs", "crates/hyperswitch_connectors/src/connectors/loonio/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/loonio.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": 165, "imports_added": 22}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(connector): [Cybersource] change commerce indicator for applepay ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Change the commerce indicator for cybersource applepay payment which was failing payment in production Hotfix correspond to PR - [#6634](https://github.com/juspay/hyperswitch/pull/6634) Note: This pr is crucial for flowbird ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR 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 for Cybersource: - Create a Payment with Applepay: ``` { "amount": 650, "currency": "USD", "confirm": true, "amount_to_capture": 650, "customer_id": "test_fb", "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "authentication_type": "three_ds", "return_url": "https://google.com", "email": "something@gmail.com", "name": "Joseph Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment request", "statement_descriptor_name": "Juspay", "statement_descriptor_suffix": "Router", "payment_method": "wallet", "payment_method_type": "apple_pay", "payment_method_data": { "wallet": { "apple_pay": { "payment_data": "{{payment_data}}", "payment_method": { "display_name": "MasterCard 7599", "network": "MasterCard", "type": "credit" }, "transaction_identifier": "{{transaction_identifier}}" } }, "billing": { "address": { "line1": "jhkdsa", "zip": "10000", "last_name": "chikke", "city": "adf", "country": "US", "first_name": "srujan", "state": "Alabama" }, "email": "chikke.srujan@juspay.in" } } } ``` - The payment should `succeed` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/router/src/connector/cybersource/transformers.rs` **Detailed Identifier Changes:** Commit 42b5a1e9: Files to modify: **crates/router/src/connector/cybersource/transformers.rs** Modify existing code
{"pr_number": 6641, "pr_title": "fix(connector): [Cybersource] change commerce indicator for applepay", "merged_at": "2024-11-22T12:26:57Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "card"]}, "hierarchy": {"connectors": ["crates/router/src/connector/cybersource/transformers.rs"]}, "change_types": {}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(router): Handle adyen webhook issue ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Hotfix for https://github.com/juspay/hyperswitch/pull/9372 Add acknowledgement in adyen for incoming webhooks by sending status 200. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> We need to create two profiles having same adyen account, both the profiles should return 200 to webhooks even if it doesnt belongs to them. here i made two profiles: ``` pro_JcW9GqodbWptCntfDiiJ : mca_kAzlkhIkGnErSSc3L6Xr pro_4vFskA1mTL8nf81s9Fzq : mca_4F3FOjPSWuvclkKoiG06 ``` Making below payments API: ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_**' \ --data-raw '{ "amount": 700, "currency": "USD", "confirm": true, "customer_id":"StripeCustomer", "payment_link": false, "capture_on": "2029-09-10T10:11:12Z", "amount_to_capture": 700, "name": "John Doe", "email": "dg@example.com", "phone": "999999999", "phone_country_code": "+1", "description": "Its my first payment request", "authentication_type": "no_three_ds", "return_url": "https://google.com", "payment_method_data": { "card": { "card_number": "4111111111111111", "card_exp_month": "03", "card_exp_year": "30", "card_cvc": "737" }, "billing": { "address": { "line1": "1467", "line2": "CA", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US" } } }, "payment_method": "card", "payment_method_type": "credit", "profile_id": "pro_JcW9GqodbWptCntfDiiJ", "browser_info": { "color_depth": 24, "java_enabled": true, "java_script_enabled": true, "language": "en-GB", "screen_height": 720, "screen_width": 1280, "time_zone": -330, "ip_address": "208.127.127.193", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0" }, "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" }, "order_details": [ { "product_name": "Tea", "quantity": 1, "amount": 110, "product_img_link": "https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg" }, { "product_name": "Tea", "quantity": 1, "amount": 110, "product_img_link": "https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg" }, { "product_name": "Tea", "quantity": 1, "amount": 110, "product_img_link": "https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg" } ] }' ``` Response: ``` {"payment_id":"pay_MGlcQq5UaVDvYSXAY6Xn","merchant_id":"merchant_1757925069","status":"succeeded","amount":700,"net_amount":700,"shipping_cost":null,"amount_capturable":0,"amount_received":700,"connector":"adyen","client_secret":"pay_MGlcQq5UaVDvYSXAY6Xn_secret_80ZstwkCzm9TyJVSzWLP","created":"2025-09-15T17:15:06.446Z","currency":"USD","customer_id":"StripeCustomer","customer":{"id":"StripeCustomer","name":"John Doe","email":"dg@example.com","phone":"999999999","phone_country_code":"+1"},"description":"Its my first payment request","refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":null,"off_session":null,"capture_on":null,"capture_method":null,"payment_method":"card","payment_method_data":{"card":{"last4":"1111","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"411111","card_extended_bin":null,"card_exp_month":"03","card_exp_year":"30","card_holder_name":null,"payment_checks":null,"authentication_data":null},"billing":{"address":{"city":"San Fransico","country":"US","line1":"1467","line2":"CA","line3":null,"zip":"94122","state":"California","first_name":null,"last_name":null,"origin_zip":null},"phone":null,"email":null}},"payment_token":null,"shipping":null,"billing":null,"order_details":[{"sku":null,"upc":null,"brand":null,"amount":110,"category":null,"quantity":1,"tax_rate":null,"product_id":null,"description":null,"product_name":"Tea","product_type":null,"sub_category":null,"total_amount":null,"commodity_code":null,"unit_of_measure":null,"product_img_link":"https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg","product_tax_code":null,"total_tax_amount":null,"requires_shipping":null,"unit_discount_amount":null},{"sku":null,"upc":null,"brand":null,"amount":110,"category":null,"quantity":1,"tax_rate":null,"product_id":null,"description":null,"product_name":"Tea","product_type":null,"sub_category":null,"total_amount":null,"commodity_code":null,"unit_of_measure":null,"product_img_link":"https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg","product_tax_code":null,"total_tax_amount":null,"requires_shipping":null,"unit_discount_amount":null},{"sku":null,"upc":null,"brand":null,"amount":110,"category":null,"quantity":1,"tax_rate":null,"product_id":null,"description":null,"product_name":"Tea","product_type":null,"sub_category":null,"total_amount":null,"commodity_code":null,"unit_of_measure":null,"product_img_link":"https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg","product_tax_code":null,"total_tax_amount":null,"requires_shipping":null,"unit_discount_amount":null}],"email":"dg@example.com","name":"John Doe","phone":"999999999","return_url":"https://google.com/","authentication_type":"no_three_ds","statement_descriptor_name":null,"statement_descriptor_suffix":null,"next_action":null,"cancellation_reason":null,"error_code":null,"error_message":null,"unified_code":null,"unified_message":null,"payment_experience":null,"payment_method_type":"credit","connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":{"customer_id":"StripeCustomer","created_at":1757956506,"expires":1757960106,"secret":"epk_"},"manual_retry_allowed":false,"connector_transaction_id":"MW2KB77642TBJWT5","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_MGlcQq5UaVDvYSXAY6Xn_1","payment_link":null,"profile_id":"pro_JcW9GqodbWptCntfDiiJ","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_kAzlkhIkGnErSSc3L6Xr","incremental_authorization_allowed":false,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-09-15T17:30:06.446Z","fingerprint":null,"browser_info":{"language":"en-GB","time_zone":-330,"ip_address":"208.127.127.193","user_agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0","color_depth":24,"java_enabled":true,"screen_width":1280,"accept_header":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8","screen_height":720,"java_script_enabled":true},"payment_channel":null,"payment_method_id":null,"network_transaction_id":"596288259500941","payment_method_status":null,"updated":"2025-09-15T17:15:07.684Z","split_payments":null,"frm_metadata":null,"extended_authorization_applied":null,"capture_before":null,"merchant_order_reference_id":null,"order_tax_amount":null,"connector_mandate_id":null,"card_discovery":"manual","force_3ds_challenge":false,"force_3ds_challenge_trigger":false,"issuer_error_code":null,"issuer_error_message":null,"is_iframe_redirection_enabled":null,"whole_connector_response":null,"enable_partial_authorization":null,"enable_overcapture":null,"is_overcapture_enabled":null,"network_details":null} ``` Refund: ``` curl --location 'http://localhost:8080/refunds' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_OvYaTu43QFXUxM2Xs1KHS7YkWRkkh5nXp7x2BENotNMBzwCWVA0Yeug0f12ofDsB' \ --data '{ "payment_id": "pay_MGlcQq5UaVDvYSXAY6Xn", "amount": 700, "reason": "Customer returned product", "refund_type": "instant", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } }' ``` Response: ``` {"refund_id":"ref_aZfW2HjCEJKhRgsZguPr","payment_id":"pay_MGlcQq5UaVDvYSXAY6Xn","amount":700,"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-09-15T17:16:30.637Z","updated_at":"2025-09-15T17:16:31.861Z","connector":"adyen","profile_id":"pro_JcW9GqodbWptCntfDiiJ","merchant_connector_id":"mca_kAzlkhIkGnErSSc3L6Xr","split_refunds":null,"issuer_error_code":null,"issuer_error_message":null} ``` <img width="1888" height="127" alt="image" src="https://github.com/user-attachments/assets/562ef85f-f9c0-404e-b159-caa5ecfb06cb" /> <img width="1888" height="127" alt="image (1)" src="https://github.com/user-attachments/assets/de279cc0-5609-4e44-9396-98c3ab730b60" /> <img width="1888" height="127" alt="image (2)" src="https://github.com/user-attachments/assets/f3683d5e-c866-4fd7-9f9e-75c214f8267e" /> <img width="1888" height="127" alt="image" src="https://github.com/user-attachments/assets/c49f8495-f628-497e-baaa-e7c51957eb10" /> <img width="3456" height="2234" alt="image (6)" src="https://github.com/user-attachments/assets/5a0918e2-2cea-4bda-a135-63a637041079" /> Cargo clippy: <img width="2560" height="1440" alt="image" src="https://github.com/user-attachments/assets/7713e5b6-9252-49a9-a8fa-789f209e9d93" /> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] 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/common_enums/src/connector_enums.rs` - `crates/hyperswitch_connectors/src/connectors/adyenplatform/transformers/payouts.rs` **Detailed Identifier Changes:** Commit 4d7ebc1b: Files to modify: **crates/common_enums/src/connector_enums.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/adyenplatform/transformers/payouts.rs** Modify existing code
{"pr_number": 9442, "pr_title": "feat(router): Handle adyen webhook issue", "merged_at": "2025-09-18T12:33:56Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/common_enums/src/connector_enums.rs", "crates/hyperswitch_connectors/src/connectors/adyenplatform/transformers/payouts.rs"]}, "change_types": {}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): [Flexiti]Add support for flexiti connector ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [X] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Flexiti is not a traditional credit card. It's a co-branded credit card that offers installment financing. Flexiti Payment Method Type: Co-Branded Credit Card with Installment Financing Flexiti issues a FlexitiCard (Mastercard network) Functions as both a credit card AND installment loan provider Customers get approved for a credit limit Can be used at participating merchants in the Flexiti network Currently we are going with [flexiti](https://flexiti.atlassian.net/wiki/spaces/FDP/pages/9601087/Transactions+Endpoints+-+POS+API) alpha integration. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Since this is alpha integration cant the connector flows. ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/payments.rs` **2. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/payment_method_data.rs` **3. Core Business Logic** - `crates/router/src/core/connector_validation.rs` **4. External Connector Integration** - `crates/common_enums/src/connector_enums.rs` - `crates/connector_configs/src/connector.rs` - `crates/connector_configs/toml/development.toml` - ... and 20 more files **5. Type Definitions** - `crates/router/src/types/transformers.rs` **6. Utils** - `crates/kgraph_utils/src/mca.rs` - `crates/kgraph_utils/src/transformers.rs` - `crates/payment_methods/src/helpers.rs` **7. 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/v1/openapi_spec_v1.json` - `api-reference/v2/openapi_spec_v2.json` - `crates/common_enums/src/enums.rs` - ... and 4 more files **Code Patterns Applied:** - Define new data structures (7 changes) - Implement new functions (15 changes) - Extend existing types with new fields (112 changes) **Detailed Identifier Changes:** Commit 2bd8c9d1: Files to modify: **crates/api_models/src/payments.rs** Modify existing code **crates/common_enums/src/connector_enums.rs** Modify existing code **crates/common_enums/src/enums.rs** Modify existing code **crates/common_enums/src/transformers.rs** Modify existing code **crates/connector_configs/src/connector.rs** Modify existing code **crates/euclid/src/frontend/dir/enums.rs** Modify existing code **crates/euclid/src/frontend/dir/lowering.rs** Modify existing code **crates/euclid/src/frontend/dir/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/adyen.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/breadpay/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/flexiti.rs** Remove: - impl: impl ConnectorIntegration<AccessTokenAuth, AccessTokenRequestData, AccessToken> for Flexiti Add: - function: private::get_default_header - function: private::validate_connector_against_payment_request - function: private::get_url - function: private::get_content_type - function: private::get_headers - function: private::get_request_body - function: private::build_request - function: private::handle_response - function: private::get_error_response - impl: impl Flexiti - impl: impl ConnectorIntegration<AccessTokenAuth, AccessTokenRequestData, AccessToken> for Flexiti **crates/hyperswitch_connectors/src/connectors/flexiti/transformers.rs** Add: - function: private::from - function: private::try_from - function: private::try_from - struct: pub::BillingInformation - struct: pub::ShippingInformation - struct: pub::FlexitiAccessTokenRequest - enum: pub::FlexitiFlow - enum: pub::FlexitiGranttype - impl: impl From<(FloatMajorUnit, T)> for FlexitiRouterData<T> - impl: impl TryFrom<&types::RefreshTokenRouterData> for FlexitiAccessTokenRequest - impl: impl TryFrom<ResponseRouterData<F, FlexitiAccessTokenResponse, T, AccessToken>> for RouterData<F, T, AccessToken> **crates/hyperswitch_connectors/src/connectors/klarna.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/multisafepay/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/nuvei/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/paypal/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/shift4/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/square/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/stripe/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/zen/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/utils.rs** Modify existing code **crates/hyperswitch_domain_models/src/payment_method_data.rs** Modify existing code **crates/kgraph_utils/src/mca.rs** Modify existing code **crates/kgraph_utils/src/transformers.rs** Modify existing code **crates/payment_methods/src/configs/payment_connector_required_fields.rs** Modify existing code **crates/payment_methods/src/helpers.rs** Modify existing code **crates/router/src/connector/utils.rs** Modify existing code **crates/router/src/core/connector_validation.rs** Modify existing code **crates/router/src/types/api/connector_mapping.rs** Modify existing code **crates/router/src/types/connector_transformers.rs** Modify existing code **crates/router/src/types/transformers.rs** Modify existing code
{"pr_number": 8743, "pr_title": "feat(connector): [Flexiti]Add support for flexiti connector ", "merged_at": "2025-07-30T12:01:26Z", "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/connector_validation.rs"], "connectors": ["crates/common_enums/src/connector_enums.rs", "crates/connector_configs/src/connector.rs", "crates/connector_configs/toml/development.toml", "crates/connector_configs/toml/production.toml", "crates/connector_configs/toml/sandbox.toml", "crates/hyperswitch_connectors/src/connectors/adyen.rs", "crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs", "crates/hyperswitch_connectors/src/connectors/breadpay/transformers.rs", "crates/hyperswitch_connectors/src/connectors/flexiti.rs", "crates/hyperswitch_connectors/src/connectors/flexiti/transformers.rs", "crates/hyperswitch_connectors/src/connectors/klarna.rs", "crates/hyperswitch_connectors/src/connectors/multisafepay/transformers.rs", "crates/hyperswitch_connectors/src/connectors/nuvei/transformers.rs", "crates/hyperswitch_connectors/src/connectors/paypal/transformers.rs", "crates/hyperswitch_connectors/src/connectors/shift4/transformers.rs", "crates/hyperswitch_connectors/src/connectors/square/transformers.rs", "crates/hyperswitch_connectors/src/connectors/stripe/transformers.rs", "crates/hyperswitch_connectors/src/connectors/zen/transformers.rs", "crates/hyperswitch_connectors/src/utils.rs", "crates/payment_methods/src/configs/payment_connector_required_fields.rs", "crates/router/src/connector/utils.rs", "crates/router/src/types/api/connector_mapping.rs", "crates/router/src/types/connector_transformers.rs"], "types": ["crates/router/src/types/transformers.rs"], "utils": ["crates/kgraph_utils/src/mca.rs", "crates/kgraph_utils/src/transformers.rs", "crates/payment_methods/src/helpers.rs"], "tests": ["config/deployments/integration_test.toml", "loadtest/config/development.toml"], "config": ["config/config.example.toml", "config/deployments/production.toml", "config/deployments/sandbox.toml", "config/development.toml", "config/docker_compose.toml"], "other": ["api-reference/v1/openapi_spec_v1.json", "api-reference/v2/openapi_spec_v2.json", "crates/common_enums/src/enums.rs", "crates/common_enums/src/transformers.rs", "crates/euclid/src/frontend/dir/enums.rs", "crates/euclid/src/frontend/dir/lowering.rs", "crates/euclid/src/frontend/dir/transformers.rs"]}, "change_types": {"structs_added": 7, "functions_added": 15, "enums_added": 3, "fields_added": 112, "imports_added": 5}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(analytics): revamped 3ds auth analytics ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Added exemption_requested and exemption_approved fields to the auth_events metrics, extended the auth-analytics API with new filters for 3DS Intelligence, and created a dedicated endpoint to serve SCA-exemption Sankey chart data. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? Tested it locally by ingesting some test data in authentications tables in CKH. CURL for /metrics/auth_events introduced two new fields authentication_exemption_approved_count and authentication_exemption_requested_count here ``` curl 'http://localhost:8080/analytics/v1/metrics/auth_events' \ -H 'Accept: */*' \ -H 'Accept-Language: en-US,en' \ -H 'Cache-Control: no-cache' \ -H 'Connection: keep-alive' \ -H 'Content-Type: application/json' \ -H 'Cookie: login_token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiY2IzYjdjNGQtYjQ0Mi00ZDk0LWJkMjQtNjk5NjI4ZjQ1MzBkIiwibWVyY2hhbnRfaWQiOiJtZXJjaGFudF8xNzQ4Mjg1ODc1Iiwicm9sZV9pZCI6Im9yZ19hZG1pbiIsImV4cCI6MTc0ODY5NDkwNywib3JnX2lkIjoib3JnX1VBQnlpWmZ4TW44dFpuSnZUemlvIiwicHJvZmlsZV9pZCI6InByb19Pcjh5cmlGYzBPY1pJZHFBOVFVVyIsInRlbmFudF9pZCI6InB1YmxpYyJ9.Bfo6nVoKTUl0I3Bzn2qg-kFxkiU3cWj-gHInHXpHneU' \ -H 'Origin: http://localhost:9000/' \ -H 'Pragma: no-cache' \ -H 'Referer: http://localhost:9000/dashboard/analytics-authentication' \ -H 'Sec-Fetch-Dest: empty' \ -H 'Sec-Fetch-Mode: cors' \ -H 'Sec-Fetch-Site: same-origin' \ -H 'Sec-GPC: 1' \ -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36' \ -H 'X-Merchant-Id: merchant_1748285875' \ -H 'X-Profile-Id: pro_Or8yriFc0OcZIdqA9QUW' \ -H 'api-key: hyperswitch' \ -H 'authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiY2IzYjdjNGQtYjQ0Mi00ZDk0LWJkMjQtNjk5NjI4ZjQ1MzBkIiwibWVyY2hhbnRfaWQiOiJtZXJjaGFudF8xNzQ4Mjg1ODc1Iiwicm9sZV9pZCI6Im9yZ19hZG1pbiIsImV4cCI6MTc0ODY5NDkwNywib3JnX2lkIjoib3JnX1VBQnlpWmZ4TW44dFpuSnZUemlvIiwicHJvZmlsZV9pZCI6InByb19Pcjh5cmlGYzBPY1pJZHFBOVFVVyIsInRlbmFudF9pZCI6InB1YmxpYyJ9.Bfo6nVoKTUl0I3Bzn2qg-kFxkiU3cWj-gHInHXpHneU' \ -H 'sec-ch-ua: "Chromium";v="130", "Brave";v="130", "Not?A_Brand";v="99"' \ -H 'sec-ch-ua-mobile: ?0' \ -H 'sec-ch-ua-platform: "macOS"' \ --data-raw '[{"timeRange":{"startTime":"2025-05-22T18:30:00Z","endTime":"2025-05-30T13:10:30Z"},"mode":"ORDER","source":"BATCH","metrics":["authentication_count","authentication_attempt_count","authentication_success_count","challenge_flow_count","frictionless_flow_count","frictionless_success_count","challenge_attempt_count","challenge_success_count"],"delta":true}]' ``` CURL for /metrics/auth_events/sankey this is required to build an exmemption analytics sankey chart on dashboard ``` curl 'http://localhost:8080/analytics/v1/metrics/auth_events/sankey' \ -H 'Accept: */*' \ -H 'Accept-Language: en-US,en' \ -H 'Cache-Control: no-cache' \ -H 'Connection: keep-alive' \ -H 'Content-Type: application/json' \ -H 'Cookie: login_token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiY2IzYjdjNGQtYjQ0Mi00ZDk0LWJkMjQtNjk5NjI4ZjQ1MzBkIiwibWVyY2hhbnRfaWQiOiJtZXJjaGFudF8xNzQ4Mjg1ODc1Iiwicm9sZV9pZCI6Im9yZ19hZG1pbiIsImV4cCI6MTc0ODY5NDkwNywib3JnX2lkIjoib3JnX1VBQnlpWmZ4TW44dFpuSnZUemlvIiwicHJvZmlsZV9pZCI6InByb19Pcjh5cmlGYzBPY1pJZHFBOVFVVyIsInRlbmFudF9pZCI6InB1YmxpYyJ9.Bfo6nVoKTUl0I3Bzn2qg-kFxkiU3cWj-gHInHXpHneU' \ -H 'Origin: http://localhost:9000/' \ -H 'Pragma: no-cache' \ -H 'Referer: http://localhost:9000/dashboard/analytics-authentication' \ -H 'Sec-Fetch-Dest: empty' \ -H 'Sec-Fetch-Mode: cors' \ -H 'Sec-Fetch-Site: same-origin' \ -H 'Sec-GPC: 1' \ -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36' \ -H 'X-Merchant-Id: merchant_1748285875' \ -H 'X-Profile-Id: pro_Or8yriFc0OcZIdqA9QUW' \ -H 'api-key: hyperswitch' \ -H 'authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiY2IzYjdjNGQtYjQ0Mi00ZDk0LWJkMjQtNjk5NjI4ZjQ1MzBkIiwibWVyY2hhbnRfaWQiOiJtZXJjaGFudF8xNzQ4Mjg1ODc1Iiwicm9sZV9pZCI6Im9yZ19hZG1pbiIsImV4cCI6MTc0ODY5NDkwNywib3JnX2lkIjoib3JnX1VBQnlpWmZ4TW44dFpuSnZUemlvIiwicHJvZmlsZV9pZCI6InByb19Pcjh5cmlGYzBPY1pJZHFBOVFVVyIsInRlbmFudF9pZCI6InB1YmxpYyJ9.Bfo6nVoKTUl0I3Bzn2qg-kFxkiU3cWj-gHInHXpHneU' \ -H 'sec-ch-ua: "Chromium";v="130", "Brave";v="130", "Not?A_Brand";v="99"' \ -H 'sec-ch-ua-mobile: ?0' \ -H 'sec-ch-ua-platform: "macOS"' \ --data-raw '{"startTime": "2025-01-22T18:30:00Z","endTime": "2025-05-29T12:59:33Z"}' ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/analytics/auth_events.rs` **2. Core Business Logic** - `crates/analytics/src/auth_events/core.rs` **3. Type Definitions** - `crates/analytics/src/auth_events/types.rs` **4. Utils** - `crates/analytics/src/utils.rs` **5. Other** - `crates/analytics/src/auth_events.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 (1 changes) - Implement new functions (6 changes) - Extend existing types with new fields (163 changes) - Add conditional logic for feature flags or filtering (24 changes) **Detailed Identifier Changes:** Commit 55f6dbe3: Files to modify: **crates/analytics/src/auth_events.rs** Add: - mod: pub::sankey **crates/analytics/src/auth_events/accumulator.rs** Modify existing code **crates/analytics/src/auth_events/core.rs** Add: - function: pub::get_sankey **crates/analytics/src/auth_events/filters.rs** Modify existing code **crates/analytics/src/auth_events/metrics.rs** Add: - mod: private::authentication_exemption_approved_count - mod: private::authentication_exemption_requested_count **crates/analytics/src/auth_events/metrics/authentication_attempt_count.rs** Modify existing code **crates/analytics/src/auth_events/metrics/authentication_count.rs** Modify existing code **crates/analytics/src/auth_events/metrics/authentication_error_message.rs** Modify existing code **crates/analytics/src/auth_events/metrics/authentication_exemption_approved_count.rs** Add: - function: private::load_metrics - struct: pub::AuthenticationExemptionApprovedCount - impl: impl super::AuthEventMetric<T> for AuthenticationExemptionApprovedCount **crates/analytics/src/auth_events/metrics/authentication_exemption_requested_count.rs** Add: - function: private::load_metrics - struct: pub::AuthenticationExemptionRequestedCount - impl: impl super::AuthEventMetric<T> for AuthenticationExemptionRequestedCount **crates/analytics/src/auth_events/metrics/authentication_funnel.rs** Modify existing code **crates/analytics/src/auth_events/metrics/authentication_success_count.rs** Modify existing code **crates/analytics/src/auth_events/metrics/challenge_attempt_count.rs** Modify existing code **crates/analytics/src/auth_events/metrics/challenge_flow_count.rs** Modify existing code **crates/analytics/src/auth_events/metrics/challenge_success_count.rs** Modify existing code **crates/analytics/src/auth_events/metrics/frictionless_flow_count.rs** Modify existing code **crates/analytics/src/auth_events/metrics/frictionless_success_count.rs** Modify existing code **crates/analytics/src/auth_events/sankey.rs** Add: - function: private::try_into - function: pub::get_sankey_data - struct: pub::SankeyRow - impl: impl TryInto<SankeyRow> for serde_json::Value **crates/analytics/src/auth_events/types.rs** Modify existing code **crates/analytics/src/sqlx.rs** Modify existing code **crates/analytics/src/utils.rs** Modify existing code **crates/api_models/src/analytics/auth_events.rs** Modify existing code **crates/router/src/analytics.rs** Add: - function: pub::get_auth_event_sankey
{"pr_number": 8163, "pr_title": "feat(analytics): revamped 3ds auth analytics", "merged_at": "2025-06-02T10:08:43Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["merchant", "user", "order"]}, "hierarchy": {"api_models": ["crates/api_models/src/analytics/auth_events.rs"], "core_business": ["crates/analytics/src/auth_events/core.rs"], "types": ["crates/analytics/src/auth_events/types.rs"], "utils": ["crates/analytics/src/utils.rs"], "other": ["crates/analytics/src/auth_events.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_exemption_approved_count.rs", "crates/analytics/src/auth_events/metrics/authentication_exemption_requested_count.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/auth_events/sankey.rs", "crates/analytics/src/sqlx.rs", "crates/router/src/analytics.rs"]}, "change_types": {"structs_added": 1, "functions_added": 6, "fields_added": 163, "imports_added": 23, "conditionals_added": 24}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): [Peachpayments] Add Webhook Flow and Support For merchant_order_reference_id ## 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/9780) ## Description <!-- Describe your changes in detail --> Added Webhook Flow and Support for merchant_order_reference_id for Peachpayments ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR 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. Set `verify_webhook_source` to `true` ```rust async fn verify_webhook_source( &self, _request: &webhooks::IncomingWebhookRequestDetails<'_>, _merchant_id: &id_type::MerchantId, _connector_webhook_details: Option<common_utils::pii::SecretSerdeValue>, _connector_account_details: common_utils::crypto::Encryptable<Secret<serde_json::Value>>, _connector_name: &str, ) -> CustomResult<bool, errors::ConnectorError> { Ok(true) } ``` 2. Host localhost in ngork and run this curl: ```curl curl --location '{{ngrokUrl}}/webhooks/:mid/:mca' \ --header 'Content-Type: application/json' \ --data-raw '{ "rule": {}, "webhookId": "000a262d-6eb9-425e-8f58-a659a771f11a", "transaction": { "referenceId": "pay_CyHp5Gty8N6y7bGBtznE_1", "responseCode": { "value": "00", "description": "Approved or completed successfully", "explanation": "Transaction approved by acquirer or issuer. Other factors may impact the final outcome of the transaction.", "receiptString": "Approved", "isoCodeDescription": "Approved or completed successfully", "terminalOutcomeString": "Approved" }, "paymentMethod": "ecommerce_card_payment_only", "transactionId": "b5438722-06c9-4f44-b8d7-9d3d5768098f", "transactionTime": "2025-10-10T02:16:15.562551Z", "transactionType": { "value": 0, "description": "Goods and Services" }, "transactionResult": "approved_confirmed", "voidableUntilTime": "2025-10-10T22:00:00Z", "cardNotPresentRefundableStatus": "not_refundable", "ecommerceCardPaymentOnlyTransactionData": { "rrn": "711184317168", "card": { "scheme": "Visa", "binNumber": "400000", "maskedPan": "400000******0446", "expiryYear": "26", "expiryMonth": "12", "cardholderName": "joseph Doe" }, "stan": "573152", "amount": { "amount": 200, "currencyCode": "ZAR", "displayValue": "R2.00" }, "traceId": "001760062576462", "approvalCode": "863244", "settlementDate": "2025-10-10" } }, "webhookTime": "2025-10-10T02:16:30.882493869Z", "webhookType": "transaction" }' ``` Response: 200 OK Status Incoming Webhook Screenshot: <img width="1728" height="621" alt="Screenshot 2025-10-13 at 1 13 33 PM" src="https://github.com/user-attachments/assets/7dfeadb3-87a5-4234-8e7b-a3a60463a305" /> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/peachpayments.rs` - `crates/hyperswitch_connectors/src/connectors/peachpayments/transformers.rs` **Code Patterns Applied:** - Define new data structures (3 changes) - Implement new functions (3 changes) - Extend existing types with new fields (60 changes) - Add conditional logic for feature flags or filtering (1 changes) **Detailed Identifier Changes:** Commit 6394c892: Files to modify: **crates/hyperswitch_connectors/src/connectors/peachpayments.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/peachpayments/transformers.rs** Remove: - struct: pub::PeachpaymentsPaymentsResponse Add: - function: pub::get_webhook_response - struct: pub::PeachpaymentsPaymentsData - enum: pub::PeachpaymentsPaymentsResponse
{"pr_number": 9781, "pr_title": "feat(connector): [Peachpayments] Add Webhook Flow and Support For merchant_order_reference_id", "merged_at": "2025-10-15T16:01:29Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "merchant", "user"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/peachpayments.rs", "crates/hyperswitch_connectors/src/connectors/peachpayments/transformers.rs"]}, "change_types": {"structs_added": 3, "functions_added": 3, "enums_added": 1, "fields_added": 60, "imports_added": 4, "conditionals_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(payments): [Payment links] Add configs for payment link ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [X] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Added below configs for payment link 1. payment_button_colour: Text for customizing message for card terms 2. custom_message_for_card_terms: Custom background colour for payment link's handle confirm button https://docs.hyperswitch.io/explore-hyperswitch/merchant-controls/integration-guide/web/customization#custom-message-for-card-terms ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 3. `crates/router/src/configs` 4. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Tested locally ### Update business_profile configs ``` curl --location --request POST 'http://localhost:8080/account/merchant_1739787034/business_profile/pro_8METe0Ui8phk2DKuovKO' \ --header 'Content-Type: application/json' \ --header 'api-key: test_admin' \ --data-raw '{ "payment_link_config": { "allowed_domains": [ "*" ], "payment_button_colour": "#ff69b4", "custom_message_for_card_terms": "Lorem ipsum odor amet, consectetuer adipiscing elit." } }' ``` ### Create payment link ``` curl --location --request POST 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_m9IjvJK2az8nLr3dKHlaH19j7nVibvQRDMCgoabWiZXH1XpjXg6GSDlZxBxfTwTC' \ --data-raw '{ "amount": 10, "setup_future_usage": "off_session", "payment_type": "setup_mandate", "currency": "EUR", "payment_link": true, "session_expiry": 1000000, "return_url": "https://google.com", "payment_link_config": { "logo": "https://logosandtypes.com/wp-content/uploads/2020/08/zurich.svg", "seller_name": "Zurich Inc." } }' ``` **Payment link** <img width="1508" alt="Screenshot 2025-02-17 at 18 17 02" src="https://github.com/user-attachments/assets/917a25c6-9acd-4cdf-b6ac-d11e354453cc" /> **Secured Payment link** <img width="1336" alt="Screenshot 2025-02-17 at 18 40 13" src="https://github.com/user-attachments/assets/03284944-4b79-4722-a842-03bb56133c95" /> ## Checklist <!-- Put an `x` in the boxes that apply --> - [X] I formatted the code `cargo +nightly fmt --all` - [X] I addressed lints thrown by `cargo clippy` - [X] I reviewed the submitted code - [ ] 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.js` - ... and 3 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/macros.rs` - ... and 1 more files **Code Patterns Applied:** - Extend existing types with new fields (32 changes) **Detailed Identifier Changes:** Commit 72080c67: Files to modify: **crates/api_models/src/admin.rs** Modify existing code **crates/api_models/src/payments.rs** Modify existing code **crates/diesel_models/src/business_profile.rs** Modify existing code **crates/diesel_models/src/payment_intent.rs** Modify existing code **crates/hyperswitch_domain_models/src/lib.rs** Modify existing code **crates/router/src/core/payment_link.rs** Modify existing code **crates/router/src/core/payments/transformers.rs** Modify existing code **crates/router/src/macros.rs** Modify existing code **crates/router/src/routes/payments.rs** Modify existing code **crates/router/src/types/transformers.rs** Modify existing code Commit d716c1d5: Files to modify: **crates/api_models/src/admin.rs** Modify existing code **crates/api_models/src/payments.rs** Modify existing code **crates/diesel_models/src/business_profile.rs** Modify existing code **crates/diesel_models/src/payment_intent.rs** Modify existing code **crates/hyperswitch_domain_models/src/lib.rs** Modify existing code **crates/router/src/core/payment_link.rs** Modify existing code **crates/router/src/core/payments/transformers.rs** Modify existing code **crates/router/src/macros.rs** Modify existing code **crates/router/src/routes/payments.rs** Modify existing code **crates/router/src/types/transformers.rs** Modify existing code
{"pr_number": 7288, "pr_title": "feat(payments): [Payment links] Add configs for payment link", "merged_at": "2025-02-18T15:29:43Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "merchant", "user"]}, "hierarchy": {"api_models": ["crates/api_models/src/admin.rs", "crates/api_models/src/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.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/macros.rs", "crates/router/src/routes/payments.rs"]}, "change_types": {"fields_added": 32}, "has_identifier_data": true, "commits_matched": 2, "match_method": "pr_number"}
refactor(core): add error handling wrapper to wehbook ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> In webhook, for specific connectors, we want to consume every webhook that arrives even if a error occurs while processing. This is done to keep the webhook channel open with the connector. In this pr, a error wrapper is introduced to handle this logic where based on connector, we choose whether to send error or not. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Tested through Postman: - Create a MCA (Adyenplatform): - Setup webhook endpoint in dashboard (Adyenplatform): - Create a payout: ``` { "amount": 100, "currency": "EUR", "customer_id": "sakilcust", "email": "payout_customer@example.com", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payout request", "payout_type": "bank", "priority": "instant", "payout_method_data": { "bank": { "iban": "DE89370400440532013000" } }, "billing": { "address": { "line1": "Raadhuisplein", "line2": "92", "city": "Hoogeveen", "state": "FL", "zip": "7901 BW", "country": "NL", "first_name": "John", "last_name": "Doe" }, "phone": { "number": "0650242319", "country_code": "+31" } }, "entity_type": "Individual", "recurring": true, "confirm": true, "auto_fulfill": true } ``` - You should receive webhook for the following payout to the endpoint mentioned during merchant creation Case 2: - Setup `ngrok` to intercept webhook - Create a payout (same body as above) - delete the `payout_attempt` from the payout_attempt table against the generated `payout_id` - See the log in ngrok for response sent to the adyenplatform - The status should be 200 with `x-http-code` present in headers ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/connector_enums.rs` **2. Core Business Logic** - `crates/router/src/core/webhooks/incoming.rs` - `crates/router/src/core/webhooks/incoming_v2.rs` **3. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/cashtocode.rs` - `crates/hyperswitch_connectors/src/connectors/worldline.rs` - `crates/hyperswitch_connectors/src/connectors/zen.rs` - ... and 5 more files **4. Other** - `crates/hyperswitch_interfaces/src/webhooks.rs` **Code Patterns Applied:** - Implement new functions (5 changes) - Extend existing types with new fields (15 changes) - Add conditional logic for feature flags or filtering (2 changes) **Detailed Identifier Changes:** Commit 4b45d212: Files to modify: **crates/api_models/src/connector_enums.rs** Add: - function: pub::should_acknowledge_webhook_for_resource_not_found_errors **crates/hyperswitch_connectors/src/connectors/cashtocode.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/worldline.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/zen.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/zsl.rs** Modify existing code **crates/hyperswitch_interfaces/src/webhooks.rs** Add: - function: private::from - enum: pub::IncomingWebhookFlowError - impl: impl From<&ApiErrorResponse> for IncomingWebhookFlowError **crates/router/src/connector/adyen.rs** Modify existing code **crates/router/src/connector/adyenplatform.rs** Add: - function: private::get_webhook_api_response **crates/router/src/connector/braintree.rs** Modify existing code **crates/router/src/core/webhooks/incoming.rs** Modify existing code **crates/router/src/core/webhooks/incoming_v2.rs** Modify existing code **crates/router/src/services/connector_integration_interface.rs** Modify existing code
{"pr_number": 6636, "pr_title": "refactor(core): add error handling wrapper to wehbook", "merged_at": "2024-11-27T15:31:49Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "merchant", "connector"]}, "hierarchy": {"api_models": ["crates/api_models/src/connector_enums.rs"], "core_business": ["crates/router/src/core/webhooks/incoming.rs", "crates/router/src/core/webhooks/incoming_v2.rs"], "connectors": ["crates/hyperswitch_connectors/src/connectors/cashtocode.rs", "crates/hyperswitch_connectors/src/connectors/worldline.rs", "crates/hyperswitch_connectors/src/connectors/zen.rs", "crates/hyperswitch_connectors/src/connectors/zsl.rs", "crates/router/src/connector/adyen.rs", "crates/router/src/connector/adyenplatform.rs", "crates/router/src/connector/braintree.rs", "crates/router/src/services/connector_integration_interface.rs"], "other": ["crates/hyperswitch_interfaces/src/webhooks.rs"]}, "change_types": {"functions_added": 5, "enums_added": 1, "fields_added": 15, "imports_added": 6, "conditionals_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor(dynamic_fields): rename fields like ach, bacs and becs for bank debit payment method ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description ach, becs and bacs in payment method data is renamed to ach_bank_debit, becs_bank_debit, bacs_bank_debit ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [x] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? Tested it through Postman. - Create Connector (Stripe): ``` { "connector_type": "payment_processor", "connector_name": "stripe", "business_country": "US", "business_label": "default", "connector_account_details": { "auth_type": "HeaderKey", "api_key": "some key here" }, "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": "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": "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": "{{gateway_merchant_id}}" } } } ], "merchant_info": { "merchant_name": "Narayan Bhat" } } } } ``` - Create Payment (Confirm set to false): ``` { "amount": 100, "currency": "USD", "confirm": false, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 100, "customer_id": "StripeCustomer", "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+1", "description": "Its my first payment request", "authentication_type": "no_three_ds", "return_url": "https://google.com", "payment_method": "bank_debit", "payment_method_type": "ach", "payment_method_data": { "bank_debit": { "ach_bank_debit":{ "account_number" : "40308669", "routing_number" : "121000358", "sort_code" : "560036", "shopper_email" : "example@gmail.com", "card_holder_name": "joseph Doe", "bank_account_holder_name": "David Archer", "billing_details":{ "houseNumberOrName":"50", "street":"Test Street", "city":"Amsterdam", "stateOrProvince":"NY", "postalCode":"12010", "country":"US", "name" : "A. Klaassen", "email" : "example@gmail.com" }, "reference": "daslvcgbaieh" } } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "GB", "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": "GB", "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" } } ``` - Do a list calll to get the ach, becs and bacs details from dynamic fields: ``` curl --location 'http://localhost:8080/account/payment_methods?client_secret={{client_secret}}' \ --header 'Accept: application/json' \ --header 'api-key: {{publishable_key}}' ``` - The response should contain the following: ``` { "payment_method": "bank_debit", "payment_method_types": [ { "payment_method_type": "sepa", "payment_experience": null, "card_networks": null, "bank_names": null, "bank_debits": { "eligible_connectors": [ "stripe" ] }, "bank_transfers": null, "required_fields": { "billing.email": { "required_field": "payment_method_data.billing.email", "display_name": "email", "field_type": "user_email_address", "value": "guest@example.com" }, "billing.address.last_name": { "required_field": "payment_method_data.billing.address.last_name", "display_name": "owner_name", "field_type": "user_billing_name", "value": "Doe" }, "payment_method_data.bank_debit.sepa_bank_debit.iban": { "required_field": "payment_method_data.bank_debit.sepa_bank_debit.iban", "display_name": "iban", "field_type": "user_iban", "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": "joseph" } }, "surcharge_details": null, "pm_auth_connector": null }, { "payment_method_type": "becs", "payment_experience": null, "card_networks": null, "bank_names": null, "bank_debits": { "eligible_connectors": [ "stripe" ] }, "bank_transfers": null, "required_fields": { "payment_method_data.bank_debit.becs_bank_debit.account_number": { "required_field": "payment_method_data.bank_debit.becs_bank_debit.account_number", "display_name": "bank_account_number", "field_type": "user_bank_account_number", "value": null }, "payment_method_data.bank_debit.becs_bank_debit.bsb_number": { "required_field": "payment_method_data.bank_debit.becs_bank_debit.bsb_number", "display_name": "bsb_number", "field_type": "text", "value": null }, "billing.email": { "required_field": "payment_method_data.billing.email", "display_name": "email", "field_type": "user_email_address", "value": "guest@example.com" }, "billing.address.first_name": { "required_field": "payment_method_data.billing.address.first_name", "display_name": "billing_first_name", "field_type": "user_billing_name", "value": "joseph" }, "billing.address.last_name": { "required_field": "payment_method_data.billing.address.last_name", "display_name": "owner_name", "field_type": "user_billing_name", "value": "Doe" } }, "surcharge_details": null, "pm_auth_connector": null }, { "payment_method_type": "bacs", "payment_experience": null, "card_networks": null, "bank_names": null, "bank_debits": { "eligible_connectors": [ "stripe" ] }, "bank_transfers": null, "required_fields": { "billing.address.line1": { "required_field": "payment_method_data.billing.address.line1", "display_name": "line1", "field_type": "user_address_line1", "value": "1467" }, "billing.address.first_name": { "required_field": "payment_method_data.billing.address.first_name", "display_name": "billing_first_name", "field_type": "user_billing_name", "value": "joseph" }, "billing.address.zip": { "required_field": "payment_method_data.billing.address.zip", "display_name": "zip", "field_type": "user_address_pincode", "value": "94122" }, "payment_method_data.bank_debit.bacs_bank_debit.account_number": { "required_field": "payment_method_data.bank_debit.bacs_bank_debit.account_number", "display_name": "bank_account_number", "field_type": "user_bank_account_number", "value": null }, "payment_method_data.bank_debit.bacs_bank_debit.sort_code": { "required_field": "payment_method_data.bank_debit.bacs_bank_debit.sort_code", "display_name": "bank_sort_code", "field_type": "text", "value": null }, "billing.address.country": { "required_field": "payment_method_data.billing.address.country", "display_name": "country", "field_type": { "user_address_country": { "options": [ "UK" ] } }, "value": "GB" } }, "surcharge_details": null, "pm_auth_connector": null }, { "payment_method_type": "ach", "payment_experience": null, "card_networks": null, "bank_names": null, "bank_debits": { "eligible_connectors": [ "stripe" ] }, "bank_transfers": null, "required_fields": { "billing.address.first_name": { "required_field": "payment_method_data.billing.address.first_name", "display_name": "billing_first_name", "field_type": "user_billing_name", "value": "joseph" }, "billing.address.last_name": { "required_field": "payment_method_data.billing.address.last_name", "display_name": "owner_name", "field_type": "user_billing_name", "value": "Doe" }, "payment_method_data.bank_debit.ach_bank_debit.account_number": { "required_field": "payment_method_data.bank_debit.ach_bank_debit.account_number", "display_name": "bank_account_number", "field_type": "user_bank_account_number", "value": null }, "payment_method_data.bank_debit.ach_bank_debit.routing_number": { "required_field": "payment_method_data.bank_debit.ach_bank_debit.routing_number", "display_name": "bank_routing_number", "field_type": "text", "value": null } }, "surcharge_details": null, "pm_auth_connector": null } ] }, ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/router/src/configs/defaults/payment_connector_required_fields.rs` **Code Patterns Applied:** - Extend existing types with new fields (12 changes) **Detailed Identifier Changes:** Commit c2646d74: Files to modify: **crates/router/src/configs/defaults/payment_connector_required_fields.rs** Modify existing code
{"pr_number": 6678, "pr_title": "refactor(dynamic_fields): rename fields like ach, bacs and becs for bank debit payment method", "merged_at": "2024-12-05T08:18:14Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/router/src/configs/defaults/payment_connector_required_fields.rs"]}, "change_types": {"fields_added": 12}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(connectors): [authorizedotnet] send customerProfileId in the CIT flow and map customerPaymentProfileId in the Setup Mandate 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 --> This PR fixes 1. Setup Mandate flow - Earlier Error is thrown in customer setup mandate if the payment profile is already present at the connector. Now, if `customerPaymentProfileId` is present we will map it to mandate id, if not we will return an error response. 2. For CIT, pass `customerProfileId` and for normal payments pass the customer id and enable create profiles only for CIT 3. Handle the case of customer id not created from hyperswitch but used via hyperswitch > Note: Ensure the customer id in the dashboard. Incase of CIT customer id will not be mapped to the transaction instead the payment profile will be stored under the 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)? --> <details> <summary>Test Setup mandate </summary> 1. Create a setup mandate payment for a customer ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_QTV7hfwJvBw7V1Cw4IxHA8h1g**********' \ --data '{ "amount": 0, "currency": "USD", "confirm": true, "description": "oda", "capture_method": "automatic", "payment_type": "setup_mandate", "customer_id": "aaa9", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4000000000001091", "card_exp_month": "01", "card_exp_year": "30", "card_cvc": "123" } }, "customer_acceptance": { "acceptance_type": "online", "accepted_at": "2025-03-27T13:56:49.848Z", "online": { "ip_address": null, "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.3 Safari/605.1.15" } }, "setup_future_usage": "off_session", "browser_info": { "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "language": "nl-NL", "color_depth": 24, "screen_height": 723, "screen_width": 1536, "time_zone": 0, "java_enabled": true, "java_script_enabled": true, "ip_address": "13.232.74.226" } }' ``` Response ``` { "payment_id": "pay_2ZOEDHarHH50bJ0CsShD", "merchant_id": "postman_merchant_GHAction_7ca00208-f80b-4f92-8ba9-3cbf9b0eb6ed", "status": "succeeded", "amount": 0, "net_amount": 0, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": "authorizedotnet", "client_secret": "pay_2ZOEDHarHH50bJ0CsShD_secret_PvsjaSnomlWtvyxCBu4N", "created": "2025-09-08T06:29:33.850Z", "currency": "USD", "customer_id": "aaa9", "customer": { "id": "aaa9", "name": null, "email": null, "phone": null, "phone_country_code": null }, "description": "oda", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "off_session", "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "1091", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "400000", "card_extended_bin": null, "card_exp_month": "01", "card_exp_year": "30", "card_holder_name": null, "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": null, "order_details": null, "email": null, "name": null, "phone": null, "return_url": null, "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "aaa9", "created_at": 1757312973, "expires": 1757316573, "secret": "epk_348e3583ce864cea9a6d4d4c882464db" }, "manual_retry_allowed": false, "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_B1KJWgaKMyj9NJZOiGiL", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_1A9mFebPqoV963nNNKk4", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-08T06:44:33.849Z", "fingerprint": null, "browser_info": { "language": "nl-NL", "time_zone": 0, "ip_address": "13.232.74.226", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "color_depth": 24, "java_enabled": true, "screen_width": 1536, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 723, "java_script_enabled": true }, "payment_channel": null, "payment_method_id": "pm_DFYzCRBsmfEIMZ40aHuk", "network_transaction_id": null, "payment_method_status": "active", "updated": "2025-09-08T06:29:35.954Z", "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": "932578546-931871295", "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 } ``` Now Create another setup mandate payment for same customer ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_QTV7hfwJvBw7V1Cw4IxHA8h1gg9in8dKYTNWtoWa6BkgfjvSr5r8Jg9gnZWL0wzX' \ --data '{ "amount": 0, "currency": "USD", "confirm": true, "description": "oda", "capture_method": "automatic", "payment_type": "setup_mandate", "customer_id": "aaa9", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4000000000001091", "card_exp_month": "01", "card_exp_year": "30", "card_cvc": "123" } }, "customer_acceptance": { "acceptance_type": "online", "accepted_at": "2025-03-27T13:56:49.848Z", "online": { "ip_address": null, "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.3 Safari/605.1.15" } }, "setup_future_usage": "off_session", "browser_info": { "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "language": "nl-NL", "color_depth": 24, "screen_height": 723, "screen_width": 1536, "time_zone": 0, "java_enabled": true, "java_script_enabled": true, "ip_address": "13.232.74.226" } }' ``` Response ``` { "payment_id": "pay_8S1upQ4fMllhyoljKbsy", "merchant_id": "postman_merchant_GHAction_7ca00208-f80b-4f92-8ba9-3cbf9b0eb6ed", "status": "succeeded", "amount": 0, "net_amount": 0, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": "authorizedotnet", "client_secret": "pay_8S1upQ4fMllhyoljKbsy_secret_nMnZtHqYqXETjQR8Y5Wl", "created": "2025-09-08T06:35:42.276Z", "currency": "USD", "customer_id": "aaa9", "customer": { "id": "aaa9", "name": null, "email": null, "phone": null, "phone_country_code": null }, "description": "oda", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "off_session", "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "1091", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "400000", "card_extended_bin": null, "card_exp_month": "01", "card_exp_year": "30", "card_holder_name": null, "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": null, "order_details": null, "email": null, "name": null, "phone": null, "return_url": null, "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "aaa9", "created_at": 1757313342, "expires": 1757316942, "secret": "epk_5ff5134eb9d145698421cd65302b777f" }, "manual_retry_allowed": false, "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_B1KJWgaKMyj9NJZOiGiL", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_1A9mFebPqoV963nNNKk4", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-08T06:50:42.276Z", "fingerprint": null, "browser_info": { "language": "nl-NL", "time_zone": 0, "ip_address": "13.232.74.226", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "color_depth": 24, "java_enabled": true, "screen_width": 1536, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 723, "java_script_enabled": true }, "payment_channel": null, "payment_method_id": "pm_dNGfqp6eJ3EQIXDKT8Ul", "network_transaction_id": null, "payment_method_status": "active", "updated": "2025-09-08T06:35:43.810Z", "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": "932578546-931871295", "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. MIT via payment method id ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_QTV7hfwJvBw7V1Cw4IxHA8h1gg9in8dKYTNWtoWa6BkgfjvSr5r8Jg9gnZWL0wzX' \ --data '{ "amount": 10000, "currency": "USD", "off_session": true, "confirm": true, "capture_method": "automatic", "recurring_details": { "type": "payment_method_id", "data": "pm_dNGfqp6eJ3EQIXDKT8Ul" }, "customer_id": "aaa9", "connector": [ "authorizedotnet" ] }' ``` Response ``` { "payment_id": "pay_Sg03kzM6XooUiUlc76PE", "merchant_id": "postman_merchant_GHAction_7ca00208-f80b-4f92-8ba9-3cbf9b0eb6ed", "status": "succeeded", "amount": 10000, "net_amount": 10000, "shipping_cost": null, "amount_capturable": 0, "amount_received": 10000, "connector": "authorizedotnet", "client_secret": "pay_Sg03kzM6XooUiUlc76PE_secret_5cjMKfkDnpJFEd1FmSS8", "created": "2025-09-08T07:30:58.770Z", "currency": "USD", "customer_id": "aaa9", "customer": { "id": "aaa9", "name": null, "email": null, "phone": null, "phone_country_code": null }, "description": null, "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": true, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "1091", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "400000", "card_extended_bin": null, "card_exp_month": "01", "card_exp_year": "30", "card_holder_name": null, "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": null, "order_details": null, "email": null, "name": null, "phone": null, "return_url": null, "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "aaa9", "created_at": 1757316658, "expires": 1757320258, "secret": "epk_2fb224c3d65d4bfaaa95dc3f3a4f1829" }, "manual_retry_allowed": false, "connector_transaction_id": "120070561048", "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": "120070561048", "payment_link": null, "profile_id": "pro_B1KJWgaKMyj9NJZOiGiL", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_1A9mFebPqoV963nNNKk4", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-08T07:45:58.770Z", "fingerprint": null, "browser_info": null, "payment_channel": null, "payment_method_id": "pm_dNGfqp6eJ3EQIXDKT8Ul", "network_transaction_id": "IP5H1DF3H9BJM0ZYBF1JNZ6", "payment_method_status": "active", "updated": "2025-09-08T07:31:00.837Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": "932578546-931871295", "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null, "enable_partial_authorization": null } ``` </details> <details> <summary> Test CIT via same customer and payment method </summary> ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_QTV7hfwJvBw7V1Cw4IxHA8h1gg9in8dKYTNWtoWa6BkgfjvSr5r8Jg9gnZWL0wzX' \ --data '{ "amount": 1000, "currency": "USD", "confirm": true, "description": "oda", "capture_method": "automatic", "customer_id": "George_12", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4000000000001091", "card_exp_month": "01", "card_exp_year": "30", "card_cvc": "123" } }, "customer_acceptance": { "acceptance_type": "online", "accepted_at": "2025-03-27T13:56:49.848Z", "online": { "ip_address": null, "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.3 Safari/605.1.15" } }, "setup_future_usage": "off_session", "browser_info": { "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "language": "nl-NL", "color_depth": 24, "screen_height": 723, "screen_width": 1536, "time_zone": 0, "java_enabled": true, "java_script_enabled": true, "ip_address": "13.232.74.226" } }' ``` Response ``` { "payment_id": "pay_cmywKrWMEyxjxor5GjGg", "merchant_id": "postman_merchant_GHAction_7ca00208-f80b-4f92-8ba9-3cbf9b0eb6ed", "status": "succeeded", "amount": 1000, "net_amount": 1000, "shipping_cost": null, "amount_capturable": 0, "amount_received": 1000, "connector": "authorizedotnet", "client_secret": "pay_cmywKrWMEyxjxor5GjGg_secret_p1LI3CglxmUMeDIfz31m", "created": "2025-09-08T07:33:47.317Z", "currency": "USD", "customer_id": "George_12", "customer": { "id": "George_12", "name": null, "email": null, "phone": null, "phone_country_code": null }, "description": "oda", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "off_session", "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "1091", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "400000", "card_extended_bin": null, "card_exp_month": "01", "card_exp_year": "30", "card_holder_name": null, "payment_checks": { "description": "The street address and postal code matched.", "avs_result_code": "Y" }, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": 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": "George_12", "created_at": 1757316827, "expires": 1757320427, "secret": "epk_bd1723532d05441c90f833fe535e8ae8" }, "manual_retry_allowed": false, "connector_transaction_id": "120070561131", "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": "120070561131", "payment_link": null, "profile_id": "pro_B1KJWgaKMyj9NJZOiGiL", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_1A9mFebPqoV963nNNKk4", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-08T07:48:47.317Z", "fingerprint": null, "browser_info": { "language": "nl-NL", "time_zone": 0, "ip_address": "13.232.74.226", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "color_depth": 24, "java_enabled": true, "screen_width": 1536, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 723, "java_script_enabled": true }, "payment_channel": null, "payment_method_id": "pm_mfdEZEUD6TRHnl3xbXen", "network_transaction_id": "KKC9N0P1V9FZ8I4224LTENH", "payment_method_status": "active", "updated": "2025-09-08T07:33:48.962Z", "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": "932579889-931872607", "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 } ``` Create another CIT with authorize.net ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_QTV7hfwJvBw7V1Cw4IxHA8h1gg9in8dKYTNWtoWa6BkgfjvSr5r8Jg9gnZWL0wzX' \ --data '{ "amount": 1000, "currency": "USD", "confirm": true, "description": "oda", "capture_method": "automatic", "customer_id": "George_12", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4000000000001091", "card_exp_month": "01", "card_exp_year": "30", "card_cvc": "123" } }, "customer_acceptance": { "acceptance_type": "online", "accepted_at": "2025-03-27T13:56:49.848Z", "online": { "ip_address": null, "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.3 Safari/605.1.15" } }, "setup_future_usage": "off_session", "browser_info": { "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "language": "nl-NL", "color_depth": 24, "screen_height": 723, "screen_width": 1536, "time_zone": 0, "java_enabled": true, "java_script_enabled": true, "ip_address": "13.232.74.226" } }' ``` Response ``` { "payment_id": "pay_CD6jJdF4ezCGlCtrpvA9", "merchant_id": "postman_merchant_GHAction_7ca00208-f80b-4f92-8ba9-3cbf9b0eb6ed", "status": "succeeded", "amount": 1000, "net_amount": 1000, "shipping_cost": null, "amount_capturable": 0, "amount_received": 1000, "connector": "authorizedotnet", "client_secret": "pay_CD6jJdF4ezCGlCtrpvA9_secret_3bQzVFajiF0grVvRqniB", "created": "2025-09-08T07:58:27.079Z", "currency": "USD", "customer_id": "George_12", "customer": { "id": "George_12", "name": null, "email": null, "phone": null, "phone_country_code": null }, "description": "oda", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "off_session", "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "1091", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "400000", "card_extended_bin": null, "card_exp_month": "01", "card_exp_year": "30", "card_holder_name": null, "payment_checks": { "description": "The street address and postal code matched.", "avs_result_code": "Y" }, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": 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": "George_12", "created_at": 1757318307, "expires": 1757321907, "secret": "epk_acf8e718b07f4b3ba654f7e21aa06ec1" }, "manual_retry_allowed": false, "connector_transaction_id": "120070562091", "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": "120070562091", "payment_link": null, "profile_id": "pro_B1KJWgaKMyj9NJZOiGiL", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_1A9mFebPqoV963nNNKk4", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-08T08:13:27.079Z", "fingerprint": null, "browser_info": { "language": "nl-NL", "time_zone": 0, "ip_address": "13.232.74.226", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "color_depth": 24, "java_enabled": true, "screen_width": 1536, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 723, "java_script_enabled": true }, "payment_channel": null, "payment_method_id": "pm_8irM47OgNptHSjd4Yxjy", "network_transaction_id": "WME4UM2HEPYE12MVHMAXWRY", "payment_method_status": "active", "updated": "2025-09-08T07:58:29.279Z", "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": "932579889-931872607", "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 } ``` Create MIT ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_QTV7hfwJvBw7V1Cw4IxHA8h1gg9in8dKYTNWtoWa6BkgfjvSr5r8Jg9gnZWL0wzX' \ --data '{ "amount": 10000, "currency": "USD", "off_session": true, "confirm": true, "capture_method": "automatic", "recurring_details": { "type": "payment_method_id", "data": "pm_mfdEZEUD6TRHnl3xbXen" }, "customer_id": "George_12", "connector": [ "authorizedotnet" ] }' ``` Response ``` { "payment_id": "pay_Uch1kSbBqSzglhlR9P3a", "merchant_id": "postman_merchant_GHAction_7ca00208-f80b-4f92-8ba9-3cbf9b0eb6ed", "status": "succeeded", "amount": 10000, "net_amount": 10000, "shipping_cost": null, "amount_capturable": 0, "amount_received": 10000, "connector": "authorizedotnet", "client_secret": "pay_Uch1kSbBqSzglhlR9P3a_secret_iskb1cwZZxOX0pJb3QgO", "created": "2025-09-08T07:59:30.857Z", "currency": "USD", "customer_id": "George_12", "customer": { "id": "George_12", "name": null, "email": null, "phone": null, "phone_country_code": null }, "description": null, "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": true, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "1091", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "400000", "card_extended_bin": null, "card_exp_month": "01", "card_exp_year": "30", "card_holder_name": null, "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": null, "order_details": null, "email": null, "name": null, "phone": null, "return_url": null, "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "George_12", "created_at": 1757318370, "expires": 1757321970, "secret": "epk_7b91847bfd94413c816e69a49135d0d0" }, "manual_retry_allowed": false, "connector_transaction_id": "120070562151", "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": "120070562151", "payment_link": null, "profile_id": "pro_B1KJWgaKMyj9NJZOiGiL", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_1A9mFebPqoV963nNNKk4", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-08T08:14:30.857Z", "fingerprint": null, "browser_info": null, "payment_channel": null, "payment_method_id": "pm_mfdEZEUD6TRHnl3xbXen", "network_transaction_id": "SOYOQ73IT3NFN1CB6VYKGWG", "payment_method_status": "active", "updated": "2025-09-08T07:59:31.707Z", "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": "932579889-931872607", "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null, "enable_partial_authorization": null } ``` </details> <details> <summary> Create customer outside Hyperswitch and do a payment with the same customer in hyperswitch</summary> ``` curl --location 'https://apitest.authorize.net/xml/v1/request.api' \ --header 'Content-Type: application/json' \ --data-raw '{ "createCustomerProfileRequest": { "merchantAuthentication": { "name": "", "transactionKey": "" }, "profile": { "merchantCustomerId": "George_34", "email": "email16@here.com" // "description": "Profile description here" // "validationMode": "testMode", } } }' ``` Response ``` { "customerProfileId": "932581492", "customerPaymentProfileIdList": [], "customerShippingAddressIdList": [], "validationDirectResponseList": [], "messages": { "resultCode": "Ok", "message": [ { "code": "I00001", "text": "Successful." } ] } } ``` Create a CIT payment with the same customer id and email ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_ojXWyOIKxCbs6qJ1HUxnr0bRHtyqct6AmGj0rJJ6oxsFCsdmuGklbzGerp8MhttC' \ --data-raw '{ "amount": 1, "currency": "USD", "confirm": true, "description": "oda", "capture_method": "automatic", "billing": { "address": { "city": "Ooty", "state": "TN", "zip": "02915", "country": "US", "first_name": "Mike", "last_name": "J. Hammer" } }, "email": "email16@here.com", "customer_id": "George_34", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4548817212493017", "card_exp_month": "01", "card_exp_year": "30", "card_cvc": "123" } }, "customer_acceptance": { "acceptance_type": "online", "accepted_at": "2025-03-27T13:56:49.848Z", "online": { "ip_address": null, "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.3 Safari/605.1.15" } }, "setup_future_usage": "off_session", "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "North Carolina South", "zip": "94122", "country": "US", "first_name": "박성준", "last_name": "박성준" }}, "browser_info": { "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "language": "nl-NL", "color_depth": 24, "screen_height": 723, "screen_width": 1536, "time_zone": 0, "java_enabled": true, "java_script_enabled": true, "ip_address": "13.232.74.226" } }' ``` Response ``` { "payment_id": "pay_7GK3Vi1p2X6nYTq0DNvi", "merchant_id": "postman_merchant_GHAction_f642d793-b987-4b8b-9d3d-760182ec59f5", "status": "succeeded", "amount": 1, "net_amount": 1, "shipping_cost": null, "amount_capturable": 0, "amount_received": 1, "connector": "authorizedotnet", "client_secret": "pay_7GK3Vi1p2X6nYTq0DNvi_secret_Mmie9JbCtArhQXrYdk02", "created": "2025-09-08T10:30:25.540Z", "currency": "USD", "customer_id": "George_34", "customer": { "id": "George_34", "name": null, "email": "email16@here.com", "phone": null, "phone_country_code": null }, "description": "oda", "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": "3017", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "454881", "card_extended_bin": null, "card_exp_month": "01", "card_exp_year": "30", "card_holder_name": null, "payment_checks": { "description": "The street address and postal code matched.", "avs_result_code": "Y" }, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "North Carolina South", "first_name": "박성준", "last_name": "박성준", "origin_zip": null }, "phone": null, "email": null }, "billing": { "address": { "city": "Ooty", "country": "US", "line1": null, "line2": null, "line3": null, "zip": "02915", "state": "TN", "first_name": "Mike", "last_name": "J. Hammer", "origin_zip": null }, "phone": null, "email": null }, "order_details": null, "email": "email16@here.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": "George_34", "created_at": 1757327425, "expires": 1757331025, "secret": "epk_745a154b3b4648e8888cd8959b6e1e31" }, "manual_retry_allowed": false, "connector_transaction_id": "120070567790", "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": "120070567790", "payment_link": null, "profile_id": "pro_4c5KStks69a6pdMZU2uv", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_1br5DZpuUOdTwIk619pY", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-08T10:45:25.540Z", "fingerprint": null, "browser_info": { "language": "nl-NL", "time_zone": 0, "ip_address": "13.232.74.226", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "color_depth": 24, "java_enabled": true, "screen_width": 1536, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 723, "java_script_enabled": true }, "payment_channel": null, "payment_method_id": "pm_kLwQZFTDZHyi7ZfsluUG", "network_transaction_id": "VQ5N75LVGWHYRFDV6SYXSN4", "payment_method_status": "active", "updated": "2025-09-08T10:30:27.640Z", "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": "932581089-931874336", "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null, "enable_partial_authorization": null } ``` MIT transaction ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_ojXWyOIKxCbs6qJ1HUxnr0bRHtyqct6AmGj0rJJ6oxsFCsdmuGklbzGerp8MhttC' \ --data '{ "amount": 10000, "currency": "USD", "off_session": true, "confirm": true, "capture_method": "automatic", "recurring_details": { "type": "payment_method_id", "data": "pm_kLwQZFTDZHyi7ZfsluUG" }, "customer_id": "George_34", "connector": [ "authorizedotnet" ] }' ``` Response ``` { "payment_id": "pay_gMzzuKqBB2SpmylOck8P", "merchant_id": "postman_merchant_GHAction_f642d793-b987-4b8b-9d3d-760182ec59f5", "status": "succeeded", "amount": 10000, "net_amount": 10000, "shipping_cost": null, "amount_capturable": 0, "amount_received": 10000, "connector": "authorizedotnet", "client_secret": "pay_gMzzuKqBB2SpmylOck8P_secret_lB92QYHhKDPHvp4wNJNJ", "created": "2025-09-08T10:32:15.961Z", "currency": "USD", "customer_id": "George_34", "customer": { "id": "George_34", "name": null, "email": "email16@here.com", "phone": null, "phone_country_code": null }, "description": null, "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": true, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "3017", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "454881", "card_extended_bin": null, "card_exp_month": "01", "card_exp_year": "30", "card_holder_name": "Mike J. Hammer", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": null, "order_details": null, "email": "email16@here.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": "George_34", "created_at": 1757327535, "expires": 1757331135, "secret": "epk_9a461e1f7e0243a1b8c0c896a5928c21" }, "manual_retry_allowed": false, "connector_transaction_id": "120070567859", "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": "120070567859", "payment_link": null, "profile_id": "pro_4c5KStks69a6pdMZU2uv", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_1br5DZpuUOdTwIk619pY", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-08T10:47:15.961Z", "fingerprint": null, "browser_info": null, "payment_channel": null, "payment_method_id": "pm_kLwQZFTDZHyi7ZfsluUG", "network_transaction_id": "Z7KZ0F7C23FF7OMWVWMZK2B", "payment_method_status": "active", "updated": "2025-09-08T10:32:18.018Z", "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": "932581089-931874336", "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null, "enable_partial_authorization": null } ``` </details> <details> <summary> Sanity checks </summary> Create a normal payment with customer id ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_ojXWyOIKxCbs6qJ1HUxnr0bRHtyqct6AmGj0rJJ6oxsFCsdmuGklbzGerp8MhttC' \ --data-raw '{ "amount": 1, "currency": "USD", "confirm": true, "description": "oda", "capture_method": "automatic", "billing": { "address": { "city": "Ooty", "state": "TN", "zip": "02915", "country": "US", "first_name": "Mike", "last_name": "J. Hammer" } }, "email": "email16@here.com", "customer_id": "George_39", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4548817212493017", "card_exp_month": "01", "card_exp_year": "30", "card_cvc": "123" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "North Carolina South", "zip": "94122", "country": "US", "first_name": "박성준", "last_name": "박성준" }}, "browser_info": { "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "language": "nl-NL", "color_depth": 24, "screen_height": 723, "screen_width": 1536, "time_zone": 0, "java_enabled": true, "java_script_enabled": true, "ip_address": "13.232.74.226" } }' ``` Response ``` { "payment_id": "pay_F6FBGXBosUnkMWVCwzwC", "merchant_id": "postman_merchant_GHAction_f642d793-b987-4b8b-9d3d-760182ec59f5", "status": "succeeded", "amount": 1, "net_amount": 1, "shipping_cost": null, "amount_capturable": 0, "amount_received": 1, "connector": "authorizedotnet", "client_secret": "pay_F6FBGXBosUnkMWVCwzwC_secret_WL7XVnHG4iF7XUybRSw0", "created": "2025-09-08T10:35:58.529Z", "currency": "USD", "customer_id": "George_39", "customer": { "id": "George_39", "name": null, "email": "email16@here.com", "phone": null, "phone_country_code": null }, "description": "oda", "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": "3017", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "454881", "card_extended_bin": null, "card_exp_month": "01", "card_exp_year": "30", "card_holder_name": null, "payment_checks": { "description": "The street address and postal code matched.", "avs_result_code": "Y" }, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "North Carolina South", "first_name": "박성준", "last_name": "박성준", "origin_zip": null }, "phone": null, "email": null }, "billing": { "address": { "city": "Ooty", "country": "US", "line1": null, "line2": null, "line3": null, "zip": "02915", "state": "TN", "first_name": "Mike", "last_name": "J. Hammer", "origin_zip": null }, "phone": null, "email": null }, "order_details": null, "email": "email16@here.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": "George_39", "created_at": 1757327758, "expires": 1757331358, "secret": "epk_eacacf5bc45041b1abcae4a96930bada" }, "manual_retry_allowed": false, "connector_transaction_id": "120070568055", "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": "120070568055", "payment_link": null, "profile_id": "pro_4c5KStks69a6pdMZU2uv", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_1br5DZpuUOdTwIk619pY", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-08T10:50:58.528Z", "fingerprint": null, "browser_info": { "language": "nl-NL", "time_zone": 0, "ip_address": "13.232.74.226", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "color_depth": 24, "java_enabled": true, "screen_width": 1536, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 723, "java_script_enabled": true }, "payment_channel": null, "payment_method_id": null, "network_transaction_id": "HOADKZPWOV4VMD7463CTMDE", "payment_method_status": null, "updated": "2025-09-08T10:36:01.130Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null, "enable_partial_authorization": null } ``` >Note: Check that the customer id is present in the authorize.net dashboard Payment without customer id ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_ojXWyOIKxCbs6qJ1HUxnr0bRHtyqct6AmGj0rJJ6oxsFCsdmuGklbzGerp8MhttC' \ --data '{ "amount": 1, "currency": "USD", "confirm": true, "description": "oda", "capture_method": "automatic", "billing": { "address": { "city": "Ooty", "state": "TN", "zip": "02915", "country": "US", "first_name": "Mike", "last_name": "J. Hammer" } }, "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4548817212493017", "card_exp_month": "01", "card_exp_year": "30", "card_cvc": "123" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "North Carolina South", "zip": "94122", "country": "US", "first_name": "박성준", "last_name": "박성준" }}, "browser_info": { "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "language": "nl-NL", "color_depth": 24, "screen_height": 723, "screen_width": 1536, "time_zone": 0, "java_enabled": true, "java_script_enabled": true, "ip_address": "13.232.74.226" } }' ``` Response ``` { "payment_id": "pay_Q45X5L5EevrqOMYCOCZ0", "merchant_id": "postman_merchant_GHAction_f642d793-b987-4b8b-9d3d-760182ec59f5", "status": "succeeded", "amount": 1, "net_amount": 1, "shipping_cost": null, "amount_capturable": 0, "amount_received": 1, "connector": "authorizedotnet", "client_secret": "pay_Q45X5L5EevrqOMYCOCZ0_secret_pLPOQD9Tsy81KfFjKB6X", "created": "2025-09-08T10:37:40.898Z", "currency": "USD", "customer_id": null, "customer": null, "description": "oda", "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": "3017", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "454881", "card_extended_bin": null, "card_exp_month": "01", "card_exp_year": "30", "card_holder_name": null, "payment_checks": { "description": "The street address and postal code matched.", "avs_result_code": "Y" }, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "North Carolina South", "first_name": "박성준", "last_name": "박성준", "origin_zip": null }, "phone": null, "email": null }, "billing": { "address": { "city": "Ooty", "country": "US", "line1": null, "line2": null, "line3": null, "zip": "02915", "state": "TN", "first_name": "Mike", "last_name": "J. Hammer", "origin_zip": null }, "phone": null, "email": null }, "order_details": null, "email": null, "name": null, "phone": null, "return_url": null, "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": null, "manual_retry_allowed": false, "connector_transaction_id": "120070568151", "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": "120070568151", "payment_link": null, "profile_id": "pro_4c5KStks69a6pdMZU2uv", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_1br5DZpuUOdTwIk619pY", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-08T10:52:40.898Z", "fingerprint": null, "browser_info": { "language": "nl-NL", "time_zone": 0, "ip_address": "13.232.74.226", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "color_depth": 24, "java_enabled": true, "screen_width": 1536, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 723, "java_script_enabled": true }, "payment_channel": null, "payment_method_id": null, "network_transaction_id": "OB29UI4CXX0LM51T4RT6F6Z", "payment_method_status": null, "updated": "2025-09-08T10:37:43.437Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null, "enable_partial_authorization": null } ``` </details> <details> <summary>Wallet test - Googlepay</summary> Create a normal payment with customer id, customer id should be shown for the transaction ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_KE9tLklSMgmO0Wh3Zy8zu5IoKEEKynF16mY53eV84Dx5TbRjpHfSJuUt7WVEgd4r' \ --data '{ "amount": 100, "currency": "USD", "confirm": true, "description": "oda", "return_url": "https://app.hyperswitch.io/dashboard/sdk", "payment_method": "wallet", "payment_method_type": "google_pay", "payment_method_data": { "wallet": { "google_pay": { "type": "CARD", "description": "Test Card: Visa •••• 1111", "info": { "assurance_details": { "account_verified": true, "card_holder_authenticated": false }, "card_details": "1111", "card_funding_source": "CREDIT", "card_network": "VISA" }, "tokenization_data": { "token": "{\"signature\":\"MEUCI**************", "type": "PAYMENT_GATEWAY" } } } }, "connector": [ "authorizedotnet" ], "browser_info": { "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.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" }, "customer_id": "cus_12345" }' ``` Response ``` { "payment_id": "pay_LDMqfa273PAHeseOz0As", "merchant_id": "postman_merchant_GHAction_5c96aafd-4990-44b3-b44d-c66b2a76f962", "status": "succeeded", "amount": 100, "net_amount": 100, "shipping_cost": null, "amount_capturable": 0, "amount_received": 100, "connector": "authorizedotnet", "client_secret": "pay_LDMqfa273PAHeseOz0As_secret_I4SZIKuOKqNufNurB1mz", "created": "2025-09-08T12:06:57.848Z", "currency": "USD", "customer_id": "cus_12345", "customer": { "id": "cus_12345", "name": null, "email": null, "phone": null, "phone_country_code": null }, "description": "oda", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": null, "payment_method": "wallet", "payment_method_data": { "wallet": { "google_pay": { "last4": "1111", "card_network": "VISA", "type": "CARD" } }, "billing": null }, "payment_token": null, "shipping": null, "billing": null, "order_details": null, "email": null, "name": null, "phone": null, "return_url": "https://app.hyperswitch.io/dashboard/sdk", "authentication_type": "three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "google_pay", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "cus_12345", "created_at": 1757333217, "expires": 1757336817, "secret": "epk_07214c9b7ff54164bd6c26ecf9895f2a" }, "manual_retry_allowed": false, "connector_transaction_id": "80044364289", "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": "80044364289", "payment_link": null, "profile_id": "pro_ayYGLzXmcF3E9JgC7HZO", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_EnqpwnxfB7GppsknYX7r", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-08T12:21:57.848Z", "fingerprint": null, "browser_info": { "os_type": "macOS", "language": "en-GB", "time_zone": -330, "os_version": "10.15.7", "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36", "color_depth": 24, "device_model": "Macintosh", "java_enabled": true, "screen_width": 1728, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 1117, "java_script_enabled": true }, "payment_channel": null, "payment_method_id": null, "network_transaction_id": "XPSPFFQOROVN42C5WFHQEM2", "payment_method_status": null, "updated": "2025-09-08T12:07:00.691Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": 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 } ``` Create Cit twice for same customer id and same payment method and create trigger an MIT CIT 1 ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_KE9tLklSMgmO0Wh3Zy8zu5IoKEEKynF16mY53eV84Dx5TbRjpHfSJuUt7WVEgd4r' \ --data '{ "amount": 100, "currency": "USD", "confirm": true, "description": "oda", "return_url": "https://app.hyperswitch.io/dashboard/sdk", "payment_method": "wallet", "payment_method_type": "google_pay", "payment_method_data": { "wallet": { "google_pay": { "type": "CARD", "description": "Test Card: Visa •••• 1111", "info": { "assurance_details": { "account_verified": true, "card_holder_authenticated": false }, "card_details": "1111", "card_funding_source": "CREDIT", "card_network": "VISA" }, "tokenization_data": { "token": "{\"signature\":\"MEUCIQD8rFtn1qHNMINks9KByeBWj6IlMDTNlkXHXvfi4ucVlgIgS2ouIBMSCILZe3YsxWeUpsGK5sDF70zKWIkL3xWzqwY\\u003d\",\"protocolVersion\":\"ECv1\",\"signedMessage\":\"{\\\"encryptedMessage\\\":\\\"wIbdKS71cuojES2JxwMQW54T2M//izzeBHj8hJUpi0ExBsrjc/OUe6XhHRopgmB+VQjfJhObfNH+uHlXypZREefBPlH78wY8Bg5s3t6ufWGXLTQQGsfhoufKbJnZrshrxYUti8+6CByH62uNq8oxCp+XuTCWnXab8aLgGWyY5wDxtC9K/1wzN6PkPPyFDNwL6jEygIEr4rN9N4zTzcoLVJRqavqa19d2z26Ley6p7NNfLFZMjczuBdyRWSj7B5zTNT7WUgpF0KUiRvdMYELGuD1R93MeBsazJS5WJD*****************"}\"}", "type": "PAYMENT_GATEWAY" } } } }, "connector": [ "authorizedotnet" ], "browser_info": { "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.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" }, "customer_id": "cus_12345", "customer_acceptance": { "acceptance_type": "online", "accepted_at": "2025-03-27T13:56:49.848Z", "online": { "ip_address": null, "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.3 Safari/605.1.15" } }, "setup_future_usage": "off_session" }' ``` Response ``` { "payment_id": "pay_37NcwVUnk2TRXeWWSffF", "merchant_id": "postman_merchant_GHAction_5c96aafd-4990-44b3-b44d-c66b2a76f962", "status": "succeeded", "amount": 100, "net_amount": 100, "shipping_cost": null, "amount_capturable": 0, "amount_received": 100, "connector": "authorizedotnet", "client_secret": "pay_37NcwVUnk2TRXeWWSffF_secret_nGC20xDeGX7b3rfUUBLv", "created": "2025-09-08T12:19:11.685Z", "currency": "USD", "customer_id": "cus_12345", "customer": { "id": "cus_12345", "name": null, "email": null, "phone": null, "phone_country_code": null }, "description": "oda", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "off_session", "off_session": null, "capture_on": null, "capture_method": null, "payment_method": "wallet", "payment_method_data": { "wallet": { "google_pay": { "last4": "1111", "card_network": "VISA", "type": "CARD" } }, "billing": null }, "payment_token": null, "shipping": null, "billing": null, "order_details": null, "email": null, "name": null, "phone": null, "return_url": "https://app.hyperswitch.io/dashboard/sdk", "authentication_type": "three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "google_pay", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "cus_12345", "created_at": 1757333951, "expires": 1757337551, "secret": "epk_237bd58adf8d48cb9ad6d38fdcdc3b07" }, "manual_retry_allowed": false, "connector_transaction_id": "80044364497", "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": "80044364497", "payment_link": null, "profile_id": "pro_ayYGLzXmcF3E9JgC7HZO", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_EnqpwnxfB7GppsknYX7r", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-08T12:34:11.685Z", "fingerprint": null, "browser_info": { "os_type": "macOS", "language": "en-GB", "time_zone": -330, "os_version": "10.15.7", "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36", "color_depth": 24, "device_model": "Macintosh", "java_enabled": true, "screen_width": 1728, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 1117, "java_script_enabled": true }, "payment_channel": null, "payment_method_id": "pm_49DfXLBrPJ1t90oFfmPi", "network_transaction_id": "BHYELB7L0V5C5Q4NW72AWX0", "payment_method_status": "active", "updated": "2025-09-08T12:19:13.552Z", "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": "524439809-536594893", "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 } ``` CIT 2 ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_KE9tLklSMgmO0Wh3Zy8zu5IoKEEK******************************' \ --data '{ "amount": 100, "currency": "USD", "confirm": true, "description": "oda", "return_url": "https://app.hyperswitch.io/dashboard/sdk", "payment_method": "wallet", "payment_method_type": "google_pay", "payment_method_data": { "wallet": { "google_pay": { "type": "CARD", "description": "Test Card: Visa •••• 1111", "info": { "assurance_details": { "account_verified": true, "card_holder_authenticated": false }, "card_details": "1111", "card_funding_source": "CREDIT", "card_network": "VISA" }, "tokenization_data": { "token": "{\"signature\":\"MEUCIQD8rFtn1qHNMINks9KByeBWj6IlMDTNlkXHXvfi4ucVlgIgS2ouIBMSCILZe3YsxWeUpsGK5sDF70zKWIkL3xWzqwY\\u003d\",\"protocolVersion\":\"ECv1\",\"signedMessage\":\"{\\\"encryptedMessage\\\":\\\"wIbdKS71cuojES2JxwMQW54T2M//izzeBHj8hJUpi0ExBsrjc/OUe6XhHRopgmB+VQjfJhObfNH+uHlXypZREefBPlH78wY8Bg5s3t6u****************************\"}\"}", "type": "PAYMENT_GATEWAY" } } } }, "connector": [ "authorizedotnet" ], "browser_info": { "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.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" }, "customer_id": "cus_12345", "customer_acceptance": { "acceptance_type": "online", "accepted_at": "2025-03-27T13:56:49.848Z", "online": { "ip_address": null, "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.3 Safari/605.1.15" } }, "setup_future_usage": "off_session" }' ``` Response ``` { "payment_id": "pay_FhZxwJ66xE2c3iNTmcjw", "merchant_id": "postman_merchant_GHAction_5c96aafd-4990-44b3-b44d-c66b2a76f962", "status": "succeeded", "amount": 100, "net_amount": 100, "shipping_cost": null, "amount_capturable": 0, "amount_received": 100, "connector": "authorizedotnet", "client_secret": "pay_FhZxwJ66xE2c3iNTmcjw_secret_EGOtM2GS2cXoBn7byX9K", "created": "2025-09-08T12:20:27.430Z", "currency": "USD", "customer_id": "cus_12345", "customer": { "id": "cus_12345", "name": null, "email": null, "phone": null, "phone_country_code": null }, "description": "oda", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "off_session", "off_session": null, "capture_on": null, "capture_method": null, "payment_method": "wallet", "payment_method_data": { "wallet": { "google_pay": { "last4": "1111", "card_network": "VISA", "type": "CARD" } }, "billing": null }, "payment_token": null, "shipping": null, "billing": null, "order_details": null, "email": null, "name": null, "phone": null, "return_url": "https://app.hyperswitch.io/dashboard/sdk", "authentication_type": "three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "google_pay", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "cus_12345", "created_at": 1757334027, "expires": 1757337627, "secret": "epk_d387f51d21cb4643bef5d6a22a5dc38e" }, "manual_retry_allowed": false, "connector_transaction_id": "80044364526", "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": "80044364526", "payment_link": null, "profile_id": "pro_ayYGLzXmcF3E9JgC7HZO", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_EnqpwnxfB7GppsknYX7r", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-08T12:35:27.430Z", "fingerprint": null, "browser_info": { "os_type": "macOS", "language": "en-GB", "time_zone": -330, "os_version": "10.15.7", "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36", "color_depth": 24, "device_model": "Macintosh", "java_enabled": true, "screen_width": 1728, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 1117, "java_script_enabled": true }, "payment_channel": null, "payment_method_id": "pm_49DfXLBrPJ1t90oFfmPi", "network_transaction_id": "PUKVC400BTCOGMT807X6ANT", "payment_method_status": "active", "updated": "2025-09-08T12:20:28.309Z", "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": "524439809-536594893", "card_discovery": null, "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null, "enable_partial_authorization": null } ``` MIT ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_KE9tLklSMgmO0Wh3Zy8zu5IoKEEKynF16mY53eV84Dx5TbRjpHfSJuUt7WVEgd4r' \ --data '{ "amount": 10000, "currency": "USD", "off_session": true, "confirm": true, "capture_method": "automatic", "recurring_details": { "type": "payment_method_id", "data": "pm_49DfXLBrPJ1t90oFfmPi" }, "customer_id": "cus_12345", "connector": [ "authorizedotnet" ] }' ``` Response ``` { "payment_id": "pay_vJpAQM8GUsOHKLCikEVP", "merchant_id": "postman_merchant_GHAction_5c96aafd-4990-44b3-b44d-c66b2a76f962", "status": "succeeded", "amount": 10000, "net_amount": 10000, "shipping_cost": null, "amount_capturable": 0, "amount_received": 10000, "connector": "authorizedotnet", "client_secret": "pay_vJpAQM8GUsOHKLCikEVP_secret_9P0sKSn1eekdRyBQJHu3", "created": "2025-09-08T12:22:01.910Z", "currency": "USD", "customer_id": "cus_12345", "customer": { "id": "cus_12345", "name": null, "email": null, "phone": null, "phone_country_code": null }, "description": null, "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": true, "capture_on": null, "capture_method": "automatic", "payment_method": "wallet", "payment_method_data": { "wallet": { "google_pay": { "last4": "1111", "card_network": "VISA", "type": "CARD" } }, "billing": null }, "payment_token": null, "shipping": null, "billing": null, "order_details": null, "email": null, "name": null, "phone": null, "return_url": null, "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "google_pay", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "cus_12345", "created_at": 1757334121, "expires": 1757337721, "secret": "epk_2cd756da4d794f4dac5a22e10457aa4c" }, "manual_retry_allowed": false, "connector_transaction_id": "80044364565", "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": "80044364565", "payment_link": null, "profile_id": "pro_ayYGLzXmcF3E9JgC7HZO", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_EnqpwnxfB7GppsknYX7r", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-08T12:37:01.910Z", "fingerprint": null, "browser_info": null, "payment_channel": null, "payment_method_id": "pm_49DfXLBrPJ1t90oFfmPi", "network_transaction_id": "D9LHUD6TDE3XP3JSXZTUEB2", "payment_method_status": "active", "updated": "2025-09-08T12:22:03.468Z", "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": "524439809-536594893", "card_discovery": null, "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null, "enable_partial_authorization": null } ``` </details> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/authorizedotnet/transformers.rs` **Code Patterns Applied:** - Implement new functions (1 changes) - Extend existing types with new fields (33 changes) - Add conditional logic for feature flags or filtering (2 changes) **Detailed Identifier Changes:** Commit 72c0f896: Files to modify: **crates/hyperswitch_connectors/src/connectors/authorizedotnet/transformers.rs** Add: - function: private::extract_customer_id
{"pr_number": 9298, "pr_title": "fix(connectors): [authorizedotnet] send customerProfileId in the CIT flow and map customerPaymentProfileId in the Setup Mandate flow", "merged_at": "2025-09-09T11:09:10Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/authorizedotnet/transformers.rs"]}, "change_types": {"functions_added": 1, "fields_added": 33, "imports_added": 1, "conditionals_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): [BRAINTREE] Add revoke mandate flow ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> ORIGINAL PR: https://github.com/juspay/hyperswitch/pull/7525 Add mandate revoke flow to Braintree https://developer.paypal.com/braintree/graphql/guides/payment_methods/#delete ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with 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/7526 ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Revoking an existing mandate using tunnel needs to be tested: Request: ``` curl --location 'http://localhost:8080/vs/v1/payment_methods/man_OVY39ecmn6QDAxh18qIe/detach' \ --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: HIDDEN' \ --data-urlencode 'merchant_connector_details%5Bencoded_data%5D=HIDDEN' ``` Response: ``` { "mandate_id": "man_OVY39ecmn6QDAxh18qIe", "status": "revoked", "error_code": null, "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.rs` - `crates/hyperswitch_connectors/src/connectors/braintree/transformers.rs` - `crates/hyperswitch_connectors/src/default_implementations.rs` **Code Patterns Applied:** - Define new data structures (5 changes) - Implement new functions (8 changes) - Extend existing types with new fields (26 changes) **Detailed Identifier Changes:** Commit 94974bdc: Files to modify: **crates/hyperswitch_connectors/src/connectors/braintree.rs** Add: - function: private::get_headers - function: private::get_url - function: private::build_request - function: private::get_request_body - function: private::handle_response - function: private::get_error_response - impl: impl api::ConnectorMandateRevoke for Braintree - impl: impl ConnectorIntegration<MandateRevoke, MandateRevokeRequestData, MandateRevokeResponseData> for Braintree **crates/hyperswitch_connectors/src/connectors/braintree/transformers.rs** Add: - function: private::try_from - function: private::try_from - struct: pub::DeletePaymentMethodFromVaultInputData - struct: pub::VariableDeletePaymentMethodFromVaultInput - struct: pub::BraintreeRevokeMandateRequest - struct: pub::RevokeMandateResponse - struct: pub::DeletePaymentMethodFromVault - enum: pub::BraintreeRevokeMandateResponse - impl: impl TryFrom<&types::MandateRevokeRouterData> for BraintreeRevokeMandateRequest - impl: impl TryFrom< ResponseRouterData< F, BraintreeRevokeMandateResponse, MandateRevokeRequestData, MandateRevokeResponseData, >, > for RouterData<F, MandateRevokeRequestData, MandateRevokeResponseData> **crates/hyperswitch_connectors/src/default_implementations.rs** Modify existing code
{"pr_number": 7530, "pr_title": "feat(connector): [BRAINTREE] Add revoke mandate flow", "merged_at": "2025-03-17T08:59:58Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "merchant", "user"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/braintree.rs", "crates/hyperswitch_connectors/src/connectors/braintree/transformers.rs", "crates/hyperswitch_connectors/src/default_implementations.rs"]}, "change_types": {"structs_added": 5, "functions_added": 8, "enums_added": 1, "fields_added": 26}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(connectors): [worldpayvantiv] change endpoint, add billing address and fix 5xx incase of psync ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This PR 1. Updates Vantiv's endpoint by replacing payments with transact. 2. Extends the payment request to include billing address and customer_id. 3. It also addresses a 5xx error encountered during psync calls. The error occurred for accounts where psync is not enabled at Vantiv's end — in such cases, the results_max10 field is not returned. Since this field was previously required on our end, its absence led to a server error. We’ve now made the field optional and are returning a proper error response when it's missing. ## How did you test 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> Make a card payment with billing data </summary> ```curl curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_TUXyXGuILlWnf8gtFvDGCs4vmylt1S5VLjHy2GnP40wswrQtVOq3v42r068e2saA' \ --data-raw '{ "amount": 10, "currency": "USD", "confirm": true, "description": "payments", "capture_method": "manual", "customer_id" :"3582faf2-43a2-4413-a801-9fd703d7f529", "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "Ceutâ", "zip": "94122", "country": "AR", "first_name": "joseph", "last_name": "Doe" }, "email": "mauro.morandi@nexi.it", "phone": { "number": "9123456789", "country_code": "+91" } }, "payment_method": "card", "payment_method_type": "debit", "payment_method_data": { "card": { "card_number": "5454545454545454", "card_exp_month": "12", "card_exp_year": "25", "card_holder_name": "Joseph", "card_cvc": "123" } }, "browser_info": { "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "language": "nl-NL", "color_depth": 24, "screen_height": 723, "screen_width": 1536, "time_zone": 0, "java_enabled": true, "java_script_enabled": true, "ip_address": "13.232.74.226" } }' ``` Response ```json {"payment_id":"pay_wWE4FZVMYu7N74PMiyGm","merchant_id":"postman_merchant_GHAction_7edbfc8f-5f1d-4a1f-83ce-8298a61e7b74","status":"requires_capture","amount":10,"net_amount":10,"shipping_cost":null,"amount_capturable":10,"amount_received":null,"connector":"worldpayvantiv","client_secret":"pay_wWE4FZVMYu7N74PMiyGm_secret_7rfzSR4dbHCvNBA56ue5","created":"2025-06-16T12:49:17.140Z","currency":"USD","customer_id":"1837eb2c-0eb8-4a76-abd3-d4f92888007f","customer":{"id":"1837eb2c-0eb8-4a76-abd3-d4f92888007f","name":null,"email":null,"phone":null,"phone_country_code":null},"description":"payments","refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":null,"off_session":null,"capture_on":null,"capture_method":"manual","payment_method":"card","payment_method_data":{"card":{"last4":"5454","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"545454","card_extended_bin":null,"card_exp_month":"12","card_exp_year":"25","card_holder_name":"Joseph","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":null,"billing":{"address":{"city":"San Fransico","country":"AR","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"Ceutâ","first_name":"joseph","last_name":"Doe"},"phone":{"number":"9123456789","country_code":"+91"},"email":"mauro.morandi@nexi.it"},"order_details":null,"email":null,"name":null,"phone":null,"return_url":null,"authentication_type":"no_three_ds","statement_descriptor_name":null,"statement_descriptor_suffix":null,"next_action":null,"cancellation_reason":null,"error_code":null,"error_message":null,"unified_code":null,"unified_message":null,"payment_experience":null,"payment_method_type":"debit","connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":{"customer_id":"1837eb2c-0eb8-4a76-abd3-d4f92888007f","created_at":1750078157,"expires":1750081757,"secret":"epk_c99202d7a00b49e5970ce58b41e18dec"},"manual_retry_allowed":false,"connector_transaction_id":"83996996320008437","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"pay_wWE4FZVMYu7N74PMiyGm","payment_link":null,"profile_id":"pro_Z9BiMKNejvk0ctZxnA52","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_01uZGaiGrDGyqGVVIOHb","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-06-16T13:04:17.140Z","fingerprint":null,"browser_info":{"language":"nl-NL","time_zone":0,"ip_address":"13.232.74.226","user_agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36","color_depth":24,"java_enabled":true,"screen_width":1536,"accept_header":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8","screen_height":723,"java_script_enabled":true},"payment_method_id":null,"payment_method_status":null,"updated":"2025-06-16T12:49:17.562Z","split_payments":null,"frm_metadata":null,"extended_authorization_applied":null,"capture_before":null,"merchant_order_reference_id":null,"order_tax_amount":null,"connector_mandate_id":null,"card_discovery":"manual","force_3ds_challenge":false,"force_3ds_challenge_trigger":false,"issuer_error_code":null,"issuer_error_message":null,"is_iframe_redirection_enabled":null,"whole_connector_response":null} ``` </details> <details> <summary> Psync </summary> ```curl {"payment_id":"pay_wWE4FZVMYu7N74PMiyGm","merchant_id":"postman_merchant_GHAction_7edbfc8f-5f1d-4a1f-83ce-8298a61e7b74","status":"requires_capture","amount":10,"net_amount":10,"shipping_cost":null,"amount_capturable":10,"amount_received":null,"connector":"worldpayvantiv","client_secret":"pay_wWE4FZVMYu7N74PMiyGm_secret_7rfzSR4dbHCvNBA56ue5","created":"2025-06-16T12:49:17.140Z","currency":"USD","customer_id":"1837eb2c-0eb8-4a76-abd3-d4f92888007f","customer":{"id":"1837eb2c-0eb8-4a76-abd3-d4f92888007f","name":null,"email":null,"phone":null,"phone_country_code":null},"description":"payments","refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":null,"off_session":null,"capture_on":null,"capture_method":"manual","payment_method":"card","payment_method_data":{"card":{"last4":"5454","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"545454","card_extended_bin":null,"card_exp_month":"12","card_exp_year":"25","card_holder_name":"Joseph","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":null,"billing":{"address":{"city":"San Fransico","country":"AR","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"Ceutâ","first_name":"joseph","last_name":"Doe"},"phone":{"number":"9123456789","country_code":"+91"},"email":"mauro.morandi@nexi.it"},"order_details":null,"email":null,"name":null,"phone":null,"return_url":null,"authentication_type":"no_three_ds","statement_descriptor_name":null,"statement_descriptor_suffix":null,"next_action":null,"cancellation_reason":null,"error_code":null,"error_message":null,"unified_code":null,"unified_message":null,"payment_experience":null,"payment_method_type":"debit","connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":{"customer_id":"1837eb2c-0eb8-4a76-abd3-d4f92888007f","created_at":1750078157,"expires":1750081757,"secret":"epk_c99202d7a00b49e5970ce58b41e18dec"},"manual_retry_allowed":false,"connector_transaction_id":"83996996320008437","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"pay_wWE4FZVMYu7N74PMiyGm","payment_link":null,"profile_id":"pro_Z9BiMKNejvk0ctZxnA52","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_01uZGaiGrDGyqGVVIOHb","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-06-16T13:04:17.140Z","fingerprint":null,"browser_info":{"language":"nl-NL","time_zone":0,"ip_address":"13.232.74.226","user_agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36","color_depth":24,"java_enabled":true,"screen_width":1536,"accept_header":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8","screen_height":723,"java_script_enabled":true},"payment_method_id":null,"payment_method_status":null,"updated":"2025-06-16T12:49:17.562Z","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} ``` Response ```json {"payment_id":"pay_wWE4FZVMYu7N74PMiyGm","merchant_id":"postman_merchant_GHAction_7edbfc8f-5f1d-4a1f-83ce-8298a61e7b74","status":"requires_capture","amount":10,"net_amount":10,"shipping_cost":null,"amount_capturable":10,"amount_received":null,"connector":"worldpayvantiv","client_secret":"pay_wWE4FZVMYu7N74PMiyGm_secret_7rfzSR4dbHCvNBA56ue5","created":"2025-06-16T12:49:17.140Z","currency":"USD","customer_id":"1837eb2c-0eb8-4a76-abd3-d4f92888007f","customer":{"id":"1837eb2c-0eb8-4a76-abd3-d4f92888007f","name":null,"email":null,"phone":null,"phone_country_code":null},"description":"payments","refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":null,"off_session":null,"capture_on":null,"capture_method":"manual","payment_method":"card","payment_method_data":{"card":{"last4":"5454","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"545454","card_extended_bin":null,"card_exp_month":"12","card_exp_year":"25","card_holder_name":"Joseph","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":null,"billing":{"address":{"city":"San Fransico","country":"AR","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"Ceutâ","first_name":"joseph","last_name":"Doe"},"phone":{"number":"9123456789","country_code":"+91"},"email":"mauro.morandi@nexi.it"},"order_details":null,"email":null,"name":null,"phone":null,"return_url":null,"authentication_type":"no_three_ds","statement_descriptor_name":null,"statement_descriptor_suffix":null,"next_action":null,"cancellation_reason":null,"error_code":null,"error_message":null,"unified_code":null,"unified_message":null,"payment_experience":null,"payment_method_type":"debit","connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":null,"manual_retry_allowed":false,"connector_transaction_id":"83996996320008437","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"pay_wWE4FZVMYu7N74PMiyGm","payment_link":null,"profile_id":"pro_Z9BiMKNejvk0ctZxnA52","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_01uZGaiGrDGyqGVVIOHb","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-06-16T13:04:17.140Z","fingerprint":null,"browser_info":{"language":"nl-NL","time_zone":0,"ip_address":"13.232.74.226","user_agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36","color_depth":24,"java_enabled":true,"screen_width":1536,"accept_header":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8","screen_height":723,"java_script_enabled":true},"payment_method_id":null,"payment_method_status":null,"updated":"2025-06-16T12:51:05.782Z","split_payments":null,"frm_metadata":null,"extended_authorization_applied":null,"capture_before":null,"merchant_order_reference_id":null,"order_tax_amount":null,"connector_mandate_id":null,"card_discovery":"manual","force_3ds_challenge":false,"force_3ds_challenge_trigger":false,"issuer_error_code":null,"issuer_error_message":null,"is_iframe_redirection_enabled":null,"whole_connector_response":null} ``` </details> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **payment** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/worldpayvantiv/transformers.rs` **2. Tests** - `config/deployments/integration_test.toml` - `loadtest/config/development.toml` **3. Configuration Files** - `config/config.example.toml` - `config/deployments/production.toml` - `config/deployments/sandbox.toml` - ... and 2 more files **Code Patterns Applied:** - Define new data structures (2 changes) - Implement new functions (1 changes) - Extend existing types with new fields (125 changes) - Add conditional logic for feature flags or filtering (5 changes) **Detailed Identifier Changes:** Commit 5f7055fc: Files to modify: **crates/hyperswitch_connectors/src/connectors/worldpayvantiv/transformers.rs** Add: - struct: pub::BillToAddressData - struct: pub::FraudResult
{"pr_number": 8354, "pr_title": "fix(connectors): [worldpayvantiv] change endpoint, add billing address and fix 5xx incase of psync", "merged_at": "2025-06-19T07:07:15Z", "intent": {"feature_type": "payment", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/worldpayvantiv/transformers.rs"], "tests": ["config/deployments/integration_test.toml", "loadtest/config/development.toml"], "config": ["config/config.example.toml", "config/deployments/production.toml", "config/deployments/sandbox.toml", "config/development.toml", "config/docker_compose.toml"]}, "change_types": {"structs_added": 2, "functions_added": 1, "fields_added": 125, "conditionals_added": 5}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(subscription): get plans for subscription This pull request introduces a new API endpoint for retrieving subscription plans and the supporting plumbing required for it. The changes include new request/response types, authentication and expiry logic, and routing updates to expose the endpoint. The main themes are new subscription plan retrieval functionality and related codebase integration. **Subscription Plan Retrieval Functionality** * Added a new API endpoint `/subscription/plans/{client_secret}` to fetch available subscription plans, including routing and handler logic in `app.rs` and `subscription.rs`. [[1]](diffhunk://#diff-a6e49b399ffdee83dd322b3cb8bee170c65fb9c6e2e52c14222ec310f6927c54L1176-R1186) [[2]](diffhunk://#diff-d737ada25c830476b3867c693bd362d4b1142773f1b0d971556518b5c04691a3R70-R105) * Implemented the `get_subscription_plans` function in `core/subscription.rs`, which authenticates the client secret, fetches the relevant subscription, and integrates with connector services to retrieve plans. * Introduced helper functions in `core/utils/subscription.rs` for authenticating client secrets and constructing router data for connector calls. **Type and Model Updates** * Added new request and response types for subscription plan retrieval, including `GetPlansResponse` and `GetSubscriptionPlansRequest` with appropriate traits and serialization. [[1]](diffhunk://#diff-3d85d9e288cc67856867986ee406a3102ce1d0cf9fe5c8f9efed3a578608f817R108-R117) [[2]](diffhunk://#diff-8eb3ff11b17aa944306848a821a22486cbad862e5100916531fdcee5a6718636L26-R26) **Routing and Flow Integration** * Updated flow enums and routing logic to support the new subscription plans flow, ensuring correct API identifier mapping and logging. [[1]](diffhunk://#diff-f57d3f577ce7478b78b53d715f35fe97acd4f02ef2043738f053a15100a13ba5R268-R269) [[2]](diffhunk://#diff-0034b07e0697eb780f74742326da73d1e85183054d879fe55143a0ab39c0ee99L93-R93) **Module Organization** * Registered the new `subscription` module under `core/utils.rs` for better code organization.## Type of Change ### 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)? --> 1. Create charge-bee mca 2. Create subscription ``` curl --location 'http://localhost:8080/subscription/create' \ --header 'Content-Type: application/json' \ --header 'X-Profile-Id: pro_dQr2rAikRT2xWZr7R1QL' \ --header 'api-key: dev_wSnWYnMrVFSJ0N25i99QT08Jmx1WBurtbuDl3Ks0XQ1RQn3URdM4UntOenSPHHmT' \ --data '{ "customer_id": "cus_jtJ8WHTHnsguskpiorEt" }' ``` 3. update db (subscription table) with the mca_id ``` UPDATE subscription SET merchant_connector_id = 'mca_QRvgtteGBG6Ip2g1gKtD' WHERE id = 'subscription_vFcn0H8kSTU9bE3Khe05'; ``` 4. Get plans(with client_secret) ``` curl --location 'http://localhost:8080/subscription/plans' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_Ske75Nx2J7qtHsP8cc7pFx5k4dccYBedM6UAExaLOdHCkji3uVWSqfmZ0Qz0Tnyj' \ --header 'X-Profile-Id: pro_2WzEeiNyj8fSCObXqo36' ``` Response: ``` [ { "plan_id": "cbdemo_enterprise-suite", "name": "Enterprise Suite", "description": "High-end customer support suite with enterprise-grade solutions.", "price_id": [ { "price_id": "cbdemo_enterprise-suite-monthly", "plan_id": "cbdemo_enterprise-suite", "amount": 14100, "currency": "INR", "interval": "Month", "interval_count": 1, "trial_period": null, "trial_period_unit": null }, { "price_id": "cbdemo_enterprise-suite-annual", "plan_id": "cbdemo_enterprise-suite", "amount": 169000, "currency": "INR", "interval": "Year", "interval_count": 1, "trial_period": null, "trial_period_unit": null } ] }, { "plan_id": "cbdemo_business-suite", "name": "Business Suite", "description": "Advanced customer support plan with premium features.", "price_id": [ { "price_id": "cbdemo_business-suite-monthly", "plan_id": "cbdemo_business-suite", "amount": 9600, "currency": "INR", "interval": "Month", "interval_count": 1, "trial_period": null, "trial_period_unit": null }, { "price_id": "cbdemo_business-suite-annual", "plan_id": "cbdemo_business-suite", "amount": 115000, "currency": "INR", "interval": "Year", "interval_count": 1, "trial_period": null, "trial_period_unit": null } ] }, { "plan_id": "cbdemo_professional-suite", "name": "Professional Suite", "description": "Comprehensive customer support plan with extended capabilities.", "price_id": [ { "price_id": "cbdemo_professional-suite-monthly", "plan_id": "cbdemo_professional-suite", "amount": 4600, "currency": "INR", "interval": "Month", "interval_count": 1, "trial_period": null, "trial_period_unit": null }, { "price_id": "cbdemo_professional-suite-annual", "plan_id": "cbdemo_professional-suite", "amount": 55000, "currency": "INR", "interval": "Year", "interval_count": 1, "trial_period": null, "trial_period_unit": null } ] }, { "plan_id": "cbdemo_essential-support", "name": "Essential Support", "description": "Basic customer support plan with core features.", "price_id": [ { "price_id": "cbdemo_essential-support-monthly", "plan_id": "cbdemo_essential-support", "amount": 1600, "currency": "INR", "interval": "Month", "interval_count": 1, "trial_period": null, "trial_period_unit": null }, { "price_id": "cbdemo_essential-support-annual", "plan_id": "cbdemo_essential-support", "amount": 19000, "currency": "INR", "interval": "Year", "interval_count": 1, "trial_period": null, "trial_period_unit": null } ] } ] ``` 5. Get plans(without client_secret) ``` curl --location 'http://localhost:8080/subscription/plans?subscription_id=subscription_CLjJKIwjKlhuHk1BNOWc' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_UknLiMdqzEcVS5XJiJLqY3kfRT7WznSlbGYkV9kVHGy9GLHmNlNWJxGCEGrljHwt' ``` Response: ``` [ { "plan_id": "cbdemo_enterprise-suite", "name": "Enterprise Suite", "description": "High-end customer support suite with enterprise-grade solutions." }, { "plan_id": "cbdemo_business-suite", "name": "Business Suite", "description": "Advanced customer support plan with premium features." }, { "plan_id": "cbdemo_professional-suite", "name": "Professional Suite", "description": "Comprehensive customer support plan with extended capabilities." }, { "plan_id": "cbdemo_essential-support", "name": "Essential Support", "description": "Basic customer support plan with core features." } ] ``` Subscriptions create - ``` curl --location 'http://localhost:8080/subscriptions/create' \ --header 'Content-Type: application/json' \ --header 'X-Profile-Id: pro_2WzEeiNyj8fSCObXqo36' \ --header 'api-key: dev_Ske75Nx2J7qtHsP8cc7pFx5k4dccYBedM6UAExaLOdHCkji3uVWSqfmZ0Qz0Tnyj' \ --data '{ "customer_id": "cus_zppXAwRyRF6yXH5PEqJd", "amount": 14100, "currency": "USD", "payment_details": { "authentication_type": "no_three_ds", "setup_future_usage": "off_session", "capture_method": "automatic", "return_url": "https://google.com" } }' ``` Response - ``` {"id":"sub_uIILXUeoPUSzKzl67wyE","merchant_reference_id":null,"status":"created","plan_id":null,"price_id":null,"coupon":null,"profile_id":"pro_2WzEeiNyj8fSCObXqo36","payment":{"payment_id":"pay_niPeSIobMcl8Du4mkYce","status":"requires_payment_method","amount":14100,"currency":"USD","connector":null,"payment_method_id":null,"payment_experience":null,"error_code":null,"error_message":null,"payment_method_type":null,"client_secret":"pay_niPeSIobMcl8Du4mkYce_secret_mdzBqY9TeWppcvjJLIEu"},"customer_id":"cus_zppXAwRyRF6yXH5PEqJd","invoice":{"id":"invoice_FJEWqTVRZUgfzfAoowLi","subscription_id":"sub_uIILXUeoPUSzKzl67wyE","merchant_id":"merchant_1758626894","profile_id":"pro_2WzEeiNyj8fSCObXqo36","merchant_connector_id":"mca_eN6JxSK2NkuT0wSYAH5s","payment_intent_id":"pay_niPeSIobMcl8Du4mkYce","payment_method_id":null,"customer_id":"cus_zppXAwRyRF6yXH5PEqJd","amount":14100,"currency":"USD","status":"invoice_created"},"billing_processor_subscription_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 **payment** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/subscription.rs` **2. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/lib.rs` - `crates/hyperswitch_domain_models/src/router_request_types/subscriptions.rs` - `crates/hyperswitch_domain_models/src/router_response_types/subscriptions.rs` - ... and 1 more files **3. Core Business Logic** - `crates/router/src/core/subscription.rs` - `crates/router/src/core/subscription/billing_processor_handler.rs` - `crates/router/src/core/subscription/subscription_handler.rs` **4. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/chargebee.rs` - `crates/hyperswitch_connectors/src/connectors/chargebee/transformers.rs` **5. Type Definitions** - `crates/router_env/src/logger/types.rs` **6. Utils** - `crates/router/src/routes/lock_utils.rs` **7. Other** - `crates/router/src/routes/app.rs` - `crates/router/src/routes/subscription.rs` - `crates/router/src/workflows/invoice_sync.rs` **Code Patterns Applied:** - Define new data structures (5 changes) - Implement new functions (19 changes) - Extend existing types with new fields (65 changes) - Add conditional logic for feature flags or filtering (3 changes) **Detailed Identifier Changes:** Commit b3beda7d: Files to modify: **crates/api_models/src/subscription.rs** Add: - function: pub::new - function: pub::as_str - struct: pub::GetPlansResponse - struct: pub::SubscriptionPlanPrices - struct: pub::ClientSecret - struct: pub::GetPlansQuery - enum: pub::PeriodUnit - impl: impl ClientSecret - impl: impl ApiEventMetric for GetPlansQuery - impl: impl ApiEventMetric for GetPlansResponse **crates/hyperswitch_connectors/src/connectors/chargebee.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/chargebee/transformers.rs** Modify existing code **crates/hyperswitch_domain_models/src/lib.rs** Add: - mod: pub::subscription **crates/hyperswitch_domain_models/src/router_request_types/subscriptions.rs** Add: - function: pub::new - function: private::default - impl: impl GetSubscriptionPlansRequest - impl: impl Default for GetSubscriptionPlansRequest **crates/hyperswitch_domain_models/src/router_response_types/subscriptions.rs** Add: - function: private::from - function: private::from - impl: impl From<SubscriptionPlanPrices> for api_models::subscription::SubscriptionPlanPrices - impl: impl From<PeriodUnit> for api_models::subscription::PeriodUnit **crates/hyperswitch_domain_models/src/subscription.rs** Add: - function: pub::new - function: pub::get_subscription_id - function: private::fmt - function: private::from - function: private::from - struct: pub::ClientSecret - impl: impl ClientSecret - impl: impl std::fmt::Display for ClientSecret - impl: impl ApiEventMetric for ClientSecret - impl: impl From<api_models::subscription::ClientSecret> for ClientSecret - impl: impl From<ClientSecret> for api_models::subscription::ClientSecret **crates/router/src/core/subscription.rs** Modify existing code **crates/router/src/core/subscription/billing_processor_handler.rs** Add: - function: pub::get_subscription_plans - function: pub::get_subscription_plan_prices **crates/router/src/core/subscription/subscription_handler.rs** Add: - function: pub::find_and_validate_subscription - function: pub::validate_client_secret **crates/router/src/routes/app.rs** Modify existing code **crates/router/src/routes/lock_utils.rs** Modify existing code **crates/router/src/routes/subscription.rs** Add: - function: pub::get_subscription_plans **crates/router/src/workflows/invoice_sync.rs** Modify existing code **crates/router_env/src/logger/types.rs** Modify existing code
{"pr_number": 9251, "pr_title": "feat(subscription): get plans for subscription", "merged_at": "2025-10-07T09:07:33Z", "intent": {"feature_type": "payment", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/subscription.rs"], "domain": ["crates/hyperswitch_domain_models/src/lib.rs", "crates/hyperswitch_domain_models/src/router_request_types/subscriptions.rs", "crates/hyperswitch_domain_models/src/router_response_types/subscriptions.rs", "crates/hyperswitch_domain_models/src/subscription.rs"], "core_business": ["crates/router/src/core/subscription.rs", "crates/router/src/core/subscription/billing_processor_handler.rs", "crates/router/src/core/subscription/subscription_handler.rs"], "connectors": ["crates/hyperswitch_connectors/src/connectors/chargebee.rs", "crates/hyperswitch_connectors/src/connectors/chargebee/transformers.rs"], "types": ["crates/router_env/src/logger/types.rs"], "utils": ["crates/router/src/routes/lock_utils.rs"], "other": ["crates/router/src/routes/app.rs", "crates/router/src/routes/subscription.rs", "crates/router/src/workflows/invoice_sync.rs"]}, "change_types": {"structs_added": 5, "functions_added": 19, "enums_added": 1, "fields_added": 65, "imports_added": 5, "conditionals_added": 3}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
chore(injector): removing changes for injector check of proxy and certificate ## 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 --> removing changes for injector check of proxy and certificate ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR 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 it in UCS ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Other** - `crates/injector/src/vault_metadata.rs` **Detailed Identifier Changes:** Commit 56447525: Files to modify: **crates/injector/src/vault_metadata.rs** Remove: - function: private::validate_proxy_url - function: private::validate_certificate - impl: impl VgsMetadata
{"pr_number": 9373, "pr_title": "chore(injector): removing changes for injector check of proxy and certificate", "merged_at": "2025-09-16T10:09:16Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"other": ["crates/injector/src/vault_metadata.rs"]}, "change_types": {}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
ci(postman): map assertions for `Sofort` using `Stripe` Payment Processor ## 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 --> ### Summary of Changes Simply, Removed the Sofort TestCase for Stripe, nothing else. And, because of this had to make some name changes. _And the Errors showing up in the Screenshot labelled as After is not due to 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). --> The Postman Test Cases for `Sofort` using `Stripe` are failing because `Sofort` has been deprecated. ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> **Before** <img width="1058" alt="image" src="https://github.com/user-attachments/assets/4aa5f40d-6ce1-4c08-a807-e985816237f6" /> **After** <!-- img width="493" alt="image" src="https://github.com/user-attachments/assets/63c6dbf8-d1ec-4770-8743-10dbc9a8259d" / --> ![image](https://github.com/user-attachments/assets/dd26e322-d6c5-4f56-90ff-a768eb7e7813) ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Tests** - `postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario17-Bank Redirect-eps/Payments - Confirm/event.test.js` - `postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario16-Bank Redirect-sofort/Payments - Create/event.test.js` - `postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario17-Bank Redirect-eps/Payments - Retrieve/event.test.js` - ... and 63 more files **2. Other** - `postman/collection-dir/stripe/Flow Testcases/Happy Cases/.meta.json` - `postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario16-Bank Redirect-sofort/.meta.json` - `postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario16-Bank Redirect-sofort/Payments - Confirm/.event.meta.json` - ... and 208 more files
{"pr_number": 7849, "pr_title": "ci(postman): map assertions for `Sofort` using `Stripe` Payment Processor", "merged_at": "2025-04-25T14:07:23Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user"]}, "hierarchy": {"tests": ["postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario17-Bank Redirect-eps/Payments - Confirm/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario16-Bank Redirect-sofort/Payments - Create/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario17-Bank Redirect-eps/Payments - Retrieve/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario16-Bank Redirect-sofort/Payments - Confirm/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario16-Bank Redirect-sofort/Payments - Retrieve/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario18-Bank Transfer-ach/Payments - Confirm/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario17-Bank Redirect-eps/Payments - Create/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario18-Bank Transfer-ach/Payments - Retrieve/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario19-Bank Debit-ach/Payments - Create/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario19-Bank Debit-ach/Payments - Retrieve/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario20-Wallet-Wechatpay/Payments - Confirm/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario18-Bank Transfer-ach/Payments - Create/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario20-Wallet-Wechatpay/Payments - Retrieve/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario21- Update address and List Payment method/List Payment Methods for a Merchant-copy/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario21- Update address and List Payment method/List Payment Methods for a Merchant/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario21- Update address and List Payment method/Payments - Confirm/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario21- Update address and List Payment method/Payments - Create/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario21- Update address and List Payment method/Payments - Retrieve/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario21- Update address and List Payment method/Payments - Update/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario22- Update Amount/Payments - Confirm/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario22- Update Amount/Payments - Create/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario22- Update Amount/Payments - Retrieve/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario22- Update Amount/Payments - Update/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario23-Add card flow/List payment methods for a Customer/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario23-Add card flow/Payments - Create/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario23-Add card flow/Payments - Retrieve/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario23-Add card flow/Refunds - Create Copy/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario23-Add card flow/Refunds - Retrieve/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario23-Add card flow/Save card payments - Confirm/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario23-Add card flow/Save card payments - Create/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario24-Don't Pass CVV for save card flow and verifysuccess payment/List payment methods for a Customer/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario24-Don't Pass CVV for save card flow and verifysuccess payment/Payments - Create/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario24-Don't Pass CVV for save card flow and verifysuccess payment/Save card payments - Confirm/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario24-Don't Pass CVV for save card flow and verifysuccess payment/Save card payments - Create/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario25-Save card payment with manual capture/List payment methods for a Customer/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario25-Save card payment with manual capture/Payments - Capture/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario25-Save card payment with manual capture/Payments - Create/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario25-Save card payment with manual capture/Payments - Retrieve-copy/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario25-Save card payment with manual capture/Payments - Retrieve/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario25-Save card payment with manual capture/Refunds - Create Copy/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario25-Save card payment with manual capture/Refunds - Retrieve Copy/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario25-Save card payment with manual capture/Save card payments - Confirm/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario25-Save card payment with manual capture/Save card payments - Create/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario26-Create payment without customer_id and with billing address and shipping address/Payments - Create/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario26-Create payment without customer_id and with billing address and shipping address/Payments - Retrieve/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario27-Confirm a payment with requires_customer_action status/Payments - Confirm/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario27-Confirm a payment with requires_customer_action status/Payments - Create with confirm true/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment with payment method billing/Payments - Create/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment with payment method billing/Payments - Retrieve/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario29-Update payment with payment method billing/Payments - Create/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario29-Update payment with payment method billing/Payments - Retrieve/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario29-Update payment with payment method billing/Payments - Update/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario30-Pass payment method billing in Confirm/Payments - Confirm/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario20-Wallet-Wechatpay/Payments - Create/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario30-Pass payment method billing in Confirm/Payments - Retrieve/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario31-Ensure API Contract for Payment Method Data/Payments - Card Payment Method Invalid Card CVC/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario31-Ensure API Contract for Payment Method Data/Payments - Card Payment Method Invalid Card Number/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario31-Ensure API Contract for Payment Method Data/Payments - Card Payment Method Invalid Expiry month/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario31-Ensure API Contract for Payment Method Data/Payments - Card Payment Method Invalid Expiry year/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario31-Ensure API Contract for Payment Method Data/Payments - Card Payment Method Success/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario31-Ensure API Contract for Payment Method Data/Payments - Reward Payment Method/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario30-Pass payment method billing in Confirm/Payments - Create/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario32-Check is payment checks are populated/Payments - cvv check fails/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario32-Check is payment checks are populated/Payments - payment check populated for successful payment without billing/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario32-Check is payment checks are populated/Payments - postal code check fail/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario32-Check is payment checks are populated/Payments - successful payment with billing/event.test.js"], "other": ["postman/collection-dir/stripe/Flow Testcases/Happy Cases/.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario16-Bank Redirect-sofort/.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario16-Bank Redirect-sofort/Payments - Confirm/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario16-Bank Redirect-sofort/Payments - Confirm/event.prerequest.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario17-Bank Redirect-eps/Payments - Confirm/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario16-Bank Redirect-sofort/Payments - Confirm/response.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario16-Bank Redirect-sofort/Payments - Create/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario17-Bank Redirect-eps/Payments - Create/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario16-Bank Redirect-sofort/Payments - Create/response.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario16-Bank Redirect-sofort/Payments - Retrieve/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario16-Bank Redirect-sofort/Payments - Retrieve/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario16-Bank Redirect-sofort/Payments - Retrieve/response.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario16-Bank Redirect-sofort/Payments - Confirm/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario16-Bank Redirect-sofort/Payments - Create/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario17-Bank Redirect-eps/.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario17-Bank Redirect-eps/Payments - Confirm/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario17-Bank Redirect-eps/Payments - Confirm/event.prerequest.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario18-Bank Transfer-ach/Payments - Confirm/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario17-Bank Redirect-eps/Payments - Confirm/response.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario17-Bank Redirect-eps/Payments - Create/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario18-Bank Transfer-ach/Payments - Create/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario17-Bank Redirect-eps/Payments - Create/response.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario17-Bank Redirect-eps/Payments - Retrieve/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario17-Bank Redirect-eps/Payments - Retrieve/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario17-Bank Redirect-eps/Payments - Retrieve/response.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario19-Bank Debit-ach/.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario19-Bank Debit-ach/Payments - Create/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario18-Bank Transfer-ach/Payments - Confirm/event.prerequest.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario19-Bank Debit-ach/Payments - Create/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario18-Bank Transfer-ach/Payments - Confirm/response.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario19-Bank Debit-ach/Payments - Retrieve/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario19-Bank Debit-ach/Payments - Retrieve/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario18-Bank Transfer-ach/Payments - Create/response.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario18-Bank Transfer-ach/Payments - Confirm/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario18-Bank Transfer-ach/.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario20-Wallet-Wechatpay/Payments - Confirm/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario19-Bank Debit-ach/Payments - Create/event.prerequest.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario20-Wallet-Wechatpay/Payments - Confirm/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario18-Bank Transfer-ach/Payments - Retrieve/response.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario20-Wallet-Wechatpay/Payments - Create/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario20-Wallet-Wechatpay/Payments - Create/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario19-Bank Debit-ach/Payments - Create/response.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario20-Wallet-Wechatpay/Payments - Retrieve/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario20-Wallet-Wechatpay/Payments - Retrieve/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario19-Bank Debit-ach/Payments - Retrieve/response.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario21- Update address and List Payment method/.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario21- Update address and List Payment method/List Payment Methods for a Merchant-copy/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario21- Update address and List Payment method/List Payment Methods for a Merchant-copy/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario20-Wallet-Wechatpay/Payments - Confirm/response.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario21- Update address and List Payment method/List Payment Methods for a Merchant/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario21- Update address and List Payment method/List Payment Methods for a Merchant/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario20-Wallet-Wechatpay/Payments - Create/response.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario21- Update address and List Payment method/Payments - Confirm/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario21- Update address and List Payment method/Payments - Confirm/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario20-Wallet-Wechatpay/Payments - Retrieve/response.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario21- Update address and List Payment method/Payments - Create/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario21- Update address and List Payment method/Payments - Create/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario21- Update address and List Payment method/List Payment Methods for a Merchant-copy/response.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario21- Update address and List Payment method/Payments - Retrieve/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario21- Update address and List Payment method/Payments - Retrieve/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario21- Update address and List Payment method/List Payment Methods for a Merchant/response.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario21- Update address and List Payment method/Payments - Update/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario21- Update address and List Payment method/Payments - Update/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario21- Update address and List Payment method/Payments - Confirm/response.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario22- Update Amount/.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario22- Update Amount/Payments - Confirm/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario22- Update Amount/Payments - Confirm/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario21- Update address and List Payment method/Payments - Create/response.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario22- Update Amount/Payments - Create/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario22- Update Amount/Payments - Create/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario21- Update address and List Payment method/Payments - Retrieve/response.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario22- Update Amount/Payments - Retrieve/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario22- Update Amount/Payments - Retrieve/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario21- Update address and List Payment method/Payments - Update/response.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario22- Update Amount/Payments - Update/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario22- Update Amount/Payments - Update/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario22- Update Amount/Payments - Confirm/response.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario23-Add card flow/.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario23-Add card flow/List payment methods for a Customer/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario23-Add card flow/List payment methods for a Customer/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario22- Update Amount/Payments - Create/response.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario23-Add card flow/Payments - Create/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario23-Add card flow/Payments - Create/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario22- Update Amount/Payments - Retrieve/response.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario23-Add card flow/Payments - Retrieve/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario23-Add card flow/Payments - Retrieve/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario22- Update Amount/Payments - Update/response.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario23-Add card flow/Refunds - Create Copy/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario23-Add card flow/Refunds - Create Copy/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario23-Add card flow/List payment methods for a Customer/response.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario23-Add card flow/Refunds - Retrieve/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario23-Add card flow/Refunds - Retrieve/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario23-Add card flow/Payments - Create/response.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario23-Add card flow/Save card payments - Confirm/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario23-Add card flow/Save card payments - Confirm/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario23-Add card flow/Payments - Retrieve/response.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario23-Add card flow/Save card payments - Create/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario23-Add card flow/Save card payments - Create/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario23-Add card flow/Refunds - Create Copy/response.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario24-Don't Pass CVV for save card flow and verifysuccess payment/.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario24-Don't Pass CVV for save card flow and verifysuccess payment/List payment methods for a Customer/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario24-Don't Pass CVV for save card flow and verifysuccess payment/List payment methods for a Customer/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario23-Add card flow/Refunds - Retrieve/response.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario24-Don't Pass CVV for save card flow and verifysuccess payment/Payments - Create/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario24-Don't Pass CVV for save card flow and verifysuccess payment/Payments - Create/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario23-Add card flow/Save card payments - Confirm/response.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario24-Don't Pass CVV for save card flow and verifysuccess payment/Save card payments - Confirm/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario24-Don't Pass CVV for save card flow and verifysuccess payment/Save card payments - Confirm/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario23-Add card flow/Save card payments - Create/response.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario24-Don't Pass CVV for save card flow and verifysuccess payment/Save card payments - Create/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario24-Don't Pass CVV for save card flow and verifysuccess payment/Save card payments - Create/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario24-Don't Pass CVV for save card flow and verifysuccess payment/List payment methods for a Customer/response.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario25-Save card payment with manual capture/.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario25-Save card payment with manual capture/List payment methods for a Customer/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario25-Save card payment with manual capture/List payment methods for a Customer/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario24-Don't Pass CVV for save card flow and verifysuccess payment/Payments - Create/response.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario25-Save card payment with manual capture/Payments - Capture/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario25-Save card payment with manual capture/Payments - Capture/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario24-Don't Pass CVV for save card flow and verifysuccess payment/Save card payments - Confirm/response.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario25-Save card payment with manual capture/Payments - Create/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario25-Save card payment with manual capture/Payments - Create/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario24-Don't Pass CVV for save card flow and verifysuccess payment/Save card payments - Create/response.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario25-Save card payment with manual capture/Payments - Retrieve-copy/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario25-Save card payment with manual capture/Payments - Retrieve-copy/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario25-Save card payment with manual capture/List payment methods for a Customer/response.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario25-Save card payment with manual capture/Payments - Retrieve/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario25-Save card payment with manual capture/Payments - Retrieve/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario25-Save card payment with manual capture/Payments - Capture/response.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario25-Save card payment with manual capture/Refunds - Create Copy/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario25-Save card payment with manual capture/Refunds - Create Copy/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario25-Save card payment with manual capture/Payments - Create/response.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario25-Save card payment with manual capture/Refunds - Retrieve Copy/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario25-Save card payment with manual capture/Refunds - Retrieve Copy/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario25-Save card payment with manual capture/Payments - Retrieve-copy/response.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario25-Save card payment with manual capture/Save card payments - Confirm/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario25-Save card payment with manual capture/Save card payments - Confirm/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario25-Save card payment with manual capture/Payments - Retrieve/response.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario25-Save card payment with manual capture/Save card payments - Create/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario25-Save card payment with manual capture/Save card payments - Create/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario25-Save card payment with manual capture/Refunds - Create Copy/response.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario26-Create payment without customer_id and with billing address and shipping address/.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario26-Create payment without customer_id and with billing address and shipping address/Payments - Create/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario26-Create payment without customer_id and with billing address and shipping address/Payments - Create/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario25-Save card payment with manual capture/Refunds - Retrieve Copy/response.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario26-Create payment without customer_id and with billing address and shipping address/Payments - Retrieve/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario26-Create payment without customer_id and with billing address and shipping address/Payments - Retrieve/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario25-Save card payment with manual capture/Save card payments - Confirm/response.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario27-Confirm a payment with requires_customer_action status/.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario18-Bank Transfer-ach/Payments - Create/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario27-Confirm a payment with requires_customer_action status/Payments - Confirm/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario25-Save card payment with manual capture/Save card payments - Create/response.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario18-Bank Transfer-ach/Payments - Retrieve/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario27-Confirm a payment with requires_customer_action status/Payments - Create with confirm true/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario26-Create payment without customer_id and with billing address and shipping address/Payments - Create/response.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment with payment method billing/.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario27-Confirm a payment with requires_customer_action status/Payments - Confirm/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment with payment method billing/Payments - Create/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario26-Create payment without customer_id and with billing address and shipping address/Payments - Retrieve/response.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario27-Confirm a payment with requires_customer_action status/Payments - Create with confirm true/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario18-Bank Transfer-ach/Payments - Retrieve/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario27-Confirm a payment with requires_customer_action status/Payments - Confirm/response.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario29-Update payment with payment method billing/.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment with payment method billing/Payments - Create/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario29-Update payment with payment method billing/Payments - Create/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario27-Confirm a payment with requires_customer_action status/Payments - Create with confirm true/response.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment with payment method billing/Payments - Retrieve/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment with payment method billing/Payments - Retrieve/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment with payment method billing/Payments - Create/response.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario29-Update payment with payment method billing/Payments - Create/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario29-Update payment with payment method billing/Payments - Update/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment with payment method billing/Payments - Retrieve/response.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario20-Wallet-Wechatpay/.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario30-Pass payment method billing in Confirm/Payments - Confirm/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario20-Wallet-Wechatpay/Payments - Confirm/event.prerequest.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario30-Pass payment method billing in Confirm/Payments - Confirm/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario29-Update payment with payment method billing/Payments - Create/response.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario30-Pass payment method billing in Confirm/Payments - Create/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario30-Pass payment method billing in Confirm/Payments - Confirm/event.prerequest.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario30-Pass payment method billing in Confirm/Payments - Create/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario29-Update payment with payment method billing/Payments - Retrieve/response.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario30-Pass payment method billing in Confirm/Payments - Retrieve/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario30-Pass payment method billing in Confirm/Payments - Retrieve/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario29-Update payment with payment method billing/Payments - Update/response.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario29-Update payment with payment method billing/Payments - Retrieve/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario29-Update payment with payment method billing/Payments - Retrieve/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario29-Update payment with payment method billing/Payments - Update/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario31-Ensure API Contract for Payment Method Data/Payments - Card Payment Method Invalid Card CVC/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario31-Ensure API Contract for Payment Method Data/Payments - Card Payment Method Invalid Card CVC/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario31-Ensure API Contract for Payment Method Data/Payments - Card Payment Method Invalid Card Number/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario31-Ensure API Contract for Payment Method Data/Payments - Card Payment Method Invalid Card Number/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario31-Ensure API Contract for Payment Method Data/Payments - Card Payment Method Invalid Expiry month/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario31-Ensure API Contract for Payment Method Data/Payments - Card Payment Method Invalid Expiry month/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario31-Ensure API Contract for Payment Method Data/Payments - Card Payment Method Invalid Expiry year/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario31-Ensure API Contract for Payment Method Data/Payments - Card Payment Method Invalid Expiry year/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario31-Ensure API Contract for Payment Method Data/Payments - Card Payment Method Success/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario31-Ensure API Contract for Payment Method Data/Payments - Card Payment Method Success/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario31-Ensure API Contract for Payment Method Data/Payments - Reward Payment Method/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario31-Ensure API Contract for Payment Method Data/Payments - Reward Payment Method/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario30-Pass payment method billing in Confirm/.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario30-Pass payment method billing in Confirm/Payments - Confirm/response.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario30-Pass payment method billing in Confirm/Payments - Create/event.prerequest.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario30-Pass payment method billing in Confirm/Payments - Create/response.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario30-Pass payment method billing in Confirm/Payments - Retrieve/response.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario32-Check is payment checks are populated/Payments - cvv check fails/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario32-Check is payment checks are populated/Payments - cvv check fails/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario32-Check is payment checks are populated/Payments - payment check populated for successful payment without billing/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario32-Check is payment checks are populated/Payments - payment check populated for successful payment without billing/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario32-Check is payment checks are populated/Payments - postal code check fail/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario32-Check is payment checks are populated/Payments - postal code check fail/request.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario32-Check is payment checks are populated/Payments - successful payment with billing/.event.meta.json", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario32-Check is payment checks are populated/Payments - successful payment with billing/request.json"]}, "change_types": {}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
fix(webhooks): mask custom outgoing webhook headers in profile response ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Mask custom outgoing webhook headers in profile response. This changes is required to mask the custom outgoing webhook headers in the profile dashboard. This also requires control center changes, BE changes will only be merged and deployed after dashboard changes. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Test Case 1 : Profile create ``` curl --location 'http://localhost:8080/account/merchant_1733900220/business_profile' \ --header 'Content-Type: application/json' \ --header 'api-key: ••••••' \ --data-raw '{ "profile_name" : "test_profile1", "webhook_details": { "webhook_url": "https://webhook.site/672f0697-9e14-4a49-abef-b15769c19962", "webhook_version": "1.0.1", "webhook_username": "ekart_retail", "webhook_password": "password_ekart@123", "payment_created_enabled": true, "payment_succeeded_enabled": true, "payment_failed_enabled": true }, "outgoing_webhook_custom_http_headers": { "authentication": "this is test key header", "test_key": "asd", "client_key": "asdkfjhakdjh" } }' ``` Response ``` { "merchant_id": "merchant_1733900220", "profile_id": "pro_nvV4ljCmGfPnUiRbjjMW", "profile_name": "test_profile1", "return_url": "https://google.com/success", "enable_payment_response_hash": true, "payment_response_hash_key": "IurVIL6k065SRjO2TWHcx6cf2mQCWO1SKf1tep6AZ79XBFBcLJFvsfpZ3JWRkxHy", "redirect_to_merchant_with_http_post": false, "webhook_details": { "webhook_version": "1.0.1", "webhook_username": "ekart_retail", "webhook_password": "password_ekart@123", "webhook_url": "https://webhook.site/672f0697-9e14-4a49-abef-b15769c19962", "payment_created_enabled": true, "payment_succeeded_enabled": true, "payment_failed_enabled": true }, "metadata": null, "routing_algorithm": null, "intent_fulfillment_time": 900, "frm_routing_algorithm": null, "payout_routing_algorithm": null, "applepay_verified_domains": null, "session_expiry": 900, "payment_link_config": null, "authentication_connector_details": null, "use_billing_as_payment_method_billing": true, "extended_card_info_config": null, "collect_shipping_details_from_wallet_connector": false, "collect_billing_details_from_wallet_connector": false, "always_collect_shipping_details_from_wallet_connector": false, "always_collect_billing_details_from_wallet_connector": false, "is_connector_agnostic_mit_enabled": false, "payout_link_config": null, "outgoing_webhook_custom_http_headers": { "authentication": "th*******************er", "test_key": "***", "client_key": "as********jh" }, "tax_connector_id": null, "is_tax_connector_enabled": false, "is_network_tokenization_enabled": false, "is_auto_retries_enabled": false, "max_auto_retries_enabled": null, "is_click_to_pay_enabled": false } ``` Profile update request ``` curl --location 'http://localhost:8080/account/merchant_1733900220/business_profile/pro_nvV4ljCmGfPnUiRbjjMW' \ --header 'Content-Type: application/json' \ --header 'api-key: ••••••' \ --data '{ "profile_name" : "test_profile1", "outgoing_webhook_custom_http_headers": { "changed_key" : "changed_value" } }' ``` response should have masked webhook headers ``` { "merchant_id": "merchant_1733900220", "profile_id": "pro_nvV4ljCmGfPnUiRbjjMW", "profile_name": "test_profile1", "return_url": "https://google.com/success", "enable_payment_response_hash": true, "payment_response_hash_key": "IurVIL6k065SRjO2TWHcx6cf2mQCWO1SKf1tep6AZ79XBFBcLJFvsfpZ3JWRkxHy", "redirect_to_merchant_with_http_post": false, "webhook_details": { "webhook_version": "1.0.1", "webhook_username": "ekart_retail", "webhook_password": "password_ekart@123", "webhook_url": "https://webhook.site/672f0697-9e14-4a49-abef-b15769c19962", "payment_created_enabled": true, "payment_succeeded_enabled": true, "payment_failed_enabled": true }, "metadata": null, "routing_algorithm": null, "intent_fulfillment_time": 900, "frm_routing_algorithm": null, "payout_routing_algorithm": null, "applepay_verified_domains": null, "session_expiry": 900, "payment_link_config": null, "authentication_connector_details": null, "use_billing_as_payment_method_billing": true, "extended_card_info_config": null, "collect_shipping_details_from_wallet_connector": false, "collect_billing_details_from_wallet_connector": false, "always_collect_shipping_details_from_wallet_connector": false, "always_collect_billing_details_from_wallet_connector": false, "is_connector_agnostic_mit_enabled": false, "payout_link_config": null, "outgoing_webhook_custom_http_headers": { "changed_key": "ch*********ue" }, "tax_connector_id": null, "is_tax_connector_enabled": false, "is_network_tokenization_enabled": false, "is_auto_retries_enabled": false, "max_auto_retries_enabled": null, "is_click_to_pay_enabled": false } ``` Payment webhooks : ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept-Language: zh' \ --header 'api-key: dev_e3cBS20M6B2YB0ec2fDQTbGMUQjfRpNSP6PSko2AC9plc57huvPLb70dLndryRMG' \ --data-raw '{ "amount": 700, "currency": "USD", "confirm": true, "payment_link": false, "capture_on": "2029-09-10T10:11:12Z", "amount_to_capture": 700, "name": "John Doe", "phone": "999999999", "email" :"example@gmail.com", "phone_country_code": "+1", "description": "Its my first payment request", "authentication_type": "no_three_ds", "return_url": "https://google.com", "payment_method_data": { "card": { "card_number": "4917610000000000", "card_exp_month": "03", "card_exp_year": "30", "card_cvc": "737" }, "billing": { "address": { "line1": "1467", "line2": "CA", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US" } } }, "payment_method": "card", "payment_method_type": "credit", "profile_id": "pro_Os8bvIiwq7rz0XESi190", "browser_info": { "color_depth": 24, "java_enabled": true, "java_script_enabled": true, "language": "en-GB", "screen_height": 720, "screen_width": 1280, "time_zone": -330, "ip_address": "208.127.127.193", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0" }, "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" }, "payment_link_config_id":"key2", "order_details": [ { "product_name": "Tea", "quantity": 1, "amount": 110, "product_img_link": "https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg" }, { "product_name": "Tea", "quantity": 1, "amount": 110, "product_img_link": "https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg" }, { "product_name": "Tea", "quantity": 1, "amount": 110, "product_img_link": "https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg" } ] } ' ``` custom headerss of out going webhook will have non masked headers . <img width="1698" alt="Screenshot 2024-12-11 at 12 38 16 PM" src="https://github.com/user-attachments/assets/949cd502-1d24-47c6-a051-e9102267e4ca"> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/admin.rs` **2. Type Definitions** - `crates/router/src/types/api/admin.rs` **Code Patterns Applied:** - Define new data structures (1 changes) - Implement new functions (2 changes) - Extend existing types with new fields (6 changes) - Add conditional logic for feature flags or filtering (1 changes) **Detailed Identifier Changes:** Commit 6f2ac77b: Files to modify: **crates/api_models/src/admin.rs** Add: - function: private::mask_value - function: pub::from_headers - struct: pub::MaskedHeaders - impl: impl MaskedHeaders **crates/router/src/types/api/admin.rs** Modify existing code
{"pr_number": 6826, "pr_title": "fix(webhooks): mask custom outgoing webhook headers in profile response", "merged_at": "2024-12-12T12:56:51Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/admin.rs"], "types": ["crates/router/src/types/api/admin.rs"]}, "change_types": {"structs_added": 1, "functions_added": 2, "fields_added": 6, "imports_added": 1, "conditionals_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(vsaas): enable creating v2 merchant accounts in platform organization ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Previously, in platform organization, there was support for creating v1 merchant accounts only. This PR enables creating v2 merchant accounts of merchant_account_type `Standard` in the Platform Organization through the dashboard (using JWT authentication). A default platform merchant is created when the platform organization is created. Adding support to create `Standard` V2 merchant accounts in the platform organization. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> Allow creation of v2 merchant accounts via the dashboard. ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ### Create Platform Organization: ```bash curl --location 'http://localhost:8080/user/create_platform' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiMGEwNWQyOWEtNmQ2ZC00MjQxLTk1YzItNzA1MTAzNjE0Mjc3IiwibWVyY2hhbnRfaWQiOiJyZXZlbnVlX3JlY292ZXJ5X2V2YndjbHlvaXpfUk9lVTVWdlJ1YkZxeVRETERnZTciLCJyb2xlX2lkIjoib3JnX2FkbWluIiwiZXhwIjoxNzU0MjI4ODQ0LCJvcmdfaWQiOiJvcmdfV1N3M3VYWWJtdGZESFR6Y3Q4SGYiLCJwcm9maWxlX2lkIjoicHJvXzRFUEtzVEdlYmNEMXNBN1E3bGltIiwidGVuYW50X2lkIjoicHVibGljIn0.8QxVCiQAuVD5Y7Sd8RGkAQNe8RsgxEPLWHs_Hb22k2A' \ --data '{ "organization_name": "Platform Org" }' ``` Response: ```json { "org_id": "org_aGk0QGLCsjp7h5zJn0m9", "org_name": "Platform Org", "org_type": "platform", "merchant_id": "merchant_1754056099", "merchant_account_type": "platform" } ``` ### Create v2 Merchant Account ```bash curl --location 'http://localhost:8081/v2/user/create_merchant' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiMGEwNWQyOWEtNmQ2ZC00MjQxLTk1YzItNzA1MTAzNjE0Mjc3IiwibWVyY2hhbnRfaWQiOiJtZXJjaGFudF8xNzU0MDU2MDk5Iiwicm9sZV9pZCI6Im9yZ19hZG1pbiIsImV4cCI6MTc1NDIyODkxMiwib3JnX2lkIjoib3JnX2FHazBRR0xDc2pwN2g1ekpuMG05IiwicHJvZmlsZV9pZCI6InByb19vQ2VPOVhwOWlvU3Y0R3dSM1h6SCIsInRlbmFudF9pZCI6InB1YmxpYyJ9.FmSuOH8xoEg7Ojsj0i-ikr910JtWgppHHF9MhRQxj5s' \ --data '{ "company_name": "Revenue Test Merchant", "product_type": "recovery" } ' ``` Response: ```json { "merchant_id": "revenuetestmerchant_bP770ihUPHmE4RFFFQcb", "merchant_name": "Revenue Test Merchant", "product_type": "recovery", "merchant_account_type": "standard", "version": "v2" } ``` Should be able to create v2 merchants in platform organization now. <img width="1696" height="884" alt="image" src="https://github.com/user-attachments/assets/43449232-3d80-4f5b-871a-7f9ca50f0571" /> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Core Business Logic** - `crates/router/src/core/admin.rs` **Detailed Identifier Changes:** Commit ecd7366d: Files to modify: **crates/router/src/core/admin.rs** Modify existing code
{"pr_number": 8823, "pr_title": "feat(vsaas): enable creating v2 merchant accounts in platform organization", "merged_at": "2025-08-03T14:21:25Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["merchant", "user"]}, "hierarchy": {"core_business": ["crates/router/src/core/admin.rs"]}, "change_types": {}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(payment-link): emit intent status to parent before rendering payment link UI ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Hotfix for https://github.com/juspay/hyperswitch/pull/7531 ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding 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 merchants take action for requires_customer_action state in case user re-renders the link for the mentioned intent status. ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/payments.rs` **2. Core Business Logic** - `crates/router/src/core/payment_link.rs` - `crates/router/src/core/payment_link/payment_link_initiate/payment_link.js` - `crates/router/src/core/payment_link/payment_link_status/status.css` - ... and 2 more files **Code Patterns Applied:** - Extend existing types with new fields (7 changes) - Add conditional logic for feature flags or filtering (10 changes) **Detailed Identifier Changes:** Commit d6f25976: Files to modify: **crates/api_models/src/payments.rs** Modify existing code **crates/router/src/core/payment_link.rs** Modify existing code
{"pr_number": 7571, "pr_title": "feat(payment-link): emit intent status to parent before rendering payment link UI", "merged_at": "2025-03-19T12:57:07Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "merchant", "user"]}, "hierarchy": {"api_models": ["crates/api_models/src/payments.rs"], "core_business": ["crates/router/src/core/payment_link.rs", "crates/router/src/core/payment_link/payment_link_initiate/payment_link.js", "crates/router/src/core/payment_link/payment_link_status/status.css", "crates/router/src/core/payment_link/payment_link_status/status.html", "crates/router/src/core/payment_link/payment_link_status/status.js"]}, "change_types": {"fields_added": 7, "conditionals_added": 10}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(core): [NETWORK TOKENIZATION] Check Network Token Status API ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Create an API for Network Token Status Check. API Doc: [doc](https://docs.google.com/document/d/1MZoq2C9NsZYBhvfqwVb3nPPTtufBlE1FE41r2MARc9Y/edit?tab=t.0) Curl: ``` curl --location 'http://localhost:8080/v2/payment-methods/12345_pm_019959146f92737389eb6927ce1eb7dc/check-network-token-status' \ --header 'X-Profile-Id: pro_wK6tlmyhh3I77DGoKn8T' \ --header 'Authorization: api-key=abc' ``` Response: ``` { "status": "ACTIVE", "token_expiry_month": "12", "token_expiry_year": "2026", "card_last_four": "1234", "token_last_four": "0787", "card_expiry": "08/2031" "payment_method_id": "12345_pm_019959146f92737389eb6927ce1eb7dc", "customer_id": "12345_cus_0195dc62bb8e7312a44484536da76aef", } ``` ### Additional Changes - [x] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> 1. Org create: ``` curl --location 'http://localhost:8080/v2/organizations' \ --header 'x-tenant-id: public' \ --header 'Content-Type: application/json' \ --header 'Authorization: admin-api-key=abc' \ --data '{ "organization_name": "random_org_1760089742" }' ``` 2. Merchant acc create: ``` curl --location 'http://localhost:8080/v2/merchant-accounts' \ --header 'x-organization-id: org_8iFFpg2ubrmxMLVJm1Mp' \ --header 'Content-Type: application/json' \ --header 'Authorization: admin-api-key=abc' \ --data '{ "merchant_name": "cloth_seller" }' ``` 3. Api key create: ``` curl --location 'http://localhost:8080/v2/api-keys' \ --header 'x-merchant-id: cloth_seller_H2lsUdao9NxSZkkNU59l' \ --header 'x-tenant-id: public' \ --header 'Content-Type: application/json' \ --header 'Authorization: admin-api-key=abc' \ --data '{ "name": "My Api Key", "expiration": "never" }' ``` 4. Business Pro create: ``` curl --location 'http://localhost:8080/v2/profiles' \ --header 'x-merchant-id: cloth_seller_H2lsUdao9NxSZkkNU59l' \ --header 'Content-Type: application/json' \ --header 'Authorization: admin-api-key=abc' \ --data-raw '{ "profile_name": "business", "return_url": "https://google.com/success", "enable_payment_response_hash": true, "redirect_to_merchant_with_http_post": false, "webhook_details": { "webhook_version": "1.0.1", "webhook_username": "ekart_retail", "webhook_password": "", "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 }' ``` 5. Enable `is_network_tokenization_enabled` 6. Customer create: ``` curl --location 'http://localhost:8080/v2/customers' \ --header 'x-profile-id: pro_x79KlTkaZMxhoo7p2j45' \ --header 'Content-Type: application/json' \ --header 'Authorization: api-key=dev_ZpgOf8dUQfC0YsyePy0VYJMfeR7awmRuc10CyB5lNUdCf4c3US1057TQXebNx8Ru' \ --data-raw '{ "merchant_reference_id": "customer_1760089918", "name": "John Doe", "email": "guest@example.com", "phone": "999999999", "phone_country_code": "+65", "description": "First customer", "default_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" }, "default_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" }, "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } }' ``` 7. MCA create: ``` curl --location 'http://localhost:8080/v2/connector-accounts' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'x-merchant-id: cloth_seller_H2lsUdao9NxSZkkNU59l' \ --header 'x-profile-id: pro_x79KlTkaZMxhoo7p2j45' \ --header 'Authorization: admin-api-key=test_admin' \ --data '{ "connector_type": "payment_processor", "connector_name": "adyen", "connector_account_details": { "auth_type": "BodyKey", "api_key": "abc", "key1" : "abc", "api_secret": "abc" }, "payment_methods_enabled": [ { "payment_method_type": "upi", "payment_method_subtypes": [ { "payment_method_subtype": "upi_collect", "payment_experience": "redirect_to_url", "card_networks": null, "accepted_currencies": { "type" : "enable_only", "list": ["INR"] }, "accepted_countries": { "type" : "enable_only", "list": ["IN"] }, "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true } ] }, { "payment_method_type": "card", "payment_method_subtypes": [ { "payment_method_subtype": "credit", "payment_experience": null, "card_networks": [ "Visa", "Mastercard" ], "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_subtype": "debit", "payment_experience": null, "card_networks": [ "Visa", "Mastercard" ], "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true } ] }, { "payment_method_type": "wallet", "payment_method_subtypes": [ { "payment_method_subtype": "google_pay", "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_subtype": "apple_pay", "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_subtype": "we_chat_pay", "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_subtype": "ali_pay", "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_subtype": "paypal", "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_subtype": "mb_way", "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": "pay_later", "payment_method_subtypes": [ { "payment_method_subtype": "klarna", "payment_experience": "redirect_to_url", "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_subtype": "affirm", "payment_experience": "redirect_to_url", "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_subtype": "afterpay_clearpay", "payment_experience": "redirect_to_url", "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_subtype": "walley", "payment_experience": "redirect_to_url", "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true } ] }, { "payment_method_type": "bank_redirect", "payment_method_subtypes": [ { "payment_method_subtype": "giropay", "payment_experience": "redirect_to_url", "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_subtype": "ideal", "payment_experience": "redirect_to_url", "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_subtype": "eps", "payment_experience": "redirect_to_url", "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_subtype": "bancontact_card", "payment_experience": "redirect_to_url", "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_subtype": "przelewy24", "payment_experience": "redirect_to_url", "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_subtype": "sofort", "payment_experience": "redirect_to_url", "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_subtype": "blik", "payment_experience": "redirect_to_url", "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_subtype": "trustly", "payment_experience": "redirect_to_url", "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_subtype": "online_banking_finland", "payment_experience": "redirect_to_url", "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_subtype": "online_banking_poland", "payment_experience": "redirect_to_url", "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true } ] }, { "payment_method_type": "bank_transfer", "payment_method_subtypes": [ { "payment_method_subtype": "ach", "payment_experience": "redirect_to_url", "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_subtype": "sepa", "payment_experience": "redirect_to_url", "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_subtype": "bacs", "payment_experience": "redirect_to_url", "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true } ] }, { "payment_method_type": "bank_debit", "payment_method_subtypes": [ { "payment_method_subtype": "ach", "payment_experience": null, "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_subtype": "sepa", "payment_experience": null, "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_subtype": "bacs", "payment_experience": null, "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_subtype": "becs", "payment_experience": null, "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true } ] } ], "metadata": { "status_url": "", "account_name": "transaction_processing", "pricing_type": "fixed_price", "acquirer_bin": "438309", "acquirer_merchant_id": "00002000000" }, "frm_configs": null, "connector_webhook_details": { "merchant_secret": "" }, "profile_id": "pro_x79KlTkaZMxhoo7p2j45" }' ``` 8. Payment Methods create intent: ``` curl --location 'http://localhost:8080/v2/payment-methods/create-intent' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'X-Profile-Id: pro_x79KlTkaZMxhoo7p2j45' \ --header 'Authorization: api-key=dev_ZpgOf8dUQfC0YsyePy0VYJMfeR7awmRuc10CyB5lNUdCf4c3US1057TQXebNx8Ru' \ --data '{ "customer_id": "12345_cus_0199cd88ba357b6088a48b7f536b2a21" }' ``` 9. Payments Create: ``` curl --location 'http://localhost:8080/v2/payments' \ --header 'x-profile-id: pro_x79KlTkaZMxhoo7p2j45' \ --header 'x-merchant-id: cloth_seller_H2lsUdao9NxSZkkNU59l' \ --header 'Content-Type: application/json' \ --header 'Authorization: api-key=dev_ZpgOf8dUQfC0YsyePy0VYJMfeR7awmRuc10CyB5lNUdCf4c3US1057TQXebNx8Ru' \ --data '{ "amount_details": { "currency": "USD", "order_amount": 5000 }, "merchant_connector_details": { "connector_name": "adyen", "merchant_connector_creds": { "auth_type": "SignatureKey", "api_key": "abc", "key1": "abc", "api_secret": "abc" } }, "setup_future_usage": "off_session", "customer_id": "12345_cus_0199cd88ba357b6088a48b7f536b2a21", "payment_method_data": { "card": { "card_number": "3569990010095841", "card_exp_month": "03", "card_exp_year": "30", "card_holder_name": "John Doe", "card_cvc": "737" } }, "payment_method_type": "card", "payment_method_subtype": "credit", "payment_method_id": "12345_pm_0199cda1d7d77022a73bf14c423e8da9", "merchant_reference_id": "12345_pay_01970c787911760091869", "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" } }' ``` 10. Check token status: ``` curl --location 'http://localhost:8080/v2/payment-methods/12345_pm_019959146f92737389eb6927ce1eb7dc/check-network-token-status' \ --header 'X-Profile-Id: pro_wK6tlmyhh3I77DGoKn8T' \ --header 'Authorization: api-key=abc' ``` ## Checklist <!-- Put 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` - `crates/api_models/src/payment_methods.rs` **2. Core Business Logic** - `crates/router/src/core/payment_methods.rs` - `crates/router/src/core/payment_methods/network_tokenization.rs` **3. Type Definitions** - `crates/router/src/types/payment_methods.rs` - `crates/router_env/src/logger/types.rs` **4. Utils** - `crates/router/src/routes/lock_utils.rs` **5. Other** - `api-reference/docs.json` - `api-reference/v2/openapi_spec_v2.json` - `crates/openapi/src/openapi_v2.rs` - ... and 3 more files **Code Patterns Applied:** - Define new data structures (3 changes) - Implement new functions (5 changes) - Extend existing types with new fields (41 changes) - Add conditional logic for feature flags or filtering (2 changes) **Detailed Identifier Changes:** Commit d9d4b2e5: Files to modify: **crates/api_models/src/enums.rs** Add: - enum: pub::TokenStatus **crates/api_models/src/payment_methods.rs** Add: - struct: pub::NetworkTokenStatusCheckSuccessResponse - struct: pub::NetworkTokenStatusCheckFailureResponse - enum: pub::NetworkTokenStatusCheckResponse - impl: impl common_utils::events::ApiEventMetric for NetworkTokenStatusCheckResponse **crates/openapi/src/openapi_v2.rs** Modify existing code **crates/openapi/src/routes/payment_method.rs** Add: - function: pub::network_token_status_check_api **crates/router/src/core/payment_methods.rs** Add: - function: private::fetch_payment_method - function: pub::check_network_token_status **crates/router/src/core/payment_methods/network_tokenization.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/payment_methods.rs** Add: - function: pub::network_token_status_check_api **crates/router/src/types/payment_methods.rs** Remove: - struct: pub::CheckTokenStatusResponsePayload - struct: pub::CheckTokenStatusResponse Add: - struct: pub::CheckTokenStatusResponse **crates/router_env/src/logger/types.rs** Modify existing code
{"pr_number": 9443, "pr_title": "feat(core): [NETWORK TOKENIZATION] Check Network Token Status API", "merged_at": "2025-10-10T12:36:56Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/enums.rs", "crates/api_models/src/payment_methods.rs"], "core_business": ["crates/router/src/core/payment_methods.rs", "crates/router/src/core/payment_methods/network_tokenization.rs"], "types": ["crates/router/src/types/payment_methods.rs", "crates/router_env/src/logger/types.rs"], "utils": ["crates/router/src/routes/lock_utils.rs"], "other": ["api-reference/docs.json", "api-reference/v2/openapi_spec_v2.json", "crates/openapi/src/openapi_v2.rs", "crates/openapi/src/routes/payment_method.rs", "crates/router/src/routes/app.rs", "crates/router/src/routes/payment_methods.rs"]}, "change_types": {"structs_added": 3, "functions_added": 5, "enums_added": 2, "fields_added": 41, "conditionals_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(payment_method): update entity id used for Vault to global customer 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 --> Currently, if payment method data is inserted in vault for customer c1, merchant id is being sent as entity id, this will not allow us to store same payment method data for customer c2. Payment Method data is always tied to customer, not to merchant. Hence updated entity id to Global customer id ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> test case - - create a payment method with 4242 card for a customer c1 - create new payment method with 4242 card for a customer c2 Both api should return 200 Initially for a diff customer under same merchant, api is returning duplication error. with this fix, the api should return 2xx ``` curl --location 'http://localhost:8080/v2/payment-methods' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'X-Profile-Id: profile id' \ --header 'Authorization: api-key=api key' \ --data '{ "customer_id": "12345_cus_0197ca90d3797040985aceb3da929431", "payment_method_type": "card", "payment_method_subtype": "credit", "payment_method_data": { "card": { "card_number": "card_number", "card_exp_month": "12", "card_exp_year": "2026", "card_holder_name": "joseph Doe" } }, "network_tokenization":{ "enable":"Enable" } }' ``` ## 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` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Core Business Logic** - `crates/router/src/core/payment_methods.rs` - `crates/router/src/core/payment_methods/vault.rs` - `crates/router/src/core/proxy.rs` - ... and 2 more files **2. Type Definitions** - `crates/router/src/types/domain.rs` - `crates/router/src/types/payment_methods.rs` **Code Patterns Applied:** - Implement new functions (4 changes) - Extend existing types with new fields (23 changes) **Detailed Identifier Changes:** Commit cf96c826: Files to modify: **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/proxy.rs** Modify existing code **crates/router/src/core/proxy/utils.rs** Add: - function: pub::get_proxy_record - function: pub::get_vault_id - function: pub::get_customer_id - enum: pub::ProxyRecord - impl: impl ProxyRecord **crates/router/src/core/tokenization.rs** Modify existing code **crates/router/src/types/domain.rs** Add: - mod: pub::tokenization **crates/router/src/types/payment_methods.rs** Modify existing code
{"pr_number": 8380, "pr_title": "fix(payment_method): update entity id used for Vault to global customer id", "merged_at": "2025-07-08T17:49:54Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"core_business": ["crates/router/src/core/payment_methods.rs", "crates/router/src/core/payment_methods/vault.rs", "crates/router/src/core/proxy.rs", "crates/router/src/core/proxy/utils.rs", "crates/router/src/core/tokenization.rs"], "types": ["crates/router/src/types/domain.rs", "crates/router/src/types/payment_methods.rs"]}, "change_types": {"functions_added": 4, "enums_added": 1, "fields_added": 23}, "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 ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR 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 5e7e0d82: Files to modify: **crates/router/src/core/payments/flows/session_flow.rs** Modify existing code
{"pr_number": 7365, "pr_title": "fix(core): make parsing optional for connector_wallet_details in session token flow", "merged_at": "2025-02-25T08:27:55Z", "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"}
chore(injector): injector change for proxy ## Type of Change <!-- Put an `x` in the boxes that apply --> Making changes for proxy url extraction and certificate changes for proxy flow. - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This is PR is fixing the external vault proxy URL addition to the request being sent to the PSP/Internet, which is being used in the connector-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). --> Fixing connection timeout in proxy flow ## How did you test 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: ```bash grpcurl -plaintext \ -H 'x-connector: adyen' \ -H 'x-auth: signature-key' \ -H 'x-external-vault-metadata: VAULT_HEADER' \ -H 'x-api-key: API_KEY' \ -H 'x-key1: KEY_1' \ -H 'x-api-secret: SECRET' \ -H 'x-merchant-id: MERCHANT_ID' \ -H 'x-tenant-id: TENANT_ID' \ -d '{ "request_ref_id": { "id": "ref_1234" }, "amount": 1000, "currency": "USD", "payment_method": { "card": { "credit_proxy": { "card_number": { "value": "TOKEN" }, "card_exp_month": { "value": "03" }, "card_exp_year": { "value": "2030" }, "card_cvc": { "value": "CVC" }, "card_network": "VISA" } } }, "connector_customer_id": "abc123", "return_url": "www.google.com", "capture_method": "1", "address": {}, "auth_type": "NO_THREE_DS", "enrolled_for_3ds": true, "request_incremental_authorization": false, "minor_amount": 1000, "browser_info": { "language": "en-US", "color_depth": 24, "screen_height": 1080, "screen_width": 1920, "java_enabled": false } }' localhost:8000 ucs.v2.PaymentService/Authorize ``` Response: ```json { "transactionId": { "id": "ID" }, "status": "CHARGED", "networkTxnId": "NETWORK_TXN_ID", "responseRefId": { "id": "ref_1234" }, "rawConnectorResponse": "********", "statusCode": 200, "responseHeaders": { "cache-control": "no-cache, no-store, private, must-revalidate, max-age=0", "content-length": "1668", "content-type": "application/json;charset=UTF-8", "date": "Sat, 20 Sep 2025 12:27:30 GMT", "expires": "0", "strict-transport-security": "max-age=31536000; includeSubDomains", "vgs-request-id": "e96735cc47783228cf8ec26571553a10", "vgs-upstream-status-code": "200", "via": "1.1 proxy", "x-content-type-options": "nosniff", "x-frame-options": "SAMEORIGIN" } } ``` ## 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. Type Definitions** - `crates/injector/src/types.rs` **2. Other** - `crates/injector/src/injector.rs` - `crates/injector/src/vault_metadata.rs` **Code Patterns Applied:** - Extend existing types with new fields (8 changes) - Add conditional logic for feature flags or filtering (2 changes) **Detailed Identifier Changes:** Commit 97d034a2: Files to modify: **crates/injector/src/injector.rs** Modify existing code **crates/injector/src/types.rs** Modify existing code **crates/injector/src/vault_metadata.rs** Modify existing code
{"pr_number": 9460, "pr_title": "chore(injector): injector change for proxy", "merged_at": "2025-09-23T19:41:28Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"types": ["crates/injector/src/types.rs"], "other": ["crates/injector/src/injector.rs", "crates/injector/src/vault_metadata.rs"]}, "change_types": {"fields_added": 8, "imports_added": 2, "conditionals_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(router): [worldpayvantiv] add support for moto flag for v1 and extend vantiv api contract ## 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 --> In this PR 1. Add support for moto flag : A type field called payment_channel will be accepted in the payment request optionally. This field can have one of `ecommerce`, `mail_order`, `telephone_order`. This flag is stored in the paymentIntent and sent to the connector in the authorization flow. 2. Add optional shipping address to the payment request 3. Add support for 0 dollar authorization 4. Extend the response of Vantiv to deserialize FraudSight Results 5. Add Avs and Cvv result in the response ``` "payment_checks": { "avs_result": "00", "advanced_a_v_s_result": null, "authentication_result": null, "card_validation_result": "U" }, ``` ## How did you test 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>Test moto with Payment create + confirm </summary> Create a payment ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_UXwpmZ1gXNkuqIpAVIDAVFDTWgVOLM78eAalxmizaJK4apdD2DyeD8JpnJDVFq52' \ --data '{ "amount": 1000, "currency": "USD", "capture_method": "automatic", "billing": { "address": { "city": "Riverside", "state": "RI", "zip": "02915", "country": "US", "first_name": "Mike", "last_name": "J. Hammer" } }, "payment_channel": "mail_order" }' ``` Response ``` {"payment_id":"pay_K1PdysmtvIUhPOLldVIC","merchant_id":"postman_merchant_GHAction_22031607-342f-4579-84c9-a660616ee489","status":"requires_payment_method","amount":1000,"net_amount":1000,"shipping_cost":null,"amount_capturable":1000,"amount_received":null,"connector":null,"client_secret":"pay_K1PdysmtvIUhPOLldVIC_secret_ExvWwgaoQwdlfC5gxCQe","created":"2025-07-30T11:18:44.704Z","currency":"USD","customer_id":null,"customer":null,"description":null,"refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":null,"off_session":null,"capture_on":null,"capture_method":"automatic","payment_method":null,"payment_method_data":null,"payment_token":null,"shipping":null,"billing":{"address":{"city":"Riverside","country":"US","line1":null,"line2":null,"line3":null,"zip":"02915","state":"RI","first_name":"Mike","last_name":"J. Hammer"},"phone":null,"email":null},"order_details":null,"email":null,"name":null,"phone":null,"return_url":null,"authentication_type":null,"statement_descriptor_name":null,"statement_descriptor_suffix":null,"next_action":null,"cancellation_reason":null,"error_code":null,"error_message":null,"unified_code":null,"unified_message":null,"payment_experience":null,"payment_method_type":null,"connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":null,"manual_retry_allowed":null,"connector_transaction_id":null,"frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":null,"payment_link":null,"profile_id":"pro_YMqK5k5J3XPj5RaCrmNN","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":null,"incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-07-30T11:33:44.704Z","fingerprint":null,"browser_info":null,"payment_channel":"mail_order","payment_method_id":null,"payment_method_status":null,"updated":"2025-07-30T11:18:44.801Z","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} ``` Confirm the payment ``` curl --location 'http://localhost:8080/payments/pay_K1PdysmtvIUhPOLldVIC/confirm' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: pk_dev_6ea63505e309482cbc5df098d484ccfe' \ --data '{ "client_secret": "pay_K1PdysmtvIUhPOLldVIC_secret_ExvWwgaoQwdlfC5gxCQe" ,"payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4111111111111111", "card_exp_month": "11", "card_exp_year": "50", "card_cvc": "987", "card_network":"Visa" } } }' ``` Response ``` {"payment_id":"pay_K1PdysmtvIUhPOLldVIC","merchant_id":"postman_merchant_GHAction_22031607-342f-4579-84c9-a660616ee489","status":"processing","amount":1000,"net_amount":1000,"shipping_cost":null,"amount_capturable":0,"amount_received":null,"connector":"worldpayvantiv","client_secret":"pay_K1PdysmtvIUhPOLldVIC_secret_ExvWwgaoQwdlfC5gxCQe","created":"2025-07-30T11:18:44.704Z","currency":"USD","customer_id":null,"customer":null,"description":null,"refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":null,"off_session":null,"capture_on":null,"capture_method":"automatic","payment_method":"card","payment_method_data":{"card":{"last4":"1111","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"411111","card_extended_bin":null,"card_exp_month":"11","card_exp_year":"50","card_holder_name":null,"payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":null,"billing":{"address":{"city":"Riverside","country":"US","line1":null,"line2":null,"line3":null,"zip":"02915","state":"RI","first_name":"Mike","last_name":"J. Hammer"},"phone":null,"email":null},"order_details":null,"email":null,"name":null,"phone":null,"return_url":null,"authentication_type":"no_three_ds","statement_descriptor_name":null,"statement_descriptor_suffix":null,"next_action":null,"cancellation_reason":null,"error_code":null,"error_message":null,"unified_code":null,"unified_message":null,"payment_experience":null,"payment_method_type":"credit","connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":null,"manual_retry_allowed":false,"connector_transaction_id":"83997308262365024","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"pay_K1PdysmtvIUhPOLldVIC_1","payment_link":null,"profile_id":"pro_YMqK5k5J3XPj5RaCrmNN","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_Qv5TMsyNVO9D3JbkOwjz","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-07-30T11:33:44.704Z","fingerprint":null,"browser_info":{"os_type":null,"language":null,"time_zone":null,"ip_address":"::1","os_version":null,"user_agent":null,"color_depth":null,"device_model":null,"java_enabled":null,"screen_width":null,"accept_header":null,"screen_height":null,"accept_language":"en","java_script_enabled":null},"payment_channel":"mail_order","payment_method_id":null,"payment_method_status":null,"updated":"2025-07-30T11:20:52.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":"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} ``` Psync ``` {"payment_id":"pay_K1PdysmtvIUhPOLldVIC","merchant_id":"postman_merchant_GHAction_22031607-342f-4579-84c9-a660616ee489","status":"succeeded","amount":1000,"net_amount":1000,"shipping_cost":null,"amount_capturable":0,"amount_received":1000,"connector":"worldpayvantiv","client_secret":"pay_K1PdysmtvIUhPOLldVIC_secret_ExvWwgaoQwdlfC5gxCQe","created":"2025-07-30T11:18:44.704Z","currency":"USD","customer_id":null,"customer":null,"description":null,"refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":null,"off_session":null,"capture_on":null,"capture_method":"automatic","payment_method":"card","payment_method_data":{"card":{"last4":"1111","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"411111","card_extended_bin":null,"card_exp_month":"11","card_exp_year":"50","card_holder_name":null,"payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":null,"billing":{"address":{"city":"Riverside","country":"US","line1":null,"line2":null,"line3":null,"zip":"02915","state":"RI","first_name":"Mike","last_name":"J. Hammer"},"phone":null,"email":null},"order_details":null,"email":null,"name":null,"phone":null,"return_url":null,"authentication_type":"no_three_ds","statement_descriptor_name":null,"statement_descriptor_suffix":null,"next_action":null,"cancellation_reason":null,"error_code":null,"error_message":null,"unified_code":null,"unified_message":null,"payment_experience":null,"payment_method_type":"credit","connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":null,"manual_retry_allowed":false,"connector_transaction_id":"83997308262365024","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"pay_K1PdysmtvIUhPOLldVIC_1","payment_link":null,"profile_id":"pro_YMqK5k5J3XPj5RaCrmNN","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_Qv5TMsyNVO9D3JbkOwjz","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-07-30T11:33:44.704Z","fingerprint":null,"browser_info":{"os_type":null,"language":null,"time_zone":null,"ip_address":"::1","os_version":null,"user_agent":null,"color_depth":null,"device_model":null,"java_enabled":null,"screen_width":null,"accept_header":null,"screen_height":null,"accept_language":"en","java_script_enabled":null},"payment_channel":"mail_order","payment_method_id":null,"payment_method_status":null,"updated":"2025-07-30T11:21:54.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} ``` </details> <details> <summary>Test Moto with update payment </summary> Create a payment with confirm false ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_UXwpmZ1gXNkuqIpAVIDAVFDTWgVOLM78eAalxmizaJK4apdD2DyeD8JpnJDVFq52' \ --data '{ "amount": 1000, "currency": "USD", "capture_method": "automatic", "billing": { "address": { "city": "Riverside", "state": "RI", "zip": "02915", "country": "US", "first_name": "Mike", "last_name": "J. Hammer" } } }' ``` Response ``` {"payment_id":"pay_M2Kjx50xM7uFmM80nPaZ","merchant_id":"postman_merchant_GHAction_22031607-342f-4579-84c9-a660616ee489","status":"requires_payment_method","amount":1000,"net_amount":1000,"shipping_cost":null,"amount_capturable":1000,"amount_received":null,"connector":null,"client_secret":"pay_M2Kjx50xM7uFmM80nPaZ_secret_yxyefgSY2ZDS1y6yszsr","created":"2025-07-30T11:30:51.074Z","currency":"USD","customer_id":null,"customer":null,"description":null,"refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":null,"off_session":null,"capture_on":null,"capture_method":"automatic","payment_method":null,"payment_method_data":null,"payment_token":null,"shipping":null,"billing":{"address":{"city":"Riverside","country":"US","line1":null,"line2":null,"line3":null,"zip":"02915","state":"RI","first_name":"Mike","last_name":"J. Hammer"},"phone":null,"email":null},"order_details":null,"email":null,"name":null,"phone":null,"return_url":null,"authentication_type":null,"statement_descriptor_name":null,"statement_descriptor_suffix":null,"next_action":null,"cancellation_reason":null,"error_code":null,"error_message":null,"unified_code":null,"unified_message":null,"payment_experience":null,"payment_method_type":null,"connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":null,"manual_retry_allowed":null,"connector_transaction_id":null,"frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":null,"payment_link":null,"profile_id":"pro_YMqK5k5J3XPj5RaCrmNN","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":null,"incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-07-30T11:45:51.074Z","fingerprint":null,"browser_info":null,"payment_channel":null,"payment_method_id":null,"payment_method_status":null,"updated":"2025-07-30T11:30:51.135Z","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} ``` Update call ``` curl --location 'http://localhost:8080/payments/pay_M2Kjx50xM7uFmM80nPaZ' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'client_secret: VJ6J79R8Y87A6W670E4X_secret_p6b8S0zWY4qUOmYLuFcp' \ --header 'api-key: dev_UXwpmZ1gXNkuqIpAVIDAVFDTWgVOLM78eAalxmizaJK4apdD2DyeD8JpnJDVFq52' \ --data '{ "client_secret": "pay_M2Kjx50xM7uFmM80nPaZ_secret_yxyefgSY2ZDS1y6yszsr", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4111111111111111", "card_exp_month": "11", "card_exp_year": "50", "card_cvc": "987", "card_network":"Visa" } }, "payment_channel": "telephone_order" }' ``` Response ``` {"payment_id":"pay_M2Kjx50xM7uFmM80nPaZ","merchant_id":"postman_merchant_GHAction_22031607-342f-4579-84c9-a660616ee489","status":"requires_confirmation","amount":1000,"net_amount":1000,"shipping_cost":null,"amount_capturable":1000,"amount_received":null,"connector":null,"client_secret":"pay_M2Kjx50xM7uFmM80nPaZ_secret_yxyefgSY2ZDS1y6yszsr","created":"2025-07-30T11:30:51.074Z","currency":"USD","customer_id":null,"customer":null,"description":null,"refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":null,"off_session":null,"capture_on":null,"capture_method":"automatic","payment_method":"card","payment_method_data":{"card":{"last4":"1111","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"411111","card_extended_bin":null,"card_exp_month":"11","card_exp_year":"50","card_holder_name":null,"payment_checks":null,"authentication_data":null},"billing":null},"payment_token":"token_Fl3SFafy4MJq1EAGYwzh","shipping":null,"billing":{"address":{"city":"Riverside","country":"US","line1":null,"line2":null,"line3":null,"zip":"02915","state":"RI","first_name":"Mike","last_name":"J. Hammer"},"phone":null,"email":null},"order_details":null,"email":null,"name":null,"phone":null,"return_url":null,"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":"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_YMqK5k5J3XPj5RaCrmNN","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":null,"incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-07-30T11:45:51.074Z","fingerprint":null,"browser_info":null,"payment_channel":"telephone_order","payment_method_id":null,"payment_method_status":null,"updated":"2025-07-30T11:32:15.776Z","split_payments":null,"frm_metadata":null,"extended_authorization_applied":null,"capture_before":null,"merchant_order_reference_id":null,"order_tax_amount":null,"connector_mandate_id":null,"card_discovery":null,"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} ``` Confirm ``` {"payment_id":"pay_M2Kjx50xM7uFmM80nPaZ","merchant_id":"postman_merchant_GHAction_22031607-342f-4579-84c9-a660616ee489","status":"processing","amount":1000,"net_amount":1000,"shipping_cost":null,"amount_capturable":0,"amount_received":null,"connector":"worldpayvantiv","client_secret":"pay_M2Kjx50xM7uFmM80nPaZ_secret_yxyefgSY2ZDS1y6yszsr","created":"2025-07-30T11:30:51.074Z","currency":"USD","customer_id":null,"customer":null,"description":null,"refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":null,"off_session":null,"capture_on":null,"capture_method":"automatic","payment_method":"card","payment_method_data":{"card":{"last4":"1111","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"411111","card_extended_bin":null,"card_exp_month":"11","card_exp_year":"50","card_holder_name":null,"payment_checks":null,"authentication_data":null},"billing":null},"payment_token":"token_Fl3SFafy4MJq1EAGYwzh","shipping":null,"billing":{"address":{"city":"Riverside","country":"US","line1":null,"line2":null,"line3":null,"zip":"02915","state":"RI","first_name":"Mike","last_name":"J. Hammer"},"phone":null,"email":null},"order_details":null,"email":null,"name":null,"phone":null,"return_url":null,"authentication_type":"no_three_ds","statement_descriptor_name":null,"statement_descriptor_suffix":null,"next_action":null,"cancellation_reason":null,"error_code":null,"error_message":null,"unified_code":null,"unified_message":null,"payment_experience":null,"payment_method_type":"credit","connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":null,"manual_retry_allowed":false,"connector_transaction_id":"83997308262383738","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"pay_M2Kjx50xM7uFmM80nPaZ_1","payment_link":null,"profile_id":"pro_YMqK5k5J3XPj5RaCrmNN","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_Qv5TMsyNVO9D3JbkOwjz","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-07-30T11:45:51.074Z","fingerprint":null,"browser_info":{"os_type":null,"language":null,"time_zone":null,"ip_address":"::1","os_version":null,"user_agent":null,"color_depth":null,"device_model":null,"java_enabled":null,"screen_width":null,"accept_header":null,"screen_height":null,"accept_language":"en","java_script_enabled":null},"payment_channel":"telephone_order","payment_method_id":null,"payment_method_status":null,"updated":"2025-07-30T11:33:42.611Z","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} ``` Psync ``` {"payment_id":"pay_M2Kjx50xM7uFmM80nPaZ","merchant_id":"postman_merchant_GHAction_22031607-342f-4579-84c9-a660616ee489","status":"succeeded","amount":1000,"net_amount":1000,"shipping_cost":null,"amount_capturable":0,"amount_received":1000,"connector":"worldpayvantiv","client_secret":"pay_M2Kjx50xM7uFmM80nPaZ_secret_yxyefgSY2ZDS1y6yszsr","created":"2025-07-30T11:30:51.074Z","currency":"USD","customer_id":null,"customer":null,"description":null,"refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":null,"off_session":null,"capture_on":null,"capture_method":"automatic","payment_method":"card","payment_method_data":{"card":{"last4":"1111","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"411111","card_extended_bin":null,"card_exp_month":"11","card_exp_year":"50","card_holder_name":null,"payment_checks":null,"authentication_data":null},"billing":null},"payment_token":"token_Fl3SFafy4MJq1EAGYwzh","shipping":null,"billing":{"address":{"city":"Riverside","country":"US","line1":null,"line2":null,"line3":null,"zip":"02915","state":"RI","first_name":"Mike","last_name":"J. Hammer"},"phone":null,"email":null},"order_details":null,"email":null,"name":null,"phone":null,"return_url":null,"authentication_type":"no_three_ds","statement_descriptor_name":null,"statement_descriptor_suffix":null,"next_action":null,"cancellation_reason":null,"error_code":null,"error_message":null,"unified_code":null,"unified_message":null,"payment_experience":null,"payment_method_type":"credit","connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":null,"manual_retry_allowed":false,"connector_transaction_id":"83997308262383738","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"pay_M2Kjx50xM7uFmM80nPaZ_1","payment_link":null,"profile_id":"pro_YMqK5k5J3XPj5RaCrmNN","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_Qv5TMsyNVO9D3JbkOwjz","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-07-30T11:45:51.074Z","fingerprint":null,"browser_info":{"os_type":null,"language":null,"time_zone":null,"ip_address":"::1","os_version":null,"user_agent":null,"color_depth":null,"device_model":null,"java_enabled":null,"screen_width":null,"accept_header":null,"screen_height":null,"accept_language":"en","java_script_enabled":null},"payment_channel":"telephone_order","payment_method_id":null,"payment_method_status":null,"updated":"2025-07-30T11:34:22.794Z","split_payments":null,"frm_metadata":null,"extended_authorization_applied":null,"capture_before":null,"merchant_order_reference_id":null,"order_tax_amount":null,"connector_mandate_id":null,"card_discovery":"manual","force_3ds_challenge":false,"force_3ds_challenge_trigger":false,"issuer_error_code":null,"issuer_error_message":null,"is_iframe_redirection_enabled":null,"whole_connector_response":null} ``` </details> <details> <summary>Create a moto payment with shipping address</summary> Create a payment ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_UXwpmZ1gXNkuqIpAVIDAVFDTWgVOLM78eAalxmizaJK4apdD2DyeD8JpnJDVFq52' \ --data '{ "amount": 1000, "currency": "USD", "confirm": true, "capture_method": "automatic", "customer_id": "aaaa", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4111111111111111", "card_exp_month": "11", "card_exp_year": "50", "card_cvc": "987", "card_network":"Visa" } }, "payment_channel": "telephone_order", "billing": { "address": { "line1": "Singapore Changi Airport. 2nd flr", "line2": "", "line3": "", "city": "Downtown Core", "state": "Central Indiana America", "zip": "039393", "country": "SG", "first_name": "박성준", "last_name": "박성준" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "shipping": { "address": { "line1": "Singapore Changi Airport. 2nd flr", "line2": "", "line3": "", "city": "Downtown Core", "state": "Central Indiana America", "zip": "039393", "country": "SG", "first_name": "박성준", "last_name": "박성준" }, "phone": { "number": "8056594427", "country_code": "+91" } } }' ``` Response ``` {"payment_id":"pay_yKHlF8uZrJeszznefskv","merchant_id":"postman_merchant_GHAction_22031607-342f-4579-84c9-a660616ee489","status":"processing","amount":1000,"net_amount":1000,"shipping_cost":null,"amount_capturable":0,"amount_received":null,"connector":"worldpayvantiv","client_secret":"pay_yKHlF8uZrJeszznefskv_secret_UQiFLRY0wGvSefV229Ni","created":"2025-07-30T11:41:30.982Z","currency":"USD","customer_id":"aaaa","customer":{"id":"aaaa","name":null,"email":null,"phone":null,"phone_country_code":null},"description":null,"refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":null,"off_session":null,"capture_on":null,"capture_method":"automatic","payment_method":"card","payment_method_data":{"card":{"last4":"1111","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"411111","card_extended_bin":null,"card_exp_month":"11","card_exp_year":"50","card_holder_name":null,"payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":{"address":{"city":"Downtown Core","country":"SG","line1":"Singapore Changi Airport. 2nd flr","line2":"","line3":"","zip":"039393","state":"Central Indiana America","first_name":"박성준","last_name":"박성준"},"phone":{"number":"8056594427","country_code":"+91"},"email":null},"billing":{"address":{"city":"Downtown Core","country":"SG","line1":"Singapore Changi Airport. 2nd flr","line2":"","line3":"","zip":"039393","state":"Central Indiana America","first_name":"박성준","last_name":"박성준"},"phone":{"number":"8056594427","country_code":"+91"},"email":null},"order_details":null,"email":null,"name":null,"phone":null,"return_url":null,"authentication_type":"no_three_ds","statement_descriptor_name":null,"statement_descriptor_suffix":null,"next_action":null,"cancellation_reason":null,"error_code":null,"error_message":null,"unified_code":null,"unified_message":null,"payment_experience":null,"payment_method_type":"credit","connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":{"customer_id":"aaaa","created_at":1753875690,"expires":1753879290,"secret":"epk_27697346bd654d08b66a9fa4e2012fbc"},"manual_retry_allowed":false,"connector_transaction_id":"84085268499804834","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"pay_yKHlF8uZrJeszznefskv_1","payment_link":null,"profile_id":"pro_YMqK5k5J3XPj5RaCrmNN","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_Qv5TMsyNVO9D3JbkOwjz","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-07-30T11:56:30.982Z","fingerprint":null,"browser_info":null,"payment_channel":"telephone_order","payment_method_id":null,"payment_method_status":null,"updated":"2025-07-30T11:41:39.517Z","split_payments":null,"frm_metadata":null,"extended_authorization_applied":null,"capture_before":null,"merchant_order_reference_id":null,"order_tax_amount":null,"connector_mandate_id":null,"card_discovery":"manual","force_3ds_challenge":false,"force_3ds_challenge_trigger":false,"issuer_error_code":null,"issuer_error_message":null,"is_iframe_redirection_enabled":null,"whole_connector_response":null} ``` Psync ``` {"payment_id":"pay_yKHlF8uZrJeszznefskv","merchant_id":"postman_merchant_GHAction_22031607-342f-4579-84c9-a660616ee489","status":"succeeded","amount":1000,"net_amount":1000,"shipping_cost":null,"amount_capturable":0,"amount_received":1000,"connector":"worldpayvantiv","client_secret":"pay_yKHlF8uZrJeszznefskv_secret_UQiFLRY0wGvSefV229Ni","created":"2025-07-30T11:41:30.982Z","currency":"USD","customer_id":"aaaa","customer":{"id":"aaaa","name":null,"email":null,"phone":null,"phone_country_code":null},"description":null,"refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":null,"off_session":null,"capture_on":null,"capture_method":"automatic","payment_method":"card","payment_method_data":{"card":{"last4":"1111","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"411111","card_extended_bin":null,"card_exp_month":"11","card_exp_year":"50","card_holder_name":null,"payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":{"address":{"city":"Downtown Core","country":"SG","line1":"Singapore Changi Airport. 2nd flr","line2":"","line3":"","zip":"039393","state":"Central Indiana America","first_name":"박성준","last_name":"박성준"},"phone":{"number":"8056594427","country_code":"+91"},"email":null},"billing":{"address":{"city":"Downtown Core","country":"SG","line1":"Singapore Changi Airport. 2nd flr","line2":"","line3":"","zip":"039393","state":"Central Indiana America","first_name":"박성준","last_name":"박성준"},"phone":{"number":"8056594427","country_code":"+91"},"email":null},"order_details":null,"email":null,"name":null,"phone":null,"return_url":null,"authentication_type":"no_three_ds","statement_descriptor_name":null,"statement_descriptor_suffix":null,"next_action":null,"cancellation_reason":null,"error_code":null,"error_message":null,"unified_code":null,"unified_message":null,"payment_experience":null,"payment_method_type":"credit","connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":null,"manual_retry_allowed":false,"connector_transaction_id":"84085268499804834","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"pay_yKHlF8uZrJeszznefskv_1","payment_link":null,"profile_id":"pro_YMqK5k5J3XPj5RaCrmNN","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_Qv5TMsyNVO9D3JbkOwjz","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-07-30T11:56:30.982Z","fingerprint":null,"browser_info":null,"payment_channel":"telephone_order","payment_method_id":null,"payment_method_status":null,"updated":"2025-07-30T11:42:21.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":null,"card_discovery":"manual","force_3ds_challenge":false,"force_3ds_challenge_trigger":false,"issuer_error_code":null,"issuer_error_message":null,"is_iframe_redirection_enabled":null,"whole_connector_response":null} ``` </details> <details> <summary> Zero dollar authorization </summary> ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_uw1Ncf3woHvI73OT47Yy6kLk9IXv56Jc5AhbhWXwpSZYHlN2duOeAqQW0kkNyZ1t' \ --data '{ "amount": 0, "currency": "USD", "confirm": true, "capture_method": "automatic", "customer_id": "aaaa", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4457000300000007", "card_exp_month": "01", "card_exp_year": "50", "card_cvc": "987" } }, "billing": { "address": { "line1": "Singapore Changi Airport. 2nd flr", "line2": "", "line3": "", "city": "Downtown Core", "state": "Central Indiana America", "zip": "039393", "country": "SG", "first_name": "박성준", "last_name": "박성준" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "shipping": { "address": { "line1": "Singapore Changi Airport. 2nd flr", "line2": "", "line3": "", "city": "Downtown Core", "state": "Central Indiana America", "zip": "039393", "country": "SG", "first_name": "박성준", "last_name": "박성준" }, "phone": { "number": "8056594427", "country_code": "+91" } } }' ``` Response ``` {"payment_id":"pay_jS8ndVUdRkzkRT2e0v86","merchant_id":"postman_merchant_GHAction_836979fc-63b2-4169-ba75-ba0cccef4309","status":"processing","amount":0,"net_amount":0,"shipping_cost":null,"amount_capturable":0,"amount_received":null,"connector":"worldpayvantiv","client_secret":"pay_jS8ndVUdRkzkRT2e0v86_secret_jG2IXMuTdAWPqnDgkROD","created":"2025-07-31T08:07:32.104Z","currency":"USD","customer_id":"aaaa","customer":{"id":"aaaa","name":null,"email":null,"phone":null,"phone_country_code":null},"description":null,"refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":null,"off_session":null,"capture_on":null,"capture_method":"automatic","payment_method":"card","payment_method_data":{"card":{"last4":"0007","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"445700","card_extended_bin":null,"card_exp_month":"01","card_exp_year":"50","card_holder_name":null,"payment_checks":{"avs_result":"00","advanced_a_v_s_result":null,"authentication_result":null,"card_validation_result":"U"},"authentication_data":null},"billing":null},"payment_token":null,"shipping":{"address":{"city":"Downtown Core","country":"SG","line1":"Singapore Changi Airport. 2nd flr","line2":"","line3":"","zip":"039393","state":"Central Indiana America","first_name":"박성준","last_name":"박성준"},"phone":{"number":"8056594427","country_code":"+91"},"email":null},"billing":{"address":{"city":"Downtown Core","country":"SG","line1":"Singapore Changi Airport. 2nd flr","line2":"","line3":"","zip":"039393","state":"Central Indiana America","first_name":"박성준","last_name":"박성준"},"phone":{"number":"8056594427","country_code":"+91"},"email":null},"order_details":null,"email":null,"name":null,"phone":null,"return_url":null,"authentication_type":"no_three_ds","statement_descriptor_name":null,"statement_descriptor_suffix":null,"next_action":null,"cancellation_reason":null,"error_code":null,"error_message":null,"unified_code":null,"unified_message":null,"payment_experience":null,"payment_method_type":"credit","connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":{"customer_id":"aaaa","created_at":1753949252,"expires":1753952852,"secret":"epk_8fc541cb1ef84373b9ab942042b20303"},"manual_retry_allowed":false,"connector_transaction_id":"84085275247196280","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"pay_jS8ndVUdRkzkRT2e0v86_1","payment_link":null,"profile_id":"pro_bnv4zrJAtUyH6OvreKcz","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_dkc71SIB1i4C5Nz4Pw31","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-07-31T08:22:32.103Z","fingerprint":null,"browser_info":null,"payment_channel":null,"payment_method_id":null,"payment_method_status":null,"updated":"2025-07-31T08:07:36.811Z","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} ``` Psync ``` {"payment_id":"pay_jS8ndVUdRkzkRT2e0v86","merchant_id":"postman_merchant_GHAction_836979fc-63b2-4169-ba75-ba0cccef4309","status":"succeeded","amount":0,"net_amount":0,"shipping_cost":null,"amount_capturable":0,"amount_received":0,"connector":"worldpayvantiv","client_secret":"pay_jS8ndVUdRkzkRT2e0v86_secret_jG2IXMuTdAWPqnDgkROD","created":"2025-07-31T08:07:32.104Z","currency":"USD","customer_id":"aaaa","customer":{"id":"aaaa","name":null,"email":null,"phone":null,"phone_country_code":null},"description":null,"refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":null,"off_session":null,"capture_on":null,"capture_method":"automatic","payment_method":"card","payment_method_data":{"card":{"last4":"0007","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"445700","card_extended_bin":null,"card_exp_month":"01","card_exp_year":"50","card_holder_name":null,"payment_checks":{"avs_result":"00","advanced_a_v_s_result":null,"authentication_result":null,"card_validation_result":"U"},"authentication_data":null},"billing":null},"payment_token":null,"shipping":{"address":{"city":"Downtown Core","country":"SG","line1":"Singapore Changi Airport. 2nd flr","line2":"","line3":"","zip":"039393","state":"Central Indiana America","first_name":"박성준","last_name":"박성준"},"phone":{"number":"8056594427","country_code":"+91"},"email":null},"billing":{"address":{"city":"Downtown Core","country":"SG","line1":"Singapore Changi Airport. 2nd flr","line2":"","line3":"","zip":"039393","state":"Central Indiana America","first_name":"박성준","last_name":"박성준"},"phone":{"number":"8056594427","country_code":"+91"},"email":null},"order_details":null,"email":null,"name":null,"phone":null,"return_url":null,"authentication_type":"no_three_ds","statement_descriptor_name":null,"statement_descriptor_suffix":null,"next_action":null,"cancellation_reason":null,"error_code":null,"error_message":null,"unified_code":null,"unified_message":null,"payment_experience":null,"payment_method_type":"credit","connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":null,"manual_retry_allowed":false,"connector_transaction_id":"84085275247196280","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"pay_jS8ndVUdRkzkRT2e0v86_1","payment_link":null,"profile_id":"pro_bnv4zrJAtUyH6OvreKcz","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_dkc71SIB1i4C5Nz4Pw31","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-07-31T08:22:32.103Z","fingerprint":null,"browser_info":null,"payment_channel":null,"payment_method_id":null,"payment_method_status":null,"updated":"2025-07-31T08:09:57.144Z","split_payments":null,"frm_metadata":null,"extended_authorization_applied":null,"capture_before":null,"merchant_order_reference_id":null,"order_tax_amount":null,"connector_mandate_id":null,"card_discovery":"manual","force_3ds_challenge":false,"force_3ds_challenge_trigger":false,"issuer_error_code":null,"issuer_error_message":null,"is_iframe_redirection_enabled":null,"whole_connector_response":null} ``` </details> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Introduced a new field to capture the payment initiation channel (“ecommerce”, “mail_order”, or “telephone_order”) in payment requests and responses. * The payment channel is now visible in API requests, responses, and related documentation. * Enhanced support for additional payment flows, including mail and telephone orders. * **Bug Fixes** * Improved consistency in handling address and card type data for certain payment connectors. * **Chores** * Database schema updated to support the new payment channel field. * Test data and sample responses updated to include the payment channel field. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
To implement this **payment** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/payments.rs` **2. Database Layer (Queries & Schema)** - `crates/diesel_models/src/payment_intent.rs` - `crates/diesel_models/src/schema.rs` - `crates/diesel_models/src/schema_v2.rs` **3. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/payments.rs` - `crates/hyperswitch_domain_models/src/payments/payment_intent.rs` - `crates/hyperswitch_domain_models/src/router_request_types.rs` **4. Core Business Logic** - `crates/router/src/core/payments/helpers.rs` - `crates/router/src/core/payments/operations/payment_confirm.rs` - `crates/router/src/core/payments/operations/payment_create.rs` - ... and 2 more files **5. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/worldpayvantiv/transformers.rs` - `crates/hyperswitch_connectors/src/utils.rs` - `crates/router/src/types/api/verify_connector.rs` - ... and 1 more files **6. Type Definitions** - `crates/router/src/types.rs` **7. Utils** - `crates/router/src/utils/user/sample_data.rs` **8. Tests** - `crates/router/tests/payments.rs` - `crates/router/tests/payments2.rs` **9. Other** - `api-reference/v1/openapi_spec_v1.json` - `crates/common_enums/src/enums.rs` - `crates/openapi/src/openapi.rs` - ... and 2 more files **Code Patterns Applied:** - Define new data structures (2 changes) - Implement new functions (8 changes) - Extend existing types with new fields (96 changes) - Add conditional logic for feature flags or filtering (1 changes) **Detailed Identifier Changes:** Commit 8ac5e504: Files to modify: **crates/api_models/src/payments.rs** Modify existing code **crates/common_enums/src/enums.rs** Add: - enum: pub::PaymentChannel **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/worldpayvantiv/transformers.rs** Remove: - struct: pub::BillToAddressData Add: - function: private::from - function: private::get_connector_response - struct: pub::VantivAddressData - struct: pub::AdvancedFraudResults - impl: impl From<&Option<common_enums::PaymentChannel>> for OrderSource **crates/hyperswitch_connectors/src/utils.rs** Add: - function: private::get_optional_shipping_line3 **crates/hyperswitch_domain_models/src/payments.rs** Modify existing code **crates/hyperswitch_domain_models/src/payments/payment_intent.rs** Modify existing code **crates/hyperswitch_domain_models/src/router_request_types.rs** Modify existing code **crates/openapi/src/openapi.rs** Modify existing code **crates/router/src/core/payments/helpers.rs** Modify existing code **crates/router/src/core/payments/operations/payment_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/transformers.rs** Modify existing code **crates/router/src/types.rs** Modify existing code **crates/router/src/types/api/verify_connector.rs** Modify existing code **crates/router/src/utils/user/sample_data.rs** Modify existing code **crates/router/tests/connectors/utils.rs** Modify existing code **crates/router/tests/payments.rs** Modify existing code **crates/router/tests/payments2.rs** Modify existing code
{"pr_number": 8800, "pr_title": "feat(router): [worldpayvantiv] add support for moto flag for v1 and extend vantiv api contract", "merged_at": "2025-08-01T11:08:29Z", "intent": {"feature_type": "payment", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/payments.rs"], "database": ["crates/diesel_models/src/payment_intent.rs", "crates/diesel_models/src/schema.rs", "crates/diesel_models/src/schema_v2.rs"], "domain": ["crates/hyperswitch_domain_models/src/payments.rs", "crates/hyperswitch_domain_models/src/payments/payment_intent.rs", "crates/hyperswitch_domain_models/src/router_request_types.rs"], "core_business": ["crates/router/src/core/payments/helpers.rs", "crates/router/src/core/payments/operations/payment_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/transformers.rs"], "connectors": ["crates/hyperswitch_connectors/src/connectors/worldpayvantiv/transformers.rs", "crates/hyperswitch_connectors/src/utils.rs", "crates/router/src/types/api/verify_connector.rs", "crates/router/tests/connectors/utils.rs"], "types": ["crates/router/src/types.rs"], "utils": ["crates/router/src/utils/user/sample_data.rs"], "tests": ["crates/router/tests/payments.rs", "crates/router/tests/payments2.rs"], "other": ["api-reference/v1/openapi_spec_v1.json", "crates/common_enums/src/enums.rs", "crates/openapi/src/openapi.rs", "migrations/2025-07-28-762893_add_payment_channel_to_payment_intent/down.sql", "migrations/2025-07-28-762893_add_payment_channel_to_payment_intent/up.sql"]}, "change_types": {"structs_added": 2, "functions_added": 8, "enums_added": 1, "fields_added": 96, "conditionals_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
docs: Improving 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 --> Improving API-Reference to include payment flows, and include better and correct description of some fields. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Documentation** - Introduced a comprehensive "Payment Flows" API reference covering payment processing patterns, one-time and recurring payments, and flow diagrams. - Enhanced OpenAPI specifications with clearer endpoint and schema descriptions, improved field explanations, and expanded example requests and responses. - Updated sidebar metadata and icons for setup instructions. - Added a new documentation site configuration file with structured navigation, theming, and integrations. - Removed legacy API documentation configuration file. - Improved in-code documentation for payment models and endpoints to clarify field usage and API behaviors. - Refined descriptive text in API schemas for addresses, captures, payment attempts, and payment methods to improve clarity and precision. - Expanded and clarified enum documentation for payment authentication, capture methods, currency codes, intent statuses, and future usage. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
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.json` - `api-reference/api-reference/payments/payment--flows.mdx` - `api-reference/api-reference/payments/Introduction--to--payments.mdx` - ... and 5 more files **Detailed Identifier Changes:** Commit 5ce2ab2d: Files to modify: **crates/api_models/src/payments.rs** Modify existing code **crates/common_enums/src/enums.rs** Modify existing code **crates/openapi/src/routes/payments.rs** Modify existing code
{"pr_number": 8194, "pr_title": "docs: Improving API Reference", "merged_at": "2025-06-11T10:26:06Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment"]}, "hierarchy": {"api_models": ["crates/api_models/src/payments.rs"], "other": ["api-reference-v2/openapi_spec.json", "api-reference/api-reference/payments/payment--flows.mdx", "api-reference/api-reference/payments/Introduction--to--payments.mdx", "api-reference/docs.json", "api-reference/mint.json", "api-reference/openapi_spec.json", "crates/common_enums/src/enums.rs", "crates/openapi/src/routes/payments.rs"]}, "change_types": {}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(router): Save payment method on payments confirm (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 a field `payment_token` to customer PML response - During `/confirm-intent`, in case of card, an inactive payment method method is created before `call_conector_service` - After the payment has completed, depending on its status the payment method is marked active - Added support for confirming a payment using `payment_token` and `card_cvc` ### 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 #8089 ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> 1. Confirm Intent Request: ``` curl --location 'http://localhost:8080/v2/payments/12345_pay_01971c02c9f176a3b60be16df712bfc3/confirm-intent' \ --header 'x-client-secret: cs_01971c02ca147f11baea8a2521618052' \ --header 'x-profile-id: pro_W5FEDaNZ8OqqVDgFXgfg' \ --header 'Authorization: publishable-key=pk_dev_08e48a189e584123be3657ad34e1fb74,client-secret=cs_01971c02ca147f11baea8a2521618052' \ --header 'Content-Type: application/json' \ --header 'api-key: pk_dev_08e48a189e584123be3657ad34e1fb74' \ --data '{ "payment_method_data": { "card": { "card_number": "4242424242424242", "card_exp_month": "10", "card_exp_year": "25", "card_holder_name": "John Doe", "card_cvc": "100" } }, "customer_acceptance": { "acceptance_type": "online", "accepted_at": "2025-05-10T10:11:12Z", "online": null }, "payment_method_type": "card", "payment_method_subtype": "card" }' ``` 2. Confirm Intent Response: ```json { "id": "12345_pay_01971677d7ea7c80a137ddcb47221e17", "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_01971677c68c79d1be4297b6565164fb", "connector": "stripe", "created": "2025-05-28T10:37:22.297Z", "payment_method_data": { "billing": null }, "payment_method_type": "card", "payment_method_subtype": "card", "connector_transaction_id": "pi_3RThMRD5R7gDAGff03fgp3sK", "connector_reference_id": null, "merchant_connector_id": "mca_zi4k2xVeD6hTCWqHxDeX", "browser_info": null, "error": null, "shipping": null, "billing": null, "attempts": null, "connector_token_details": { "token": "pm_1RThMRD5R7gDAGffyr5YF1e5", "connector_token_request_reference_id": "rmuFSW2YVDX2PHEnpU" }, "payment_method_id": "12345_pm_01971677e50c7aa29a4ec01584df07dc", "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 } ``` 3. Customer PML Request: ``` curl --location 'http://localhost:8080/v2/customers/12345_cus_01971677c68c79d1be4297b6565164fb/saved-payment-methods' \ --header 'Content-Type: application/json' \ --header 'x-profile-id: pro_hvfcgBE4PqzQ25QRg2Y1' \ --header 'Authorization: api-key=dev_huT4fMR6cwCZL7j8pGpORZqKUGfTmWOD6ahQ6IOkmOMgJdJkVbJfYCHxpuapjpuM' \ --header 'api-key: dev_huT4fMR6cwCZL7j8pGpORZqKUGfTmWOD6ahQ6IOkmOMgJdJkVbJfYCHxpuapjpuM' ``` 4. Customer PML Response: ```json { "customer_payment_methods": [ { "id": "12345_pm_01971677e50c7aa29a4ec01584df07dc", "payment_token": "token_mb4HgBeUiiDtw4p9fmsh", "customer_id": "12345_cus_01971677c68c79d1be4297b6565164fb", "payment_method_type": "card", "payment_method_subtype": "card", "recurring_enabled": true, "payment_method_data": { "card": { "issuer_country": null, "last4_digits": "4242", "expiry_month": "10", "expiry_year": "25", "card_holder_name": "John Doe", "card_fingerprint": null, "nick_name": null, "card_network": null, "card_isin": null, "card_issuer": null, "card_type": null, "saved_to_locker": true } }, "bank": null, "created": "2025-05-28T10:37:25.645Z", "requires_cvv": true, "last_used_at": "2025-05-28T10:37:25.645Z", "is_default": false, "billing": null, "network_tokenization": null, "psp_tokenization_enabled": false } ] } ``` 5. Payments Confirm using token request: ``` curl --location 'http://localhost:8080/v2/payments/12345_pay_01971ae0cd847b20984cf9b465bd84ba/confirm-intent' \ --header 'x-profile-id: pro_pE7MrT231b4IhEVnTycu' \ --header 'x-client-secret: cs_01971ae0cd9170b1a05d40f837a86c8f' \ --header 'Authorization: publishable-key=pk_dev_841e89133d1246d3b53a3468ea92dd6a,client-secret=cs_01971ae0cd9170b1a05d40f837a86c8f' \ --header 'Content-Type: application/json' \ --header 'api-key: pk_dev_841e89133d1246d3b53a3468ea92dd6a' \ --data '{ "payment_method_data": { "card_token": { "card_holder_name": "John Doe", "card_cvc": "123" } }, "payment_method_type": "card", "payment_method_subtype": "card", "payment_token": "token_14edM60EPMfyyPvp80Ex" }' ``` 6. Payments Confirm using token response: ```json { "id": "12345_pay_01971ae0cd847b20984cf9b465bd84ba", "status": "succeeded", "amount": { "order_amount": 100, "currency": "GBP", "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_01971adcfc007813b7bc2367e2a399b5", "connector": "stripe", "created": "2025-05-29T07:10:29.774Z", "payment_method_data": { "billing": null }, "payment_method_type": "card", "payment_method_subtype": "card", "connector_transaction_id": "pi_3RU0cUD5R7gDAGff0yM3CMmF", "connector_reference_id": null, "merchant_connector_id": "mca_ZXKvjtgq3DVPfbpHW902", "browser_info": null, "error": null, "shipping": null, "billing": null, "attempts": null, "connector_token_details": { "token": "pm_1RU0cUD5R7gDAGff6idzjsOT", "connector_token_request_reference_id": "vjY55lNJYsW5G6nbPZ" }, "payment_method_id": "12345_pm_01971ade17337c939cc0c2e3df36cf0e", "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/events/payment.rs` - `crates/api_models/src/payment_methods.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/payment_method_data.rs` - `crates/hyperswitch_domain_models/src/payments.rs` - `crates/hyperswitch_domain_models/src/payments/payment_attempt.rs` **4. Core Business Logic** - `crates/router/src/core/payment_methods.rs` - `crates/router/src/core/payment_methods/cards.rs` - `crates/router/src/core/payment_methods/transformers.rs` - ... and 9 more files **5. Type Definitions** - `crates/router/src/types/api/payment_methods.rs` - `crates/router/src/types/storage/payment_method.rs` **6. Other** - `api-reference-v2/openapi_spec.json` - `crates/openapi/src/openapi_v2.rs` - `crates/openapi/src/routes/payment_method.rs` - ... and 2 more files **Code Patterns Applied:** - Define new data structures (3 changes) - Implement new functions (18 changes) - Extend existing types with new fields (152 changes) - Add conditional logic for feature flags or filtering (6 changes) **Detailed Identifier Changes:** Commit 2c356397: Files to modify: **crates/api_models/src/events/payment.rs** Modify existing code **crates/api_models/src/payment_methods.rs** Add: - struct: pub::PaymentMethodListResponseForSession **crates/api_models/src/payments.rs** Modify existing code **crates/diesel_models/src/payment_attempt.rs** Modify existing code **crates/hyperswitch_domain_models/src/payment_method_data.rs** Add: - function: private::from - function: private::from - impl: impl From<( payment_methods::CardDetail, Secret<String>, Option<Secret<String>>, )> for Card - impl: impl From<Card> for payment_methods::CardDetail **crates/hyperswitch_domain_models/src/payments.rs** Add: - function: pub::update_payment_method_data - function: pub::update_payment_method_and_pm_id **crates/hyperswitch_domain_models/src/payments/payment_attempt.rs** Modify existing code **crates/openapi/src/openapi_v2.rs** Modify existing code **crates/openapi/src/routes/payment_method.rs** Modify existing code **crates/router/src/core/payment_methods.rs** Add: - function: private::get_pm_list_token_data **crates/router/src/core/payment_methods/cards.rs** Modify existing code **crates/router/src/core/payment_methods/transformers.rs** Remove: - impl: impl transformers::ForeignTryFrom<domain::PaymentMethod> for api::CustomerPaymentMethod Add: - function: private::foreign_try_from - impl: impl transformers::ForeignTryFrom<(domain::PaymentMethod, String)> for api::CustomerPaymentMethodResponseItem - impl: impl transformers::ForeignTryFrom<domain::PaymentMethod> for PaymentMethodResponseItem **crates/router/src/core/payment_methods/utils.rs** Add: - function: pub::retrieve_payment_token_data - function: pub::delete_payment_token_data **crates/router/src/core/payment_methods/vault.rs** Add: - function: pub::retrieve_payment_method_from_vault_using_payment_token - function: pub::delete_payment_token **crates/router/src/core/payments.rs** Modify existing code **crates/router/src/core/payments/helpers.rs** Modify existing code **crates/router/src/core/payments/operations.rs** Add: - function: private::create_or_fetch_payment_method **crates/router/src/core/payments/operations/payment_confirm_intent.rs** Add: - function: private::create_or_fetch_payment_method **crates/router/src/core/payments/operations/payment_response.rs** Modify existing code **crates/router/src/core/payments/operations/proxy_payments_intent.rs** Modify existing code **crates/router/src/core/payments/payment_methods.rs** Modify existing code **crates/router/src/routes/payment_methods.rs** Add: - function: pub::return_key_for_token **crates/router/src/types/api/payment_methods.rs** Modify existing code **crates/router/src/types/storage/payment_method.rs** Add: - function: pub::is_permanent_card - enum: pub::PaymentTokenData **crates/router/src/workflows/revenue_recovery.rs** Modify existing code
{"pr_number": 8090, "pr_title": "feat(router): Save payment method on payments confirm (V2)", "merged_at": "2025-06-06T15:55:49Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/events/payment.rs", "crates/api_models/src/payment_methods.rs", "crates/api_models/src/payments.rs"], "database": ["crates/diesel_models/src/payment_attempt.rs"], "domain": ["crates/hyperswitch_domain_models/src/payment_method_data.rs", "crates/hyperswitch_domain_models/src/payments.rs", "crates/hyperswitch_domain_models/src/payments/payment_attempt.rs"], "core_business": ["crates/router/src/core/payment_methods.rs", "crates/router/src/core/payment_methods/cards.rs", "crates/router/src/core/payment_methods/transformers.rs", "crates/router/src/core/payment_methods/utils.rs", "crates/router/src/core/payment_methods/vault.rs", "crates/router/src/core/payments.rs", "crates/router/src/core/payments/helpers.rs", "crates/router/src/core/payments/operations.rs", "crates/router/src/core/payments/operations/payment_confirm_intent.rs", "crates/router/src/core/payments/operations/payment_response.rs", "crates/router/src/core/payments/operations/proxy_payments_intent.rs", "crates/router/src/core/payments/payment_methods.rs"], "types": ["crates/router/src/types/api/payment_methods.rs", "crates/router/src/types/storage/payment_method.rs"], "other": ["api-reference-v2/openapi_spec.json", "crates/openapi/src/openapi_v2.rs", "crates/openapi/src/routes/payment_method.rs", "crates/router/src/routes/payment_methods.rs", "crates/router/src/workflows/revenue_recovery.rs"]}, "change_types": {"structs_added": 3, "functions_added": 18, "enums_added": 1, "fields_added": 152, "imports_added": 11, "conditionals_added": 6}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(database): percent-encode spaces in Postgres connection URI ## 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 --> Currently with Postgres@18, db connection fails. Reason being space should be percent encoded as `%20`. This encoding standards are followed across all versions of Postgres as mentioned in their [docs](https://www.postgresql.org/docs/13/libpq-connect.html#LIBPQ-CONNSTRING) as well. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Created a API Key using Hyperswitch curls: cURL: ``` curl --location 'http://localhost:8080/api_keys/merchant_1759751745' \ --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_B0IKCHN3tOmvjIA8m30P", "merchant_id": "merchant_1759751745", "name": "API Key 1", "description": null, "api_key": "dev_rzf4iZbDCXjdUAV5azsJQ2p6J38lseesvbJaKPLdkfusiDNOG1WrsZVliSklF0ls", "created": "2025-10-06T12:19:05.958Z", "expiration": "2038-01-19T03:14:08.000Z" } ``` <img width="360" height="54" alt="Screenshot 2025-10-06 at 5 28 46 PM" src="https://github.com/user-attachments/assets/f8894773-5ed2-4700-828b-92a6d539a22e" /> <img width="1590" height="306" alt="Screenshot 2025-10-06 at 5 49 42 PM" src="https://github.com/user-attachments/assets/8312cf1e-3b52-4fe6-916e-ed4e9a79cc12" /> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Utils** - `crates/common_utils/src/lib.rs` **Detailed Identifier Changes:** Commit dbc113fe: Files to modify: **crates/common_utils/src/lib.rs** Modify existing code
{"pr_number": 9685, "pr_title": "fix(database): percent-encode spaces in Postgres connection URI", "merged_at": "2025-10-06T18:21:44Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["merchant", "user"]}, "hierarchy": {"utils": ["crates/common_utils/src/lib.rs"]}, "change_types": {}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(core): add support for confirmation flow for click to pay ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] New feature ## Description <!-- Describe your changes in detail --> Add support for confirmation flow for click to pay currenlty in cick to pay we do authentication with mastercard and authorisation with adyen. But to be prod certified mastercard needs a confirmation notification from hyperswitch after authorisation stating the state of the transaction. So, in this Pr I have added confirmation flow for click to pay ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Add config to make the merchant eligible for authentication service ```shell curl --location 'http://localhost:8080/configs/' \ --header 'Content-Type: application/json' \ --header 'api-key: test_admin' \ --data '{ "key": "merchants_eligible_for_authentication_service", "value": "[\"sahkal\", \"cewqcewc\", \"dqwdwljildwduoqwhduwqcqwjd\"]" }' ``` Create merchant connector account for Ctp_mastercard ```shell curl --location 'http://localhost:8080/account/dqwdwljildwduoqwhduwqcqwjd/connectors' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: test_admin' \ --data ' { "connector_type": "authentication_processor", "connector_name": "ctp_mastercard", "connector_account_details": { "auth_type": "HeaderKey", "api_key": "API-KEY" }, "test_mode": true, "disabled": false, "payment_methods_enabled": [ { "payment_method": "card", "payment_method_types": [ { "payment_method_type": "credit", "card_networks": [ "Visa", "Mastercard" ], "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_type": "debit", "card_networks": [ "Visa", "Mastercard" ], "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true } ] } ], "business_country": "US", "business_label": "default", "metadata": { "dpa_id": "b6e06cc6-3018-4c4c-bbf5-9fb232615090", "dpa_name": "TestMerchant", "locale": "en_AU", "card_brands": ["mastercard", "visa"], "acquirer_bin": "545301", "acquirer_merchant_id": "SRC3DS", "merchant_category_code": "0001", "merchant_country_code": "US" } } ' ``` Adyen ```shell curl --location 'http://localhost:8080/account/dqwdwljildwduoqwhduwqcqwjd/connectors' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: test_admin' \ --data ' { "connector_type": "payment_processor", "connector_name": "adyen", "connector_account_details": { "auth_type": "SignatureKey", "api_key": "API-KEY", "key1": "KEY-1", "api_secret": "API-SECRET" }, "test_mode": true, "disabled": false, "payment_methods_enabled": [ { "payment_method": "card", "payment_method_types": [ { "payment_method_type": "credit", "card_networks": [ "Visa", "Mastercard" ], "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_type": "debit", "card_networks": [ "Visa", "Mastercard" ], "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true } ] } ], "metadata": { "city": "NY", "unit": "245", "live_endpoint_prefix": "vsfbjh" }, "connector_webhook_details": { "merchant_secret": "MERCHANT SECRET" }, "business_country": "US", "business_label": "default" } ' ``` update business profile with ctp_mastercard mca_id ```shell curl --location 'http://localhost:8080/account/dqwdwljildwduoqwhduwqcqwjd/business_profile/pro_KCTRv8sFQfC0r65CZxrn' \ --header 'Content-Type: application/json' \ --header 'api-key: test_admin' \ --data '{ "is_click_to_pay_enabled": true, "authentication_product_ids": {"click_to_pay": "mca_XAXUpel8ABbpoGNF8lGz"} }' ``` do payments create ```shell curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_fQsdc9JbERQ7CWvmguo84XDROuXOD1oK9sdfCJXOko3SossoI4zdxpJkOIPmojwn' \ --data '{ "amount": 1130, "currency": "USD", "confirm": false, "return_url": "https://hyperswitch.io" } ' ``` do payments confirm ```shell curl --location 'http://localhost:8080/payments/pay_Ft9Ke5Lun924OCJa7yll/confirm' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: pk_dev_1f712ac5fd7f4d8c91da6a627862a4f0' \ --data ' { "payment_method": "card", "payment_method_type": "debit", "client_secret": "pay_Ft9Ke5Lun924OCJa7yll_secret_po1FVW5adQWFolWJUhMb", "ctp_service_details" : { "merchant_transaction_id": "0a4e0d3.34f4a04b.803eb38b0a56f082296538d4a70c064a6b320639", "correlation_id": "34f4a04b.bcd1ac39-e0f3-479e-b3ee-703ade0c66dc", "x_src_flow_id" : "34f4a04b.bcd1ac39-e0f3-479e-b3ee-703ade0c66dc.1727438793" }, "browser_info": { "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "color_depth": 24, "java_enabled":true, "java_script_enabled": true, "language": "en-GB", "screen_height": 1440, "screen_width": 2560, "time_zone": -330, "user_agent": "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Mobile Safari/537.36" } }' ``` Expected Response ```shell { "payment_id": "pay_Ft9Ke5Lun924OCJa7yll", "merchant_id": "dqwdwljildwduoqwhduwqcqwjd", "status": "failed", "amount": 1130, "net_amount": 1130, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": "adyen", "client_secret": "pay_Ft9Ke5Lun924OCJa7yll_secret_po1FVW5adQWFolWJUhMb", "created": "2024-12-18T13:00:47.663Z", "currency": "USD", "customer_id": null, "customer": null, "description": null, "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": null, "payment_method": "card", "payment_method_data": null, "payment_token": null, "shipping": null, "billing": null, "order_details": null, "email": null, "name": null, "phone": null, "return_url": "https://hyperswitch.io/", "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": "2", "error_message": "Refused", "unified_code": "UE_9000", "unified_message": "Something went wrong", "payment_experience": null, "payment_method_type": "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": true, "connector_transaction_id": "KN8X64SH6PRRVS65", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": null, "payment_link": null, "profile_id": "pro_KCTRv8sFQfC0r65CZxrn", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_L6N77PiH3BI2BTPwkZPL", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2024-12-18T13:15:47.663Z", "fingerprint": null, "browser_info": { "language": "en-GB", "time_zone": -330, "ip_address": "::1", "user_agent": "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Mobile Safari/537.36", "color_depth": 24, "java_enabled": true, "screen_width": 2560, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 1440, "java_script_enabled": true }, "payment_method_id": null, "payment_method_status": null, "updated": "2024-12-18T13:04:08.461Z", "split_payments": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null } ``` Reason for it being failed is ayden doesn't support click to pay in sandbox, but does support in production Look for confirmation call in logs <img width="1728" alt="Screenshot 2025-01-06 at 12 37 23 PM" src="https://github.com/user-attachments/assets/e0419df6-c2c8-452c-a5b3-b21dd54552c1" /> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I 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/router_flow_types/unified_authentication_service.rs` - `crates/hyperswitch_domain_models/src/router_request_types.rs` - `crates/hyperswitch_domain_models/src/router_request_types/unified_authentication_service.rs` - ... and 1 more files **2. Core Business Logic** - `crates/router/src/core/payments.rs` - `crates/router/src/core/payments/connector_integration_v2_impls.rs` - `crates/router/src/core/payments/flows.rs` - ... and 7 more files **3. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs` - `crates/hyperswitch_connectors/src/connectors/datatrans/transformers.rs` - `crates/hyperswitch_connectors/src/connectors/unified_authentication_service.rs` - ... and 5 more files **4. Type Definitions** - `crates/hyperswitch_interfaces/src/types.rs` - `crates/router/src/types.rs` **5. Other** - `crates/hyperswitch_interfaces/src/api.rs` **Code Patterns Applied:** - Define new data structures (4 changes) - Implement new functions (12 changes) - Extend existing types with new fields (158 changes) - Add conditional logic for feature flags or filtering (5 changes) **Detailed Identifier Changes:** Commit 74bbf4bf: Files to modify: **crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/datatrans/transformers.rs** Modify existing code **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 - impl: impl api::UasAuthenticationConfirmation for UnifiedAuthenticationService - impl: impl ConnectorIntegration< AuthenticationConfirmation, UasConfirmationRequestData, UasAuthenticationResponseData, > for UnifiedAuthenticationService **crates/hyperswitch_connectors/src/connectors/unified_authentication_service/transformers.rs** Add: - function: private::try_from - function: private::try_from - struct: pub::UnifiedAuthenticationServiceAuthenticateConfirmationRequest - struct: pub::UnifiedAuthenticationServiceAuthenticateConfirmationResponse - impl: impl TryFrom< ResponseRouterData< F, UnifiedAuthenticationServiceAuthenticateConfirmationResponse, T, UasAuthenticationResponseData, >, > for RouterData<F, T, UasAuthenticationResponseData> - impl: impl TryFrom<&UnifiedAuthenticationServiceRouterData<&UasAuthenticationConfirmationRouterData>> for UnifiedAuthenticationServiceAuthenticateConfirmationRequest **crates/hyperswitch_connectors/src/connectors/wellsfargo/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/default_implementations.rs** Modify existing code **crates/hyperswitch_domain_models/src/router_flow_types/unified_authentication_service.rs** Add: - struct: pub::AuthenticationConfirmation **crates/hyperswitch_domain_models/src/router_request_types.rs** Modify existing code **crates/hyperswitch_domain_models/src/router_request_types/unified_authentication_service.rs** Add: - struct: pub::UasConfirmationRequestData **crates/hyperswitch_domain_models/src/types.rs** Modify existing code **crates/hyperswitch_interfaces/src/api.rs** Add: - trait: private::UasAuthenticationConfirmation - trait: private::UasAuthenticationConfirmationV2 **crates/hyperswitch_interfaces/src/types.rs** Modify existing code **crates/router/src/connector/checkout/transformers.rs** Modify existing code **crates/router/src/connector/nmi/transformers.rs** Modify existing code **crates/router/src/core/payments.rs** Modify existing code **crates/router/src/core/payments/connector_integration_v2_impls.rs** Add: - impl: impl UasAuthenticationConfirmationV2 for $connector **crates/router/src/core/payments/flows.rs** Add: - impl: impl UasAuthenticationConfirmation for connector::DummyConnector<T> - impl: impl services::ConnectorIntegration< AuthenticationConfirmation, types::UasConfirmationRequestData, types::UasAuthenticationResponseData, > for connector::DummyConnector<T> **crates/router/src/core/payments/helpers.rs** Modify existing code **crates/router/src/core/payments/operations.rs** Modify existing code **crates/router/src/core/payments/operations/payment_confirm.rs** Modify existing code **crates/router/src/core/payments/types.rs** Modify existing code **crates/router/src/core/unified_authentication_service.rs** Remove: - function: private::confirmation **crates/router/src/core/unified_authentication_service/types.rs** Modify existing code **crates/router/src/core/unified_authentication_service/utils.rs** Add: - function: pub::get_checkout_event_status_and_reason **crates/router/src/types.rs** Modify existing code
{"pr_number": 6982, "pr_title": "feat(core): add support for confirmation flow for click to pay", "merged_at": "2025-02-20T08:04:39Z", "intent": {"feature_type": "payment", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"domain": ["crates/hyperswitch_domain_models/src/router_flow_types/unified_authentication_service.rs", "crates/hyperswitch_domain_models/src/router_request_types.rs", "crates/hyperswitch_domain_models/src/router_request_types/unified_authentication_service.rs", "crates/hyperswitch_domain_models/src/types.rs"], "core_business": ["crates/router/src/core/payments.rs", "crates/router/src/core/payments/connector_integration_v2_impls.rs", "crates/router/src/core/payments/flows.rs", "crates/router/src/core/payments/helpers.rs", "crates/router/src/core/payments/operations.rs", "crates/router/src/core/payments/operations/payment_confirm.rs", "crates/router/src/core/payments/types.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/cybersource/transformers.rs", "crates/hyperswitch_connectors/src/connectors/datatrans/transformers.rs", "crates/hyperswitch_connectors/src/connectors/unified_authentication_service.rs", "crates/hyperswitch_connectors/src/connectors/unified_authentication_service/transformers.rs", "crates/hyperswitch_connectors/src/connectors/wellsfargo/transformers.rs", "crates/hyperswitch_connectors/src/default_implementations.rs", "crates/router/src/connector/checkout/transformers.rs", "crates/router/src/connector/nmi/transformers.rs"], "types": ["crates/hyperswitch_interfaces/src/types.rs", "crates/router/src/types.rs"], "other": ["crates/hyperswitch_interfaces/src/api.rs"]}, "change_types": {"structs_added": 4, "functions_added": 12, "fields_added": 158, "imports_added": 3, "conditionals_added": 5}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(core/connector): introduce authentication token flow and add sepa bankdebit for nordea ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [x] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> ### Summary This PR introduces Nordea as a new payment connector with support for SEPA bank debit payments. It also implements a new **Authentication Token Flow** mechanism that enables two-step OAuth authentication, which is required by certain connectors like Nordea. ### Problem Statement Some payment connectors require a more complex authentication process that involves: 1. **Step 1**: Obtaining an authentication token (authorization code) using client credentials 2. **Step 2**: Exchanging that authentication token for an access token using OAuth 2.0 flow The existing access token flow in Hyperswitch only supported direct access token generation, making it incompatible with connectors that require this two-step OAuth authentication process. ### Solution This PR introduces: 1. **Authentication Token Flow**: A new connector flow that handles the two-step OAuth authentication process 2. **Nordea Connector Integration**: The first connector to utilize this new authentication flow 3. **SEPA Bank Debit Support**: Implementation of SEPA payment method through Nordea ### Implementation Details #### Authentication Token Flow Architecture The new authentication flow works as follows: ```mermaid flowchart TD A[Payment Flow Initiated] --> B{Connector Supports<br/>Access Token?} B -->|No| Z[Continue with Payment<br/>No Access Token] B -->|Yes| C[Check Access Token Cache] C --> D{Access Token<br/>in Cache?} D -->|Yes| E[Use Cached Access Token] D -->|No| F{Connector Needs<br/>Authentication Token?} F -->|No| G[Create AccessTokenRequestData<br/>with ConnectorAuthType only] F -->|Yes| H[Authentication Token Flow] H --> I[Create AccessTokenAuthenticationRequestData<br/>from ConnectorAuthType] I --> J[Call execute_authentication_token] J --> K[POST /oauth/authorize<br/>with client credentials] K --> L{Authentication<br/>Successful?} L -->|No| M[Return Error] L -->|Yes| N[Receive AccessTokenAuthenticationResponse<br/>authorization code] N --> O[Create AccessTokenRequestData<br/>with ConnectorAuthType + AuthenticationToken] O --> P[Access Token Flow] G --> P P --> Q[Call refresh_connector_auth] Q --> R[POST /oauth/token<br/>exchange auth code for access token] R --> S{Access Token<br/>Successful?} S -->|No| T[Return Error] S -->|Yes| U[Receive AccessToken<br/>bearer token + expiry] U --> V[Cache Access Token<br/>with reduced expiry] V --> W[Return Access Token] E --> W W --> X[Use Access Token<br/>for Payment Requests] M --> Y[Payment Flow Fails] T --> Y X --> AA[Payment Flow Continues] Z --> AA style H fill:#e1f5fe style P fill:#f3e5f5 style I fill:#e8f5e8 style O fill:#e8f5e8 style K fill:#fff3e0 style R fill:#fff3e0 style V fill:#e8eaf6 ``` #### Key Components - __AccessTokenAuthenticationRequestData__: Contains connector auth credentials for the first OAuth step - __AccessTokenAuthenticationResponse__: Contains the authorization code received from the authentication endpoint - __Enhanced AccessTokenRequestData__: Now supports both direct access token creation and token exchange flows - __Automatic Flow Detection__: The system automatically detects if a connector needs authentication tokens via `authentication_token_for_token_creation()` #### Nordea Connector Integration - __Authentication__: Implements OAuth 2.0 with eIDAS signature validation - __Payment Methods__: SEPA Credit Transfers (bank debit) - __Supported Operations__: - Payment authorization (automatic capture only) - Payment synchronization (PSync) - Two-step OAuth authentication flow - __Not Supported__: - Manual capture - Refunds (only available in Corporate APIs) - Void/cancellation #### Technical Implementation - __Signature Generation__: Implements eIDAS signature generation using RSA-SHA256 for API request signing - __Auth Configuration__: Uses `SignatureKey` auth type with: - `api_key`: Client Secret - `key1`: Client ID - `api_secret`: eIDAS Private Key (base64 encoded) - __Request Signing__: All requests include: - X-Nordea-Originating-Host - X-Nordea-Originating-Date - Signature header (following HTTP Signature spec) - Digest header for POST/PUT requests - __Payment Flow__: 1. Authentication token creation (authorization) 2. Access token exchange 3. Payment initiation (PreProcessing) 4. Payment confirmation (Authorize) ### Changes Made 1. __Core Authentication Infrastructure__: - Added `AccessTokenAuthenticationRequestData` struct for auth token requests - Added `AccessTokenAuthenticationResponse` struct for auth token responses - Enhanced `AccessTokenRequestData` to support both direct and exchange flows - Added `execute_authentication_token` function for OAuth step 1 - Modified access token flow to check for authentication token support - Added backward-compatible authentication token detection 2. __Connector Implementation__: - Added Nordea connector module with request/response structures - Implemented eIDAS signature generation - Added SEPA payment method support - Implemented OAuth 2.0 authentication flow 3. __Configuration__: - Added Nordea to connector configs (development, sandbox, production) - Added payment method required fields configuration - Updated WASM bindings for frontend integration ### Testing - Tested SEPA bank debit payments through complete flow - Verified eIDAS signature generation - Confirmed OAuth authentication flow works correctly - Validated payment status synchronization - Tested backward compatibility with existing connectors ### Unsupported features by Nordea - Webhooks - Manual Capture - Refunds (only supported through Corporate API and is behind a paywall) ### Breaking Changes None - The authentication token flow is backward compatible and only activates for connectors that explicitly support it through the `authentication_token_for_token_creation()` method. ### Additional Changes - [x] 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). --> New connector Nordea SEPA integration. Closes #8134. ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> <details> <summary>MCA</summary> ```curl curl --location 'http://localhost:8080/account/postman_merchant_GHAction_1752842696/connectors' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_DL49cxo4k5VbOYIabte7WgRsu9xTmB6in77WVBxdN8nPRWMqzFb5ISd3mGocJC0I' \ --data '{ "connector_type": "payment_processor", "connector_name": "nordea", "business_country": "US", "business_label": "default", "connector_account_details": { "auth_type": "SignatureKey", "api_key": "client_secret", "key1": "client_id", "api_secret": "decrypted_certificate" }, "test_mode": false, "disabled": false, "metadata": { "creditor_account_type": "IBAN", "creditor_account_value": "{{creditor_account_number}}", "creditor_beneficiary_name": "Test Merchant" }, "payment_methods_enabled": [ { "payment_method": "bank_debit", "payment_method_types": [ { "payment_method_type": "sepa", "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true } ] } ] }' ``` ```json { "connector_type": "payment_processor", "connector_name": "nordea", "connector_label": "nordea_US_default", "merchant_connector_id": "mca_UWrnV7EnGkfVapwuHOAM", "profile_id": "pro_892QTRQ3W6mWykBeSXDQ", "connector_account_details": { "auth_type": "SignatureKey", "api_key": "client_secret", "key1": "client_id", "api_secret": "decrypted_certificate" }, "payment_methods_enabled": [ { "payment_method": "bank_debit", "payment_method_types": [ { "payment_method_type": "sepa", "payment_experience": null, "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true } ] } ], "connector_webhook_details": null, "metadata": { "creditor_account_type": "IBAN", "creditor_account_value": "FI7473834510057469", "creditor_beneficiary_name": "Test Merchant" }, "test_mode": false, "disabled": false, "frm_configs": null, "business_country": "US", "business_label": "default", "business_sub_label": null, "applepay_verified_domains": null, "pm_auth_config": null, "status": "active", "additional_merchant_data": null, "connector_wallets_details": null } ``` </details> <details> <summary>Payment Create</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_DL49cxo4k5VbOYIabte7WgRsu9xTmB6in77WVBxdN8nPRWMqzFb5ISd3mGocJC0I' \ --data-raw '{ "amount": 10400, "currency": "EUR", "confirm": false, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 10400, "customer_id": "customer", "email": "guesjhvghht@example.com", "phone": "999999999", "phone_country_code": "+1", "description": "Its my first payment request", "authentication_type": "three_ds", "return_url": "https://duck.com", "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "FI" , "first_name": "PiX" , "last_name": "THE" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "FI", "first_name": "PiX" } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" }, "browser_info": { "color_depth": 24, "java_enabled": true, "java_script_enabled": true, "language": "en-GB", "screen_height": 720, "screen_width": 1280, "time_zone": -330, "ip_address": "208.127.127.193", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0" } }' ``` ```json { "payment_id": "pay_GJDKAKdDxM4bQ8xX0anw", "merchant_id": "postman_merchant_GHAction_1752842696", "status": "requires_payment_method", "amount": 10400, "net_amount": 10400, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": null, "client_secret": "pay_GJDKAKdDxM4bQ8xX0anw_secret_TL3I7uzVd7IA4uvwkPqh", "created": "2025-07-18T12:45:03.009Z", "currency": "EUR", "customer_id": "customer", "customer": { "id": "customer", "name": null, "email": "guesjhvghht@example.com", "phone": "999999999", "phone_country_code": "+1" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": null, "payment_method_data": null, "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": "FI", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "PiX", "last_name": null }, "phone": null, "email": null }, "billing": { "address": { "city": "San Fransico", "country": "FI", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "PiX", "last_name": "THE" }, "phone": null, "email": null }, "order_details": null, "email": "guesjhvghht@example.com", "name": null, "phone": "999999999", "return_url": "https://duck.com/", "authentication_type": "three_ds", "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": null, "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "customer", "created_at": 1752842702, "expires": 1752846302, "secret": "epk_d55a0599354449ebafda40a1f4989778" }, "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_892QTRQ3W6mWykBeSXDQ", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": null, "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-07-18T13:00:03.008Z", "fingerprint": null, "browser_info": { "language": "en-GB", "time_zone": -330, "ip_address": "208.127.127.193", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0", "color_depth": 24, "java_enabled": true, "screen_width": 1280, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 720, "java_script_enabled": true }, "payment_method_id": null, "payment_method_status": null, "updated": "2025-07-18T12:45:03.075Z", "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>Payment Confirm</summary> ```curl curl --location 'http://localhost:8080/payments/pay_GJDKAKdDxM4bQ8xX0anw/confirm' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: pk_dev_b6513b5899694eaeb7d76adfe1d29708' \ --data '{ "payment_method": "bank_debit", "payment_method_type": "sepa", "payment_method_data": { "bank_debit": { "sepa_bank_debit": { "iban": "FI6593857450293470" } } }, "client_secret": "pay_GJDKAKdDxM4bQ8xX0anw_secret_TL3I7uzVd7IA4uvwkPqh" }' ``` ```json { "payment_id": "pay_GJDKAKdDxM4bQ8xX0anw", "merchant_id": "postman_merchant_GHAction_1752842696", "status": "requires_customer_action", "amount": 10400, "net_amount": 10400, "shipping_cost": null, "amount_capturable": 10400, "amount_received": null, "connector": "nordea", "client_secret": "pay_GJDKAKdDxM4bQ8xX0anw_secret_TL3I7uzVd7IA4uvwkPqh", "created": "2025-07-18T12:45:03.009Z", "currency": "EUR", "customer_id": "customer", "customer": { "id": "customer", "name": null, "email": "guesjhvghht@example.com", "phone": "999999999", "phone_country_code": "+1" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "bank_debit", "payment_method_data": { "bank_debit": { "sepa": { "iban": "FI659********93470", "bank_account_holder_name": null } }, "billing": null }, "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": "FI", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "PiX", "last_name": null }, "phone": null, "email": null }, "billing": { "address": { "city": "San Fransico", "country": "FI", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "PiX", "last_name": "THE" }, "phone": null, "email": null }, "order_details": null, "email": "guesjhvghht@example.com", "name": null, "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_GJDKAKdDxM4bQ8xX0anw/postman_merchant_GHAction_1752842696/pay_GJDKAKdDxM4bQ8xX0anw_1" }, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "sepa", "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": "c14b226e-dfc1-4458-a477-a7b3ee4387fd", "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_GJDKAKdDxM4bQ8xX0anw_1", "payment_link": null, "profile_id": "pro_892QTRQ3W6mWykBeSXDQ", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_UWrnV7EnGkfVapwuHOAM", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-07-18T13:00:03.008Z", "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-07-18T12:45:06.878Z", "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>Redirection</summary> <img width="249" height="120" alt="image" src="https://github.com/user-attachments/assets/c66f3ea7-e779-4702-8190-1d7925bfa7fc" /> </details> <details> <summary>Retrieve</summary> ```curl curl --location 'http://localhost:8080/payments/pay_GJDKAKdDxM4bQ8xX0anw?force_sync=true' \ --header 'Accept: application/json' \ --header 'api-key: dev_DL49cxo4k5VbOYIabte7WgRsu9xTmB6in77WVBxdN8nPRWMqzFb5ISd3mGocJC0I' ``` ```json { "payment_id": "pay_GJDKAKdDxM4bQ8xX0anw", "merchant_id": "postman_merchant_GHAction_1752842696", "status": "succeeded", "amount": 10400, "net_amount": 10400, "shipping_cost": null, "amount_capturable": 0, "amount_received": 10400, "connector": "nordea", "client_secret": "pay_GJDKAKdDxM4bQ8xX0anw_secret_TL3I7uzVd7IA4uvwkPqh", "created": "2025-07-18T12:45:03.009Z", "currency": "EUR", "customer_id": "customer", "customer": { "id": "customer", "name": null, "email": "guesjhvghht@example.com", "phone": "999999999", "phone_country_code": "+1" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "bank_debit", "payment_method_data": { "bank_debit": { "sepa": { "iban": "FI659********93470", "bank_account_holder_name": null } }, "billing": null }, "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": "FI", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "PiX", "last_name": null }, "phone": null, "email": null }, "billing": { "address": { "city": "San Fransico", "country": "FI", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "PiX", "last_name": "THE" }, "phone": null, "email": null }, "order_details": null, "email": "guesjhvghht@example.com", "name": null, "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": "sepa", "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": "c14b226e-dfc1-4458-a477-a7b3ee4387fd", "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_GJDKAKdDxM4bQ8xX0anw_1", "payment_link": null, "profile_id": "pro_892QTRQ3W6mWykBeSXDQ", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_UWrnV7EnGkfVapwuHOAM", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-07-18T13:00:03.008Z", "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-07-18T12:45:16.869Z", "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>Cypress</summary> WILL INTRODUCE IN NEXT PR. </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 <!-- @coderabbitai ignore -->
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. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/router_data.rs` - `crates/hyperswitch_domain_models/src/router_data_v2.rs` - `crates/hyperswitch_domain_models/src/router_data_v2/flow_common_types.rs` - ... and 3 more files **3. Core Business Logic** - `crates/router/src/core/connector_validation.rs` - `crates/router/src/core/payments.rs` - `crates/router/src/core/payments/access_token.rs` - ... and 16 more files **4. External Connector Integration** - `crates/common_enums/src/connector_enums.rs` - `crates/connector_configs/src/connector.rs` - `crates/connector_configs/toml/development.toml` - ... and 17 more files **5. Type Definitions** - `crates/hyperswitch_interfaces/src/types.rs` - `crates/router/src/types.rs` - `crates/router/src/types/api.rs` **6. Utils** - `crates/common_utils/src/lib.rs` **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** - `Cargo.lock` - `api-reference/v1/openapi_spec_v1.json` - `api-reference/v2/openapi_spec_v2.json` - ... and 3 more files **Code Patterns Applied:** - Define new data structures (36 changes) - Implement new functions (43 changes) - Extend existing types with new fields (353 changes) - Add conditional logic for feature flags or filtering (9 changes) - Modify database queries (1 changes) **Detailed Identifier Changes:** Commit b46a838d: Files to modify: **crates/api_models/src/admin.rs** Modify existing code **crates/common_enums/src/connector_enums.rs** Modify existing code **crates/common_utils/src/lib.rs** Add: - function: pub::now_rfc7231_http_date **crates/connector_configs/src/connector.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/nordea.rs** Remove: - function: private::get_auth_header Add: - function: pub::generate_digest_from_request - function: private::format_private_key - function: private::generate_signature - function: private::get_form_urlencoded_payload - function: private::build_request - function: private::get_http_method - function: private::get_http_method - function: private::build_request - function: private::build_request - function: private::build_request - function: private::get_connector_about - function: private::get_supported_payment_methods - function: private::get_supported_webhook_flows - function: private::authentication_token_for_token_creation - struct: private::SignatureParams - impl: impl api::ConnectorAuthenticationToken for Nordea - impl: impl api::PaymentsPreProcessing for Nordea - impl: impl ConnectorIntegration<Session, PaymentsSessionData, PaymentsResponseData> for Nordea - impl: impl ConnectorIntegration<SetupMandate, SetupMandateRequestData, PaymentsResponseData> for Nordea - impl: impl ConnectorIntegration<Capture, PaymentsCaptureData, PaymentsResponseData> for Nordea - impl: impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Nordea - impl: impl ConnectorIntegration<Execute, RefundsData, RefundsResponseData> for Nordea - impl: impl ConnectorIntegration<RSync, RefundsData, RefundsResponseData> for Nordea - impl: impl ConnectorSpecifications for Nordea - mod: private::requests - mod: private::responses **crates/hyperswitch_connectors/src/connectors/nordea/requests.rs** Add: - struct: pub::NordeaRouterData - struct: pub::NordeaOAuthRequest - struct: pub::NordeaOAuthExchangeRequest - struct: pub::AccountNumber - struct: pub::CreditorAccountReference - struct: pub::NordeaAddress - struct: pub::CreditorBank - struct: pub::CreditorAccount - struct: pub::DebitorAccount - struct: pub::InstructedAmount - struct: pub::RecurringInformation - struct: pub::ThirdPartyMessages - struct: pub::NordeaPaymentsRequest - struct: pub::NordeaPaymentsConfirmRequest - enum: pub::GrantType - enum: pub::AccessScope - enum: pub::AccountType - enum: pub::RecurrenceType - enum: pub::FundsAvailabilityRequest - enum: pub::PaymentsUrgency - enum: pub::TppCategory - enum: pub::TppCode - enum: pub::NordeaAuthenticationMethod - enum: pub::NordeaConfirmLanguage **crates/hyperswitch_connectors/src/connectors/nordea/responses.rs** Add: - struct: pub::NordeaOAuthExchangeResponse - struct: pub::NordeaGroupHeader - struct: pub::NordeaResponseLinks - struct: pub::TransactionFee - struct: pub::BankFee - struct: pub::ExchangeRate - struct: pub::MessagePagination - struct: pub::NordeaPaymentsInitiateResponseData - struct: pub::NordeaPaymentsInitiateResponse - struct: pub::NordeaPaymentsConfirmErrorObject - struct: pub::NordeaPaymentsResponseWrapper - struct: pub::NordeaPaymentsConfirmResponse - struct: pub::NordeaOriginalRequest - struct: pub::NordeaFailures - struct: pub::NordeaErrorBody - struct: pub::NordeaErrorResponse - enum: pub::NordeaPaymentStatus - enum: pub::FeesType - enum: pub::ChargeBearer **crates/hyperswitch_connectors/src/connectors/nordea/transformers.rs** Remove: - function: private::try_from - struct: pub::NordeaRouterData - struct: pub::NordeaPaymentsRequest - struct: pub::NordeaCard - impl: impl TryFrom<&NordeaRouterData<&PaymentsAuthorizeRouterData>> for NordeaPaymentsRequest **crates/hyperswitch_connectors/src/default_implementations.rs** Add: - impl: impl ConnectorAuthenticationToken for connectors::DummyConnector<T> - impl: impl ConnectorIntegration< AccessTokenAuthentication, AccessTokenAuthenticationRequestData, AccessTokenAuthenticationResponse, > for connectors::DummyConnector<T> **crates/hyperswitch_connectors/src/default_implementations_v2.rs** Modify existing code **crates/hyperswitch_connectors/src/utils.rs** Add: - function: private::get_ip_address **crates/hyperswitch_domain_models/src/router_data.rs** Add: - struct: pub::AccessTokenAuthenticationResponse **crates/hyperswitch_domain_models/src/router_data_v2.rs** Modify existing code **crates/hyperswitch_domain_models/src/router_data_v2/flow_common_types.rs** Add: - struct: pub::AuthenticationTokenFlowData **crates/hyperswitch_domain_models/src/router_flow_types/access_token_auth.rs** Add: - struct: pub::AccessTokenAuthentication **crates/hyperswitch_domain_models/src/router_request_types.rs** Add: - function: private::try_from - function: private::try_from - struct: pub::AccessTokenAuthenticationRequestData - impl: impl TryFrom<router_data::ConnectorAuthType> for AccessTokenAuthenticationRequestData - impl: impl TryFrom<( router_data::ConnectorAuthType, Option<AccessTokenAuthenticationResponse>, )> for AccessTokenRequestData **crates/hyperswitch_domain_models/src/types.rs** Modify existing code **crates/hyperswitch_interfaces/src/api.rs** Add: - trait: pub::ConnectorAuthenticationTokenV2 **crates/hyperswitch_interfaces/src/connector_integration_interface.rs** Add: - function: private::authentication_token_for_token_creation **crates/hyperswitch_interfaces/src/connector_integration_v2.rs** Modify existing code **crates/hyperswitch_interfaces/src/conversion_impls.rs** Add: - function: private::from_old_router_data - function: private::to_old_router_data - impl: impl RouterDataConversion<T, Req, Resp> for AuthenticationTokenFlowData **crates/hyperswitch_interfaces/src/types.rs** Modify existing code **crates/payment_methods/src/configs/payment_connector_required_fields.rs** Modify existing code **crates/router/src/core/connector_validation.rs** Modify existing code **crates/router/src/core/payments.rs** Modify existing code **crates/router/src/core/payments/access_token.rs** Add: - function: pub::execute_authentication_token **crates/router/src/core/payments/flows/approve_flow.rs** Modify existing code **crates/router/src/core/payments/flows/authorize_flow.rs** Modify existing code **crates/router/src/core/payments/flows/cancel_flow.rs** Modify existing code **crates/router/src/core/payments/flows/cancel_post_capture_flow.rs** Modify existing code **crates/router/src/core/payments/flows/capture_flow.rs** Modify existing code **crates/router/src/core/payments/flows/complete_authorize_flow.rs** Modify existing code **crates/router/src/core/payments/flows/incremental_authorization_flow.rs** Modify existing code **crates/router/src/core/payments/flows/post_session_tokens_flow.rs** Modify existing code **crates/router/src/core/payments/flows/psync_flow.rs** Modify existing code **crates/router/src/core/payments/flows/reject_flow.rs** Modify existing code **crates/router/src/core/payments/flows/session_flow.rs** Modify existing code **crates/router/src/core/payments/flows/session_update_flow.rs** Modify existing code **crates/router/src/core/payments/flows/setup_mandate_flow.rs** Modify existing code **crates/router/src/core/payments/flows/update_metadata_flow.rs** Modify existing code **crates/router/src/core/refunds.rs** Modify existing code **crates/router/src/core/refunds_v2.rs** Modify existing code **crates/router/src/services/api.rs** Modify existing code **crates/router/src/types.rs** Remove: - function: private::foreign_try_from - impl: impl ForeignTryFrom<ConnectorAuthType> for AccessTokenRequestData **crates/router/src/types/api.rs** Modify existing code **crates/router/src/types/api/connector_mapping.rs** Modify existing code **crates/router/src/types/connector_transformers.rs** Modify existing code **crates/test_utils/src/connector_auth.rs** Modify existing code
{"pr_number": 8133, "pr_title": "feat(core/connector): introduce authentication token flow and add sepa bankdebit for nordea", "merged_at": "2025-08-11T07:26:26Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/admin.rs"], "domain": ["crates/hyperswitch_domain_models/src/router_data.rs", "crates/hyperswitch_domain_models/src/router_data_v2.rs", "crates/hyperswitch_domain_models/src/router_data_v2/flow_common_types.rs", "crates/hyperswitch_domain_models/src/router_flow_types/access_token_auth.rs", "crates/hyperswitch_domain_models/src/router_request_types.rs", "crates/hyperswitch_domain_models/src/types.rs"], "core_business": ["crates/router/src/core/connector_validation.rs", "crates/router/src/core/payments.rs", "crates/router/src/core/payments/access_token.rs", "crates/router/src/core/payments/flows/approve_flow.rs", "crates/router/src/core/payments/flows/authorize_flow.rs", "crates/router/src/core/payments/flows/cancel_flow.rs", "crates/router/src/core/payments/flows/cancel_post_capture_flow.rs", "crates/router/src/core/payments/flows/capture_flow.rs", "crates/router/src/core/payments/flows/complete_authorize_flow.rs", "crates/router/src/core/payments/flows/incremental_authorization_flow.rs", "crates/router/src/core/payments/flows/post_session_tokens_flow.rs", "crates/router/src/core/payments/flows/psync_flow.rs", "crates/router/src/core/payments/flows/reject_flow.rs", "crates/router/src/core/payments/flows/session_flow.rs", "crates/router/src/core/payments/flows/session_update_flow.rs", "crates/router/src/core/payments/flows/setup_mandate_flow.rs", "crates/router/src/core/payments/flows/update_metadata_flow.rs", "crates/router/src/core/refunds.rs", "crates/router/src/core/refunds_v2.rs"], "connectors": ["crates/common_enums/src/connector_enums.rs", "crates/connector_configs/src/connector.rs", "crates/connector_configs/toml/development.toml", "crates/connector_configs/toml/production.toml", "crates/connector_configs/toml/sandbox.toml", "crates/hyperswitch_connectors/Cargo.toml", "crates/hyperswitch_connectors/src/connectors/nordea.rs", "crates/hyperswitch_connectors/src/connectors/nordea/requests.rs", "crates/hyperswitch_connectors/src/connectors/nordea/responses.rs", "crates/hyperswitch_connectors/src/connectors/nordea/transformers.rs", "crates/hyperswitch_connectors/src/default_implementations.rs", "crates/hyperswitch_connectors/src/default_implementations_v2.rs", "crates/hyperswitch_connectors/src/utils.rs", "crates/hyperswitch_interfaces/src/connector_integration_interface.rs", "crates/hyperswitch_interfaces/src/connector_integration_v2.rs", "crates/payment_methods/src/configs/payment_connector_required_fields.rs", "crates/router/src/types/api/connector_mapping.rs", "crates/router/src/types/connector_transformers.rs", "crates/router/tests/connectors/sample_auth.toml", "crates/test_utils/src/connector_auth.rs"], "types": ["crates/hyperswitch_interfaces/src/types.rs", "crates/router/src/types.rs", "crates/router/src/types/api.rs"], "utils": ["crates/common_utils/src/lib.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": ["Cargo.lock", "api-reference/v1/openapi_spec_v1.json", "api-reference/v2/openapi_spec_v2.json", "crates/hyperswitch_interfaces/src/api.rs", "crates/hyperswitch_interfaces/src/conversion_impls.rs", "crates/router/src/services/api.rs"]}, "change_types": {"structs_added": 36, "functions_added": 43, "enums_added": 13, "fields_added": 353, "imports_added": 25, "conditionals_added": 9, "database_queries": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(connector): [Novalnet] allow debit card MITs ## 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/7956 ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context Fixes the bug which allows debit card mandate creation, but does not allow MITs for the same payment method entry. ## How did you test it? Same as described in https://github.com/juspay/hyperswitch/pull/7956 ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/novalnet/transformers.rs` **Detailed Identifier Changes:** Commit 0f684bc0: Files to modify: **crates/hyperswitch_connectors/src/connectors/novalnet/transformers.rs** Modify existing code
{"pr_number": 7959, "pr_title": "fix(connector): [Novalnet] allow debit card MITs", "merged_at": "2025-05-05T12:34:09Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "card"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/novalnet/transformers.rs"]}, "change_types": {}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(process_tracker): Add a version column in process tracker table ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Add a version column in process tracker table. This PR also includes the changes for filtering the range queries based on the versions ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? - when we create a task in v1 at `2025-03-05 13:20` the task is picked up by v1 producer and not the v2 producer, as displayed in the following screenshot <img width="1697" alt="Screenshot 2025-03-06 at 8 33 02 AM" src="https://github.com/user-attachments/assets/68a15061-0e84-44a8-84fa-45b8204c299c" /> - And the consumer v1 picks up the tasks from REDIS_STREAM_1 <img width="847" alt="Screenshot 2025-03-06 at 8 43 12 AM" src="https://github.com/user-attachments/assets/e3229398-9b24-416b-90b3-b930e7204e07" /> - same goes vice versa, for v2 the task is picked up at `2025-03-05 13:33` by v2 producer and not the v1 producer, as displayed in the following screenshot <img width="1697" alt="Screenshot 2025-03-06 at 8 37 37 AM" src="https://github.com/user-attachments/assets/299d2ff5-183b-47cd-80cc-5eda502cbda1" /> - And the consumer v2 picks up the tasks from REDIS_STREAM_7 <img width="847" alt="Screenshot 2025-03-06 at 8 44 10 AM" src="https://github.com/user-attachments/assets/d7692072-37fc-4971-8fad-399d60daef71" /> ## 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/process_tracker.rs` - `crates/diesel_models/src/query/process_tracker.rs` - `crates/diesel_models/src/schema.rs` - ... and 1 more files **2. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/consts.rs` **3. Core Business Logic** - `crates/router/src/core/api_keys.rs` - `crates/router/src/core/passive_churn_recovery.rs` - `crates/router/src/core/payment_methods.rs` - ... and 5 more files **4. Configuration Files** - `crates/router/Cargo.toml` - `crates/scheduler/Cargo.toml` **5. Other** - `crates/router/src/db/kafka_store.rs` - `crates/scheduler/src/db/process_tracker.rs` - `migrations/2025-02-18-091645_add_api_version_for_process_tracker/down.sql` - ... and 1 more files **Code Patterns Applied:** - Extend existing types with new fields (6 changes) - Modify database queries (4 changes) **Detailed Identifier Changes:** Commit dbecdcf1: Files to modify: **crates/diesel_models/src/process_tracker.rs** Modify existing code **crates/diesel_models/src/query/process_tracker.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/consts.rs** Modify existing code **crates/router/src/core/api_keys.rs** Modify existing code **crates/router/src/core/passive_churn_recovery.rs** Modify existing code **crates/router/src/core/payment_methods.rs** Modify existing code **crates/router/src/core/payment_methods/vault.rs** Modify existing code **crates/router/src/core/payments.rs** Modify existing code **crates/router/src/core/payouts.rs** Modify existing code **crates/router/src/core/refunds.rs** Modify existing code **crates/router/src/core/webhooks/outgoing.rs** Modify existing code **crates/router/src/db/kafka_store.rs** Modify existing code **crates/scheduler/src/db/process_tracker.rs** Modify existing code
{"pr_number": 7389, "pr_title": "feat(process_tracker): Add a version column in process tracker table", "merged_at": "2025-03-11T10:44:24Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user"]}, "hierarchy": {"database": ["crates/diesel_models/src/process_tracker.rs", "crates/diesel_models/src/query/process_tracker.rs", "crates/diesel_models/src/schema.rs", "crates/diesel_models/src/schema_v2.rs"], "domain": ["crates/hyperswitch_domain_models/src/consts.rs"], "core_business": ["crates/router/src/core/api_keys.rs", "crates/router/src/core/passive_churn_recovery.rs", "crates/router/src/core/payment_methods.rs", "crates/router/src/core/payment_methods/vault.rs", "crates/router/src/core/payments.rs", "crates/router/src/core/payouts.rs", "crates/router/src/core/refunds.rs", "crates/router/src/core/webhooks/outgoing.rs"], "config": ["crates/router/Cargo.toml", "crates/scheduler/Cargo.toml"], "other": ["crates/router/src/db/kafka_store.rs", "crates/scheduler/src/db/process_tracker.rs", "migrations/2025-02-18-091645_add_api_version_for_process_tracker/down.sql", "migrations/2025-02-18-091645_add_api_version_for_process_tracker/up.sql"]}, "change_types": {"fields_added": 6, "imports_added": 1, "database_queries": 4}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor(kafka_message): NanoSecond precision for consolidated logs ## 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 --> Adding nanosecond level precision to kafka messages for sessionizer ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> So due to millisecond level precision earlier , sessionizer was getting updates in same millisecond due to which updates we not getting picked up ![Screenshot](https://github.com/user-attachments/assets/b1bad009-86db-45d5-8cc5-30b28a8880ae) ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? Post deployment, the timestamp columns would have nano-second based epoch value ![Screenshot](https://github.com/user-attachments/assets/46a3641d-92ae-4cbb-8af6-9e147f8c529d) --> Via Kafka UI ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Other** - `crates/router/src/services/kafka/dispute_event.rs` - `crates/router/src/services/kafka/payment_attempt_event.rs` - `crates/router/src/services/kafka/payment_intent_event.rs` - ... and 1 more files **Detailed Identifier Changes:** Commit fb3a49be: Files to modify: **crates/router/src/services/kafka/dispute_event.rs** Modify existing code **crates/router/src/services/kafka/payment_attempt_event.rs** Modify existing code **crates/router/src/services/kafka/payment_intent_event.rs** Modify existing code **crates/router/src/services/kafka/refund_event.rs** Modify existing code
{"pr_number": 6771, "pr_title": "refactor(kafka_message): NanoSecond precision for consolidated logs", "merged_at": "2024-12-12T10:18:40Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user", "session"]}, "hierarchy": {"other": ["crates/router/src/services/kafka/dispute_event.rs", "crates/router/src/services/kafka/payment_attempt_event.rs", "crates/router/src/services/kafka/payment_intent_event.rs", "crates/router/src/services/kafka/refund_event.rs"]}, "change_types": {}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
chore(wasm): show allowed auth methods option in google pay ## 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 --> Allow user to configure allowed auth methods for google pay ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? Locally In this PR, only wasm changes are there so no test cases required <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/connector_configs/toml/development.toml` - `crates/connector_configs/toml/production.toml` - `crates/connector_configs/toml/sandbox.toml`
{"pr_number": 7425, "pr_title": "chore(wasm): show allowed auth methods option in google pay", "merged_at": "2025-03-11T10:11:29Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user"]}, "hierarchy": {"connectors": ["crates/connector_configs/toml/development.toml", "crates/connector_configs/toml/production.toml", "crates/connector_configs/toml/sandbox.toml"]}, "change_types": {}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
fix(connector): GooglePay fixed in Ayden ## 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 --> https://github.com/juspay/hyperswitch/pull/7393 ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_Coa5dQU6Vo2ezZrfgvAlgmDed2NjJmuW1hTcmI5uMevC27Tkp4F16r5Om4HEb9UU' \ --data-raw '{ "amount": 6540, "currency": "USD", "amount_to_capture": 6540, "confirm": true, "profile_id": null, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "authentication_type": "three_ds", "setup_future_usage": "on_session", "customer": { "id": "customer123", "name": "John Doe", "email": "customer@gmail.com", "phone": "9999999999", "phone_country_code": "+1" }, "customer_id": "customer123", "phone_country_code": "+1", "routing": { "type": "single", "data": "stripe" }, "description": "Its my first payment request", "return_url": "https://google.com", "payment_method": "wallet", "payment_method_type": "google_pay", "payment_method_data": { "wallet": { "google_pay": { "type": "CARD", "description": "Amex •••• 0002", "info": { "assurance_details": { "account_verified": true, "card_holder_authenticated": false }, "card_details": "0002", "card_network": "AMEX" }, "tokenization_data": { "token": "{\"signature\":\"MEYCIQC7ferzG3SQgMMoJ18frh9oLAdQigN4jTAeAlx26IoCawIhAIL/6we459IuANws+AeNbeU5+eBnscy7FBjaANj9lJmd\",\"protocolVersion\":\"ECv1\",\"signedMessage\":\"{\\\"encryptedMessage\\\":\\\"VFe6XC/1MKP2O9ETH6Uv/NUe0MtyHjAe0uqDsZ3b1jtUw/crQ+LIAEhgFt0+B2r6pqJdg56yYzZ4nuuEiIVMvgDtMr6Lz8bHRDv620RSFT+lfZOHFAX0JtKAzUSbfzR50tnMFAlBEPBfOKCGVKboA0g2dfQhfhyYFX5pqgEM8rg0/YHl5FPpfSH1ZaZQxM/PXwF/ju84zB9doOVyYyT6/jUtnoW6FmGChVZPSuV3o++y9Q+lOEGTjOEQTsLrWtqiRit3atkiLguzo57xrK6TE9hK6+3XXv8o/7gbBQPaxlXYWSbjRK4mHkOmkC0LTSiPVvJkKlY0SHMjKz85jwcttWs3LgPSHkKkFv+VM4vQiXIjAbmX1KMfgbLcEVNfAWL+/j/IwSif66DVakkO277KcsVhpQC2y/p/1VMTDtg45guT2kMVJsqQORumwJPvYumVgpwIFmlg5uDKo7j0ioyeagp67lBdhZbsyvyJsyzFbSCyGoXaFCJbYqNQIVl8ioFuCIe50ePc79Mkxony\\\",\\\"ephemeralPublicKey\\\":\\\"BBWzyB4tX5yqOEDaryLLlX9h91M2298ChS0lYgHLbXwN/eEh0V8w2PX/psg12dY2do2ksP2NA3be/e+9NhvTlU0\\\\u003d\\\",\\\"tag\\\":\\\"123ZOhok0+5uiBUYaO3i5U/h73+YsXPbwK8IhinHVl8\\\\u003d\\\"}\"}", "type": "PAYMENT_GATEWAY" } } } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "guest@example.com" }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "guest@example.com" }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "order_details": [ { "product_name": "Apple iphone 15", "quantity": 1, "amount": 6540, "account_name": "transaction_processing" } ], "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" }, "browser_info": { "user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36", "accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8", "language": "nl-NL", "color_depth": 24, "screen_height": 723, "screen_width": 1536, "time_zone": 0, "java_enabled": true, "java_script_enabled": true, "ip_address": "128.0.0.1" }, "customer_acceptance": { "acceptance_type": "offline", "accepted_at": "1963-05-03T04:07:52.723Z", "online": { "ip_address": "125.0.0.1", "user_agent": "amet irure esse" } }, "connector_metadata": { "noon": { "order_category": "pay" } }, "payment_link": false, "payment_link_config": { "theme": "", "logo": "", "seller_name": "", "sdk_layout": "", "display_sdk_only": false, "enabled_saved_payment_method": false }, "payment_type": "normal", "request_incremental_authorization": false, "merchant_order_reference_id": "test_ord", "session_expiry": 900 }' ``` Response ``` { "payment_id": "pay_BHtu7Av3hbxF6YGyNg6y", "merchant_id": "merchant_1740661643", "status": "succeeded", "amount": 6540, "net_amount": 6540, "shipping_cost": null, "amount_capturable": 0, "amount_received": 6540, "connector": "adyen", "client_secret": "pay_BHtu7Av3hbxF6YGyNg6y_secret_Ta6ChMs3WiuxCppvsKm8", "created": "2025-02-27T13:07:38.606Z", "currency": "USD", "customer_id": "customer123", "customer": { "id": "customer123", "name": "John Doe", "email": "customer@gmail.com", "phone": "9999999999", "phone_country_code": "+1" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "on_session", "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "wallet", "payment_method_data": { "wallet": { "google_pay": { "last4": "0002", "card_network": "AMEX", "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": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "guest@example.com" }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "guest@example.com" }, "order_details": [ { "brand": null, "amount": 6540, "category": null, "quantity": 1, "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": 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": "customer123", "created_at": 1740661658, "expires": 1740665258, "secret": "epk_fa7ee7a7801840348e3e6f6e6f20adf3" }, "manual_retry_allowed": false, "connector_transaction_id": "LMSBT86ZTGGNFL75", "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": "pay_BHtu7Av3hbxF6YGyNg6y_1", "payment_link": null, "profile_id": "pro_5CrLzkPfIhQSZT0e92na", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_kc9GbBR2tswsauYa0J2O", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-02-27T13:22:38.605Z", "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-27T13:07:40.697Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": "test_ord", "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": null } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/router/src/connector/adyen/transformers.rs` **Detailed Identifier Changes:** Commit 5b671630: Files to modify: **crates/router/src/connector/adyen/transformers.rs** Modify existing code
{"pr_number": 7400, "pr_title": "fix(connector): GooglePay fixed in Ayden ", "merged_at": "2025-03-03T11:18:28Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/router/src/connector/adyen/transformers.rs"]}, "change_types": {}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): [Xendit] ADD Cards & Mandates Flow ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Added Xendit Cards & Mandates Flow ### 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 ## How did you test it? <img width="744" alt="Screenshot 2025-01-09 at 1 17 47 PM" src="https://github.com/user-attachments/assets/43daa6e8-1033-470a-9ae0-737816240c70" /> <img width="746" alt="Screenshot 2025-01-09 at 1 20 37 PM" src="https://github.com/user-attachments/assets/c0b791be-2542-4615-bab5-a60adf9e0703" /> <img width="853" alt="Screenshot 2025-01-09 at 1 20 58 PM" src="https://github.com/user-attachments/assets/3ac69984-3bb2-4997-b8b6-02445416ab28" /> <img width="901" alt="Screenshot 2025-01-09 at 1 21 10 PM" src="https://github.com/user-attachments/assets/3d30e7fd-bf8c-432f-abdf-f184e0b2731d" /> **Three-DS ** ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_tq4ULEe1sBlAVdBP2vInkkBCLMBBPimfl5cfsGZKq19Apf2XxUxxJYfYQ0iDTvkb' \ --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": "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": "guest@example.com" }, }' Response { "payment_id": "pay_J396NwTCTnQR6aNN06cj", "merchant_id": "merchant_1736237814", "status": "requires_customer_action", "amount": 651200, "net_amount": 651200, "shipping_cost": null, "amount_capturable": 651200, "amount_received": null, "connector": "xendit", "client_secret": "pay_J396NwTCTnQR6aNN06cj_secret_D8MZIqPS0np9YOmdaY1k", "created": "2025-01-09T08:02:30.946Z", "currency": "IDR", "customer_id": "First_Customer", "customer": { "id": "First_Customer", "name": "John Doe", "email": "guest@example.com", "phone": "999999999", "phone_country_code": "+65" }, "description": null, "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "1091", "card_type": "CREDIT", "card_network": "Visa", "card_issuer": "INTL HDQTRS-CENTER OWNED", "card_issuing_country": "UNITEDSTATES", "card_isin": "400000", "card_extended_bin": null, "card_exp_month": "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": "guest@example.com" }, "order_details": null, "email": "guest@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_J396NwTCTnQR6aNN06cj/merchant_1736237814/pay_J396NwTCTnQR6aNN06cj_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": "First_Customer", "created_at": 1736409750, "expires": 1736413350, "secret": "epk_2775a6f3843b44088dfd343772ec8f90" }, "manual_retry_allowed": null, "connector_transaction_id": "pr-68380c6c-fa9c-4f70-8f90-b3435d13294c", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "32864b78-b0e6-404f-91d5-3499ca43d437", "payment_link": null, "profile_id": "pro_LHUMEFyJkdZ8ZpRYaPlO", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_Z3QCs07PIgZl44iBlKr7", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-01-09T08:17:30.946Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2025-01-09T08:02:32.018Z", "split_payments": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null } ``` **Redirection Response** <img width="676" alt="Screenshot 2025-01-09 at 1 33 00 PM" src="https://github.com/user-attachments/assets/e47e637a-3122-4f7a-b6a2-ab2c47bf5496" /> <img width="1044" alt="Screenshot 2025-01-09 at 1 34 03 PM" src="https://github.com/user-attachments/assets/04c66815-f696-4f6f-86e8-de4513b2aa4e" /> **Mandates 3DS** ``` Request: CIT curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_tq4ULEe1sBlAVdBP2vInkkBCLMBBPimfl5cfsGZKq19Apf2XxUxxJYfYQ0iDTvkb' \ --data-raw '{ "amount": 651200, "currency": "IDR", "confirm": true, "capture_method": "automatic", "customer_id": "First_Customer", "authentication_type": "three_ds", "return_url": "https://google.com", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4000000000001091", "card_exp_month": "12", "card_exp_year": "27", "card_holder_name": "joseph Doe", "card_cvc": "124" } }, "billing": { "phone": { "number": "8056594427", "country_code": "+91" }, "email": "guest@example.com" }, "setup_future_usage": "off_session", "customer_acceptance": { "acceptance_type": "online", "accepted_at": "1963-05-03T04:07:52.723Z", "online": { "ip_address": "127.0.0.1", "user_agent": "amet irure esse" } } }' Response { "payment_id": "pay_mFnbSGcR9kGihTbbZlk1", "merchant_id": "merchant_1736237814", "status": "requires_customer_action", "amount": 651200, "net_amount": 651200, "shipping_cost": null, "amount_capturable": 651200, "amount_received": null, "connector": "xendit", "client_secret": "pay_mFnbSGcR9kGihTbbZlk1_secret_WcRx43ISAJxiWd36FYwi", "created": "2025-01-09T08:05:08.408Z", "currency": "IDR", "customer_id": "First_Customer", "customer": { "id": "First_Customer", "name": "John Doe", "email": "guest@example.com", "phone": "999999999", "phone_country_code": "+65" }, "description": null, "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "off_session", "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "1091", "card_type": "CREDIT", "card_network": "Visa", "card_issuer": "INTL HDQTRS-CENTER OWNED", "card_issuing_country": "UNITEDSTATES", "card_isin": "400000", "card_extended_bin": null, "card_exp_month": "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": "guest@example.com" }, "order_details": null, "email": "guest@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_mFnbSGcR9kGihTbbZlk1/merchant_1736237814/pay_mFnbSGcR9kGihTbbZlk1_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": "First_Customer", "created_at": 1736409908, "expires": 1736413508, "secret": "epk_6c04b0ae18fb45c6947cb8debbd8ffb3" }, "manual_retry_allowed": null, "connector_transaction_id": "pr-daa78a5d-9c69-4d92-8333-ec358739018c", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "6e6cb3b5-00cd-43ff-8162-26cd4cbd96f8", "payment_link": null, "profile_id": "pro_LHUMEFyJkdZ8ZpRYaPlO", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_Z3QCs07PIgZl44iBlKr7", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-01-09T08:20:08.408Z", "fingerprint": null, "browser_info": null, "payment_method_id": "pm_pC8guSouUhlruaVUnMeQ", "payment_method_status": "inactive", "updated": "2025-01-09T08:05:09.242Z", "split_payments": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": "pm-8c1b96d1-6dbf-40f1-bf7f-02fb85b50275" } **Sync Response** <img width="1064" alt="Screenshot 2025-01-09 at 1 37 00 PM" src="https://github.com/user-attachments/assets/012f527a-bef7-4886-b752-a4779a95744f" /> ``` **MIT-Payments** ``` Request: curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_tq4ULEe1sBlAVdBP2vInkkBCLMBBPimfl5cfsGZKq19Apf2XxUxxJYfYQ0iDTvkb' \ --data-raw '{ "amount": 6500000, "currency": "IDR", "confirm": true, "capture_method": "automatic", "customer_id": "First_Customer", "email": "guest@example.com", "off_session": true, "recurring_details": { "type": "payment_method_id", "data": "pm_pC8guSouUhlruaVUnMeQ" }, "billing": { "address": { "city": "test", "country": "US", "line1": "here", "line2": "there", "line3": "anywhere", "zip": "560095", "state": "Washington", "first_name": "One", "last_name": "Two" }, "phone": { "number": "1234567890", "country_code": "+1" }, "email": "guest@example.com" } }' Response { "payment_id": "pay_jQ9tMQek9zg1LULe6iGe", "merchant_id": "merchant_1736237814", "status": "processing", "amount": 6500000, "net_amount": 6500000, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": "xendit", "client_secret": "pay_jQ9tMQek9zg1LULe6iGe_secret_kDteLBW9dmMfCUaPJvoz", "created": "2025-01-09T08:08:57.890Z", "currency": "IDR", "customer_id": "First_Customer", "customer": { "id": "First_Customer", "name": "John Doe", "email": "guest@example.com", "phone": "999999999", "phone_country_code": "+65" }, "description": null, "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": true, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "1091", "card_type": "CREDIT", "card_network": "Visa", "card_issuer": "INTL HDQTRS-CENTER OWNED", "card_issuing_country": "UNITEDSTATES", "card_isin": "400000", "card_extended_bin": null, "card_exp_month": "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": { "city": "test", "country": "US", "line1": "here", "line2": "there", "line3": "anywhere", "zip": "560095", "state": "Washington", "first_name": "One", "last_name": "Two" }, "phone": { "number": "1234567890", "country_code": "+1" }, "email": "guest@example.com" }, "order_details": null, "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "return_url": null, "authentication_type": "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": 1736410137, "expires": 1736413737, "secret": "epk_75908c6e3a9843e7bd685f32058cd10e" }, "manual_retry_allowed": false, "connector_transaction_id": "pr-ca0126e8-03de-424d-a3db-02a55c9d93c8", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "2c7ed899-7b29-4a4b-92e7-06a3d647c394", "payment_link": null, "profile_id": "pro_LHUMEFyJkdZ8ZpRYaPlO", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_Z3QCs07PIgZl44iBlKr7", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-01-09T08:23:57.890Z", "fingerprint": null, "browser_info": null, "payment_method_id": "pm_pC8guSouUhlruaVUnMeQ", "payment_method_status": "active", "updated": "2025-01-09T08:08:58.839Z", "split_payments": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": "pm-8c1b96d1-6dbf-40f1-bf7f-02fb85b50275" } ``` Sync: <img width="1314" alt="Screenshot 2025-01-13 at 4 32 16 PM" src="https://github.com/user-attachments/assets/e59739c4-ba05-444f-bc61-f3b92e54aa36" /> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Core Business Logic** - `crates/router/src/core/admin.rs` - `crates/router/src/core/payments/connector_integration_v2_impls.rs` - `crates/router/src/core/payments/flows.rs` **2. External Connector Integration** - `crates/common_enums/src/connector_enums.rs` - `crates/connector_configs/src/connector.rs` - `crates/connector_configs/toml/development.toml` - ... and 7 more files **3. Type Definitions** - `crates/router/src/types/api.rs` - `crates/router/src/types/transformers.rs` **4. Tests** - `cypress-tests/cypress/e2e/PaymentTest/00007-VoidPayment.cy.js` - `cypress-tests/cypress/e2e/PaymentUtils/Utils.js` - `cypress-tests/cypress/e2e/PaymentUtils/Xendit.js` - ... and 1 more files **5. Other** - `api-reference-v2/openapi_spec.json` - `api-reference/openapi_spec.json` **Code Patterns Applied:** - Define new data structures (12 changes) - Implement new functions (14 changes) - Extend existing types with new fields (642 changes) - Add conditional logic for feature flags or filtering (2 changes) **Detailed Identifier Changes:** Commit bbf88446: 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/xendit.rs** Remove: - impl: impl ConnectorIntegration<AccessTokenAuth, AccessTokenRequestData, AccessToken> for Xendit Add: - function: private::build_request - function: private::validate_connector_against_payment_request - function: private::validate_mandate_payment - impl: impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Xendit - impl: impl ConnectorIntegration<AccessTokenAuth, AccessTokenRequestData, AccessToken> for Xendit **crates/hyperswitch_connectors/src/connectors/xendit/transformers.rs** Remove: - function: private::from - struct: pub::XenditCard **crates/hyperswitch_connectors/src/default_implementations.rs** Modify existing code **crates/hyperswitch_connectors/src/utils.rs** Add: - function: private::get_cardholder_name **crates/router/src/configs/defaults/payment_connector_required_fields.rs** Modify existing code **crates/router/src/core/admin.rs** Modify existing code **crates/router/src/core/payments/connector_integration_v2_impls.rs** Modify existing code **crates/router/src/core/payments/flows.rs** Modify existing code **crates/router/src/types/api.rs** Modify existing code **crates/router/src/types/transformers.rs** Modify existing code
{"pr_number": 6966, "pr_title": "feat(connector): [Xendit] ADD Cards & Mandates Flow ", "merged_at": "2025-01-15T10:51:54Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"core_business": ["crates/router/src/core/admin.rs", "crates/router/src/core/payments/connector_integration_v2_impls.rs", "crates/router/src/core/payments/flows.rs"], "connectors": ["crates/common_enums/src/connector_enums.rs", "crates/connector_configs/src/connector.rs", "crates/connector_configs/toml/development.toml", "crates/connector_configs/toml/production.toml", "crates/connector_configs/toml/sandbox.toml", "crates/hyperswitch_connectors/src/connectors/xendit.rs", "crates/hyperswitch_connectors/src/connectors/xendit/transformers.rs", "crates/hyperswitch_connectors/src/default_implementations.rs", "crates/hyperswitch_connectors/src/utils.rs", "crates/router/src/configs/defaults/payment_connector_required_fields.rs"], "types": ["crates/router/src/types/api.rs", "crates/router/src/types/transformers.rs"], "tests": ["cypress-tests/cypress/e2e/PaymentTest/00007-VoidPayment.cy.js", "cypress-tests/cypress/e2e/PaymentUtils/Utils.js", "cypress-tests/cypress/e2e/PaymentUtils/Xendit.js", "cypress-tests/cypress/support/redirectionHandler.js"], "other": ["api-reference-v2/openapi_spec.json", "api-reference/openapi_spec.json"]}, "change_types": {"structs_added": 12, "functions_added": 14, "enums_added": 5, "fields_added": 642, "imports_added": 9, "conditionals_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
chore: add migrate_v2_compatible recipe in justfile ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Added a new justfile recipe to run v2 migrations compatible with v1 schema. Refactor v2 migration: * move all v1 compatible migrations to a separate directory. * refactor just commands to run the migration scripts as per the new directory structure. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Tested manually by running the following commands. `just migrate` `just migrate_v2_compatible` `just migrate_v2` ![image](https://github.com/user-attachments/assets/df205f51-e795-4e71-8483-e557ddd626ab) ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] 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** - `justfile` - `v2_migrations/2024-07-29-155137_add_v2_soft_delete_db_enum/down.sql` - `v2_migrations/2024-07-29-155137_add_v2_soft_delete_db_enum/up.sql` - ... and 6 more files **Code Patterns Applied:** - Add conditional logic for feature flags or filtering (1 changes)
{"pr_number": 7415, "pr_title": "chore: add migrate_v2_compatible recipe in justfile", "merged_at": "2025-03-07T13:52:56Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user"]}, "hierarchy": {"other": ["justfile", "v2_migrations/2024-07-29-155137_add_v2_soft_delete_db_enum/down.sql", "v2_migrations/2024-07-29-155137_add_v2_soft_delete_db_enum/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-081747_recreate_ids_for_v2/down.sql", "v2_migrations/2024-08-28-081747_recreate_ids_for_v2/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"]}, "change_types": {"conditionals_added": 1}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
fix(connector): [CYBERSOURCE] send xid as none for external 3ds payments ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> send xid as none for external 3ds payments Main PR - https://github.com/juspay/hyperswitch/pull/7577 ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Test cases in main PR ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs` **Code Patterns Applied:** - Extend existing types with new fields (3 changes) **Detailed Identifier Changes:** Commit 3efc99f6: Files to modify: **crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs** Modify existing code
{"pr_number": 7576, "pr_title": "fix(connector): [CYBERSOURCE] send xid as none for external 3ds payments", "merged_at": "2025-03-20T05:41:50Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs"]}, "change_types": {"fields_added": 3}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(api): Adds support to change reveue_recovery_retry_algorithm_type using UpdateProfileAPI (V2) ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This Pr provides support to change `revenue_recovery_retry_algorithm_type` under the profile using ProfileUpdate 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? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Create a Business Profile and hit the following api. ``` curl --location --request PUT '{{base_url}}/v2/profiles/{{profile_id}}' \ --header 'x-merchant-id: {{merchant_id}}' \ --header 'Authorization: {{admin_api_key}}' \ --header 'Content-Type: application/json' \ --header 'api-key: {{admin-api-key}}' \ --data '{ "revenue_recovery_retry_algorithm_type": "monitoring" }' ``` And verify the `revenue_recovery_retry_algorithm_type` status of the Business Profile In the DB. ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] 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. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/business_profile.rs` **3. Core Business Logic** - `crates/router/src/core/admin.rs` **Code Patterns Applied:** - Extend existing types with new fields (2 changes) **Detailed Identifier Changes:** Commit 9c6f0b7c: Files to modify: **crates/api_models/src/admin.rs** Modify existing code **crates/hyperswitch_domain_models/src/business_profile.rs** Modify existing code **crates/router/src/core/admin.rs** Modify existing code
{"pr_number": 8858, "pr_title": "feat(api): Adds support to change reveue_recovery_retry_algorithm_type using UpdateProfileAPI (V2)", "merged_at": "2025-08-08T09:24:32Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/admin.rs"], "domain": ["crates/hyperswitch_domain_models/src/business_profile.rs"], "core_business": ["crates/router/src/core/admin.rs"]}, "change_types": {"fields_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): [trustpay] introduce instant bank_transfer, finland and poland ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description - Implement InstantBankTransferFinland for Trustpay - Implement InstantBankTransferPoland for Trustpay - Also fixes typos in the repo ### Additional Changes - [x] This PR modifies the API contract - [ ] This PR modifies the database schema - [x] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> - config/ - loadtest/ - crates/connector_configs/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). --> NA ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> By making payment through introduced payment method types. <details> <summary>Instant Bank Transfer Finland Payment</summary> ```curl curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_MkJxqoVkISRvnKqtloVUiLpyXqLDNaeY8WDcIDLPMQ4CSFt7eh42C6ISn0w9f0lB' \ --data-raw '{ "amount": 1, "currency": "PLN", "confirm": true, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 1, "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": "bank_transfer", "payment_method_type": "instant_bank_transfer_poland", "payment_method_data": { "bank_transfer": { "instant_bank_transfer_poland": {} } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "PL", "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": "PL", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "browser_info": { "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "language": "nl-NL", "color_depth": 24, "screen_height": 723, "screen_width": 1536, "time_zone": 0, "java_enabled": true, "java_script_enabled": true, "ip_address": "125.0.0.1" }, "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_mLvd0FUpuxnGhTZU8ael", "merchant_id": "postman_merchant_GHAction_ce2dd562-05c9-49ce-8305-e25bde428103", "status": "requires_customer_action", "amount": 1, "net_amount": 1, "shipping_cost": null, "amount_capturable": 1, "amount_received": null, "connector": "trustpay", "client_secret": "pay_mLvd0FUpuxnGhTZU8ael_secret_tOnuSQACQqBZWMerllUD", "created": "2025-06-09T18:18:21.709Z", "currency": "PLN", "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_poland": {} }, "billing": null }, "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": "PL", "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": "PL", "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://duck.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "next_action": { "type": "redirect_to_url", "redirect_to_url": "http://localhost:8080/payments/redirect/pay_mLvd0FUpuxnGhTZU8ael/postman_merchant_GHAction_ce2dd562-05c9-49ce-8305-e25bde428103/pay_mLvd0FUpuxnGhTZU8ael_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_poland", "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": 1749493101, "expires": 1749496701, "secret": "epk_bcebc37b463f4c6bafa5a6d57762c9bf" }, "manual_retry_allowed": null, "connector_transaction_id": "2224056845", "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_NHOLLnSzgFm54rSvDFmg", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_BGFeiO7U2AU7zBbWkruC", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-06-09T18:33:21.709Z", "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-06-09T18:18:21.937Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": null, "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null } ``` <img width="750" alt="image" src="https://github.com/user-attachments/assets/0c3ccab7-942e-4282-bd71-9f04272ec8f7" /> </details> <details> <summary>Instant Bank Transfer Poland Payment</summary> ```curl curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_MkJxqoVkISRvnKqtloVUiLpyXqLDNaeY8WDcIDLPMQ4CSFt7eh42C6ISn0w9f0lB' \ --data-raw '{ "amount": 1, "currency": "EUR", "confirm": true, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 1, "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": "bank_transfer", "payment_method_type": "instant_bank_transfer_finland", "payment_method_data": { "bank_transfer": { "instant_bank_transfer_finland": {} } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "FI", "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": "FI", "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" }, "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_mucEVLyOMUX95JbdptGJ", "merchant_id": "postman_merchant_GHAction_ce2dd562-05c9-49ce-8305-e25bde428103", "status": "requires_customer_action", "amount": 1, "net_amount": 1, "shipping_cost": null, "amount_capturable": 1, "amount_received": null, "connector": "trustpay", "client_secret": "pay_mucEVLyOMUX95JbdptGJ_secret_jtkGqkPWKxXhXHFv4YLr", "created": "2025-06-09T18:23:07.383Z", "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_finland": {} }, "billing": null }, "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": "FI", "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": "FI", "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://duck.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "next_action": { "type": "redirect_to_url", "redirect_to_url": "http://localhost:8080/payments/redirect/pay_mucEVLyOMUX95JbdptGJ/postman_merchant_GHAction_ce2dd562-05c9-49ce-8305-e25bde428103/pay_mucEVLyOMUX95JbdptGJ_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_finland", "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": 1749493387, "expires": 1749496987, "secret": "epk_f32082f6e7d74cde9c903adf7b1f3e6d" }, "manual_retry_allowed": null, "connector_transaction_id": "9374558245", "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_NHOLLnSzgFm54rSvDFmg", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_BGFeiO7U2AU7zBbWkruC", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-06-09T18:38:07.383Z", "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-06-09T18:23:08.752Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": null, "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null } ``` <img width="534" alt="image" src="https://github.com/user-attachments/assets/e8c358c5-fa38-40ca-bda7-634eb9d60a2e" /> </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 ___ coderabbit: @coderabbitai ignore
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/payments.rs` - `crates/api_models/src/payments/additional_info.rs` **2. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/payment_method_data.rs` **3. External Connector Integration** - `crates/connector_configs/toml/development.toml` - `crates/connector_configs/toml/production.toml` - `crates/connector_configs/toml/sandbox.toml` - ... and 15 more files **4. Type Definitions** - `crates/router/src/types/transformers.rs` **5. Utils** - `crates/kgraph_utils/src/mca.rs` - `crates/kgraph_utils/src/transformers.rs` - `crates/payment_methods/src/helpers.rs` **6. Tests** - `config/deployments/integration_test.toml` - `cypress-tests/cypress/e2e/configs/Payment/Adyen.js` - `cypress-tests/cypress/e2e/configs/Payment/Commons.js` - ... and 12 more files **7. Configuration Files** - `.typos.toml` - `config/config.example.toml` - `config/deployments/production.toml` - ... and 3 more files **8. 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 (85 changes) - Add conditional logic for feature flags or filtering (7 changes) **Detailed Identifier Changes:** Commit 61c2e2c7: Files to modify: **crates/api_models/src/payments.rs** Modify existing code **crates/api_models/src/payments/additional_info.rs** Modify existing code **crates/common_enums/src/enums.rs** Modify existing code **crates/common_enums/src/transformers.rs** Modify existing code **crates/euclid/src/frontend/dir/enums.rs** Modify existing code **crates/euclid/src/frontend/dir/lowering.rs** Modify existing code **crates/euclid/src/frontend/dir/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/adyen.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/facilitapay/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/itaubank/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/klarna.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/paypal/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/shift4/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/stripe/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/trustpay/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/worldpayvantiv/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/zen/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/zsl/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/utils.rs** Modify existing code **crates/hyperswitch_domain_models/src/payment_method_data.rs** Modify existing code **crates/kgraph_utils/src/mca.rs** Modify existing code **crates/kgraph_utils/src/transformers.rs** Modify existing code **crates/payment_methods/src/configs/payment_connector_required_fields.rs** Modify existing code **crates/payment_methods/src/helpers.rs** Modify existing code **crates/router/src/connector/utils.rs** Modify existing code **crates/router/src/types/transformers.rs** Modify existing code
{"pr_number": 7925, "pr_title": "feat(connector): [trustpay] introduce instant bank_transfer, finland and poland", "merged_at": "2025-06-13T07:05:32Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/payments.rs", "crates/api_models/src/payments/additional_info.rs"], "domain": ["crates/hyperswitch_domain_models/src/payment_method_data.rs"], "connectors": ["crates/connector_configs/toml/development.toml", "crates/connector_configs/toml/production.toml", "crates/connector_configs/toml/sandbox.toml", "crates/hyperswitch_connectors/src/connectors/adyen.rs", "crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs", "crates/hyperswitch_connectors/src/connectors/facilitapay/transformers.rs", "crates/hyperswitch_connectors/src/connectors/itaubank/transformers.rs", "crates/hyperswitch_connectors/src/connectors/klarna.rs", "crates/hyperswitch_connectors/src/connectors/paypal/transformers.rs", "crates/hyperswitch_connectors/src/connectors/shift4/transformers.rs", "crates/hyperswitch_connectors/src/connectors/stripe/transformers.rs", "crates/hyperswitch_connectors/src/connectors/trustpay/transformers.rs", "crates/hyperswitch_connectors/src/connectors/worldpayvantiv/transformers.rs", "crates/hyperswitch_connectors/src/connectors/zen/transformers.rs", "crates/hyperswitch_connectors/src/connectors/zsl/transformers.rs", "crates/hyperswitch_connectors/src/utils.rs", "crates/payment_methods/src/configs/payment_connector_required_fields.rs", "crates/router/src/connector/utils.rs"], "types": ["crates/router/src/types/transformers.rs"], "utils": ["crates/kgraph_utils/src/mca.rs", "crates/kgraph_utils/src/transformers.rs", "crates/payment_methods/src/helpers.rs"], "tests": ["config/deployments/integration_test.toml", "cypress-tests/cypress/e2e/configs/Payment/Adyen.js", "cypress-tests/cypress/e2e/configs/Payment/Commons.js", "cypress-tests/cypress/e2e/configs/Payment/Facilitapay.js", "cypress-tests/cypress/e2e/configs/Payment/Fiserv.js", "cypress-tests/cypress/e2e/configs/Payment/ItauBank.js", "cypress-tests/cypress/e2e/configs/Payment/Modifiers.js", "cypress-tests/cypress/e2e/configs/Payment/Paypal.js", "cypress-tests/cypress/e2e/configs/Payment/Stripe.js", "cypress-tests/cypress/e2e/configs/Payment/Trustpay.js", "cypress-tests/cypress/e2e/spec/Payment/00017-BankTransfers.cy.js", "cypress-tests/cypress/e2e/spec/Payment/00018-BankRedirect.cy.js", "cypress-tests/cypress/support/commands.js", "cypress-tests/cypress/support/redirectionHandler.js", "loadtest/config/development.toml"], "config": [".typos.toml", "config/config.example.toml", "config/deployments/production.toml", "config/deployments/sandbox.toml", "config/development.toml", "config/docker_compose.toml"], "other": ["api-reference-v2/openapi_spec.json", "api-reference/openapi_spec.json", "crates/common_enums/src/enums.rs", "crates/common_enums/src/transformers.rs", "crates/euclid/src/frontend/dir/enums.rs", "crates/euclid/src/frontend/dir/lowering.rs", "crates/euclid/src/frontend/dir/transformers.rs"]}, "change_types": {"fields_added": 85, "conditionals_added": 7}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(events): add audit event for CompleteAuthorize ## Type of Change - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Created from #4674 This covers adding events for `CompleteAuthorize` operation ## How did you test it Use `globalpay` as connector, `wallet` as payment_method and `paypal` as payment_method_type ```bash "payment_method": "wallet", "payment_method_types": [ { "payment_method_type": "paypal", "payment_experience": "redirect_to_url", "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, } ``` Create a payment: ```bash { "amount": 600, "currency": "USD", "confirm": true, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 600, "customer_id": "StripeCustomer", "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+1", "description": "Its my first payment request", "authentication_type": "no_three_ds", "return_url": "https://google.com", "payment_method": "wallet", "payment_method_type": "paypal", "payment_method_data": { "wallet": { "paypal_redirect":{} } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "DE", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "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: ```json { "payment_id": "pay_AkkvFG6dZN3gasgy729h", "merchant_id": "postman_merchant_GHAction_93d97914-663d-4099-b4a2-a9ec314d654e", "status": "requires_customer_action", "amount": 600, "net_amount": 600, "amount_capturable": 600, "amount_received": null, "connector": "globalpay", "client_secret": "pay_AkkvFG6dZN3gasgy729h_secret_XLheDrFzLzXL7eF0BOxV", "created": "2024-11-06T14:35:59.773Z", "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": "wallet", "payment_method_data": { "wallet": {}, "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": "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://google.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "next_action": { "type": "redirect_to_url", "redirect_to_url": "http://localhost:8080/payments/redirect/pay_AkkvFG6dZN3gasgy729h/postman_merchant_GHAction_93d97914-663d-4099-b4a2-a9ec314d654e/pay_AkkvFG6dZN3gasgy729h_1" }, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "paypal", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "StripeCustomer", "created_at": 1730903759, "expires": 1730907359, "secret": "epk_2f5f6461495c44d5836e790820a006f4" }, "manual_retry_allowed": null, "connector_transaction_id": "TRN_N8FIKEvvsrYO5xqzUcwgzTLg9dXnCq_3gasgy729h_1", "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2019-09-10T10:11:12Z", "new_customer": "true" }, "connector_metadata": null, "feature_metadata": null, "reference_id": "pay_AkkvFG6dZN3gasgy729h_1", "payment_link": null, "profile_id": "pro_S5r08g7HrBg5FT2NWS3l", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_8uJfYpthurOSVoLJwxfR", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2024-11-06T14:50:59.773Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2024-11-06T14:36:02.437Z", "charges": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null } ``` Hit the `redirction_url` and complete the payment. Audit logs will get generated and can be viewed in `hyperswitch-audit-events` topic in kafka with `PaymentCompleteAuthorize` event-type. <img width="1361" alt="image" src="https://github.com/user-attachments/assets/aa909b5b-7eb8-4f03-8453-8c02af9aa74d"> ## Checklist - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **payment** feature, you'll need to modify these architectural layers: **1. Core Business Logic** - `crates/router/src/core/payments/operations/payment_complete_authorize.rs` **2. Other** - `crates/router/src/events/audit_events.rs` **Code Patterns Applied:** - Extend existing types with new fields (1 changes) **Detailed Identifier Changes:** Commit dc26317e: Files to modify: **crates/router/src/core/payments/operations/payment_complete_authorize.rs** Modify existing code **crates/router/src/events/audit_events.rs** Modify existing code
{"pr_number": 6310, "pr_title": "feat(events): add audit event for CompleteAuthorize", "merged_at": "2024-12-05T07:46:26Z", "intent": {"feature_type": "payment", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"core_business": ["crates/router/src/core/payments/operations/payment_complete_authorize.rs"], "other": ["crates/router/src/events/audit_events.rs"]}, "change_types": {"fields_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
chore(wasm): update sepa to sepa_bank_transfer for payout MCAs ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description This PR updates the payout MCA creation to use `sepa_bank_transfer` instead of `sepa`. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding 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 issue #8168 during payout creation ## How did you test it? Needs to be tested from dashboard ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/connector_configs/toml/development.toml` - `crates/connector_configs/toml/production.toml` - `crates/connector_configs/toml/sandbox.toml`
{"pr_number": 9536, "pr_title": "chore(wasm): update sepa to sepa_bank_transfer for payout MCAs", "merged_at": "2025-09-25T07:49:03Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "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(users): add tenant id reads in user roles ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Support tenant id in user roles queries. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding 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 [#6660](https://github.com/juspay/hyperswitch/issues/6660) ## How did you test it? With tenancy feature flag enabled these changes will be tested when upcoming tenant related PRs from dashboard gets merged. The current behaviour of user apis should not change. Since hyperswitch has its own tenant id and we don't have tenant_id feature flag enabled for now. Tested the sanity flows for users. Working as expected. ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Database Layer (Queries & Schema)** - `crates/diesel_models/src/query/user_role.rs` **2. Core Business Logic** - `crates/router/src/core/user.rs` - `crates/router/src/core/user_role.rs` **3. Type Definitions** - `crates/router/src/types/domain/user/decision_manager.rs` **4. Utils** - `crates/router/src/utils/user_role.rs` **5. Other** - `crates/router/src/analytics.rs` - `crates/router/src/db/kafka_store.rs` - `crates/router/src/db/user_role.rs` - ... and 1 more files **Code Patterns Applied:** - Implement new functions (4 changes) - Extend existing types with new fields (55 changes) - Add conditional logic for feature flags or filtering (3 changes) - Modify database queries (59 changes) **Detailed Identifier Changes:** Commit 9212f776: Files to modify: **crates/diesel_models/src/query/user_role.rs** Remove: - function: pub::find_by_user_id - function: pub::find_by_user_id_merchant_id - function: pub::list_by_user_id **crates/router/src/analytics.rs** Modify existing code **crates/router/src/core/user.rs** Modify existing code **crates/router/src/core/user_role.rs** Modify existing code **crates/router/src/db/kafka_store.rs** Modify existing code **crates/router/src/db/user_role.rs** Modify existing code **crates/router/src/services/authentication.rs** Modify existing code **crates/router/src/types/domain/user/decision_manager.rs** Modify existing code **crates/router/src/utils/user_role.rs** Modify existing code
{"pr_number": 6661, "pr_title": "feat(users): add tenant id reads in user roles", "merged_at": "2024-11-29T10:54:00Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user"]}, "hierarchy": {"database": ["crates/diesel_models/src/query/user_role.rs"], "core_business": ["crates/router/src/core/user.rs", "crates/router/src/core/user_role.rs"], "types": ["crates/router/src/types/domain/user/decision_manager.rs"], "utils": ["crates/router/src/utils/user_role.rs"], "other": ["crates/router/src/analytics.rs", "crates/router/src/db/kafka_store.rs", "crates/router/src/db/user_role.rs", "crates/router/src/services/authentication.rs"]}, "change_types": {"functions_added": 4, "fields_added": 55, "imports_added": 1, "conditionals_added": 3, "database_queries": 59}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(connector): [GLOBALPAY] Added Tokenization Flow for CITs ## 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 --> In One-off payments, we donot need to create the token. Just passing raw cards would be enough. In CITs, we need to create a token and store it in `connector_mandate_id` for future MITs but while executing the CIT, raw cards need to be passed. In MITs, we need to use that previously stored token in CIT and no more need to hit the tokenization endpoint at connector. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [x] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> 1. Payments Create - One-off cURL: ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_v5jp7Ow9W5g6tgWaDHs4UR385iFfpg9dXQGYQkxxRXQdHlcvR70WmjJRPWJt7Xe7' \ --header 'Cookie: PHPSESSID=0b47db9d7de94c37b6b272087a9f2fa7' \ --data-raw '{ "currency":"USD", "amount": 300, "confirm": true, "amount_to_capture": 300, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "authentication_type": "no_three_ds", "return_url": "https://www.google.com", "email": "something@gmail.com", "name": "Joseph Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment request", "statement_descriptor_name": "Juspay", "statement_descriptor_suffix": "Router", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4242424242424242", "card_exp_month": "03", "card_exp_year": "2030", "card_holder_name": "joseph Doe", "card_cvc": "737" } }, "billing": { "address": { "line1": "1467", "line2": "CA", "line3": "Harrison Street", "city": "San Fransico", "state": "CA", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "browser_info": { "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "language": "nl-NL", "color_depth": 24, "screen_height": 723, "screen_width": 1536, "time_zone": 0, "java_enabled": true, "java_script_enabled": true, "ip_address": "109.71.40.0" }, "metadata": { "order_category": "applepay" }, "order_details": [ { "product_name": "Apple iphone 15", "quantity": 1, "amount": 300, "account_name": "transaction_processing" } ] }' ``` Response: ``` { "payment_id": "pay_j2mMaanCWkdCD2ytx5gg", "merchant_id": "merchant_1751871882", "status": "succeeded", "amount": 300, "net_amount": 300, "shipping_cost": null, "amount_capturable": 0, "amount_received": 300, "connector": "globalpay", "client_secret": "pay_j2mMaanCWkdCD2ytx5gg_secret_CqzsQEqF82ClZdEAoVF3", "created": "2025-07-07T11:03:44.204Z", "currency": "USD", "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": 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": null, "shipping": null, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "CA", "line3": "Harrison Street", "zip": "94122", "state": "CA", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "order_details": [ { "brand": null, "amount": 300, "category": null, "quantity": 1, "tax_rate": null, "product_id": null, "product_name": "Apple iphone 15", "product_type": null, "sub_category": null, "product_img_link": null, "product_tax_code": null, "total_tax_amount": null, "requires_shipping": null } ], "email": null, "name": null, "phone": null, "return_url": "https://www.google.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": "Juspay", "statement_descriptor_suffix": "Router", "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": null, "manual_retry_allowed": false, "connector_transaction_id": "TRN_IORyBbPseO4Qiy0L2v8YpZpgWA9auN_dCD2ytx5gg_1", "frm_message": null, "metadata": { "order_category": "applepay" }, "connector_metadata": null, "feature_metadata": null, "reference_id": "pay_j2mMaanCWkdCD2ytx5gg_1", "payment_link": null, "profile_id": "pro_GIxd8tTl8PWNt9L2ynbr", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_ghTQYltef3iCpp4cdsVu", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-07-07T11:18:44.204Z", "fingerprint": null, "browser_info": { "language": "nl-NL", "time_zone": 0, "ip_address": "109.71.40.0", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "color_depth": 24, "java_enabled": true, "screen_width": 1536, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 723, "java_script_enabled": true }, "payment_method_id": null, "payment_method_status": null, "updated": "2025-07-07T11:03:46.731Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null } ``` 2. CIT using `mandate_id` Request: ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_otcCi6DyRzeDWx38OH5BTLBjBK1WS7Jt1BbsMpPepSR2Rr5dIPgVgPMoeekaqoXL' \ --header 'Cookie: PHPSESSID=0b47db9d7de94c37b6b272087a9f2fa7' \ --data-raw '{ "amount": 6000, "all_keys_required": true, "currency": "USD", "confirm": true, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "customer_id": "cus_LI9DQMmb1tHRjnfnkjwknjfXtonFkU", "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://example.com", "payment_method": "card", "payment_method_type": "debit", "payment_method_data": { "card": { "card_number": "4111111111111111", "card_exp_month": "12", "card_exp_year": "2030", "card_holder_name": "joseph Doe", "card_cvc": "123" } }, "setup_future_usage": "off_session", "customer_acceptance": { "acceptance_type": "offline", "accepted_at": "1963-05-03T04:07:52.723Z", "online": { "ip_address": "in sit", "user_agent": "amet irure esse" } }, "mandate_data": { "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" } }, "mandate_type": { "single_use": { "amount": 8000, "currency": "USD" } } }, "payment_type": "new_mandate", "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" } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" }, "browser_info": { "ip_address": "129.0.0.1", "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "language": "en-US", "color_depth": 32, "screen_height": 1117, "screen_width": 1728, "time_zone": -330, "java_enabled": true, "java_script_enabled": true } }' ``` Response: ``` { "payment_id": "pay_pgbcY6mXYI4IYk2Zt5kc", "merchant_id": "merchant_1753277415", "status": "succeeded", "amount": 6000, "net_amount": 6000, "shipping_cost": null, "amount_capturable": 0, "amount_received": 6000, "connector": "globalpay", "client_secret": "pay_pgbcY6mXYI4IYk2Zt5kc_secret_H0sK1auIjNZsIcfjVE1d", "created": "2025-07-23T17:30:07.918Z", "currency": "USD", "customer_id": "cus_LI9DQMmb1tHRjnfnkjwknjfXtonFkU", "customer": { "id": "cus_LI9DQMmb1tHRjnfnkjwknjfXtonFkU", "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_bRinPSQhGM8Pky90uBNb", "mandate_data": { "update_mandate_id": null, "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" } }, "mandate_type": { "single_use": { "amount": 8000, "currency": "USD", "start_date": null, "end_date": null, "metadata": null } } }, "setup_future_usage": "off_session", "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "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": "2030", "card_holder_name": "joseph Doe", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "john", "last_name": "Doe" }, "phone": null, "email": null }, "billing": { "address": { "city": "San Fransico", "country": "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": "guest@example.com", "name": "John Doe", "phone": "999999999", "return_url": "https://example.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": "cus_LI9DQMmb1tHRjnfnkjwknjfXtonFkU", "created_at": 1753291807, "expires": 1753295407, "secret": "epk_222a00737e6c47d181b899d8afc76813" }, "manual_retry_allowed": false, "connector_transaction_id": "TRN_gBpefdKHlBxfmgVgFSlfPuCQXj86TT_4IYk2Zt5kc_1", "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2019-09-10T10:11:12Z", "new_customer": "true" }, "connector_metadata": null, "feature_metadata": null, "reference_id": "pay_pgbcY6mXYI4IYk2Zt5kc_1", "payment_link": null, "profile_id": "pro_roCz974ra9LQxsifUris", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_5Y545k7TI4upQYSbJJ9L", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-07-23T17:45:07.918Z", "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_uDtgQsunDERQMrEXxbcy", "payment_method_status": null, "updated": "2025-07-23T17:30:11.412Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": "{\"id\":\"TRN_gBpefdKHlBxfmgVgFSlfPuCQXj86TT_4IYk2Zt5kc_1\",\"time_created\":\"2025-07-23T17:30:11.323Z\",\"type\":\"SALE\",\"status\":\"CAPTURED\",\"channel\":\"CNP\",\"capture_mode\":\"AUTO\",\"amount\":\"6000\",\"currency\":\"USD\",\"country\":\"US\",\"merchant_id\":\"MER_7e3e2c7df34f42819b3edee31022ee3f\",\"merchant_name\":\"Sandbox_merchant_3\",\"account_id\":\"TRA_c9967ad7d8ec4b46b6dd44a61cde9a91\",\"account_name\":\"transaction_processing\",\"reference\":\"pay_pgbcY6mXYI4IYk2Zt5kc_1\",\"payment_method\":{\"result\":\"00\",\"message\":\"(00)[ test system ] Authorised\",\"entry_mode\":\"ECOM\",\"card\":{\"brand\":\"VISA\",\"masked_number_last4\":\"XXXXXXXXXXXX1111\",\"authcode\":\"123456\",\"brand_reference\":\"R0LEZpZE51h4fEcD\",\"brand_time_created\":\"\",\"cvv_result\":\"MATCHED\",\"provider\":{\"result\":\"00\",\"cvv_result\":\"M\",\"avs_address_result\":\"M\",\"avs_postal_code_result\":\"M\"}}},\"risk_assessment\":[{\"mode\":\"ACTIVE\",\"result\":\"ACCEPTED\",\"rules\":[{\"reference\":\"0c93a6c9-7649-4822-b5ea-1efa356337fd\",\"description\":\"Cardholder Name Rule\",\"mode\":\"ACTIVE\",\"result\":\"ACCEPTED\"},{\"reference\":\"a539d51a-abc1-4fff-a38e-b34e00ad0cc3\",\"description\":\"CardNumber block\",\"mode\":\"ACTIVE\",\"result\":\"ACCEPTED\"},{\"reference\":\"d023a19e-6985-4fda-bb9b-5d4e0dedbb1e\",\"description\":\"Amount test\",\"mode\":\"ACTIVE\",\"result\":\"ACCEPTED\"}]}],\"batch_id\":\"BAT_1558804\",\"action\":{\"id\":\"ACT_gBpefdKHlBxfmgVgFSlfPuCQXj86TT\",\"type\":\"AUTHORIZE\",\"time_created\":\"2025-07-23T17:30:11.323Z\",\"result_code\":\"SUCCESS\",\"app_id\":\"OXKlGGm6ecZLIqMyRgPHRfMxdUAiEcp8\",\"app_name\":\"rotate_again\"}}" } ``` 3. MIT using `mandate_id` Request: ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_otcCi6DyRzeDWx38OH5BTLBjBK1WS7Jt1BbsMpPepSR2Rr5dIPgVgPMoeekaqoXL' \ --header 'Cookie: PHPSESSID=0b47db9d7de94c37b6b272087a9f2fa7' \ --data '{ "amount": 6000, "currency": "USD", "capture_method": "automatic", "off_session": true, "confirm": true, "description": "Initiated by merchant", "mandate_id": "man_bRinPSQhGM8Pky90uBNb", "customer_id": "cus_LI9DQMmb1tHRjnfnkjwknjfXtonFkU" }' ``` Response: ``` { "payment_id": "pay_RI5mPEtiRZOUPPBEckqZ", "merchant_id": "merchant_1753277415", "status": "succeeded", "amount": 6000, "net_amount": 6000, "shipping_cost": null, "amount_capturable": 0, "amount_received": 6000, "connector": "globalpay", "client_secret": "pay_RI5mPEtiRZOUPPBEckqZ_secret_Aj61vZbZEdJkamRrE2EK", "created": "2025-07-23T17:30:20.230Z", "currency": "USD", "customer_id": "cus_LI9DQMmb1tHRjnfnkjwknjfXtonFkU", "customer": { "id": "cus_LI9DQMmb1tHRjnfnkjwknjfXtonFkU", "name": "John Doe", "email": "guest@example.com", "phone": "999999999", "phone_country_code": "+65" }, "description": "Initiated by merchant", "refunds": null, "disputes": null, "mandate_id": "man_bRinPSQhGM8Pky90uBNb", "mandate_data": null, "setup_future_usage": null, "off_session": true, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "1111", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "411111", "card_extended_bin": null, "card_exp_month": "12", "card_exp_year": "2030", "card_holder_name": "joseph Doe", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": "23420a93-c0ad-435f-885f-2d57c30c14d9", "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": "cus_LI9DQMmb1tHRjnfnkjwknjfXtonFkU", "created_at": 1753291820, "expires": 1753295420, "secret": "epk_ceed93e4ac414b0ea6c2f454b9187067" }, "manual_retry_allowed": false, "connector_transaction_id": "TRN_VlfWAjrCer1pEZaQ7BRJsxE9tqGHnn_OUPPBEckqZ_1", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "pay_RI5mPEtiRZOUPPBEckqZ_1", "payment_link": null, "profile_id": "pro_roCz974ra9LQxsifUris", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_5Y545k7TI4upQYSbJJ9L", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-07-23T17:45:20.230Z", "fingerprint": null, "browser_info": null, "payment_method_id": "pm_uDtgQsunDERQMrEXxbcy", "payment_method_status": "active", "updated": "2025-07-23T17:30:23.884Z", "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": "PMT_9fd7c105-65f1-4b54-9b3f-d3f34c35100d", "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null } ``` 4. CIT using `payment_method_id` cURL: ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_otcCi6DyRzeDWx38OH5BTLBjBK1WS7Jt1BbsMpPepSR2Rr5dIPgVgPMoeekaqoXL' \ --header 'Cookie: PHPSESSID=0b47db9d7de94c37b6b272087a9f2fa7' \ --data-raw '{ "amount": 1650, "currency": "USD", "connector": ["globalpay"], "confirm": true, "customer_id": "customer123ffffa", "setup_future_usage": "off_session", "payment_method_type": "debit", "payment_method": "card", "payment_method_data": { "card": { "card_number": "4111111111111111", "card_exp_month": "03", "card_exp_year": "30", "card_holder_name": "joseph Doe", "card_cvc": "737" } }, "billing": { "address": { "first_name": "joseph", "last_name": "Doe", "country": "US" } }, "email": "something@example.com", "customer_acceptance": { "acceptance_type": "offline" } }' ``` Response: ``` { "payment_id": "pay_CNM35m7O7JfdmH9qYyFq", "merchant_id": "merchant_1753277415", "status": "succeeded", "amount": 1650, "net_amount": 1650, "shipping_cost": null, "amount_capturable": 0, "amount_received": 1650, "connector": "globalpay", "client_secret": "pay_CNM35m7O7JfdmH9qYyFq_secret_uz67njQIBT8dhkSR2jcr", "created": "2025-07-23T17:29:50.150Z", "currency": "USD", "customer_id": "customer123ffffa", "customer": { "id": "customer123ffffa", "name": null, "email": "something@example.com", "phone": null, "phone_country_code": null }, "description": null, "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "off_session", "off_session": null, "capture_on": null, "capture_method": null, "payment_method": "card", "payment_method_data": { "card": { "last4": "1111", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "411111", "card_extended_bin": null, "card_exp_month": "03", "card_exp_year": "30", "card_holder_name": "joseph Doe", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": { "city": null, "country": "US", "line1": null, "line2": null, "line3": null, "zip": null, "state": null, "first_name": "joseph", "last_name": "Doe" }, "phone": null, "email": null }, "order_details": null, "email": "something@example.com", "name": null, "phone": null, "return_url": null, "authentication_type": "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": "customer123ffffa", "created_at": 1753291790, "expires": 1753295390, "secret": "epk_b79f5365965648aea900af73ee98fc51" }, "manual_retry_allowed": false, "connector_transaction_id": "TRN_hR9reO0fbf15HP7SDBznXeKNnhvb6u_fdmH9qYyFq_1", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "pay_CNM35m7O7JfdmH9qYyFq_1", "payment_link": null, "profile_id": "pro_roCz974ra9LQxsifUris", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_5Y545k7TI4upQYSbJJ9L", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-07-23T17:44:50.150Z", "fingerprint": null, "browser_info": null, "payment_method_id": "pm_P66KYq7rG0B7f7RENNf2", "payment_method_status": "active", "updated": "2025-07-23T17:29:53.258Z", "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": "PMT_d6001c7b-6150-404d-92f3-56b217fb8a3d", "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null } ``` 5. MIT using `payment_method_id` cURL: ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_otcCi6DyRzeDWx38OH5BTLBjBK1WS7Jt1BbsMpPepSR2Rr5dIPgVgPMoeekaqoXL' \ --header 'Cookie: PHPSESSID=0b47db9d7de94c37b6b272087a9f2fa7' \ --data '{ "amount": 179, "currency": "USD", "confirm": true, "customer_id": "customer123ffffa", "recurring_details": { "type": "payment_method_id", "data": "pm_P66KYq7rG0B7f7RENNf2" }, "off_session": true }' ``` Response: ``` { "payment_id": "pay_6pONwGPfaI6X8zmyOPcS", "merchant_id": "merchant_1753277415", "status": "succeeded", "amount": 179, "net_amount": 179, "shipping_cost": null, "amount_capturable": 0, "amount_received": 179, "connector": "globalpay", "client_secret": "pay_6pONwGPfaI6X8zmyOPcS_secret_XRjvCntYf6esUICifOQg", "created": "2025-07-23T17:30:01.371Z", "currency": "USD", "customer_id": "customer123ffffa", "customer": { "id": "customer123ffffa", "name": null, "email": "something@example.com", "phone": null, "phone_country_code": null }, "description": null, "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": true, "capture_on": null, "capture_method": null, "payment_method": "card", "payment_method_data": { "card": { "last4": "1111", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "411111", "card_extended_bin": null, "card_exp_month": "03", "card_exp_year": "30", "card_holder_name": "joseph Doe", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": null, "order_details": null, "email": "something@example.com", "name": null, "phone": null, "return_url": null, "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "debit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "customer123ffffa", "created_at": 1753291801, "expires": 1753295401, "secret": "epk_66d9de3b79db4ee3b35e9dd6db9c18e4" }, "manual_retry_allowed": false, "connector_transaction_id": "TRN_xgxrFV1PkebYZKabeA2R4qN63rqTka_6X8zmyOPcS_1", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "pay_6pONwGPfaI6X8zmyOPcS_1", "payment_link": null, "profile_id": "pro_roCz974ra9LQxsifUris", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_5Y545k7TI4upQYSbJJ9L", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-07-23T17:45:01.371Z", "fingerprint": null, "browser_info": null, "payment_method_id": "pm_P66KYq7rG0B7f7RENNf2", "payment_method_status": "active", "updated": "2025-07-23T17:30:05.264Z", "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": "PMT_d6001c7b-6150-404d-92f3-56b217fb8a3d", "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null } ``` ## Cypress test <details> <summary> Globalpay </summary> <img width="490" height="1088" alt="Screenshot 2025-07-15 at 7 31 52 PM" src="https://github.com/user-attachments/assets/fc412951-43e1-4be9-bd07-28c7980db3a4" /> </details> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/router_request_types.rs` **2. Core Business Logic** - `crates/router/src/core/payment_methods.rs` - `crates/router/src/core/payments.rs` - `crates/router/src/core/payments/helpers.rs` **3. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/globalpay.rs` - `crates/hyperswitch_connectors/src/connectors/globalpay/requests.rs` - `crates/hyperswitch_connectors/src/connectors/globalpay/response.rs` - ... and 5 more files **4. Tests** - `config/deployments/integration_test.toml` - `cypress-tests/cypress/e2e/configs/Payment/Globalpay.js` - `cypress-tests/cypress/e2e/configs/Payment/Utils.js` - ... and 1 more files **5. Configuration Files** - `config/config.example.toml` - `config/deployments/production.toml` - `config/deployments/sandbox.toml` - ... and 3 more files **Code Patterns Applied:** - Define new data structures (7 changes) - Implement new functions (15 changes) - Extend existing types with new fields (202 changes) - Add conditional logic for feature flags or filtering (4 changes) **Detailed Identifier Changes:** Commit f7bc33cd: Files to modify: **crates/hyperswitch_connectors/src/connectors/globalpay.rs** Add: - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::build_request - function: private::get_request_body - function: private::handle_response - function: private::get_error_response **crates/hyperswitch_connectors/src/connectors/globalpay/requests.rs** Remove: - struct: pub::CurrencyConversion - struct: pub::Device - struct: pub::Capabilities - struct: pub::Lodging - struct: pub::LodgingChargeItem - struct: pub::Order - struct: pub::PaymentMethod - struct: pub::Apm - struct: pub::Authentication - struct: pub::Bank - enum: pub::AuthorizationMode - enum: pub::EnabledResponse - enum: pub::CapabilitiesEntryMode - enum: pub::Mobile - enum: pub::PayerVerification - enum: pub::DeviceEntryMode - enum: pub::GratuityPromptMode - enum: pub::PrintReceiptMode - enum: pub::GlobalpayPaymentsRequestType - enum: pub::Language - enum: pub::PaymentMethodProgramCode - enum: pub::TypeElement - enum: pub::ExemptStatus - enum: pub::NumberType - enum: pub::SecCode - enum: pub::ChipCondition - enum: pub::Funding - enum: pub::TokenFormat - enum: pub::Method - enum: pub::FingerprintMode - enum: pub::CardStorageMode - enum: pub::Reason Add: - struct: pub::CommonPaymentMethodData - struct: pub::TokenizationData - struct: pub::GlobalPayPaymentMethodsRequest **crates/hyperswitch_connectors/src/connectors/globalpay/response.rs** Remove: - struct: pub::Action - struct: pub::Bank - struct: pub::Mandate - struct: pub::Authentication - struct: pub::ThreeDs - struct: pub::BankTransfer - struct: pub::ProviderClass - enum: pub::ResultCode - enum: pub::ActionType - enum: pub::FundStatus - enum: pub::AvsAction - enum: pub::GlobalPayResult - enum: pub::Brand Add: - struct: pub::GlobalpayPaymentMethodsResponse - enum: pub::GlobalpayPaymentMethodStatus **crates/hyperswitch_connectors/src/connectors/globalpay/transformers.rs** Remove: - function: private::get_payment_response - function: private::get_payment_method_data - function: private::get_mandate_details Add: - function: private::try_from - impl: impl TryFrom<&TokenizationRouterData> for requests::GlobalPayPaymentMethodsRequest **crates/hyperswitch_connectors/src/utils.rs** Add: - function: private::is_mandate_payment **crates/hyperswitch_domain_models/src/router_request_types.rs** Modify existing code **crates/router/src/configs/settings.rs** Add: - enum: pub::PaymentFlow **crates/router/src/core/payment_methods.rs** Modify existing code **crates/router/src/core/payments.rs** Modify existing code **crates/router/tests/connectors/square.rs** Modify existing code **crates/router/tests/connectors/stax.rs** Modify existing code **crates/router/tests/connectors/utils.rs** Modify existing code
{"pr_number": 8568, "pr_title": "fix(connector): [GLOBALPAY] Added Tokenization Flow for CITs", "merged_at": "2025-07-29T12:54:12Z", "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/payment_methods.rs", "crates/router/src/core/payments.rs", "crates/router/src/core/payments/helpers.rs"], "connectors": ["crates/hyperswitch_connectors/src/connectors/globalpay.rs", "crates/hyperswitch_connectors/src/connectors/globalpay/requests.rs", "crates/hyperswitch_connectors/src/connectors/globalpay/response.rs", "crates/hyperswitch_connectors/src/connectors/globalpay/transformers.rs", "crates/hyperswitch_connectors/src/utils.rs", "crates/router/tests/connectors/square.rs", "crates/router/tests/connectors/stax.rs", "crates/router/tests/connectors/utils.rs"], "tests": ["config/deployments/integration_test.toml", "cypress-tests/cypress/e2e/configs/Payment/Globalpay.js", "cypress-tests/cypress/e2e/configs/Payment/Utils.js", "loadtest/config/development.toml"], "config": ["config/config.example.toml", "config/deployments/production.toml", "config/deployments/sandbox.toml", "config/development.toml", "config/docker_compose.toml", "crates/router/src/configs/settings.rs"]}, "change_types": {"structs_added": 7, "functions_added": 15, "enums_added": 4, "fields_added": 202, "conditionals_added": 4}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(connector): [DATATRANS] Fix Force Sync 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 connector Datatrans add new payment status: ChallengeOngoing and ChallengeRequired Fix Deseralization Issue on Force Sync Flow ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> https://github.com/juspay/hyperswitch/issues/7328 ## How did you test 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: Request: ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_pzCQPy1Bguc8j2kV8DQeqQJHIqJQJCjF5kLyDVep1qhmsjAPfl6GUbb10RId0cr8' \ --data-raw '{ "amount": 1000, "currency": "GBP", "amount_to_capture": 1000, "confirm": true, "capture_method": "manual", "authentication_type": "no_three_ds", "payment_method": "card", "payment_method_type": "credit", "email": "guest@example.com", "payment_method_data": { "card": { "card_number": "5404000000000001", "card_exp_month": "06", "card_exp_year": "25", "card_holder_name": "joseph Doe", "card_cvc": "123" }, "billing": { "email": "guest@example.com" } } }' ``` Response: ``` { "payment_id": "pay_o5DC6PfvFD102tR0jAkC", "merchant_id": "merchant_1740052235", "status": "requires_capture", "amount": 1000, "net_amount": 1000, "shipping_cost": null, "amount_capturable": 1000, "amount_received": null, "connector": "datatrans", "client_secret": "pay_o5DC6PfvFD102tR0jAkC_secret_aIwxbFdYcRA5QEzSwRH0", "created": "2025-02-20T12:54:31.835Z", "currency": "GBP", "customer_id": null, "customer": { "id": null, "name": null, "email": "guest@example.com", "phone": null, "phone_country_code": null }, "description": null, "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "manual", "payment_method": "card", "payment_method_data": { "card": { "last4": "0001", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "540400", "card_extended_bin": null, "card_exp_month": "06", "card_exp_year": "25", "card_holder_name": "joseph Doe", "payment_checks": null, "authentication_data": null }, "billing": { "address": null, "phone": null, "email": "guest@example.com" } }, "payment_token": null, "shipping": null, "billing": null, "order_details": null, "email": null, "name": null, "phone": null, "return_url": null, "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": null, "manual_retry_allowed": false, "connector_transaction_id": "250220135432771618", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": null, "payment_link": null, "profile_id": "pro_u7haQkBn6S4w6TXz8EJH", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_2NXjPxtjXhySNn9Ui8bD", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-02-20T13:09:31.834Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2025-02-20T12:54:33.029Z", "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" } ``` Payments Intent: Request: ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_pzCQPy1Bguc8j2kV8DQeqQJHIqJQJCjF5kLyDVep1qhmsjAPfl6GUbb10RId0cr8' \ --data '{ "amount": 0, "currency": "GBP", "confirm": false, "setup_future_usage": "off_session", "customer_id": "tester1799" }' ``` Response: ``` { "payment_id": "pay_mLh13MuvuHd60YDrzoRJ", "merchant_id": "merchant_1740052235", "status": "requires_payment_method", "amount": 0, "net_amount": 0, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": null, "client_secret": "pay_mLh13MuvuHd60YDrzoRJ_secret_vG7S4ysL0mc0jQunux4v", "created": "2025-02-20T12:55:01.990Z", "currency": "GBP", "customer_id": "tester1799", "customer": { "id": "tester1799", "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": null, "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": "tester1799", "created_at": 1740056101, "expires": 1740059701, "secret": "epk_5f5f55938a5e4d4aa926cf0ebdfaac0a" }, "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_u7haQkBn6S4w6TXz8EJH", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": null, "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-02-20T13:10:01.990Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2025-02-20T12:55:02.018Z", "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 } ``` Payments Confirm(Creating Mandate): Request: ``` curl --location 'http://localhost:8080/payments/pay_FW8L70XM5ECVgz0V0M4U/confirm' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_pzCQPy1Bguc8j2kV8DQeqQJHIqJQJCjF5kLyDVep1qhmsjAPfl6GUbb10RId0cr8' \ --data-raw '{ "payment_method": "card", "payment_method_type": "credit", "customer_acceptance": { "acceptance_type": "offline" }, "capture_method": "automatic", "authentication_type": "no_three_ds", "payment_method_data": { "card": { "card_number": "5404000000000001", "card_exp_month": "06", "card_exp_year": "25", "card_holder_name": "joseph Doe", "card_cvc": "123" }, "billing": { "email": "guest2@example.com" } } }' ``` Response: ``` { "payment_id": "pay_mLh13MuvuHd60YDrzoRJ", "merchant_id": "merchant_1740052235", "status": "requires_customer_action", "amount": 0, "net_amount": 0, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": "datatrans", "client_secret": "pay_mLh13MuvuHd60YDrzoRJ_secret_vG7S4ysL0mc0jQunux4v", "created": "2025-02-20T12:55:01.990Z", "currency": "GBP", "customer_id": "tester1799", "customer": { "id": "tester1799", "name": null, "email": null, "phone": null, "phone_country_code": null }, "description": null, "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "off_session", "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "0001", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "540400", "card_extended_bin": null, "card_exp_month": "06", "card_exp_year": "25", "card_holder_name": "joseph Doe", "payment_checks": null, "authentication_data": null }, "billing": { "address": null, "phone": null, "email": "guest2@example.com" } }, "payment_token": null, "shipping": null, "billing": null, "order_details": null, "email": null, "name": null, "phone": null, "return_url": null, "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": { "type": "redirect_to_url", "redirect_to_url": "http://localhost:8080/payments/redirect/pay_mLh13MuvuHd60YDrzoRJ/merchant_1740052235/pay_mLh13MuvuHd60YDrzoRJ_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": "250220135517601774", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": null, "payment_link": null, "profile_id": "pro_u7haQkBn6S4w6TXz8EJH", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_2NXjPxtjXhySNn9Ui8bD", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-02-20T13:10:01.990Z", "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_wnpldY3cjI1hNd9eCdvV", "payment_method_status": "inactive", "updated": "2025-02-20T12:55:17.804Z", "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" } ``` Request ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_GSXcUmpO1O7kDsua577iUQXDZWOCT4dIMglCcbXzVpPrvujyDkm59ourkW6oOXbS' \ --data-raw '{ "amount": 1000, "currency": "GBP", "amount_to_capture": 1000, "confirm": true, "capture_method": "manual", "customer_id":"blajsh", "authentication_type": "no_three_ds", "setup_future_usage":"on_session", "customer_acceptance": { "acceptance_type": "offline", "accepted_at": "1963-05-03T04:07:52.723Z", "online": { "ip_address": "127.0.0.1", "user_agent": "amet irure esse" } }, "payment_method": "card", "payment_method_type": "credit", "email": "guest@example.com", "payment_method_data": { "card": { "card_number": "5404000000000001", "card_exp_month": "06", "card_exp_year": "25", "card_holder_name": "joseph Doe", "card_cvc": "123" }, "billing":{ "email":"guest@example.com" } } }' ``` Response ``` { "payment_id": "pay_guOgcn7GmWiPeGXkZucP", "merchant_id": "postman_merchant_GHAction_ab9fae91-aff0-4a08-baae-194e61092bf6", "status": "requires_capture", "amount": 1000, "net_amount": 1000, "shipping_cost": null, "amount_capturable": 1000, "amount_received": null, "connector": "datatrans", "client_secret": "pay_guOgcn7GmWiPeGXkZucP_secret_PUdAYdnPcNUscVt1NYqt", "created": "2025-02-20T15:12:52.832Z", "currency": "GBP", "customer_id": "blajsh", "customer": { "id": "blajsh", "name": null, "email": "guest@example.com", "phone": null, "phone_country_code": null }, "description": null, "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "on_session", "off_session": null, "capture_on": null, "capture_method": "manual", "payment_method": "card", "payment_method_data": { "card": { "last4": "0001", "card_type": "DEBIT", "card_network": "Visa", "card_issuer": "MASTERCARD INTERNATIONAL", "card_issuing_country": "UNITEDSTATES", "card_isin": "540400", "card_extended_bin": null, "card_exp_month": "06", "card_exp_year": "25", "card_holder_name": "joseph Doe", "payment_checks": null, "authentication_data": null }, "billing": { "address": null, "phone": null, "email": "guest@example.com" } }, "payment_token": null, "shipping": null, "billing": null, "order_details": null, "email": "guest@example.com", "name": null, "phone": null, "return_url": null, "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "debit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "blajsh", "created_at": 1740064372, "expires": 1740067972, "secret": "epk_dd3a6c0d4ead4f78bdec9a0b2b9ec12e" }, "manual_retry_allowed": false, "connector_transaction_id": "250220161253992987", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": null, "payment_link": null, "profile_id": "pro_HKMwd5SucLDtv5qWMf47", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_EZEmKXkvmX9nowH9gsty", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-02-20T15:27:52.832Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2025-02-20T15:12:54.206Z", "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 Sync (Request) ``` curl --location 'http://localhost:8080/payments/pay_guOgcn7GmWiPeGXkZucP?force_sync=true' \ --header 'Accept: application/json' \ --header 'api-key: dev_GSXcUmpO1O7kDsua577iUQXDZWOCT4dIMglCcbXzVpPrvujyDkm59ourkW6oOXbS' \ --data '' ``` Force Sync Response ``` { "payment_id": "pay_guOgcn7GmWiPeGXkZucP", "merchant_id": "postman_merchant_GHAction_ab9fae91-aff0-4a08-baae-194e61092bf6", "status": "requires_capture", "amount": 1000, "net_amount": 1000, "shipping_cost": null, "amount_capturable": 1000, "amount_received": null, "connector": "datatrans", "client_secret": "pay_guOgcn7GmWiPeGXkZucP_secret_PUdAYdnPcNUscVt1NYqt", "created": "2025-02-20T15:12:52.832Z", "currency": "GBP", "customer_id": "blajsh", "customer": { "id": "blajsh", "name": null, "email": "guest@example.com", "phone": null, "phone_country_code": null }, "description": null, "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "on_session", "off_session": null, "capture_on": null, "capture_method": "manual", "payment_method": "card", "payment_method_data": { "card": { "last4": "0001", "card_type": "DEBIT", "card_network": "Visa", "card_issuer": "MASTERCARD INTERNATIONAL", "card_issuing_country": "UNITEDSTATES", "card_isin": "540400", "card_extended_bin": null, "card_exp_month": "06", "card_exp_year": "25", "card_holder_name": "joseph Doe", "payment_checks": null, "authentication_data": null }, "billing": { "address": null, "phone": null, "email": "guest@example.com" } }, "payment_token": null, "shipping": null, "billing": null, "order_details": null, "email": "guest@example.com", "name": null, "phone": null, "return_url": null, "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "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": "250220161253992987", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": null, "payment_link": null, "profile_id": "pro_HKMwd5SucLDtv5qWMf47", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_EZEmKXkvmX9nowH9gsty", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-02-20T15:27:52.832Z", "fingerprint": null, "browser_info": null, "payment_method_id": "pm_T4qWIKfShRUpJp0J6n3o", "payment_method_status": "active", "updated": "2025-02-20T15:14:43.581Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": "manual" } ``` Note: Non-3DS transaction will redirect if we pass off_session https://docs.datatrans.ch/docs/tokenization ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/datatrans/transformers.rs` **Code Patterns Applied:** - Extend existing types with new fields (2 changes) **Detailed Identifier Changes:** Commit 0e96e247: Files to modify: **crates/hyperswitch_connectors/src/connectors/datatrans/transformers.rs** Modify existing code
{"pr_number": 7331, "pr_title": "fix(connector): [DATATRANS] Fix Force Sync Flow", "merged_at": "2025-02-21T10:42:56Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/datatrans/transformers.rs"]}, "change_types": {"fields_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor(dynamic_fields): Multiple SDK queries fixed ## 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 --> Multiple SDK queries fixed: 1. Modified field_type text to some unique enum 2. Corrected multiple required fields 3. Voucher payments error billing.phone.number is required fixed 4. Cashapp and Swish payment_experience fixed. 5. Preprocessing to be done only for Givex in gift_cards ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Voucher payment ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_7u1WfwhlOfuf9PlZpwf54Ejwwi7d6cEBn51jXQiQXBzoQEY4C0CMB8ddkJ6ES0GZ' \ --data-raw '{ "amount": 1000, "currency": "JPY", "confirm": true, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 1000, "phone_country_code": "+1", "description": "Its my first payment request", "authentication_type": "no_three_ds", "return_url": "https://duck.com", "payment_method": "voucher", "payment_method_type": "seven_eleven", "payment_method_data": { "voucher": { "seven_eleven": {} }, "billing": { "address": { "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "9123456789", "country_code": "" }, "email": "someone@kk.com" } } }' ``` Response ``` { "payment_id": "pay_uoGRFxEqHLGs9mJHh4gs", "merchant_id": "merchant_1740480565", "status": "requires_customer_action", "amount": 1000, "net_amount": 1000, "shipping_cost": null, "amount_capturable": 1000, "amount_received": null, "connector": "adyen", "client_secret": "pay_uoGRFxEqHLGs9mJHh4gs_secret_iWcNQpBKiRXtrJE3Ywei", "created": "2025-02-25T16:02:51.611Z", "currency": "JPY", "customer_id": null, "customer": { "id": null, "name": null, "email": null, "phone": null, "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": "voucher", "payment_method_data": { "voucher": { "seven_eleven": { "first_name": null, "last_name": null, "email": null, "phone_number": null } }, "billing": { "address": { "city": null, "country": null, "line1": null, "line2": null, "line3": null, "zip": null, "state": null, "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "9123456789", "country_code": "" }, "email": "someone@kk.com" } }, "payment_token": null, "shipping": null, "billing": null, "order_details": null, "email": null, "name": null, "phone": null, "return_url": "https://duck.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": { "type": "redirect_to_url", "redirect_to_url": "http://localhost:8080/payments/redirect/pay_uoGRFxEqHLGs9mJHh4gs/merchant_1740480565/pay_uoGRFxEqHLGs9mJHh4gs_1" }, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "seven_eleven", "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": "XZ6J6GDVKX2R3M75", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "XZ6J6GDVKX2R3M75", "payment_link": null, "profile_id": "pro_XQL7oWxF1wAf4kznf1Ti", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_uzopYnVyxTBm7bzDBhJI", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-02-25T16:17:51.611Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2025-02-25T16:02:56.270Z", "split_payments": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": null } ``` Other refactoring is related to SDK and Dashboard WASM, so no need to test. ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/enums.rs` **2. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/address.rs` **3. Core Business Logic** - `crates/router/src/core/payments.rs` **4. External Connector Integration** - `crates/connector_configs/src/transformer.rs` - `crates/connector_configs/toml/development.toml` - `crates/router/src/configs/defaults/payment_connector_required_fields.rs` **Code Patterns Applied:** - Extend existing types with new fields (9 changes) - Add conditional logic for feature flags or filtering (2 changes) **Detailed Identifier Changes:** Commit cbc262fb: Files to modify: **crates/api_models/src/enums.rs** Modify existing code **crates/connector_configs/src/transformer.rs** Modify existing code **crates/hyperswitch_domain_models/src/address.rs** Modify existing code **crates/router/src/configs/defaults/payment_connector_required_fields.rs** Modify existing code **crates/router/src/core/payments.rs** Modify existing code
{"pr_number": 7380, "pr_title": "refactor(dynamic_fields): Multiple SDK queries fixed", "merged_at": "2025-03-20T10:55:17Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/enums.rs"], "domain": ["crates/hyperswitch_domain_models/src/address.rs"], "core_business": ["crates/router/src/core/payments.rs"], "connectors": ["crates/connector_configs/src/transformer.rs", "crates/connector_configs/toml/development.toml", "crates/router/src/configs/defaults/payment_connector_required_fields.rs"]}, "change_types": {"fields_added": 9, "conditionals_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(connectors): [fiuu] zero amount mandate flow for wallets ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Hotfix for https://github.com/juspay/hyperswitch/pull/7251 ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context Helps fix zero amount CIT mandate flow for wallets through Fiuu ## How did you test it? As mentioned in Helps fix zero amount CIT mandate flow for wallets through Fiuu ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/novalnet/transformers.rs` - `crates/hyperswitch_connectors/src/utils.rs` **Code Patterns Applied:** - Implement new functions (4 changes) - Extend existing types with new fields (3 changes) **Detailed Identifier Changes:** Commit 7abd1518: Files to modify: **crates/hyperswitch_connectors/src/connectors/novalnet/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/utils.rs** Add: - function: private::get_optional_first_name - function: private::get_optional_last_name
{"pr_number": 7261, "pr_title": "fix(connectors): [fiuu] zero amount mandate flow for wallets", "merged_at": "2025-02-13T12:53:38Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/novalnet/transformers.rs", "crates/hyperswitch_connectors/src/utils.rs"]}, "change_types": {"functions_added": 4, "fields_added": 3}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
chore: add hyperswitch-react-demo-app to docker-compose ## Type of Change - [x] Enhancement ## Description Added `hyperswitch-demo` to the Docker Compose setup to provide a visual interface for the SDK. ## Motivation and Context This addition enables merchants to preview and interact with the SDK in a demo environment, improving the overall developer experience. ## How Did You Test It? Via running and generating image locally ## Checklist - [x] I formatted the code using `cargo +nightly fmt --all` - [x] I addressed lints using `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where applicable
To implement this **validation** feature, you'll need to modify these architectural layers: **1. Configuration Files** - `docker-compose.yml` **Code Patterns Applied:** - Extend existing types with new fields (14 changes)
{"pr_number": 7841, "pr_title": "chore: add hyperswitch-react-demo-app to docker-compose", "merged_at": "2025-04-24T13:44:58Z", "intent": {"feature_type": "validation", "action": "add_feature", "entities": ["merchant"]}, "hierarchy": {"config": ["docker-compose.yml"]}, "change_types": {"fields_added": 14}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
feat(core): add authentication date in Authentication Flow ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [X] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description 1. Added **created_at** (time at which authentication completed) in Authentication Flow 2. Reused **created_at** field from AuthenticationStore, since all 3ds connectors do not send this field in authentication response 3. Used this field **created_at** for 3ds external authentication payments for Cybersource.( See ref Pg 460 https://docs.cybersource.com/content/dam/new-documentation/documentation/en/reference/api-fields/api-fields-so.pdf ). Reason for this change - Without this field Visa card payments are currently failing for a france-based merchant acquirer CMCIC in prod for cybersource. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Tested this for both Mastercard card and Visa card, for 3ds external authentication ### Step 1: call /payment with mastercard `curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_vZhxm9YIR6AL29HJ6By1vUTW6vOsmBvT295BcGlhbmiM0CoTnQPFkUbExaOqYuLf' \ --data-raw '{ "amount": 10000, "currency": "EUR", "confirm": true, "payment_link": false, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 10000, "customer_id": "StripeCustomer", "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+1", "description": "Its my first payment request", "request_external_three_ds_authentication": true, "authentication_type": "three_ds", "return_url": "https://google.com", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "5512459816707531", "card_exp_month": "12", "card_exp_year": "2025", "card_cvc": "000", "card_network": "Mastercard" } }, "billing": { "address": { "line1": "1467", "line2": "CA", "line3": "CA", "city": "Musterhausen", "state": "California", "zip": "12345", "country": "US", "first_name": "Debarati", "last_name": "Ghatak" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "browser_info": { "user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36", "accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,\/;q=0.8", "language": "nl-NL", "color_depth": 24, "ip_address": "103.77.139.95", "screen_height": 723, "screen_width": 1536, "time_zone": 0, "java_enabled": true, "java_script_enabled": true }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "dg": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } }' ` <img width="1203" height="721" alt="Screenshot 2025-07-16 at 3 14 49 PM" src="https://github.com/user-attachments/assets/7cf1aaa3-18b7-4814-9238-a27438c590ca" /> ### Step 2: call /3ds/authentication with netcetera `curl --location 'http://localhost:8080/payments/pay_PSx4kFvcV2b2ZpBfq6xe/3ds/authentication' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: pk_dev_e93c08fa617547b69cd87169c0cb016f' \ --data '{ "client_secret": "pay_PSx4kFvcV2b2ZpBfq6xe_secret_kcT0vkHDtCig6M30dvuD", "device_channel": "BRW", "threeds_method_comp_ind": "Y" }' ` <img width="815" height="461" alt="Screenshot 2025-07-16 at 3 15 59 PM" src="https://github.com/user-attachments/assets/5ed2cd6b-81e6-47dd-ba04-2aeb6555ab6a" /> ### Step 3: call /authorization for Cybersource `curl --location --request POST 'http://localhost:8080/payments/pay_PSx4kFvcV2b2ZpBfq6xe/merchant_1752656162/authorize/cybersource'` <img width="910" height="524" alt="Screenshot 2025-07-16 at 3 16 52 PM" src="https://github.com/user-attachments/assets/64f13cc9-08a5-4c01-adbc-22be467e5aba" /> ### Testing with visa card <img width="917" height="670" alt="Screenshot 2025-07-16 at 3 17 35 PM" src="https://github.com/user-attachments/assets/33374685-531a-4bd4-b716-73730aab27cf" /> <img width="1045" height="762" alt="Screenshot 2025-07-16 at 3 17 58 PM" src="https://github.com/user-attachments/assets/dd1a1136-ecc7-401b-a3d5-108bbc027e57" /> <img width="1045" height="762" alt="Screenshot 2025-07-16 at 3 18 07 PM" src="https://github.com/user-attachments/assets/871c8a31-6c43-4c80-911e-15397496caed" /> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] 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/types.rs` **3. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs` **Code Patterns Applied:** - Extend existing types with new fields (7 changes) **Detailed Identifier Changes:** Commit a93ebda7: Files to modify: **crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs** Modify existing code **crates/hyperswitch_domain_models/src/router_request_types.rs** Modify existing code **crates/router/src/core/payments/types.rs** Modify existing code
{"pr_number": 8661, "pr_title": "feat(core): add authentication date in Authentication Flow", "merged_at": "2025-07-22T15:09:37Z", "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/types.rs"], "connectors": ["crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs"]}, "change_types": {"fields_added": 7}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix: web-docker pull from docker hub ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Docker pull from latest stable tag ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> Web Docker Image was not working properly <img width="1043" alt="Screenshot 2025-04-02 at 3 40 52 PM" src="https://github.com/user-attachments/assets/514b49c8-6a63-4c5b-934b-9d2f0709fc5f" /> Now with this fix its working ## How did you test it? Via locally running Docker Image ## Checklist <!-- Put an `x` in the boxes that 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 **validation** feature, you'll need to modify these architectural layers: **1. Configuration Files** - `docker-compose.yml` **Code Patterns Applied:** - Extend existing types with new fields (2 changes)
{"pr_number": 7701, "pr_title": "fix: web-docker pull from docker hub", "merged_at": "2025-04-02T10:24:08Z", "intent": {"feature_type": "validation", "action": "add_feature", "entities": ["user"]}, "hierarchy": {"config": ["docker-compose.yml"]}, "change_types": {"fields_added": 2}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
ci(cypress): Add test for powertranz connector ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [x] CI/CD ## Description Enhanced powertranz Connector in cypress for Comprehensive Testing. ## How did you test it? PowerTranz <img width="561" alt="Powertrans" src="https://github.com/user-attachments/assets/33f89770-1566-4503-b52e-77e809e082f7" /> Alway 3ds payments are getting failed and there is no error code and message ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **payment** feature, you'll need to modify these architectural layers: **1. Tests** - `cypress-tests/cypress/e2e/configs/Payment/PowerTranz.js` - `cypress-tests/cypress/e2e/configs/Payment/Utils.js` **Code Patterns Applied:** - Extend existing types with new fields (537 changes)
{"pr_number": 8452, "pr_title": "ci(cypress): Add test for powertranz connector", "merged_at": "2025-06-24T14:22:46Z", "intent": {"feature_type": "payment", "action": "add_feature", "entities": ["payment", "user", "connector"]}, "hierarchy": {"tests": ["cypress-tests/cypress/e2e/configs/Payment/PowerTranz.js", "cypress-tests/cypress/e2e/configs/Payment/Utils.js"]}, "change_types": {"fields_added": 537}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
feat(connector): add barclaycard template code ## 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/8015) ## Description <!-- Describe your changes in detail --> added barclaycard template code ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> Added template code for barclaycard Docs Link: [https://developer.smartpayfuse.barclaycard/api-reference-assets/index.html](https://developer.smartpayfuse.barclaycard/api-reference-assets/index.html) ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Only template PR hence no testing required ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. 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 6e08edca: 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::barclaycard **crates/hyperswitch_connectors/src/connectors/barclaycard.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::Barclaycard - impl: impl Barclaycard - impl: impl api::Payment for Barclaycard - impl: impl api::PaymentSession for Barclaycard - impl: impl api::ConnectorAccessToken for Barclaycard - impl: impl api::MandateSetup for Barclaycard - impl: impl api::PaymentAuthorize for Barclaycard - impl: impl api::PaymentSync for Barclaycard - impl: impl api::PaymentCapture for Barclaycard - impl: impl api::PaymentVoid for Barclaycard - impl: impl api::Refund for Barclaycard - impl: impl api::RefundExecute for Barclaycard - impl: impl api::RefundSync for Barclaycard - impl: impl api::PaymentToken for Barclaycard - impl: impl ConnectorIntegration<PaymentMethodToken, PaymentMethodTokenizationData, PaymentsResponseData> for Barclaycard - impl: impl ConnectorCommonExt<Flow, Request, Response> for Barclaycard - impl: impl ConnectorCommon for Barclaycard - impl: impl ConnectorValidation for Barclaycard - impl: impl ConnectorIntegration<Session, PaymentsSessionData, PaymentsResponseData> for Barclaycard - impl: impl ConnectorIntegration<AccessTokenAuth, AccessTokenRequestData, AccessToken> for Barclaycard - impl: impl ConnectorIntegration<SetupMandate, SetupMandateRequestData, PaymentsResponseData> for Barclaycard - impl: impl ConnectorIntegration<Authorize, PaymentsAuthorizeData, PaymentsResponseData> for Barclaycard - impl: impl ConnectorIntegration<PSync, PaymentsSyncData, PaymentsResponseData> for Barclaycard - impl: impl ConnectorIntegration<Capture, PaymentsCaptureData, PaymentsResponseData> for Barclaycard - impl: impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Barclaycard - impl: impl ConnectorIntegration<Execute, RefundsData, RefundsResponseData> for Barclaycard - impl: impl ConnectorIntegration<RSync, RefundsData, RefundsResponseData> for Barclaycard - impl: impl webhooks::IncomingWebhook for Barclaycard - impl: impl ConnectorSpecifications for Barclaycard - mod: pub::transformers **crates/hyperswitch_connectors/src/connectors/barclaycard/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::BarclaycardRouterData - struct: pub::BarclaycardPaymentsRequest - struct: pub::BarclaycardCard - struct: pub::BarclaycardAuthType - struct: pub::BarclaycardPaymentsResponse - struct: pub::BarclaycardRefundRequest - struct: pub::RefundResponse - struct: pub::BarclaycardErrorResponse - enum: pub::BarclaycardPaymentStatus - enum: pub::RefundStatus - impl: impl From<(StringMinorUnit, T)> for BarclaycardRouterData<T> - impl: impl TryFrom<&BarclaycardRouterData<&PaymentsAuthorizeRouterData>> for BarclaycardPaymentsRequest - impl: impl TryFrom<&ConnectorAuthType> for BarclaycardAuthType - impl: impl From<BarclaycardPaymentStatus> for common_enums::AttemptStatus - impl: impl TryFrom<ResponseRouterData<F, BarclaycardPaymentsResponse, T, PaymentsResponseData>> for RouterData<F, T, PaymentsResponseData> - impl: impl TryFrom<&BarclaycardRouterData<&RefundsRouterData<F>>> for BarclaycardRefundRequest - 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/barclaycard.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::BarclaycardTest - impl: impl ConnectorActions for BarclaycardTest - impl: impl utils::Connector for BarclaycardTest **crates/router/tests/connectors/main.rs** Add: - mod: private::barclaycard **crates/test_utils/src/connector_auth.rs** Modify existing code
{"pr_number": 8017, "pr_title": "feat(connector): add barclaycard template code", "merged_at": "2025-05-20T12:15:42Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["card"]}, "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/barclaycard.rs", "crates/hyperswitch_connectors/src/connectors/barclaycard/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/barclaycard.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"}
feat(connector): [Adyen ] Add fixes for AdyenPaymentRequest struct ## Type of Change <!-- Put an `x` in the boxes that apply --> - [X] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description 1. We are sending type twice in paymentMethod.This PR fixes it. <img width="1728" alt="Screenshot 2024-12-11 at 14 22 04" src="https://github.com/user-attachments/assets/dc362465-48a7-4398-9f9b-5b875960110c"> 2. Line 2 is not mandatory in Adyen, but we have mandated it. This PR fixes it. 3. We are sending keys which has null in payments request. This PR fixes it. > { "amount": { "currency": "HKD", "value": 1000 }, "merchantAccount": "ZurichInsurance_HongKong_TEST", "paymentMethod": { "type": "adyencard", "type": "scheme", "number": "************1142", "expiryMonth": "03", "expiryYear": "2030", "cvc":****, "holderName": "John Doe", "brand": "visa", "networkPaymentReference": "********0415050" Good, this is the NTR from the CIT! }, "reference": "pay_iKttX4eWOlYXUZVi2YJC_1", "returnUrl": "https://sandbox.hyperswitch.io/payments/pay_iKttX4eWOlYXUZVi2YJC/merchant_1724257022/redirect/response/adyen", "shopperInteraction": "ContAuth", "recurringProcessingModel": "UnscheduledCardOnFile", "additionalData": { "authorisationType": null, "manualCapture": null, "executeThreeD": null, "recurringProcessingModel": null, "recurring.recurringDetailReference": null, "recurring.shopperReference": null, "networkTxReference": null, "payoutEligible": null, "fundsAvailability": null }, "shopperReference": "merchant_1724257022_venkatesh_testing_adyen", "shopperEmail": "abc@gmail.com" } ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> <details> <summary>1. For testing fix 1( type being sent twice in "payment method") (expand to view more)</summary> 1. Set base url of adyen to below in config/development.toml file > adyen.base_url = "https://webhook.site/da9694a5-b8d3-4795-8c58-350348c0cd5c/" **2. Hit curl for /payments CIT** > curl --location --request POST 'http://localhost:8080/payments' \ > --header 'Content-Type: application/json' \ > --header 'Accept: application/json' \ > --header 'api-key: dev_yqQUK1etxKP6i7ZnNJ7qNO02pDmcoTjInBCRVK89NmXbvw5NR723adMoSUpGWSto' \ > --data-raw '{ > "amount": 20000, > "currency": "EUR", > "confirm": false, > "capture_method": "automatic", > "capture_on": "2022-09-10T10:11:12Z", > "authentication_type": "three_ds", > "return_url": "https://google.com", > "email": "something@gmail.com", > "name": "Joseph Doe", > "phone": "999999999", > "phone_country_code": "+65", > "description": "Its my first payment request", > "setup_future_usage": "off_session", > "billing": { > "address": { > "line1": "1467", > "line2": "Harrison Street", > "line3": "Harrison Street", > "city": "San Fransico", > "state": "California", > "zip": "94122", > "country": "US", > "first_name": "joseph", > "last_name": "Doe" > }, > "phone": { > "number": "8056594427", > "country_code": "+91" > } > }, > "shipping": { > "address": { > "line1": "1467", > "line2": "Harrison Street", > "line3": "Harrison Street", > "city": "San Fransico", > "state": "California", > "zip": "94122", > "country": "US", > "first_name": "joseph", > "last_name": "Doe" > }, > "phone": { > "number": "8056594427", > "country_code": "+91" > } > } > }' **3. Hit curl for /confirm CIT** > `curl --location --request POST 'http://localhost:8080/payments/pay_OUqcRtxgPbEWwJWXkPQL/confirm' \ > --header 'Content-Type: application/json' \ > --header 'Accept: application/json' \ > --header 'api-key: dev_yqQUK1etxKP6i7ZnNJ7qNO02pDmcoTjInBCRVK89NmXbvw5NR723adMoSUpGWSto' \ > --data-raw '{ > "confirm": true, > "customer_id": "StripeCustomer", > "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": "4917610000000000", > "card_exp_month": "03", > "card_exp_year": "30", > "card_cvc": "737" > }, > "billing": { > "address": { > "line1": "1467", > "city": "San Fransico", > "state": "California", > "zip": "94122", > "country": "US" > }, > "email": "test@novalnet.de", > "phone": { > "number": "8056594427", > "country_code": "+91" > } > } > }, > "browser_info": { > "user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36", > "accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,\/;q=0.8", > "language": "nl-NL", > "color_depth": 24, > "ip_address": "103.77.139.95", > "screen_height": 723, > "screen_width": 1536, > "time_zone": 0, > "java_enabled": true, > "java_script_enabled": true > } > }'` 5. Go to https://webhook.site/#!/view/da9694a5-b8d3-4795-8c58-350348c0cd5c/00ca9417-2ef3-4f3d-90ff-198e6e8a36c4/1 **Before** (type being sent twice) <img width="1728" alt="Screenshot 2024-12-11 at 14 22 04" src="https://github.com/user-attachments/assets/dc362465-48a7-4398-9f9b-5b875960110c"> **After** <img width="1728" alt="Screenshot 2024-12-11 at 14 50 11" src="https://github.com/user-attachments/assets/8b5425cc-591c-4f4d-a233-c4c13d972652"> </details> <details><summary>For testing fix 2 and 3 (expand to view more)</summary> 1. Make /payments call (i )for cards , ii) without line2) > curl --location --request POST 'http://localhost:8080/payments' \ > --header 'Content-Type: application/json' \ > --header 'Accept: application/json' \ > --header 'api-key: dev_yqQUK1etxKP6i7ZnNJ7qNO02pDmcoTjInBCRVK89NmXbvw5NR723adMoSUpGWSto' \ > --data-raw '{ > "amount": 700, > "currency": "USD", > "confirm": true, > "payment_link": false, > "capture_on": "2029-09-10T10:11:12Z", > "amount_to_capture": 700, > "name": "John Doe", > "email": "dg@example.com", > "phone": "999999999", > "phone_country_code": "+1", > "description": "Its my first payment request", > "authentication_type": "three_ds", > "return_url": "https://google.com", > "payment_method_data": { > "card": { > "card_number": "4917610000000000", > "card_exp_month": "03", > "card_exp_year": "30", > "card_cvc": "737" > }, > "billing": { > "address": { > "line1": "1467", > "city": "San Fransico", > "state": "California", > "zip": "94122", > "country": "US" > } > } > }, > "payment_method": "card", > "payment_method_type": "credit", > "browser_info": { > "color_depth": 24, > "java_enabled": true, > "java_script_enabled": true, > "language": "en-GB", > "screen_height": 720, > "screen_width": 1280, > "time_zone": -330, > "ip_address": "208.127.127.193", > "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", > "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0" > }, > "metadata": { > "udf1": "value1", > "new_customer": "true", > "login_date": "2019-09-10T10:11:12Z" > }, > "order_details": [ > { > "product_name": "Tea", > "quantity": 1, > "amount": 110, > "product_img_link": "https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg" > }, > { > "product_name": "Tea", > "quantity": 1, > "amount": 110, > "product_img_link": "https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg" > }, > { > "product_name": "Tea", > "quantity": 1, > "amount": 110, > "product_img_link": "https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg" > } > ] > }' **Response** > { > "payment_id": "pay_2JxnSiO0TsBTkYeTqjJt", > "merchant_id": "merchant_1733902978", > "status": "requires_customer_action", > "amount": 700, > "net_amount": 700, > "shipping_cost": null, > "amount_capturable": 700, > "amount_received": null, > "connector": "adyen", > "client_secret": "pay_2JxnSiO0TsBTkYeTqjJt_secret_lllW1w9eIZj3miCW5ldU", > "created": "2024-12-11T09:21:32.834Z", > "currency": "USD", > "customer_id": null, > "customer": { > "id": null, > "name": "John Doe", > "email": "dg@example.com", > "phone": "999999999", > "phone_country_code": "+1" > }, > "description": "Its my first payment request", > "refunds": null, > "disputes": null, > "mandate_id": null, > "mandate_data": null, > "setup_future_usage": null, > "off_session": null, > "capture_on": null, > "capture_method": null, > "payment_method": "card", > "payment_method_data": { > "card": { > "last4": "0000", > "card_type": null, > "card_network": null, > "card_issuer": null, > "card_issuing_country": null, > "card_isin": "491761", > "card_extended_bin": null, > "card_exp_month": "03", > "card_exp_year": "30", > "card_holder_name": null, > "payment_checks": null, > "authentication_data": null > }, > "billing": { > "address": { > "city": "San Fransico", > "country": "US", > "line1": "1467", > "line2": null, > "line3": null, > "zip": "94122", > "state": "California", > "first_name": null, > "last_name": null > }, > "phone": null, > "email": null > } > }, > "payment_token": null, > "shipping": null, > "billing": null, > "order_details": [ > { > "brand": null, > "amount": 110, > "category": null, > "quantity": 1, > "product_id": null, > "product_name": "Tea", > "product_type": null, > "sub_category": null, > "product_img_link": "https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg", > "product_tax_code": null, > "requires_shipping": null > }, > { > "brand": null, > "amount": 110, > "category": null, > "quantity": 1, > "product_id": null, > "product_name": "Tea", > "product_type": null, > "sub_category": null, > "product_img_link": "https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg", > "product_tax_code": null, > "requires_shipping": null > }, > { > "brand": null, > "amount": 110, > "category": null, > "quantity": 1, > "product_id": null, > "product_name": "Tea", > "product_type": null, > "sub_category": null, > "product_img_link": "https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg", > "product_tax_code": null, > "requires_shipping": null > } > ], > "email": null, > "name": null, > "phone": null, > "return_url": "https://google.com/", > "authentication_type": "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_2JxnSiO0TsBTkYeTqjJt/merchant_1733902978/pay_2JxnSiO0TsBTkYeTqjJt_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": "BD3J85G7X2V52775", > "frm_message": null, > "metadata": { > "udf1": "value1", > "login_date": "2019-09-10T10:11:12Z", > "new_customer": "true" > }, > "connector_metadata": null, > "feature_metadata": null, > "reference_id": "BD3J85G7X2V52775", > "payment_link": null, > "profile_id": "pro_Q5hoSY3fyaGlippNh43p", > "surcharge_details": null, > "attempt_count": 1, > "merchant_decision": null, > "merchant_connector_id": "mca_Gb4ezGGk0nsfaea3MiD7", > "incremental_authorization_allowed": null, > "authorization_count": null, > "incremental_authorizations": null, > "external_authentication_details": null, > "external_3ds_authentication_attempted": false, > "expires_on": "2024-12-11T09:36:32.833Z", > "fingerprint": null, > "browser_info": { > "language": "en-GB", > "time_zone": -330, > "ip_address": "208.127.127.193", > "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0", > "color_depth": 24, > "java_enabled": true, > "screen_width": 1280, > "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", > "screen_height": 720, > "java_script_enabled": true > }, > "payment_method_id": null, > "payment_method_status": null, > "updated": "2024-12-11T09:21:34.449Z", > "charges": null, > "frm_metadata": null, > "merchant_order_reference_id": null, > "order_tax_amount": null, > "connector_mandate_id": null > } 2. Checking the raw_connector_request **Before (null fields present in payment request body)** > raw_connector_request: Object {"amount": Object {"currency": String("USD"), "value": Number(700)}, "merchantAccount": String("*** alloc::string::String ***"), "paymentMethod": Object {"type": String("scheme"), "number": String("491761**********"), "expiryMonth": String("*** alloc::string::String ***"), "expiryYear": String("*** alloc::string::String ***"), "cvc": String("*** alloc::string::String ***"), "holderName": Null, "brand": Null, "networkPaymentReference": Null}, "reference": String("pay_Fy3r0FLKxdUkV1Nc7SDz_1"), "returnUrl": String("http://localhost:8080/payments/pay_Fy3r0FLKxdUkV1Nc7SDz/merchant_1733902978/redirect/response/adyen"), "browserInfo": Object {"userAgent": String("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0"), "acceptHeader": String("text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8"), "language": String("en-GB"), "colorDepth": Number(24), "screenHeight": Number(720), "screenWidth": Number(1280), "timeZoneOffset": Number(-330), "javaEnabled": Bool(true)}, "shopperInteraction": String("Ecommerce"), "additionalData": Object {"authorisationType": Null, "manualCapture": Null, "executeThreeD": String("true"), "recurringProcessingModel": Null, "recurring.recurringDetailReference": Null, "recurring.shopperReference": Null, "networkTxReference": Null, "payoutEligible": Null, "fundsAvailability": Null}, "shopperName": Object {"firstName": Null, "lastName": Null}, "shopperIP": String("208.**.**.**"), "shopperEmail": String("**@example.com"), "countryCode": String("US"), "metadata": String("*** serde_json::value::Value ***")} **After (null fields are not present in payment request body)** > raw_connector_request: Object {"amount": Object {"currency": String("USD"), "value": Number(700)}, "merchantAccount": String("*** alloc::string::String ***"), "paymentMethod": Object {"type": String("scheme"), "number": String("491761**********"), "expiryMonth": String("*** alloc::string::String ***"), "expiryYear": String("*** alloc::string::String ***"), "cvc": String("*** alloc::string::String ***")}, "reference": String("pay_2JxnSiO0TsBTkYeTqjJt_1"), "returnUrl": String("http://localhost:8080/payments/pay_2JxnSiO0TsBTkYeTqjJt/merchant_1733902978/redirect/response/adyen"), "browserInfo": Object {"userAgent": String("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0"), "acceptHeader": String("text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8"), "language": String("en-GB"), "colorDepth": Number(24), "screenHeight": Number(720), "screenWidth": Number(1280), "timeZoneOffset": Number(-330), "javaEnabled": Bool(true)}, "shopperInteraction": String("Ecommerce"), "additionalData": Object {"executeThreeD": String("true")}, "shopperName": Object {}, "shopperIP": String("208.**.**.**"), "shopperEmail": String("**@example.com"), "billingAddress": Object {"city": String("San Fransico"), "country": String("US"), "houseNumberOrName": String("*** alloc::string::String ***"), "postalCode": String("*** alloc::string::String ***"), "stateOrProvince": String("*** alloc::string::String ***")}, "countryCode": String("US"), "metadata": String("*** serde_json::value::Value ***")} </details> ## Checklist <!-- Put an `x` in the boxes that apply --> - [X] I formatted the code `cargo +nightly fmt --all` - [X] I addressed lints thrown by `cargo clippy` - [X] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/router/src/connector/adyen/transformers.rs` **Code Patterns Applied:** - Extend existing types with new fields (6 changes) - Add conditional logic for feature flags or filtering (1 changes) **Detailed Identifier Changes:** Commit c22be0c9: Files to modify: **crates/router/src/connector/adyen/transformers.rs** Modify existing code
{"pr_number": 6803, "pr_title": "feat(connector): [Adyen ] Add fixes for AdyenPaymentRequest struct", "merged_at": "2024-12-16T13:15:19Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/router/src/connector/adyen/transformers.rs"]}, "change_types": {"fields_added": 6, "conditionals_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): [AUTHORIZEDOTNET] custom invoice number populated ## 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 --> Previously we were generating invoice_number randomly. This PR helps to populate it from `merchant_order_reference_id` if passed in payload. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_VXSrYYAUIpSs2kzGeGUYR2iQRuMwMW3KXTTNYetsa2AtH4WNILp16V2k0fQlijtG' \ --data-raw '{ "amount": 6540, "currency": "USD", "amount_to_capture": 6540, "confirm": true, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "authentication_type": "no_three_ds", "setup_future_usage": "on_session", "customer": { "id": "sweta11", "name": "John Doe", "email": "sweta11_on@gmail.com", "phone": "9999999999", "phone_country_code": "+1" }, "phone_country_code": "+1", "routing": { "type": "single", "data": "stripe" }, "description": "Its my first payment request", "return_url": "https://google.com", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "5424000000000015", "card_exp_month": "10", "card_exp_year": "25", "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": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "guest@example.com" }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "guest@example.com" }, "merchant_order_reference_id":"order_sweta", "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "order_details": [ { "product_name": "Apple iphone 15", "quantity": 1, "amount": 6540, "account_name": "transaction_processing" } ], "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" }, "browser_info": { "user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36", "accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8", "language": "nl-NL", "color_depth": 24, "screen_height": 723, "screen_width": 1536, "time_zone": 0, "java_enabled": true, "java_script_enabled": true, "ip_address": "128.0.0.1" }, "customer_acceptance": { "acceptance_type": "offline", "accepted_at": "1963-05-03T04:07:52.723Z", "online": { "ip_address": "125.0.0.1", "user_agent": "amet irure esse" } }, "connector_metadata": { "noon": { "order_category": "pay" } }, "payment_link": false, "payment_link_config": { "theme": "", "logo": "", "seller_name": "", "sdk_layout": "", "display_sdk_only": false, "enabled_saved_payment_method": false }, "payment_type": "normal", "request_incremental_authorization": false, "session_expiry": 900 } ' ``` Response: ``` {"payment_id":"pay_a6Kq30bvWJaZgYuZmKVT","merchant_id":"merchant_1752151744","status":"succeeded","amount":6540,"net_amount":6540,"shipping_cost":null,"amount_capturable":0,"amount_received":6540,"connector":"authorizedotnet","client_secret":"pay_a6Kq30bvWJaZgYuZmKVT_secret_6Roucji9W2Ho49KIa4ZV","created":"2025-07-15T07:18:17.964Z","currency":"USD","customer_id":"sweta11","customer":{"id":"sweta11","name":"John Doe","email":"sweta11_on@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":"0015","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"542400","card_extended_bin":null,"card_exp_month":"10","card_exp_year":"25","card_holder_name":"joseph Doe","payment_checks":{"description":"The street address and postal code matched.","avs_result_code":"Y"},"authentication_data":null},"billing":null},"payment_token":null,"shipping":{"address":{"city":"San Fransico","country":"US","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"California","first_name":"joseph","last_name":"Doe"},"phone":{"number":"8056594427","country_code":"+91"},"email":"guest@example.com"},"billing":{"address":{"city":"San Fransico","country":"US","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"California","first_name":"joseph","last_name":"Doe"},"phone":{"number":"8056594427","country_code":"+91"},"email":"guest@example.com"},"order_details":[{"brand":null,"amount":6540,"category":null,"quantity":1,"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":"sweta11_on@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":"sweta11","created_at":1752563897,"expires":1752567497,"secret":"epk_095b7b91944b4a8781c9daf8065b47f4"},"manual_retry_allowed":false,"connector_transaction_id":"120067099727","frm_message":null,"metadata":{"udf1":"value1","login_date":"2019-09-10T10:11:12Z","new_customer":"true"},"connector_metadata":{"apple_pay":null,"airwallex":null,"noon":{"order_category":"pay"},"braintree":null,"adyen":null},"feature_metadata":null,"reference_id":"120067099727","payment_link":null,"profile_id":"pro_wUwOOdqvK0JFEBlK5BhR","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_pJM3Sz2vcdU7NWLVAggw","incremental_authorization_allowed":false,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-07-15T07:33:17.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-07-15T07:18:18.752Z","split_payments":null,"frm_metadata":null,"extended_authorization_applied":null,"capture_before":null,"merchant_order_reference_id":"order_sweta","order_tax_amount":null,"connector_mandate_id":null,"card_discovery":"manual","force_3ds_challenge":false,"force_3ds_challenge_trigger":false,"issuer_error_code":null,"issuer_error_message":null,"is_iframe_redirection_enabled":null,"whole_connector_response":null} ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/authorizedotnet/transformers.rs` **Code Patterns Applied:** - Extend existing types with new fields (8 changes) **Detailed Identifier Changes:** Commit 7fb03a9b: Files to modify: **crates/hyperswitch_connectors/src/connectors/authorizedotnet/transformers.rs** Modify existing code
{"pr_number": 8635, "pr_title": "feat(connector): [AUTHORIZEDOTNET] custom invoice number populated", "merged_at": "2025-07-15T11:45:43Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/authorizedotnet/transformers.rs"]}, "change_types": {"fields_added": 8}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(authentication): add Organization context validation in `Merchant Create` and `Merchant List` APIs ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This PR introduces **authentication validation checks** in the following APIs to prevent unauthorized access across organizations: ### **List Merchant API** - **Problem:** When using JWT-based auth, the API allowed any `organization_id` in the query params as long as the token was valid. - **Fix:** Added a validation to ensure that the `organization_id` provided in the query **must match** the one derived from the authentication context. - This prevents users from listing merchants in other organizations using a valid token. --- ### **Create Merchant API** - **Problem:** Only the **Admin API Key** and **configured fallback API Keys** (set via env) can be used to create merchants. - If the Admin API Key fails, the fallback API Key is used as a backup. - When using this fallback API Key: - If `organization_id` is **not provided**, a **new organization is created**, potentially allowing unauthorized org creation. - If `organization_id` is **manually provided**, a user could create a merchant under any **organization** they should not have access to. - **Fix:** - When the **fallback API Key** is used, added a check to ensure that the merchant is created **only within the organization** associated with the authenticated merchant. - This prevents unauthorized creation of merchants in unintended organizations. --- ### Changes to Auth Flow We have updated the authentication mechanism to now return: ```rust Option<AuthenticationDataWithOrg> ``` ```rust #[derive(Clone, Debug)] pub struct AuthenticationDataWithOrg { pub organization_id: id_type::OrganizationId, } ``` `Some(AuthenticationDataWithOrg { organization_id })` is returned when: - A Configured Fallback API Key is used and the organization is resolved from the associated merchant. - A valid JWT token is used and the organization is derived from the merchant’s context. `None` is returned when: - Admin API Key is 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). --> The current implementations of the List and Create Merchant APIs do not enforce strict validation between the authenticated user's organization context and the `organization_id` passed in requests. This creates potential security risks where: - Users with valid JWTs can view merchants from other organizations. - API key users can create merchants under unrelated or unauthorized organizations. This PR addresses those gaps by ensuring that all `organization_id` references are explicitly validated against the authenticated context. ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ## Create Merchant API: We can test the behavior of the **Create Merchant API** under two authentication modes: - **Admin API Key** (Primary) - **Configured API Key** (Fallback via env) --- Request: ```bash curl --location 'http://localhost:8080/accounts' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: test_admin' \ --data-raw '{ "merchant_id": "merchant_1747853425", "locker_id": "m0010", "merchant_name": "M1 Account", "merchant_details": { "primary_contact_person": "John Test", "primary_email": "JohnTest@test.com", "primary_phone": "sunt laborum", "secondary_contact_person": "John Test2", "secondary_email": "JohnTest2@test.com", "secondary_phone": "cillum do dolor id", "website": "https://www.example.com", "about_business": "Online Retail with a wide selection of organic products for North America", "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name":"john", "last_name":"Doe" } }, "organization_id": "org_AUw4KIR0COrD90wgqZLq", // (optional) "return_url": "https://google.com/success", "webhook_details": { "webhook_version": "1.0.1", "webhook_username": "ekart_retail", "webhook_password": "password_ekart@123", "webhook_url":"https://webhook.site", "payment_created_enabled": true, "payment_succeeded_enabled": true, "payment_failed_enabled": true }, "sub_merchants_enabled": false, "parent_merchant_id":"merchant_123", "metadata": { "city": "NY", "unit": "245" }, "primary_business_details": [ { "country": "US", "business": "default" } ] }' ``` Expected Response: ```json { "merchant_id": "merchant_1747853253", "merchant_name": "M1 Account", "return_url": "https://google.com/success", "enable_payment_response_hash": true, "payment_response_hash_key": "zXBHjOf9FmDuG4hi8tX409O6yVeY9H4Ldt5ofqvxFvv6RROH3Edj3p6WDU94maPG", "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": "https://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": "john", "last_name": "Doe" } }, "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 }, "payout_routing_algorithm": null, "sub_merchants_enabled": false, "parent_merchant_id": null, "publishable_key": "pk_dev_14a42e013f8042888e6aef2b00fb6d35", "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_AUw4KIR0COrD90wgqZLq", "is_recon_enabled": false, "default_profile": "pro_tIoLTR9Zz3QO66EtmhE4", "recon_status": "not_requested", "pm_collect_link_config": null, "product_type": "orchestration" } ``` --- ### 1. Admin API Key | Scenario | organization_id in Request | Expected Behavior | |----------|-----------------------------|--------------------| | 1.1 | Present | Use the provided `organization_id` to create the merchant. | | 1.2 | Absent | Create a new organization and associate the merchant with it. | > The Admin API key is allowed to create new organizations if `organization_id` is missing. --- ### 2. Configured Fallback API Key (via env) | Scenario | organization_id in Request | Expected Behavior | |----------|-----------------------------|--------------------| | 2.1 | Present & matches auth org | Proceed with merchant creation. | | 2.2 | Present but mismatched org | Reject with `InvalidRequestData`. | | 2.3 | Absent | Automatically use the organization from the authentication context. | > Fallback API Key must always operate within the authenticated org. Cross-org creation should be blocked. --- ## List Merchant API: We can test the behavior of the **List Merchant API** under three authentication modes: - **Admin API Key** - **Configured Fallback API Key** - **JWT Token** --- Request: ```bash curl --location 'http://localhost:8080/accounts/list?organization_id=org_AUw4KIR0COrD90wgqZLQ' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_UfHPiN8Ua6cSsV6QF0LZmH0U7JlPY1CMrjaKNWy2zyA6i5VR0NoKdW3lKqvb6vea' \ --data '' ``` Expected Response: ```json [ { "merchant_id": "merchant_1747665050", "merchant_name": "Hyperswitch", "return_url": null, "enable_payment_response_hash": true, "payment_response_hash_key": "rki2yoKsrd7xZWc4EiGsHWO1W0XaGKNwmfyHJ1E4IeuEJWKlzsGavQDBd89e6PxL", "redirect_to_merchant_with_http_post": false, "merchant_details": null, "webhook_details": null, "payout_routing_algorithm": null, "sub_merchants_enabled": false, "parent_merchant_id": null, "publishable_key": "pk_dev_dfb4faba44374de8851bc7f36b1a25b9", "metadata": null, "locker_id": null, "primary_business_details": [], "frm_routing_algorithm": null, "organization_id": "org_AUw4KIR0COrD90wgqZLQ", "is_recon_enabled": false, "default_profile": "pro_poTKIbFuUTQlH4Lukesv", "recon_status": "not_requested", "pm_collect_link_config": null, "product_type": "orchestration" }, { "merchant_id": "merchant_1747665195", "merchant_name": "Standard", "return_url": null, "enable_payment_response_hash": true, "payment_response_hash_key": "XuyZ2ltZeYtTvVSaYjgQ4U5TL8JLTKcoIkzab89PkfUAWueP3OeYbNmypErVefyh", "redirect_to_merchant_with_http_post": false, "merchant_details": null, "webhook_details": null, "payout_routing_algorithm": null, "sub_merchants_enabled": false, "parent_merchant_id": null, "publishable_key": "pk_dev_44ab7414c3634bde825492fa49b9a49a", "metadata": null, "locker_id": null, "primary_business_details": [], "frm_routing_algorithm": null, "organization_id": "org_AUw4KIR0COrD90wgqZLQ", "is_recon_enabled": false, "default_profile": "pro_QxoXgT37uHxKdVZZxpQS", "recon_status": "not_requested", "pm_collect_link_config": null, "product_type": "orchestration" } ] ``` --- ### 1. Admin API Key | Scenario | organization_id in Query | Expected Behavior | |----------|---------------------------|--------------------| | 1.1 | Present | List merchants belonging to the specified organization. | | 1.2 | Absent | InvalidRequestData (organization_id is required). | > Admin API key is allowed to list merchants from any organization **explicitly** passed via query. --- ### 2. Configured Fallback API Key (via env) | Scenario | organization_id in Query | Expected Behavior | |----------|---------------------------|--------------------| | 2.1 | Present & matches org from auth | List merchants for that org. | | 2.2 | Present but mismatched with auth org | Reject with `InvalidRequestData`. | | 2.3 | Absent | organization_id is mandatory – reject the request. | > Fallback API Key must always operate within its own org context. --- ### 3. JWT Authentication | Scenario | X-Merchant-Id Header | organization_id in Query | Expected Behavior | |----------|----------------------|---------------------------|--------------------| | 3.1 | Present & matches JWT | Present & matches org auth context | Return merchant list | | 3.2 | Present & matches JWT | Present but mismatches org auth context | Error - InvalidRequestData | | 3.2 | Present but mismatches JWT | Present | Error – mismatched merchant context | | 3.3 | Present | org_id not provided | organization_id required | | 3.4 | Header missing | org_id matches JWT context | merchant_id required via header | > JWT-based requests must strictly match both `merchant_id` (via header) and `organization_id` with those in the token payload/auth context. --- ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Core Business Logic** - `crates/router/src/core/admin.rs` - `crates/router/src/core/user.rs` **2. Type Definitions** - `crates/router/src/types/domain/user.rs` **3. Other** - `crates/router/src/routes/admin.rs` - `crates/router/src/services/authentication.rs` **Code Patterns Applied:** - Define new data structures (1 changes) - Implement new functions (1 changes) - Extend existing types with new fields (17 changes) - Add conditional logic for feature flags or filtering (6 changes) **Detailed Identifier Changes:** Commit 7fee5710: Files to modify: **crates/router/src/core/admin.rs** Modify existing code **crates/router/src/core/user.rs** Modify existing code **crates/router/src/routes/admin.rs** Modify existing code **crates/router/src/services/authentication.rs** Remove: - impl: impl AuthenticateAndFetch<(), A> for (((), AuthenticationType::AdminApiKey)) Add: - function: private::authenticate_and_fetch - struct: pub::AuthenticationDataWithOrg - impl: impl AuthenticateAndFetch<Option<AuthenticationDataWithOrg>, A> for ((None, AuthenticationType::AdminApiKey)) - impl: impl AuthenticateAndFetch<Option<AuthenticationDataWithOrg>, A> for JWTAuthMerchantFromHeader **crates/router/src/types/domain/user.rs** Modify existing code
{"pr_number": 8103, "pr_title": "fix(authentication): add Organization context validation in `Merchant Create` and `Merchant List` APIs", "merged_at": "2025-05-27T10:24:45Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "merchant", "user"]}, "hierarchy": {"core_business": ["crates/router/src/core/admin.rs", "crates/router/src/core/user.rs"], "types": ["crates/router/src/types/domain/user.rs"], "other": ["crates/router/src/routes/admin.rs", "crates/router/src/services/authentication.rs"]}, "change_types": {"structs_added": 1, "functions_added": 1, "fields_added": 17, "conditionals_added": 6}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(email): Add mailhog by default in docker-compose for local smtp server ## 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 support to run local email server in docker-compose. User can see the email we send even in local setup ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR 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** - `config/docker_compose.toml` - `docker-compose.yml` **Code Patterns Applied:** - Extend existing types with new fields (4 changes)
{"pr_number": 6869, "pr_title": "feat(email): Add mailhog by default in docker-compose for local smtp server", "merged_at": "2025-01-21T10:39:56Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user"]}, "hierarchy": {"config": ["config/docker_compose.toml", "docker-compose.yml"]}, "change_types": {"fields_added": 4}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
fix(authorizedotnet): refund via ucs missing connector_metadata ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> - RELATED PR : https://github.com/juspay/hyperswitch/pull/9581 - Refunds via authorizedot net are getting into `pending` state where no connector call is made - This happens when `connector_metadata` is empty in attempt table - In usual cases `connector_metadata` is not empty but this happened via ucs. ### solution - `connector_metadata` contains last4 digits which can be fetched form payment_method_data ## how did i test - make payment from old code , delete connector metadata in attempt table and make refund 1. make payment ```json { "amount": 689, "customer_id": "hello_world", "currency": "USD", "confirm": true, "capture_method": "automatic", "payment_method": "card", "payment_method_type": "debit", "authentication_type": "no_three_ds", "setup_future_usage": "off_session", "customer_acceptance": { "acceptance_type": "online", "accepted_at": "1963-05-03T04:07:52.723Z", "online": { "ip_address": "127.0.0.1", "user_agent": "amet irure esse" } }, "email": "hello@gmail.com", "description": "hellow world", "connector": [ "authorizedotnet" ], "billing": { "address": { "zip": "560095", "country": "US", "first_name": "Sakil", "last_name": "Mostak", "line1": "Fasdf", "line2": "Fasdf", "city": "Fasdf" } }, "payment_method_data": { "card": { "card_number": "4111111111111111", "card_exp_month": "12", "card_exp_year": "2029", "card_holder_name": "John Doe", "card_cvc": "123", "card_network": "Visa" } } } ``` ```json { "payment_id": "pay_n4mGvzhDDxV8ontN4pNa", "merchant_id": "merchant_1759037295", "status": "succeeded", "amount": 689, "net_amount": 689, "shipping_cost": null, "amount_capturable": 0, "amount_received": 689, "connector": "authorizedotnet", "client_secret": "pay_n4mGvzhDDxV8ontN4pNa_secret_nJprHzvgyCnAQQxGeSD9", "created": "2025-09-28T07:38:56.792Z", "currency": "USD", "customer_id": "hello_world", "customer": { "id": "hello_world", "name": null, "email": "hello@gmail.com", "phone": null, "phone_country_code": null }, "description": "hellow world", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "off_session", "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "1111", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "411111", "card_extended_bin": null, "card_exp_month": "12", "card_exp_year": "2029", "card_holder_name": "John Doe", "payment_checks": { "description": "The street address and postal code matched.", "avs_result_code": "Y" }, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": { "city": "Fasdf", "country": "US", "line1": "Fasdf", "line2": "Fasdf", "line3": null, "zip": "560095", "state": null, "first_name": "Sakil", "last_name": "Mostak", "origin_zip": null }, "phone": null, "email": null }, "order_details": null, "email": "hello@gmail.com", "name": null, "phone": null, "return_url": null, "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "debit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "hello_world", "created_at": 1759045136, "expires": 1759048736, "secret": "epk_d109625edc44483a9a0d6e034153633f" }, "manual_retry_allowed": null, "connector_transaction_id": "120071750406", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": { "redirect_response": null, "search_tags": null, "apple_pay_recurring_details": null, "gateway_system": "direct" }, "reference_id": "120071750406", "payment_link": null, "profile_id": "pro_KP1SMsZKdiOrioYnjKO2", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_Ym77o958MRzqZWCyOQXt", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-28T07:53:56.792Z", "fingerprint": null, "browser_info": null, "payment_channel": null, "payment_method_id": "pm_BS4qjY5VS1ARCBexzcfb", "network_transaction_id": "ZKS4CMGOARXYQR4IVKIRAOE", "payment_method_status": "active", "updated": "2025-09-28T07:38:59.120Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": "932841928-932130361", "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null, "enable_partial_authorization": null, "enable_overcapture": null, "is_overcapture_enabled": null, "network_details": null } ``` Delete connector metadata <img width="1233" height="503" alt="Screenshot 2025-09-28 at 1 12 00 PM" src="https://github.com/user-attachments/assets/6fd10bd3-87a1-4798-81f3-e3707ee61ccc" /> <img width="1136" height="944" alt="Screenshot 2025-09-28 at 1 12 22 PM" src="https://github.com/user-attachments/assets/84d13528-a37f-4f2e-ab74-79f70344d49d" /> - manual update refund status into failed ```sh curl --location --request PUT 'localhost:8080/refunds/ref_Ut6eGBd4ZUKJXMhn3NZz/manual-update' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: test_admin' \ --data '{ "status": "failed", "merchant_id": "merchant_1759037295" }' ``` - retrigger refund with new code ```json curl --location 'localhost:8080/refunds' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_IbxeUnL1qB3Fre0mdogERYiA4O4rQttdcxtzqzMjzWpVR6zafoOzCYvIdRz9X5bu' \ --data '{ "payment_id": "pay_n4mGvzhDDxV8ontN4pNa", "amount":689, "reason":"pause" }' ``` ### NOTE THAT in sbx we cannot make successful refund , its skipped in cypress too. Now the api call is goign ```json { "refund_id": "ref_KlllCvhIs4k7Twk6teXh", "payment_id": "pay_n4mGvzhDDxV8ontN4pNa", "amount": 689, "currency": "USD", "status": "failed", "reason": "pause", "metadata": null, "error_message": "The referenced transaction does not meet the criteria for issuing a credit.", "error_code": "54", "unified_code": "UE_9000", "unified_message": "Something went wrong", "created_at": "2025-09-28T07:46:51.621Z", "updated_at": "2025-09-28T07:46:53.144Z", "connector": "authorizedotnet", "profile_id": "pro_KP1SMsZKdiOrioYnjKO2", "merchant_connector_id": "mca_Ym77o958MRzqZWCyOQXt", "split_refunds": null, "issuer_error_code": null, "issuer_error_message": null } ``` ### Additional Changes - [x] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/authorizedotnet/transformers.rs` **Code Patterns Applied:** - Implement new functions (2 changes) - Extend existing types with new fields (5 changes) **Detailed Identifier Changes:** Commit 43901db2: Files to modify: **crates/hyperswitch_connectors/src/connectors/authorizedotnet/transformers.rs** Add: - enum: private::PaymentDetailAccountNumber
{"pr_number": 9602, "pr_title": "fix(authorizedotnet): refund via ucs missing connector_metadata", "merged_at": "2025-09-30T06:40:32Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/authorizedotnet/transformers.rs"]}, "change_types": {"functions_added": 2, "enums_added": 1, "fields_added": 5, "imports_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): [checkout] Add NTID flow ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Add NTID flow for checkout connector. For mandate payment, changed payment type from `Recurring` to `Unscheduled`. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> NTID : Request: ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_QECK7I4E1uCy0YyFL97XvdZfAjHLNZEsW58S74PxnkcqCAjpXvTpQOg9zPmSZsqB' \ --data-raw '{ "amount": 100, "currency": "USD", "customer_id": "c112", "confirm": true, "off_session": true, "email": "guest@example.com", "payment_method": "card", "payment_method_type": "credit", "recurring_details" : { "type": "network_transaction_id_and_card_details", "data": { "card_number": "5137210000000158", "card_exp_month": "12", "card_exp_year": "2030", "network_transaction_id": "155552418737937" } }, "capture_method": "automatic" }' ``` Response: ``` { "payment_id": "pay_Qr1URT1Q6vLPnG9qCznI", "merchant_id": "merchant_1758266196", "status": "succeeded", "amount": 100, "net_amount": 100, "shipping_cost": null, "amount_capturable": 0, "amount_received": 100, "connector": "checkout", "client_secret": "pay_Qr1URT1Q6vLPnG9qCznI_secret_kmJeGzxubCAL0XuWQw5e", "created": "2025-09-19T07:38:29.425Z", "currency": "USD", "customer_id": null, "customer": null, "description": null, "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": true, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "0158", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "513721", "card_extended_bin": null, "card_exp_month": "12", "card_exp_year": "2030", "card_holder_name": null, "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": null, "order_details": null, "email": null, "name": null, "phone": null, "return_url": null, "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": null, "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "c112", "created_at": 1758267509, "expires": 1758271109, "secret": "epk_ec4780d63e9e4e0d88667359e3b87b86" }, "manual_retry_allowed": null, "connector_transaction_id": "pay_int7374chghetawiwub6dl223i", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "pay_Qr1URT1Q6vLPnG9qCznI_1", "payment_link": null, "profile_id": "pro_mFFuoKcjE9OIKwfZ7YjQ", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_J6si7HgMi3BuMdZ9XCCx", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-19T07:53:29.425Z", "fingerprint": null, "browser_info": null, "payment_channel": null, "payment_method_id": null, "network_transaction_id": "901841400677549", "payment_method_status": null, "updated": "2025-09-19T07:38:30.845Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null, "enable_partial_authorization": null, "enable_overcapture": null, "is_overcapture_enabled": null, "network_details": null } ``` Payment Type changed from Recurring to Unscheduled: <img width="1057" height="119" alt="Screenshot 2025-09-19 at 1 11 11 PM" src="https://github.com/user-attachments/assets/3baac82e-ef65-4c95-9f09-d303aba5634c" /> Cypress: <img width="857" height="468" alt="Screenshot 2025-09-18 at 6 35 58 PM" src="https://github.com/user-attachments/assets/844e1139-3b8f-4109-802c-77d23a86584d" /> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/checkout.rs` - `crates/hyperswitch_connectors/src/connectors/checkout/transformers.rs` **2. Tests** - `config/deployments/integration_test.toml` - `cypress-tests/cypress/e2e/configs/Payment/Utils.js` - `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:** - Extend existing types with new fields (27 changes) - Add conditional logic for feature flags or filtering (1 changes) **Detailed Identifier Changes:** Commit d6929280: Files to modify: **crates/hyperswitch_connectors/src/connectors/checkout.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/checkout/transformers.rs** Modify existing code
{"pr_number": 9449, "pr_title": "feat(connector): [checkout] Add NTID flow", "merged_at": "2025-09-24T14:07:54Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/checkout.rs", "crates/hyperswitch_connectors/src/connectors/checkout/transformers.rs"], "tests": ["config/deployments/integration_test.toml", "cypress-tests/cypress/e2e/configs/Payment/Utils.js", "loadtest/config/development.toml"], "config": ["config/config.example.toml", "config/deployments/production.toml", "config/deployments/sandbox.toml", "config/development.toml", "config/docker_compose.toml"]}, "change_types": {"fields_added": 27, "conditionals_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
ci(cypress): Add list and revoke for zero auth mandate payments ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [x] CI/CD ## Description Added the list mandate and revoke mandates for zero auth mandate payment Removed the fiuu hardcoded checks which is invalid for few connectors ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context To cover the scenarios for cypress ## How did you test it? ![Screenshot 2024-11-14 at 4 21 05 PM](https://github.com/user-attachments/assets/a034a0d4-6ad4-4b2c-bd47-f6f125f5c008) ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Tests** - `cypress-tests/cypress/e2e/PaymentTest/00013-ListAndRevokeMandate.cy.js` - `cypress-tests/cypress/support/commands.js` **Code Patterns Applied:** - Add conditional logic for feature flags or filtering (2 changes)
{"pr_number": 6569, "pr_title": "ci(cypress): Add list and revoke for zero auth mandate payments", "merged_at": "2024-11-26T09:19:28Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "user", "connector"]}, "hierarchy": {"tests": ["cypress-tests/cypress/e2e/PaymentTest/00013-ListAndRevokeMandate.cy.js", "cypress-tests/cypress/support/commands.js"]}, "change_types": {"conditionals_added": 2}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
feat(configs): [Trustpay] add support for AT,DE,IT country for instant_banktransfer ## 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/7815 - add AT,DE,IT country for instant_banktransfer ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? 1. Create a Merchant account 2. Create ApI key 3. Create trustpay MCA ``` curl --location 'http://localhost:8080/account/merchant_1744709039/connectors' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_nQkG6G0Aa0WnoFVCyaJnTFbT44vJkiPKjSzG3vEEdVzhMEKnunJboev2sYPbFBbc' \ --data '{ "connector_type": "payment_processor", "connector_name": "trustpay", "connector_account_details": { "auth_type": "SignatureKey", "api_key": "_", "key1": "_", "api_secret": "_" }, "test_mode": false, "disabled": false, "payment_methods_enabled": [ { "payment_method": "bank_transfer", "payment_method_types": [ { "payment_method_type": "sepa_bank_transfer", "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_type": "instant_bank_transfer", "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_type": "ach", "recurring_enabled": true, "installment_payment_enabled": true } ] } ], "metadata":{ "currency_id": 1, "platform_id": 6, "ledger_account_id": "01JP4KPNNMF0S26GVP99RZXGWP" } }' ``` 4. Create a Payment using EUR currency and these AT,DE,IT countries. ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_nQkG6G0Aa0WnoFVCyaJnTFbT44vJkiPKjSzG3vEEdVzhMEKnunJboev2sYPbFBbc' \ --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": "AT", "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": "IT", "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_dB9fFlgfkoPZtzX88qMX", "merchant_id": "merchant_1744709039", "status": "requires_customer_action", "amount": 6540, "net_amount": 6540, "shipping_cost": null, "amount_capturable": 6540, "amount_received": null, "connector": "trustpay", "client_secret": "pay_dB9fFlgfkoPZtzX88qMX_secret_7l2t0yqRy5BLn4166TO5", "created": "2025-04-15T10:27:39.329Z", "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": "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": null }, "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" }, "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_dB9fFlgfkoPZtzX88qMX/merchant_1744709039/pay_dB9fFlgfkoPZtzX88qMX_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": 1744712859, "expires": 1744716459, "secret": "epk_cc529029cc0a4f87a189e3af949449bc" }, "manual_retry_allowed": null, "connector_transaction_id": "6559721361", "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_donHMJiW4xATDBLVLCAg", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_BzpBdvVdKTUQP1dtlvJ5", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-04-15T10:42:39.329Z", "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-04-15T10:27:40.098Z", "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 } ``` Complete Payment using redirection ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Tests** - `config/deployments/integration_test.toml` - `loadtest/config/development.toml` **2. Configuration Files** - `config/config.example.toml` - `config/deployments/production.toml` - `config/deployments/sandbox.toml` - ... and 2 more files
{"pr_number": 7816, "pr_title": "feat(configs): [Trustpay] add support for AT,DE,IT country for instant_banktransfer", "merged_at": "2025-04-15T13:56:50Z", "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/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(connector): [GETNET] Add cards payment flow ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Added `no-3ds cards` flow for new connector `Getnet` ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR 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) No-3DS AutoCapture <img width="1725" alt="Screenshot 2025-02-17 at 9 29 29 PM" src="https://github.com/user-attachments/assets/5041b6b8-53c6-48e3-9c8e-587e3ffdbee1" /> 2) 3DS AutoCapture <img width="1728" alt="Screenshot 2025-02-17 at 9 30 03 PM" src="https://github.com/user-attachments/assets/ade93c4c-246f-48d4-bbda-ad1adf5d4568" /> 3) No-3DS ManualCapture <img width="1728" alt="Screenshot 2025-02-17 at 9 42 43 PM" src="https://github.com/user-attachments/assets/f6ce18d5-c292-4967-b208-e28c25fdf4af" /> 4) 3DS ManualCapture <img width="1728" alt="Screenshot 2025-02-17 at 9 30 38 PM" src="https://github.com/user-attachments/assets/69783c0f-ced4-4449-941d-d5c2670d8bcf" /> 5) Void Payment <img width="1723" alt="Screenshot 2025-02-17 at 9 30 57 PM" src="https://github.com/user-attachments/assets/bcb00a2c-89c6-4f9b-8d9e-5963b0442a2c" /> 6) PSync <img width="1728" alt="Screenshot 2025-02-17 at 9 31 11 PM" src="https://github.com/user-attachments/assets/3fb06a38-8e2f-4448-b56e-dbfde69e6409" /> 7) Refund Payment <img width="1726" alt="Screenshot 2025-02-17 at 9 32 08 PM" src="https://github.com/user-attachments/assets/b70d6e76-1ef1-4f0d-810f-328e583bdc3b" /> 8) RSync <img width="1728" alt="Screenshot 2025-02-17 at 9 32 20 PM" src="https://github.com/user-attachments/assets/ff0c432b-cad5-45fb-a568-060703aa1173" /> Webhook snapshot <img width="1064" alt="Screenshot 2025-03-03 at 4 43 19 PM" src="https://github.com/user-attachments/assets/1c202674-f78d-4ba7-9baf-68c7a8de38df" /> 1. Connector create ``` curl --location 'http://localhost:8080/account/merchant_1739434149/connectors' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: test_admin' \ --data '{ "connector_type": "payment_processor", "connector_name": "getnet", "connector_account_details": { "auth_type": "SignatureKey", "api_key": "4cHLRE-Q7YcAP", "key1": "515225-GetnetEuropeTEST", "api_secret": "5c4a8a42-04a8-4970-a595-262f0ba0a108" }, "test_mode": true, "disabled": false, "payment_methods_enabled": [ { "payment_method": "card", "payment_method_types": [ { "payment_method_type": "credit", "card_networks": [ "Visa", "Mastercard" ], "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true, "accepted_countries": { "type": "disable_only", "list": [ "HK" ] }, "accepted_currencies": { "type": "enable_only", "list": [ "GBP" ] } } ] } ], "metadata": { "city": "NY", "unit": "245" }, "connector_webhook_details": { "merchant_secret": "5ac555d4-e7f7-409f-8147-d82c8c10ed53" }, "business_country": "US", "business_label": "default" }' ``` Response ``` { "connector_type": "payment_processor", "connector_name": "getnet", "connector_label": "getnet_US_default", "merchant_connector_id": "mca_lB9movtztBkl8qeLFQj8", "profile_id": "pro_A7ujgD1s1bxz7eYEXSiy", "connector_account_details": { "auth_type": "SignatureKey", "api_key": "4c*********AP", "key1": "51*******************ST", "api_secret": "5c********************************08" }, "payment_methods_enabled": [ { "payment_method": "card", "payment_method_types": [ { "payment_method_type": "credit", "payment_experience": null, "card_networks": [ "Visa", "Mastercard" ], "accepted_currencies": { "type": "enable_only", "list": [ "GBP" ] }, "accepted_countries": { "type": "disable_only", "list": [ "HK" ] }, "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true } ] } ], "connector_webhook_details": { "merchant_secret": "5ac555d4-e7f7-409f-8147-d82c8c10ed53", "additional_secret": null }, "metadata": { "city": "NY", "unit": "245" }, "test_mode": true, "disabled": false, "frm_configs": null, "business_country": "US", "business_label": "default", "business_sub_label": null, "applepay_verified_domains": null, "pm_auth_config": null, "status": "active", "additional_merchant_data": null, "connector_wallets_details": null } ``` 2. Manual Capture ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_t9KANvghHomlbRfaxACFCdFQaMNiJbq2EpxojRA0OHbh9Kx5HqGJANqXGUnOk0Gr' \ --data-raw '{ "amount": 6540, "currency": "GBP", "amount_to_capture": 6540, "confirm": true, "profile_id": null, "capture_method": "manual", "capture_on": "2022-09-10T10:11:12Z", "authentication_type": "no_three_ds", "setup_future_usage": "on_session", "customer": { "id": "customer123", "name": "John Doe", "email": "customer@gmail.com", "phone": "9999999999", "phone_country_code": "+1" }, "customer_id": "customer123", "phone_country_code": "+1", "routing": { "type": "single", "data": "stripe" }, "description": "Its my first payment request", "return_url": "https://google.com", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "5413330300001006", "card_exp_month": "02", "card_exp_year": "2025", "card_holder_name": "joseph Doe", "card_cvc": "006", "card_network": "Visa" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "guest@example.com" }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "guest@example.com" }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "order_details": [ { "product_name": "Apple iphone 15", "quantity": 1, "amount": 6540, "account_name": "transaction_processing" } ], "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" }, "browser_info": { "user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36", "accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8", "language": "nl-NL", "color_depth": 24, "screen_height": 723, "screen_width": 1536, "time_zone": 0, "java_enabled": true, "java_script_enabled": true, "ip_address": "128.0.0.1" }, "customer_acceptance": { "acceptance_type": "offline", "accepted_at": "1963-05-03T04:07:52.723Z", "online": { "ip_address": "125.0.0.1", "user_agent": "amet irure esse" } }, "connector_metadata": { "noon": { "order_category": "pay" } }, "payment_link": false, "payment_link_config": { "theme": "", "logo": "", "seller_name": "", "sdk_layout": "", "display_sdk_only": false, "enabled_saved_payment_method": false }, "payment_type": "normal", "request_incremental_authorization": false, "merchant_order_reference_id": "test_ord", "session_expiry": 900 } ' ``` Response ``` { "payment_id": "pay_yeIQORCXdgimJRzZTCVw", "merchant_id": "merchant_1739434149", "status": "requires_capture", "amount": 6540, "net_amount": 6540, "shipping_cost": null, "amount_capturable": 6540, "amount_received": null, "connector": "getnet", "client_secret": "pay_yeIQORCXdgimJRzZTCVw_secret_u9VvAVWDu490Tj2lA7Zr", "created": "2025-02-13T08:11:07.353Z", "currency": "GBP", "customer_id": "customer123", "customer": { "id": "customer123", "name": "John Doe", "email": "customer@gmail.com", "phone": "9999999999", "phone_country_code": "+1" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "on_session", "off_session": null, "capture_on": null, "capture_method": "manual", "payment_method": "card", "payment_method_data": { "card": { "last4": "1006", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "541333", "card_extended_bin": null, "card_exp_month": "02", "card_exp_year": "2025", "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": "guest@example.com" }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "guest@example.com" }, "order_details": [ { "brand": null, "amount": 6540, "category": null, "quantity": 1, "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": 1739434267, "expires": 1739437867, "secret": "epk_667d69df4d134fc39f0a61703d75481e" }, "manual_retry_allowed": false, "connector_transaction_id": "068e3efc-4163-4020-96f7-7ed306bffa92", "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": null, "payment_link": null, "profile_id": "pro_A7ujgD1s1bxz7eYEXSiy", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_lB9movtztBkl8qeLFQj8", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-02-13T08:26:07.353Z", "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-13T08:11:12.236Z", "split_payments": null, "frm_metadata": null, "merchant_order_reference_id": "test_ord", "order_tax_amount": null, "connector_mandate_id": null } ``` ``` curl --location 'http://localhost:8080/payments/pay_yeIQORCXdgimJRzZTCVw/capture' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_t9KANvghHomlbRfaxACFCdFQaMNiJbq2EpxojRA0OHbh9Kx5HqGJANqXGUnOk0Gr' \ --data '{ "amount_to_capture": 6000, "statement_descriptor_name": "Joseph", "statement_descriptor_prefix" :"joseph", "statement_descriptor_suffix": "JS" }' ``` Response ``` { "payment_id": "pay_yeIQORCXdgimJRzZTCVw", "merchant_id": "merchant_1739434149", "status": "partially_captured", "amount": 6540, "net_amount": 6540, "shipping_cost": null, "amount_capturable": 0, "amount_received": 6000, "connector": "getnet", "client_secret": "pay_yeIQORCXdgimJRzZTCVw_secret_u9VvAVWDu490Tj2lA7Zr", "created": "2025-02-13T08:11:07.353Z", "currency": "GBP", "customer_id": "customer123", "customer": { "id": "customer123", "name": "John Doe", "email": "customer@gmail.com", "phone": "9999999999", "phone_country_code": "+1" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "on_session", "off_session": null, "capture_on": null, "capture_method": "manual", "payment_method": "card", "payment_method_data": { "card": { "last4": "1006", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "541333", "card_extended_bin": null, "card_exp_month": "02", "card_exp_year": "2025", "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": "guest@example.com" }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "guest@example.com" }, "order_details": [ { "brand": null, "amount": 6540, "category": null, "quantity": 1, "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": null, "manual_retry_allowed": false, "connector_transaction_id": "51cff4a6-6a2b-43f4-8496-9979e55d1621", "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": null, "payment_link": null, "profile_id": "pro_A7ujgD1s1bxz7eYEXSiy", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_lB9movtztBkl8qeLFQj8", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-02-13T08:26:07.353Z", "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_wSdofMDXLzBUvjp1kh4i", "payment_method_status": null, "updated": "2025-02-13T08:12:03.769Z", "split_payments": null, "frm_metadata": null, "merchant_order_reference_id": "test_ord", "order_tax_amount": null, "connector_mandate_id": null } ``` 3. Automatic capture ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_t9KANvghHomlbRfaxACFCdFQaMNiJbq2EpxojRA0OHbh9Kx5HqGJANqXGUnOk0Gr' \ --data-raw '{ "amount": 6540, "currency": "GBP", "amount_to_capture": 6540, "confirm": true, "profile_id": null, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "authentication_type": "no_three_ds", "setup_future_usage": "on_session", "customer": { "id": "customer123", "name": "John Doe", "email": "customer@gmail.com", "phone": "9999999999", "phone_country_code": "+1" }, "customer_id": "customer123", "phone_country_code": "+1", "routing": { "type": "single", "data": "stripe" }, "description": "Its my first payment request", "return_url": "https://google.com", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "5413330300001006", "card_exp_month": "02", "card_exp_year": "2025", "card_holder_name": "joseph Doe", "card_cvc": "006", "card_network": "Visa" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "guest@example.com" }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "guest@example.com" }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "order_details": [ { "product_name": "Apple iphone 15", "quantity": 1, "amount": 6540, "account_name": "transaction_processing" } ], "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" }, "browser_info": { "user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36", "accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8", "language": "nl-NL", "color_depth": 24, "screen_height": 723, "screen_width": 1536, "time_zone": 0, "java_enabled": true, "java_script_enabled": true, "ip_address": "128.0.0.1" }, "customer_acceptance": { "acceptance_type": "offline", "accepted_at": "1963-05-03T04:07:52.723Z", "online": { "ip_address": "125.0.0.1", "user_agent": "amet irure esse" } }, "connector_metadata": { "noon": { "order_category": "pay" } }, "payment_link": false, "payment_link_config": { "theme": "", "logo": "", "seller_name": "", "sdk_layout": "", "display_sdk_only": false, "enabled_saved_payment_method": false }, "payment_type": "normal", "request_incremental_authorization": false, "merchant_order_reference_id": "test_ord", "session_expiry": 900 } ' ``` Response ``` { "payment_id": "pay_VMzczCzFIwowXXE9w8OS", "merchant_id": "merchant_1739434149", "status": "succeeded", "amount": 6540, "net_amount": 6540, "shipping_cost": null, "amount_capturable": 0, "amount_received": 6540, "connector": "getnet", "client_secret": "pay_VMzczCzFIwowXXE9w8OS_secret_vuIqC7LndTSFj11rDMV7", "created": "2025-02-13T08:13:27.282Z", "currency": "GBP", "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": "1006", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "541333", "card_extended_bin": null, "card_exp_month": "02", "card_exp_year": "2025", "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": "guest@example.com" }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "guest@example.com" }, "order_details": [ { "brand": null, "amount": 6540, "category": null, "quantity": 1, "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": 1739434407, "expires": 1739438007, "secret": "epk_3dd3731f7cc24c7f8a7df6e8eeae7535" }, "manual_retry_allowed": false, "connector_transaction_id": "839fc50f-02ba-4314-83a6-056595d0bac0", "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": null, "payment_link": null, "profile_id": "pro_A7ujgD1s1bxz7eYEXSiy", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_lB9movtztBkl8qeLFQj8", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-02-13T08:28:27.282Z", "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-13T08:13:30.109Z", "split_payments": null, "frm_metadata": null, "merchant_order_reference_id": "test_ord", "order_tax_amount": null, "connector_mandate_id": null } ``` Refund ``` curl --location 'http://localhost:8080/refunds' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_t9KANvghHomlbRfaxACFCdFQaMNiJbq2EpxojRA0OHbh9Kx5HqGJANqXGUnOk0Gr' \ --data '{ "payment_id": "pay_VMzczCzFIwowXXE9w8OS", "amount": 600, "reason": "Customer returned product", "refund_type": "instant", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } }' ``` Response ``` { "refund_id": "ref_SCNfNPs3TV8wEk1pVvoS", "payment_id": "pay_VMzczCzFIwowXXE9w8OS", "amount": 600, "currency": "GBP", "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-13T08:14:13.071Z", "updated_at": "2025-02-13T08:14:14.387Z", "connector": "getnet", "profile_id": "pro_A7ujgD1s1bxz7eYEXSiy", "merchant_connector_id": "mca_lB9movtztBkl8qeLFQj8", "split_refunds": null } ``` Void ``` curl --location 'http://localhost:8080/payments/pay_LQ2EiF97FKn0yt0jgmk5/cancel' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_t9KANvghHomlbRfaxACFCdFQaMNiJbq2EpxojRA0OHbh9Kx5HqGJANqXGUnOk0Gr' \ --data '{ "cancellation_reason": "requested_by_customer" }' ``` Response ``` { "payment_id": "pay_LQ2EiF97FKn0yt0jgmk5", "merchant_id": "merchant_1739434149", "status": "cancelled", "amount": 6540, "net_amount": 6540, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": "getnet", "client_secret": "pay_LQ2EiF97FKn0yt0jgmk5_secret_C1NVCNguIV0C3f508eM7", "created": "2025-02-13T08:15:07.592Z", "currency": "GBP", "customer_id": "customer123", "customer": { "id": "customer123", "name": "John Doe", "email": "customer@gmail.com", "phone": "9999999999", "phone_country_code": "+1" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "on_session", "off_session": null, "capture_on": null, "capture_method": "manual", "payment_method": "card", "payment_method_data": { "card": { "last4": "1006", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "541333", "card_extended_bin": null, "card_exp_month": "02", "card_exp_year": "2025", "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": "guest@example.com" }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "guest@example.com" }, "order_details": [ { "brand": null, "amount": 6540, "category": null, "quantity": 1, "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": "requested_by_customer", "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": null, "manual_retry_allowed": false, "connector_transaction_id": "d89b3a2f-3d0d-4654-91f9-0f2e67f40b49", "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": null, "payment_link": null, "profile_id": "pro_A7ujgD1s1bxz7eYEXSiy", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_lB9movtztBkl8qeLFQj8", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-02-13T08:30:07.592Z", "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_8qg5T41lSXYx0qs5KU86", "payment_method_status": null, "updated": "2025-02-13T08:15:17.782Z", "split_payments": null, "frm_metadata": null, "merchant_order_reference_id": "test_ord", "order_tax_amount": null, "connector_mandate_id": null } ``` PSync ``` curl --location 'http://localhost:8080/payments/pay_LQ2EiF97FKn0yt0jgmk5?force_sync=true&expand_captures=true&expand_attempts=true' \ --header 'Accept: application/json' \ --header 'api-key: dev_6HkhcQvkti3OGp1PFsRSwRzKaPnitoH7k854sEOKfOkRypAq1PCNScAYw7VrDBcJ' ``` Response ``` { "payment_id": "pay_qXgED4jGf5ncCz2EO3q8", "merchant_id": "merchant_1739379077", "status": "succeeded", "amount": 6540, "net_amount": 6540, "shipping_cost": null, "amount_capturable": 0, "amount_received": 6540, "connector": "getnet", "client_secret": "pay_qXgED4jGf5ncCz2EO3q8_secret_tiBwvvMYD4dIUewZe8H9", "created": "2025-02-12T19:02:54.488Z", "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": [ { "refund_id": "ref_FXURRXerycqpduKOCtP2", "payment_id": "pay_qXgED4jGf5ncCz2EO3q8", "amount": 600, "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-02-12T19:02:59.241Z", "updated_at": "2025-02-12T19:03:02.765Z", "connector": "getnet", "profile_id": "pro_srQZ4vZCTrjK1XhWzA7t", "merchant_connector_id": "mca_UcS43Fo5dQL631cFT4V3", "split_refunds": null } ], "disputes": null, "attempts": [ { "attempt_id": "pay_qXgED4jGf5ncCz2EO3q8_1", "status": "charged", "amount": 6540, "order_tax_amount": null, "currency": "USD", "connector": "getnet", "error_message": null, "payment_method": "card", "connector_transaction_id": "b0c93eb0-d018-42e0-ac36-bf4a6e47f51d", "capture_method": "automatic", "authentication_type": "no_three_ds", "created_at": "2025-02-12T19:02:54.488Z", "modified_at": "2025-02-12T19:02:56.271Z", "cancellation_reason": null, "mandate_id": null, "error_code": null, "payment_token": null, "connector_metadata": null, "payment_experience": null, "payment_method_type": "credit", "reference_id": null, "unified_code": null, "unified_message": null, "client_source": null, "client_version": null } ], "mandate_id": null, "mandate_data": null, "setup_future_usage": "on_session", "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "1006", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "541333", "card_extended_bin": null, "card_exp_month": "02", "card_exp_year": "2025", "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": "guest@example.com" }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "guest@example.com" }, "order_details": [ { "brand": null, "amount": 6540, "category": null, "quantity": 1, "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": null, "manual_retry_allowed": false, "connector_transaction_id": "b0c93eb0-d018-42e0-ac36-bf4a6e47f51d", "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": null, "payment_link": null, "profile_id": "pro_srQZ4vZCTrjK1XhWzA7t", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_UcS43Fo5dQL631cFT4V3", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-02-12T19:17:54.488Z", "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_r8XyBKhMfwgSeu9RMRxt", "payment_method_status": "active", "updated": "2025-02-12T19:02:56.256Z", "split_payments": null, "frm_metadata": null, "merchant_order_reference_id": "test_ord", "order_tax_amount": null, "connector_mandate_id": null } ``` RSync ``` curl --location 'http://localhost:8080/refunds/ref_SCNfNPs3TV8wEk1pVvoS' \ --header 'Accept: application/json' \ --header 'api-key: dev_6HkhcQvkti3OGp1PFsRSwRzKaPnitoH7k854sEOKfOkRypAq1PCNScAYw7VrDBcJ' ``` Response ``` { "refund_id": "ref_FXURRXerycqpduKOCtP2", "payment_id": "pay_qXgED4jGf5ncCz2EO3q8", "amount": 600, "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-02-12T19:02:59.241Z", "updated_at": "2025-02-12T19:03:02.765Z", "connector": "getnet", "profile_id": "pro_srQZ4vZCTrjK1XhWzA7t", "merchant_connector_id": "mca_UcS43Fo5dQL631cFT4V3", "split_refunds": 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/enums.rs` **2. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/router_request_types.rs` **3. Core Business Logic** - `crates/router/src/core/admin.rs` - `crates/router/src/core/payments/flows/authorize_flow.rs` - `crates/router/src/core/payments/flows/complete_authorize_flow.rs` - ... and 3 more files **4. External Connector Integration** - `crates/common_enums/src/connector_enums.rs` - `crates/connector_configs/src/connector.rs` - `crates/connector_configs/toml/development.toml` - ... and 7 more files **5. Type Definitions** - `crates/router/src/types/api.rs` - `crates/router/src/types/transformers.rs` **6. Tests** - `cypress-tests/cypress/e2e/configs/Payment/Getnet.js` - `cypress-tests/cypress/e2e/configs/Payment/Utils.js` **7. Other** - `api-reference-v2/openapi_spec.json` - `api-reference/openapi_spec.json` - `crates/hyperswitch_interfaces/src/api.rs` **Code Patterns Applied:** - Define new data structures (28 changes) - Implement new functions (35 changes) - Extend existing types with new fields (585 changes) - Add conditional logic for feature flags or filtering (5 changes) **Detailed Identifier Changes:** Commit d346d38f: Files to modify: **crates/api_models/src/enums.rs** Modify existing code **crates/common_enums/src/connector_enums.rs** Modify existing code **crates/connector_configs/src/connector.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/getnet.rs** Remove: - impl: impl ConnectorIntegration<SetupMandate, SetupMandateRequestData, PaymentsResponseData> for Getnet - impl: impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Getnet Add: - function: private::validate_connector_against_payment_request - function: private::validate_psync_reference_id - function: private::build_request - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::get_request_body - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_webhook_source_verification_algorithm - function: private::get_webhook_source_verification_signature - function: private::get_webhook_source_verification_message - impl: impl ConnectorIntegration<Session, PaymentsSessionData, PaymentsResponseData> for Getnet - impl: impl ConnectorIntegration<SetupMandate, SetupMandateRequestData, PaymentsResponseData> for Getnet - impl: impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Getnet **crates/hyperswitch_connectors/src/connectors/getnet/transformers.rs** Add: - function: private::from - function: private::try_from - function: private::try_from - function: pub::cancel_status_from_transaction_state - function: private::get_webhook_response - function: pub::get_incoming_webhook_event - struct: pub::Amount - struct: pub::Address - struct: pub::AccountHolder - struct: pub::Card - struct: pub::PaymentMethod - struct: pub::Notification - struct: pub::PaymentMethodContainer - struct: pub::NotificationContainer - struct: pub::MerchantAccountId - struct: pub::PaymentData - struct: pub::CancelPaymentData - struct: pub::GetnetCancelRequest - struct: pub::CancelResponseData - struct: pub::GetnetCancelResponse - enum: pub::GetnetPaymentMethods - enum: pub::NotificationFormat - enum: pub::GetnetTransactionType - impl: impl TryFrom<enums::PaymentMethodType> for PaymentMethodContainer - impl: impl TryFrom<&PaymentsCancelRouterData> for GetnetCancelRequest **crates/hyperswitch_connectors/src/utils.rs** Add: - function: private::get_webhook_url - function: private::get_webhook_url **crates/hyperswitch_domain_models/src/router_request_types.rs** Modify existing code **crates/hyperswitch_interfaces/src/api.rs** Add: - function: private::get_accept_type **crates/router/src/configs/defaults/payment_connector_required_fields.rs** Modify existing code **crates/router/src/core/admin.rs** Modify existing code **crates/router/src/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/transformers.rs** Modify existing code **crates/router/src/core/relay/utils.rs** Modify existing code **crates/router/src/core/utils.rs** Modify existing code **crates/router/src/types/api.rs** Modify existing code **crates/router/src/types/transformers.rs** Modify existing code **crates/router/tests/connectors/utils.rs** Modify existing code
{"pr_number": 7256, "pr_title": "feat(connector): [GETNET] Add cards payment flow", "merged_at": "2025-03-17T15:00:18Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/enums.rs"], "domain": ["crates/hyperswitch_domain_models/src/router_request_types.rs"], "core_business": ["crates/router/src/core/admin.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/transformers.rs", "crates/router/src/core/relay/utils.rs", "crates/router/src/core/utils.rs"], "connectors": ["crates/common_enums/src/connector_enums.rs", "crates/connector_configs/src/connector.rs", "crates/connector_configs/toml/development.toml", "crates/connector_configs/toml/production.toml", "crates/connector_configs/toml/sandbox.toml", "crates/hyperswitch_connectors/src/connectors/getnet.rs", "crates/hyperswitch_connectors/src/connectors/getnet/transformers.rs", "crates/hyperswitch_connectors/src/utils.rs", "crates/router/src/configs/defaults/payment_connector_required_fields.rs", "crates/router/tests/connectors/utils.rs"], "types": ["crates/router/src/types/api.rs", "crates/router/src/types/transformers.rs"], "tests": ["cypress-tests/cypress/e2e/configs/Payment/Getnet.js", "cypress-tests/cypress/e2e/configs/Payment/Utils.js"], "other": ["api-reference-v2/openapi_spec.json", "api-reference/openapi_spec.json", "crates/hyperswitch_interfaces/src/api.rs"]}, "change_types": {"structs_added": 28, "functions_added": 35, "enums_added": 4, "fields_added": 585, "imports_added": 13, "conditionals_added": 5}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor(core): Revert "filter default routing config response based on connector type" ## 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 --> main pr: https://github.com/juspay/hyperswitch/pull/7556 We are reverting the filtering of response for payment and payout processors. So this works as follows: If Payment's route is hit all the PaymentProcessors will be listed like PayoutConnectors etc. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR 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 after creating JWT locally and adding 1 payment and 1 payout connector. Payment : ``` curl --location 'http://localhost:8080/routing/default/profile' \ --header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiMWMyMTJhODgtOGFmYy00YjJjLWIwYWQtODY3MmQ2NTI3MzdlIiwibWVyY2hhbnRfaWQiOiJtZXJjaGFudF8xNzQxMDAzMjgwIiwicm9sZV9pZCI6Im9yZ19hZG1pbiIsImV4cCI6MTc0MTE3NjE1Miwib3JnX2lkIjoib3JnX1c4MkFMNTZ6VVE1dXFHcEEyYzFkIiwicHJvZmlsZV9pZCI6InByb19NcUlMcDAwdUFJeW5JZDdtUTNUTyIsInRlbmFudF9pZCI6InB1YmxpYyJ9.RoPyIG-JGrH6QmM6Gqd9gh03hOqy6MuC9Our9EHYGNk' \ --header 'Cookie: login_token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiMWMyMTJhODgtOGFmYy00YjJjLWIwYWQtODY3MmQ2NTI3MzdlIiwibWVyY2hhbnRfaWQiOiJtZXJjaGFudF8xNzQxMDAzMjgwIiwicm9sZV9pZCI6Im9yZ19hZG1pbiIsImV4cCI6MTc0MTE3NjE1Miwib3JnX2lkIjoib3JnX1c4MkFMNTZ6VVE1dXFHcEEyYzFkIiwicHJvZmlsZV9pZCI6InByb19NcUlMcDAwdUFJeW5JZDdtUTNUTyIsInRlbmFudF9pZCI6InB1YmxpYyJ9.RoPyIG-JGrH6QmM6Gqd9gh03hOqy6MuC9Our9EHYGNk' ``` Payout : ``` curl --location 'http://localhost:8080/routing/payout/default/profile' \ --header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiMWMyMTJhODgtOGFmYy00YjJjLWIwYWQtODY3MmQ2NTI3MzdlIiwibWVyY2hhbnRfaWQiOiJtZXJjaGFudF8xNzQxMDAzMjgwIiwicm9sZV9pZCI6Im9yZ19hZG1pbiIsImV4cCI6MTc0MTE3NjE1Miwib3JnX2lkIjoib3JnX1c4MkFMNTZ6VVE1dXFHcEEyYzFkIiwicHJvZmlsZV9pZCI6InByb19NcUlMcDAwdUFJeW5JZDdtUTNUTyIsInRlbmFudF9pZCI6InB1YmxpYyJ9.RoPyIG-JGrH6QmM6Gqd9gh03hOqy6MuC9Our9EHYGNk' \ --header 'Cookie: login_token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiMWMyMTJhODgtOGFmYy00YjJjLWIwYWQtODY3MmQ2NTI3MzdlIiwibWVyY2hhbnRfaWQiOiJtZXJjaGFudF8xNzQxMDAzMjgwIiwicm9sZV9pZCI6Im9yZ19hZG1pbiIsImV4cCI6MTc0MTE3NjE1Miwib3JnX2lkIjoib3JnX1c4MkFMNTZ6VVE1dXFHcEEyYzFkIiwicHJvZmlsZV9pZCI6InByb19NcUlMcDAwdUFJeW5JZDdtUTNUTyIsInRlbmFudF9pZCI6InB1YmxpYyJ9.RoPyIG-JGrH6QmM6Gqd9gh03hOqy6MuC9Our9EHYGNk' ``` ## 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/routing.rs` **Code Patterns Applied:** - Modify database queries (1 changes) **Detailed Identifier Changes:** Commit ad05791f: Files to modify: **crates/router/src/core/routing.rs** Modify existing code
{"pr_number": 7557, "pr_title": "refactor(core): Revert \"filter default routing config response based on connector type\"", "merged_at": "2025-03-18T16:25:03Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "connector", "token"]}, "hierarchy": {"core_business": ["crates/router/src/core/routing.rs"]}, "change_types": {"imports_added": 2, "database_queries": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(analytics): remove additional filters from PaymentIntentFilters ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Fix for this PR: [https://github.com/juspay/hyperswitch/pull/5870](https://github.com/juspay/hyperswitch/pull/5870) - Additional filters are added to `PaymentIntentFilters` as new analytics APIs are expected to be calculated from `Sessionizer Payment Intents` table. - Existing metrics on current dashboard are breaking due to these new filters as the fields are not present in the Payment Intents table. Removed the following additional filters from `PaymentIntentFilters` - connector - authentication_type - payment_method - payment_method_type - card_network - merchant_id - card_last_4 - card_issuer - error_reason ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> Dashboard is raising error (status_code - 500) when payment intent based analytics APIs ae being hit, due to filter fields not present in the payment intents table. ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Added filters of connector, payment_method, etc on the dashboard and the payments v2 APIs should not return 500 error. - Hit the curl: ```bash curl --location 'http://localhost:8080/analytics/v2/org/metrics/payments' \ --header 'Accept: */*' \ --header 'Accept-Language: en-US,en;q=0.9' \ --header 'Connection: keep-alive' \ --header 'Content-Type: application/json' \ --header 'Origin: http://localhost:9000' \ --header 'QueryType: SingleStatTimeseries' \ --header 'Referer: http://localhost:9000/' \ --header 'Sec-Fetch-Dest: empty' \ --header 'Sec-Fetch-Mode: cors' \ --header 'Sec-Fetch-Site: same-site' \ --header 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36' \ --header 'api-key: snd_ug3Xjm7pNJ6u3SeC5jQCApLIPr6NdDppvEKht091zd62EJJ0pWF6KziALr0yQEuF' \ --header 'authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTQ5ZTNkMmItMTY5Yi00NzUzLWJmNTQtZDcxMTM2YjRiN2JkIiwibWVyY2hhbnRfaWQiOiJtZXJjaGFudF8xNzI2MDQ2MzI4Iiwicm9sZV9pZCI6Im9yZ19hZG1pbiIsImV4cCI6MTcyOTc0ODc1Mywib3JnX2lkIjoib3JnX1ZwU0hPanNZZkR2YWJWWUpnQ0FKIiwicHJvZmlsZV9pZCI6InByb192NXNGb0hlODBPZWlVbElvbm9jTSJ9.-NHlfMrAjUDwjMpCo9PAn86koRkkPMBygNfCTh2jiTw' \ --header 'sec-ch-ua: "Google Chrome";v="129", "Not=A?Brand";v="8", "Chromium";v="129"' \ --header 'sec-ch-ua-mobile: ?0' \ --header 'sec-ch-ua-platform: "macOS"' \ --data '[ { "timeRange": { "startTime": "2024-10-14T18:30:00Z", "endTime": "2024-10-22T15:24:00Z" }, "groupByNames": [ "currency" ], "filters": { "connector": [ "stripe_test" ] }, "timeSeries": { "granularity": "G_ONEDAY" }, "mode": "ORDER", "source": "BATCH", "metrics": [ "successful_smart_retries", "total_smart_retries", "smart_retried_amount" ] } ]' ``` - Response: ```bash { "queryData": [ { "successful_smart_retries": 1, "total_smart_retries": 1, "smart_retried_amount": 6540, "smart_retried_amount_without_smart_retries": 0, "payment_intent_count": null, "successful_payments": null, "successful_payments_without_smart_retries": null, "total_payments": null, "payments_success_rate": null, "payments_success_rate_without_smart_retries": null, "payment_processed_amount": 0, "payment_processed_count": null, "payment_processed_amount_without_smart_retries": 0, "payment_processed_count_without_smart_retries": null, "payments_success_rate_distribution_without_smart_retries": null, "payments_failure_rate_distribution_without_smart_retries": null, "status": null, "currency": "USD", "profile_id": null, "time_range": { "start_time": "2024-10-18T00:00:00.000Z", "end_time": "2024-10-18T23:00:00.000Z" }, "time_bucket": "2024-10-18 00:00:00" } ], "metaData": [ { "total_success_rate": null, "total_success_rate_without_smart_retries": null, "total_smart_retried_amount": 6540, "total_smart_retried_amount_without_smart_retries": 0, "total_payment_processed_amount": 0, "total_payment_processed_amount_without_smart_retries": 0, "total_payment_processed_count": 0, "total_payment_processed_count_without_smart_retries": 0 } ] } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/analytics/payment_intents.rs` **2. Core Business Logic** - `crates/analytics/src/payment_intents/core.rs` **3. Type Definitions** - `crates/analytics/src/payment_intents/types.rs` **4. Utils** - `crates/analytics/src/utils.rs` **5. Other** - `crates/analytics/src/payment_intents/filters.rs` - `crates/analytics/src/payment_intents/metrics.rs` - `crates/analytics/src/payment_intents/metrics/payment_intent_count.rs` - ... and 12 more files **Code Patterns Applied:** **Detailed Identifier Changes:** Commit 4ef48c39: Files to modify: **crates/analytics/src/payment_intents/core.rs** Modify existing code **crates/analytics/src/payment_intents/filters.rs** Modify existing code **crates/analytics/src/payment_intents/metrics.rs** Modify existing code **crates/analytics/src/payment_intents/metrics/payment_intent_count.rs** Modify existing code **crates/analytics/src/payment_intents/metrics/payments_success_rate.rs** Modify existing code **crates/analytics/src/payment_intents/metrics/sessionized_metrics/payment_intent_count.rs** Modify existing code **crates/analytics/src/payment_intents/metrics/sessionized_metrics/payment_processed_amount.rs** Modify existing code **crates/analytics/src/payment_intents/metrics/sessionized_metrics/payments_distribution.rs** Modify existing code **crates/analytics/src/payment_intents/metrics/sessionized_metrics/payments_success_rate.rs** Modify existing code **crates/analytics/src/payment_intents/metrics/sessionized_metrics/smart_retried_amount.rs** Modify existing code **crates/analytics/src/payment_intents/metrics/sessionized_metrics/successful_smart_retries.rs** Modify existing code **crates/analytics/src/payment_intents/metrics/sessionized_metrics/total_smart_retries.rs** Modify existing code **crates/analytics/src/payment_intents/metrics/smart_retried_amount.rs** Modify existing code **crates/analytics/src/payment_intents/metrics/successful_smart_retries.rs** Modify existing code **crates/analytics/src/payment_intents/metrics/total_smart_retries.rs** Modify existing code **crates/analytics/src/payment_intents/types.rs** Modify existing code **crates/analytics/src/sqlx.rs** Modify existing code **crates/analytics/src/utils.rs** Modify existing code **crates/api_models/src/analytics/payment_intents.rs** Modify existing code
{"pr_number": 6403, "pr_title": "feat(analytics): remove additional filters from PaymentIntentFilters", "merged_at": "2024-10-23T06:51:07Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "merchant", "user"]}, "hierarchy": {"api_models": ["crates/api_models/src/analytics/payment_intents.rs"], "core_business": ["crates/analytics/src/payment_intents/core.rs"], "types": ["crates/analytics/src/payment_intents/types.rs"], "utils": ["crates/analytics/src/utils.rs"], "other": ["crates/analytics/src/payment_intents/filters.rs", "crates/analytics/src/payment_intents/metrics.rs", "crates/analytics/src/payment_intents/metrics/payment_intent_count.rs", "crates/analytics/src/payment_intents/metrics/payments_success_rate.rs", "crates/analytics/src/payment_intents/metrics/sessionized_metrics/payment_intent_count.rs", "crates/analytics/src/payment_intents/metrics/sessionized_metrics/payment_processed_amount.rs", "crates/analytics/src/payment_intents/metrics/sessionized_metrics/payments_distribution.rs", "crates/analytics/src/payment_intents/metrics/sessionized_metrics/payments_success_rate.rs", "crates/analytics/src/payment_intents/metrics/sessionized_metrics/smart_retried_amount.rs", "crates/analytics/src/payment_intents/metrics/sessionized_metrics/successful_smart_retries.rs", "crates/analytics/src/payment_intents/metrics/sessionized_metrics/total_smart_retries.rs", "crates/analytics/src/payment_intents/metrics/smart_retried_amount.rs", "crates/analytics/src/payment_intents/metrics/successful_smart_retries.rs", "crates/analytics/src/payment_intents/metrics/total_smart_retries.rs", "crates/analytics/src/sqlx.rs"]}, "change_types": {"imports_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(payouts): add payout webhooks for Paypal and Wise ## 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 payout webhooks in Paypal and Wise. Wise requires MTLS Webhook Support (No algo). ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Tested through Postman: #### Case 1: Wise - Setup Webhook Url in Wise's Dashboard - Setup ngrok to receive webhooks (ngrok http 8080) - Create a payout through Wise: ``` { "amount": 100, "currency": "USD", "customer_id": "{{customer_id}}", "email": "payout_customer@example.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payout request", "payout_type": "bank", "payout_method_data": { "bank": { "bank_account_number": "40000000000", "bank_routing_number": "064000020", "bank_name": "Deutsche Bank", "bank_country_code": "US", "bank_city": "NewYork" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "NY", "zip": "94122", "country": "US", "first_name": "John", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "entity_type": "Individual", "recurring": false, "priority": "instant", "metadata": { "ref": "123" }, "confirm": true, "auto_fulfill": true } ``` You should receive webhook in your ngrok dashboard, below is an example: ``` { "merchant_id": "merchant_1754846936", "event_id": "evt_0198951ae9cb78a3bf27a41ac8d2065e", "event_type": "payout_initiated", "content": { "type": "payout_details", "object": { "payout_id": "payout_H2DAqVUhPEdDsRV8cfjH", "merchant_id": "merchant_1754846936", "merchant_order_reference_id": null, "amount": 100, "currency": "USD", "connector": "wise", "payout_type": "bank", "payout_method_data": { "bank": { "bank_account_number": "*******0000", "bank_routing_number": "064***020", "bank_name": "Deutsche Bank", "bank_country_code": "US", "bank_city": "NewYork" } }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "NY", "first_name": "John", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "auto_fulfill": true, "customer_id": "cus_cYAAKIdW24vIwYAOfFaV", "customer": { "id": "cus_cYAAKIdW24vIwYAOfFaV", "name": "John Doe", "email": "payout_customer@example.com", "phone": "999999999", "phone_country_code": "+65" }, "client_secret": "payout_payout_H2DAqVUhPEdDsRV8cfjH_secret_atspa5vXM8YBsPXTiyLe", "return_url": null, "business_country": null, "business_label": null, "description": "Its my first payout request", "entity_type": "Individual", "recurring": false, "metadata": { "ref": "123" }, "merchant_connector_id": "mca_y8SkmRkiqcqcQN3SkRFE", "status": "initiated", "error_message": null, "error_code": null, "profile_id": "pro_qkV0fQ7pABG5Ms3oIVZT", "created": "2025-08-10T17:50:21.347Z", "connector_transaction_id": "55321094", "priority": "instant", "payout_link": null, "email": "payout_customer@example.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+65", "unified_code": null, "unified_message": null, "payout_method_id": null } }, "timestamp": "2025-08-10T17:50:25.739Z" } ``` #### Case 2: Paypal Payouts - Setup Webhook Url in Paypal's Dashboard - Setup ngrok to receive webhooks (ngrok http 8080) - Create an MCA (Paypal) with webhook secret - Create a payout through Paypal: ``` { "amount": 1, "currency": "EUR", "customer_id": "payout_customer", "email": "payout_customer@example.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payout request", "payout_type": "wallet", "payout_method_data": { "wallet": { "paypal": { "paypal_id": "{{paypal_id}}" } } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "NY", "zip": "94122", "country": "US", "first_name": "John", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "entity_type": "NaturalPerson", "recurring": false, "metadata": { "ref": "123" }, "confirm": true, "auto_fulfill": true } ``` You should recieve webhook at ngrok's dashboard, below is an example webhook: ``` { "merchant_id": "merchant_1754899254", "event_id": "evt_019898dd79407102b334d3d842586466", "event_type": "payout_cancelled", "content": { "type": "payout_details", "object": { "payout_id": "payout_r5YPfdyK3hK7MFIXvZko", "merchant_id": "merchant_1754899254", "merchant_order_reference_id": null, "amount": 1, "currency": "EUR", "connector": "paypal", "payout_type": "wallet", "payout_method_data": { "wallet": { "email": null, "telephone_number": null, "paypal_id": "G83K*****HCQ2" } }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "NY", "first_name": "John", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "auto_fulfill": true, "customer_id": "payout_customer", "customer": { "id": "payout_customer", "name": "John Doe", "email": "payout_customer@example.com", "phone": "999999999", "phone_country_code": "+65" }, "client_secret": "payout_payout_r5YPfdyK3hK7MFIXvZko_secret_ynoZvn9rlYxeeZA2SjGT", "return_url": null, "business_country": null, "business_label": null, "description": "Its my first payout request", "entity_type": "NaturalPerson", "recurring": false, "metadata": { "ref": "123" }, "merchant_connector_id": "mca_cSNgXEk9pp06nJaqMcUj", "status": "failed", "error_message": null, "error_code": null, "profile_id": "pro_TOAPbsFfuGShtkuAsAec", "created": "2025-08-11T11:21:17.907Z", "connector_transaction_id": "JFTF8RXMY3HLE", "priority": null, "payout_link": null, "email": "payout_customer@example.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+65", "unified_code": null, "unified_message": null, "payout_method_id": null } }, "timestamp": "2025-08-11T11:21:48.096Z" } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/paypal.rs` - `crates/hyperswitch_connectors/src/connectors/paypal/transformers.rs` - `crates/hyperswitch_connectors/src/connectors/wise.rs` - ... and 2 more files **Code Patterns Applied:** - Define new data structures (8 changes) - Implement new functions (13 changes) - Extend existing types with new fields (56 changes) **Detailed Identifier Changes:** Commit fdc102de: Files to modify: **crates/hyperswitch_connectors/src/connectors/paypal.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/paypal/transformers.rs** Add: - function: private::try_from - function: private::try_from - function: private::try_from - struct: pub::PaypalPayoutSyncResponse - struct: pub::PaypalSyncBatchResponse - impl: impl TryFrom<PaypalBatchPayoutWebhooks> for PaypalPayoutSyncResponse - impl: impl TryFrom<(PaypalItemPayoutWebhooks, PaypalWebhookEventType)> for PaypalPayoutSyncResponse **crates/hyperswitch_connectors/src/connectors/wise.rs** Add: - function: private::get_url - function: private::get_headers - function: private::build_request - function: private::handle_response - function: private::get_error_response - impl: impl api::PayoutSync for Wise - impl: impl ConnectorIntegration<PoSync, PayoutsData, PayoutsResponseData> for Wise **crates/hyperswitch_connectors/src/connectors/wise/transformers.rs** Add: - function: private::try_from - function: private::from - function: private::from - function: pub::get_wise_webhooks_event - struct: pub::WisePayoutSyncResponse - struct: pub::WisePayoutsWebhookBody - struct: pub::WisePayoutsWebhookData - struct: pub::WisePayoutsWebhookResource - enum: pub::WiseSyncStatus - impl: impl TryFrom<PayoutsResponseRouterData<F, WisePayoutSyncResponse>> for PayoutsRouterData<F> - impl: impl From<WiseSyncStatus> for PayoutStatus - impl: impl From<WisePayoutsWebhookData> for WisePayoutSyncResponse **crates/hyperswitch_connectors/src/default_implementations.rs** Modify existing code
{"pr_number": 8888, "pr_title": "feat(payouts): add payout webhooks for Paypal and Wise", "merged_at": "2025-08-11T14:01:51Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "merchant", "order"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/paypal.rs", "crates/hyperswitch_connectors/src/connectors/paypal/transformers.rs", "crates/hyperswitch_connectors/src/connectors/wise.rs", "crates/hyperswitch_connectors/src/connectors/wise/transformers.rs", "crates/hyperswitch_connectors/src/default_implementations.rs"]}, "change_types": {"structs_added": 8, "functions_added": 13, "enums_added": 1, "fields_added": 56, "imports_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor(core): propagate network_transaction_id in response of payment ## 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 --> propagate network transaction id stored in payment method's table to response of payment. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR 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 an MCA with Stripe Create a mandate payment with below body: ``` { "amount": 60, "currency": "USD", "confirm": true, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 60, "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://duck.com", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4242424242424242", "card_exp_month": "10", "card_exp_year": "25", "card_holder_name": "joseph Doe", "card_cvc": "123" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "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": "+918056594427" } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" }, "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" } }, "setup_future_usage": "off_session" } ``` network_transaction_id should be present in the response, below is an example: ``` { "payment_id": "pay_jBPDrP9ZdTECIsalkkNY", "merchant_id": "merchant_1754389698", "status": "succeeded", "amount": 60, "net_amount": 60, "shipping_cost": null, "amount_capturable": 0, "amount_received": 60, "connector": "stripe", "client_secret": "pay_jBPDrP9ZdTECIsalkkNY_secret_WeZmeyHuYEjYMNkWyrR9", "created": "2025-08-05T12:27:05.434Z", "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": "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": "+918056594427", "country_code": null }, "email": null }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "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": "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_3RsjxNEOqOywnAIx0YV9IlIi", "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2019-09-10T10:11:12Z", "new_customer": "true" }, "connector_metadata": null, "feature_metadata": null, "reference_id": "pi_3RsjxNEOqOywnAIx0YV9IlIi", "payment_link": null, "profile_id": "pro_a5MVvcfyGr63Cw5swdYB", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_60PvtJNqW0Jlbq3cwyrD", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-08-05T12:42:05.434Z", "fingerprint": null, "browser_info": null, "payment_channel": null, "payment_method_id": "pm_if0cyaXWPPDGV1omReTq", "network_transaction_id": "869012010881113", "payment_method_status": "active", "updated": "2025-08-05T12:27:25.237Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/payments.rs` **2. Core Business Logic** - `crates/router/src/core/payments.rs` - `crates/router/src/core/payments/transformers.rs` **3. Tests** - `crates/router/tests/payments.rs` - `crates/router/tests/payments2.rs` **4. Other** - `api-reference/v1/openapi_spec_v1.json` - `crates/router/src/db/events.rs` **Code Patterns Applied:** - Implement new functions (1 changes) - Extend existing types with new fields (8 changes) **Detailed Identifier Changes:** Commit f3c0a9bf: Files to modify: **crates/api_models/src/payments.rs** Modify existing code **crates/router/src/core/payments.rs** Modify existing code **crates/router/src/core/payments/transformers.rs** Modify existing code **crates/router/src/db/events.rs** Modify existing code **crates/router/tests/payments.rs** Modify existing code **crates/router/tests/payments2.rs** Modify existing code
{"pr_number": 8829, "pr_title": "refactor(core): propagate network_transaction_id in response of payment", "merged_at": "2025-08-05T16:18:02Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/payments.rs"], "core_business": ["crates/router/src/core/payments.rs", "crates/router/src/core/payments/transformers.rs"], "tests": ["crates/router/tests/payments.rs", "crates/router/tests/payments2.rs"], "other": ["api-reference/v1/openapi_spec_v1.json", "crates/router/src/db/events.rs"]}, "change_types": {"functions_added": 1, "fields_added": 8}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(config): add billing payment sync configs in different environments ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Adds the billing_connector_payment_sync config to sandbox, integ and production.toml ### 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 ## How did you test it? 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. Tests** - `config/deployments/integration_test.toml` - `loadtest/config/development.toml` **2. Configuration Files** - `config/deployments/production.toml` - `config/deployments/sandbox.toml`
{"pr_number": 7708, "pr_title": "fix(config): add billing payment sync configs in different environments", "merged_at": "2025-04-04T10:03:04Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "connector"]}, "hierarchy": {"tests": ["config/deployments/integration_test.toml", "loadtest/config/development.toml"], "config": ["config/deployments/production.toml", "config/deployments/sandbox.toml"]}, "change_types": {}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
feat(core): add three_ds_requestor_app_url in business_profile ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Hotfix for [PR](https://github.com/juspay/hyperswitch/pull/7589) `cargo clippy` output <img width="1098" alt="Screenshot 2025-03-25 at 5 12 09 PM" src="https://github.com/user-attachments/assets/e191b508-e831-41ef-a138-1d2ca89f6a53" /> ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/admin.rs` - `crates/api_models/src/payments.rs` **2. Database Layer (Queries & Schema)** - `crates/diesel_models/src/business_profile.rs` **3. Core Business Logic** - `crates/router/src/core/payments.rs` **4. Type Definitions** - `crates/router/src/types/transformers.rs` **5. Other** - `api-reference-v2/openapi_spec.json` - `api-reference/openapi_spec.json` **Code Patterns Applied:** - Extend existing types with new fields (6 changes) **Detailed Identifier Changes:** Commit df93bb77: 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/router/src/core/payments.rs** Modify existing code **crates/router/src/types/transformers.rs** Modify existing code
{"pr_number": 7627, "pr_title": "feat(core): add three_ds_requestor_app_url in business_profile", "merged_at": "2025-03-25T13:25:01Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user"]}, "hierarchy": {"api_models": ["crates/api_models/src/admin.rs", "crates/api_models/src/payments.rs"], "database": ["crates/diesel_models/src/business_profile.rs"], "core_business": ["crates/router/src/core/payments.rs"], "types": ["crates/router/src/types/transformers.rs"], "other": ["api-reference-v2/openapi_spec.json", "api-reference/openapi_spec.json"]}, "change_types": {"fields_added": 6}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(router): add support for GooglePay pre-decrypted token in the payments confirm 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 --> This PR will allow to pass the Decrypted Payload(GooglePay) directly in the Payments Confirm call ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> GooglePay Decypted CyberSource Flow Requesst ``` --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_M71MzSCVlIx951DQSg5QcC3uFSrwEzKm4cYnFhwHpUwXJg9WJH1fTVF93NyykOOE' \ --data-raw '{ "amount": 6540, "currency": "EUR", "confirm": true, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 6540, "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://google.com", "payment_method": "wallet", "payment_method_type": "google_pay", "payment_method_data": { "wallet": { "google_pay": { "type": "CARD", "description": "SuccessfulAuth: Visa •••• 1000", "info": { "card_network": "VISA", "card_details": "1000", "assurance_details": { "card_holder_authenticated": false, "account_verified": true } }, "tokenization_data": { "type": "DIRECT", "token": "" } } }, "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" }, "setup_future_usage": "off_session" }' ``` Response ``` { "payment_id": "pay_syTVFvcTY4b0PjT6PKEt", "merchant_id": "postman_merchant_GHAction_02016f26-5b2d-4ec4-9b86-78a3e3e1f922", "status": "succeeded", "amount": 6540, "net_amount": 6540, "shipping_cost": null, "amount_capturable": 0, "amount_received": 6540, "connector": "cybersource", "client_secret": "pay_syTVFvcTY4b0PjT6PKEt_secret_CrowG7yDryGZXDfXDENH", "created": "2025-08-07T11:31:26.390Z", "currency": "EUR", "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": "off_session", "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "wallet", "payment_method_data": { "wallet": { "google_pay": { "last4": "1000", "card_network": "VISA", "type": "CARD" } }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null } }, "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "billing": 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": "google_pay", "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": 1754566285, "expires": 1754569885, "secret": "epk_70a449192d1b480e83ded610e7688e82" }, "manual_retry_allowed": false, "connector_transaction_id": "7545662883716066604807", "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_syTVFvcTY4b0PjT6PKEt_1", "payment_link": null, "profile_id": "pro_oq1JzZKwE5N7nVMYLUCF", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_XLlQeCZZDTIKsFLqxpNb", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-08-07T11:46:26.390Z", "fingerprint": null, "browser_info": null, "payment_channel": null, "payment_method_id": null, "network_transaction_id": null, "payment_method_status": null, "updated": "2025-08-07T11:31:28.687Z", "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 } ``` Vantive GPay Decrypted Flow (Merchant Side Decryption) Request ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_UBWl0uGQwa2edSbIthcmcgkOZGBuirsDxKK8GoHi18URlT4ou1CeihfMnULoiJdk' \ --data-raw '{ "amount": 7445, "currency": "USD", "confirm": true, "setup_future_usage": "off_session", "business_country": "US", "business_label": "default", "amount_to_capture": 7445, "customer_id": "cu_1754637351", "capture_method": "automatic", "customer_acceptance": { "acceptance_type": "offline", "accepted_at": "1963-05-03T04:07:52.723Z", "online": { "ip_address": "in sit", "user_agent": "amet irure esse" } }, "capture_on": "2022-09-10T10:11:12Z", "authentication_type": "no_three_ds", "return_url": "https://google.com", "email": "something@gmail.com", "name": "Joseph Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment request", "statement_descriptor_name": "Juspay", "statement_descriptor_suffix": "Router", "payment_method": "wallet", "payment_method_type": "google_pay", "billing": { "address": { "line1": "1467", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "payment_method_data": { "wallet": { "google_pay": { "type": "CARD", "description": "SuccessfulAuth: Visa •••• 1000", "info": { "assurance_details": { "account_verified": true, "card_holder_authenticated": false }, "card_details": "1000", "card_network": "MASTERCARd" }, "tokenization_data": { "application_primary_account_number": "5454545454545454", "card_exp_month": "01", "card_exp_year": "28", "cryptogram": "" } } } } }' ``` Response ``` { "payment_id": "pay_qy8KSDtXt9OoSeCdlLoa", "merchant_id": "merchant_1754566674", "status": "processing", "amount": 7445, "net_amount": 7445, "shipping_cost": null, "amount_capturable": 7445, "amount_received": null, "connector": "worldpayvantiv", "client_secret": "pay_qy8KSDtXt9OoSeCdlLoa_secret_81VlKhYLA8us868RDxPG", "created": "2025-08-08T07:14:57.290Z", "currency": "USD", "customer_id": "cu_1754637297", "customer": { "id": "cu_1754637297", "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": { "google_pay": { "last4": "1000", "card_network": "MASTERCARd", "type": "CARD" } }, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": null, "line3": null, "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "order_details": null, "email": "something@gmail.com", "name": "Joseph Doe", "phone": "999999999", "return_url": "https://google.com/", "authentication_type": "three_ds", "statement_descriptor_name": "Juspay", "statement_descriptor_suffix": "Router", "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "google_pay", "connector_label": "worldpayvantiv_US_default", "business_country": "US", "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "cu_1754637297", "created_at": 1754637297, "expires": 1754640897, "secret": "epk_a7a1a03427ac4315afcb6f847c9f179f" }, "manual_retry_allowed": false, "connector_transaction_id": "84085340646935892", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "pay_qy8KSDtXt9OoSeCdlLoa_1", "payment_link": null, "profile_id": "pro_MiHsgjY1VrOKYtOyfZuV", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_xqwmWPRyq3PtFk5llZb1", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-08-08T07:29:57.290Z", "fingerprint": null, "browser_info": null, "payment_channel": null, "payment_method_id": "pm_okIlsI2U4cStk6zbYTFJ", "network_transaction_id": null, "payment_method_status": "inactive", "updated": "2025-08-08T07:15:00.211Z", "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": "5454540204265454", "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 } ``` Cybersource Gpay Flow Request ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_tD9lty7koooHDy3ijR2CwW79p1vpqa2bIRzFAxJah36Jf32egCyCE8YmYE3xcJRQ' \ --data-raw '{ "amount": 6500, "order_details": [ { "product_name": "Apple iphone 15", "quantity": 1, "amount": 6500 } ], "currency": "USD", "confirm": true, "capture_method": "automatic", "authentication_type": "three_ds", "setup_future_usage": "on_session", "return_url": "https://duckduckgo.com/", "request_external_three_ds_authentication": false, "email": "user@gmail.com", "description": "Hello this is description", "shipping": { "address": { "state": "California", "city": "Banglore", "country": "US", "line1": "sdsdfsdf", "line2": "hsgdbhd", "line3": "alsksoe", "zip": "571201", "first_name": "John", "last_name": "Doe" }, "phone": { "number": "123456789", "country_code": "+1" } }, "connector_metadata": { "noon": { "order_category": "applepay" } }, "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "payment_method": "wallet", "payment_method_type": "google_pay", "payment_method_data": { "wallet": { "google_pay": { "type": "CARD", "description": "SuccessfulAuth: Visa •••• 1000", "info": { "assurance_details": { "account_verified": true, "card_holder_authenticated": false }, "card_details": "1000", "card_network": "VISA" }, "tokenization_data": { "token": "{\"signature\":\"\\\\u003d\\\"}\"}", "type": "PAYMENT_GATEWAY" } } } }, "connector": [ "cybersource" ], "browser_info": { "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.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": 967, "screen_width": 1496, "time_zone": -330, "java_enabled": true, "java_script_enabled": true, "device_model": "Macintosh", "os_type": "macOS", "os_version": "10.15.7" }, "payment_type": "normal", "customer_id": "hyperswitch_sdk_demo_id" }' ``` Response ``` { "payment_id": "pay_wAPR170kdZ7sKXDRPgbp", "merchant_id": "merchant_1754645629", "status": "succeeded", "amount": 6500, "net_amount": 6500, "shipping_cost": null, "amount_capturable": 0, "amount_received": 6500, "connector": "cybersource", "client_secret": "pay_wAPR170kdZ7sKXDRPgbp_secret_FW85m2TIHn3bUrbmsgFb", "created": "2025-08-08T09:39:49.412Z", "currency": "USD", "customer_id": "hyperswitch_sdk_demo_id", "customer": { "id": "hyperswitch_sdk_demo_id", "name": null, "email": "user@gmail.com", "phone": null, "phone_country_code": null }, "description": "Hello this is description", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "on_session", "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "wallet", "payment_method_data": { "wallet": { "google_pay": { "last4": "1000", "card_network": "VISA", "type": "CARD" } }, "billing": null }, "payment_token": null, "shipping": { "address": { "city": "Banglore", "country": "US", "line1": "sdsdfsdf", "line2": "hsgdbhd", "line3": "alsksoe", "zip": "571201", "state": "California", "first_name": "John", "last_name": "Doe", "origin_zip": null }, "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", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "order_details": [ { "sku": null, "upc": null, "brand": null, "amount": 6500, "category": null, "quantity": 1, "tax_rate": null, "product_id": null, "description": null, "product_name": "Apple iphone 15", "product_type": null, "sub_category": null, "total_amount": null, "commodity_code": null, "unit_of_measure": null, "product_img_link": null, "product_tax_code": null, "total_tax_amount": null, "requires_shipping": null, "unit_discount_amount": null } ], "email": "user@gmail.com", "name": null, "phone": null, "return_url": "https://duckduckgo.com/", "authentication_type": "three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "google_pay", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "hyperswitch_sdk_demo_id", "created_at": 1754645989, "expires": 1754649589, "secret": "epk_9a04877f4cd6405ca2c5e829b0be6b21" }, "manual_retry_allowed": false, "connector_transaction_id": "7546459910616795204806", "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2019-09-10T10:11:12Z", "new_customer": "true" }, "connector_metadata": { "apple_pay": null, "airwallex": null, "noon": { "order_category": "applepay" }, "braintree": null, "adyen": null }, "feature_metadata": null, "reference_id": "pay_wAPR170kdZ7sKXDRPgbp_1", "payment_link": null, "profile_id": "pro_lASLph2JPwiOKRotieHp", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_sGhp7hsVeJDFexyhdxsZ", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-08-08T09:54:49.412Z", "fingerprint": null, "browser_info": { "os_type": "macOS", "language": "en-GB", "time_zone": -330, "os_version": "10.15.7", "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36", "color_depth": 24, "device_model": "Macintosh", "java_enabled": true, "screen_width": 1496, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 967, "java_script_enabled": true }, "payment_channel": null, "payment_method_id": null, "network_transaction_id": null, "payment_method_status": null, "updated": "2025-08-08T09:39:52.193Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": null, "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null, "enable_partial_authorization": null } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. 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` - `crates/hyperswitch_domain_models/src/router_data.rs` **3. Core Business Logic** - `crates/router/src/core/payments.rs` - `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 26 more files **5. Type Definitions** - `crates/common_types/src/payments.rs` - `crates/router/src/types.rs` - `crates/router/src/types/domain/payments.rs` **6. Configuration Files** - `config/deployments/production.toml` - `config/deployments/sandbox.toml` - `config/development.toml` **7. Other** - `api-reference/v1/openapi_spec_v1.json` - `api-reference/v2/openapi_spec_v2.json` - `crates/common_enums/src/enums.rs` - ... and 2 more files **Code Patterns Applied:** - Define new data structures (3 changes) - Implement new functions (19 changes) - Extend existing types with new fields (98 changes) - Add conditional logic for feature flags or filtering (5 changes) **Detailed Identifier Changes:** Commit b7f42cbd: Files to modify: **crates/api_models/src/payments.rs** Remove: - struct: pub::GpayTokenizationData **crates/common_enums/src/enums.rs** Modify existing code **crates/common_types/src/payments.rs** Add: - function: pub::get_encrypted_google_pay_payment_data_mandatory - function: pub::get_encrypted_google_pay_token - function: pub::get_encrypted_token_type - function: pub::get_four_digit_expiry_year - function: pub::get_two_digit_expiry_year - function: pub::get_expiry_date_as_mmyy - function: pub::get_expiry_month - struct: pub::GpayEcryptedTokenizationData - struct: pub::GPayPredecryptData - enum: pub::GpayTokenizationData - impl: impl GpayTokenizationData - impl: impl GPayPredecryptData **crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/airwallex/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/archipel/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/bankofamerica/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/barclaycard/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/bluesnap/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/checkout/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/fiserv/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/fiuu/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/multisafepay/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/nmi/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/noon/transformers.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/payu/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/rapyd/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/stripe/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/worldpayvantiv.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/worldpayvantiv/transformers.rs** Add: - function: private::from - enum: pub::WorldPayVativGooglePayNetwork - impl: impl From<WorldPayVativGooglePayNetwork> for WorldpayvativCardType **crates/hyperswitch_connectors/src/utils.rs** Remove: - struct: pub::GpayTokenizationData Add: - function: private::get_googlepay_encrypted_payment_data - trait: pub::GooglePay - impl: impl GooglePay for payment_method_data::GooglePayWalletData **crates/hyperswitch_domain_models/src/payment_method_data.rs** Remove: - struct: pub::GpayTokenizationData **crates/hyperswitch_domain_models/src/router_data.rs** Modify existing code **crates/openapi/src/openapi.rs** Modify existing code **crates/openapi/src/openapi_v2.rs** Modify existing code **crates/router/src/connector/utils.rs** Remove: - function: private::from - struct: pub::GooglePayWalletData - struct: pub::GooglePayPaymentMethodInfo - struct: pub::GpayTokenizationData - impl: impl From<domain::GooglePayWalletData> for GooglePayWalletData Add: - function: private::get_googlepay_encrypted_payment_data - trait: pub::GooglePay - impl: impl GooglePay for domain::GooglePayWalletData **crates/router/src/core/payments.rs** Add: - function: private::check_predecrypted_token **crates/router/src/core/payments/helpers.rs** Modify existing code **crates/router/src/types.rs** Modify existing code **crates/router/src/types/domain/payments.rs** Modify existing code **crates/router/tests/connectors/payu.rs** Modify existing code **crates/router/tests/connectors/worldpay.rs** Modify existing code
{"pr_number": 8865, "pr_title": "feat(router): add support for GooglePay pre-decrypted token in the payments confirm call ", "merged_at": "2025-08-08T11:53:22Z", "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", "crates/hyperswitch_domain_models/src/router_data.rs"], "core_business": ["crates/router/src/core/payments.rs", "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/adyen/transformers.rs", "crates/hyperswitch_connectors/src/connectors/airwallex/transformers.rs", "crates/hyperswitch_connectors/src/connectors/archipel/transformers.rs", "crates/hyperswitch_connectors/src/connectors/bankofamerica/transformers.rs", "crates/hyperswitch_connectors/src/connectors/barclaycard/transformers.rs", "crates/hyperswitch_connectors/src/connectors/bluesnap/transformers.rs", "crates/hyperswitch_connectors/src/connectors/checkout/transformers.rs", "crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs", "crates/hyperswitch_connectors/src/connectors/fiserv/transformers.rs", "crates/hyperswitch_connectors/src/connectors/fiuu/transformers.rs", "crates/hyperswitch_connectors/src/connectors/multisafepay/transformers.rs", "crates/hyperswitch_connectors/src/connectors/nmi/transformers.rs", "crates/hyperswitch_connectors/src/connectors/noon/transformers.rs", "crates/hyperswitch_connectors/src/connectors/novalnet/transformers.rs", "crates/hyperswitch_connectors/src/connectors/nuvei/transformers.rs", "crates/hyperswitch_connectors/src/connectors/payu/transformers.rs", "crates/hyperswitch_connectors/src/connectors/rapyd/transformers.rs", "crates/hyperswitch_connectors/src/connectors/stripe/transformers.rs", "crates/hyperswitch_connectors/src/connectors/wellsfargo/transformers.rs", "crates/hyperswitch_connectors/src/connectors/worldpay/transformers.rs", "crates/hyperswitch_connectors/src/connectors/worldpayvantiv.rs", "crates/hyperswitch_connectors/src/connectors/worldpayvantiv/transformers.rs", "crates/hyperswitch_connectors/src/utils.rs", "crates/router/src/connector/utils.rs", "crates/router/tests/connectors/payu.rs", "crates/router/tests/connectors/worldpay.rs"], "types": ["crates/common_types/src/payments.rs", "crates/router/src/types.rs", "crates/router/src/types/domain/payments.rs"], "config": ["config/deployments/production.toml", "config/deployments/sandbox.toml", "config/development.toml"], "other": ["api-reference/v1/openapi_spec_v1.json", "api-reference/v2/openapi_spec_v2.json", "crates/common_enums/src/enums.rs", "crates/openapi/src/openapi.rs", "crates/openapi/src/openapi_v2.rs"]}, "change_types": {"structs_added": 3, "functions_added": 19, "enums_added": 2, "fields_added": 98, "imports_added": 3, "conditionals_added": 5}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
ci: update 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 <!-- Describe your changes in detail --> Updates creds. closes #6645 ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> Me ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> NA ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Tests** - `.github/workflows/cypress-tests-runner.yml` **Code Patterns Applied:** - Extend existing types with new fields (1 changes)
{"pr_number": 6726, "pr_title": "ci: update cypress creds", "merged_at": "2024-12-03T17:19:14Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"tests": [".github/workflows/cypress-tests-runner.yml"]}, "change_types": {"fields_added": 1}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
feat(connector): [nordea] template code ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Connector template code for new connector `Nordea`. Developer Docs: https://developer.nordeaopenbanking.com/documentation Login Dashboard: https://developer.nordeaopenbanking.com/login ### Additional Changes - [x] 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` --> 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with 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 #8055 ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> This is a template PR for Nordea, just checked for compilation. Nothing else to test. ## 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. 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 7c1d893c: 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::nordea **crates/hyperswitch_connectors/src/connectors/nordea.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::Nordea - impl: impl Nordea - impl: impl api::Payment for Nordea - impl: impl api::PaymentSession for Nordea - impl: impl api::ConnectorAccessToken for Nordea - impl: impl api::MandateSetup for Nordea - impl: impl api::PaymentAuthorize for Nordea - impl: impl api::PaymentSync for Nordea - impl: impl api::PaymentCapture for Nordea - impl: impl api::PaymentVoid for Nordea - impl: impl api::Refund for Nordea - impl: impl api::RefundExecute for Nordea - impl: impl api::RefundSync for Nordea - impl: impl api::PaymentToken for Nordea - impl: impl ConnectorIntegration<PaymentMethodToken, PaymentMethodTokenizationData, PaymentsResponseData> for Nordea - impl: impl ConnectorCommonExt<Flow, Request, Response> for Nordea - impl: impl ConnectorCommon for Nordea - impl: impl ConnectorValidation for Nordea - impl: impl ConnectorIntegration<Session, PaymentsSessionData, PaymentsResponseData> for Nordea - impl: impl ConnectorIntegration<AccessTokenAuth, AccessTokenRequestData, AccessToken> for Nordea - impl: impl ConnectorIntegration<SetupMandate, SetupMandateRequestData, PaymentsResponseData> for Nordea - impl: impl ConnectorIntegration<Authorize, PaymentsAuthorizeData, PaymentsResponseData> for Nordea - impl: impl ConnectorIntegration<PSync, PaymentsSyncData, PaymentsResponseData> for Nordea - impl: impl ConnectorIntegration<Capture, PaymentsCaptureData, PaymentsResponseData> for Nordea - impl: impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Nordea - impl: impl ConnectorIntegration<Execute, RefundsData, RefundsResponseData> for Nordea - impl: impl ConnectorIntegration<RSync, RefundsData, RefundsResponseData> for Nordea - impl: impl webhooks::IncomingWebhook for Nordea - impl: impl ConnectorSpecifications for Nordea - mod: pub::transformers **crates/hyperswitch_connectors/src/connectors/nordea/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::NordeaRouterData - struct: pub::NordeaPaymentsRequest - struct: pub::NordeaCard - struct: pub::NordeaAuthType - struct: pub::NordeaPaymentsResponse - struct: pub::NordeaRefundRequest - struct: pub::RefundResponse - struct: pub::NordeaErrorResponse - enum: pub::NordeaPaymentStatus - enum: pub::RefundStatus - impl: impl From<(StringMinorUnit, T)> for NordeaRouterData<T> - impl: impl TryFrom<&NordeaRouterData<&PaymentsAuthorizeRouterData>> for NordeaPaymentsRequest - impl: impl TryFrom<&ConnectorAuthType> for NordeaAuthType - impl: impl From<NordeaPaymentStatus> for common_enums::AttemptStatus - impl: impl TryFrom<ResponseRouterData<F, NordeaPaymentsResponse, T, PaymentsResponseData>> for RouterData<F, T, PaymentsResponseData> - impl: impl TryFrom<&NordeaRouterData<&RefundsRouterData<F>>> for NordeaRefundRequest - 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::nordea **crates/router/tests/connectors/nordea.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::NordeaTest - impl: impl ConnectorActions for NordeaTest - impl: impl utils::Connector for NordeaTest **crates/test_utils/src/connector_auth.rs** Modify existing code
{"pr_number": 8056, "pr_title": "feat(connector): [nordea] template code", "merged_at": "2025-05-21T07:49:27Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["connector"]}, "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/nordea.rs", "crates/hyperswitch_connectors/src/connectors/nordea/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/nordea.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"}
ci(cypress): Add shift4 connector test in cypress ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Enhanced shift4 Connector in cypress for Comprehensive Testing. Added ideal,eps bank redirect testcases aswell ## How did you test it? <img width="562" alt="swift4" src="https://github.com/user-attachments/assets/7fdc1f02-83c6-48de-b076-6863c121d67f" /> Failure Reason 1.3ds payment are failing with error_message : "Unable to parse request - unrecognized field: card[number]" 2.Void is not happening for requires_capture state 3.Sofort payment getting error but the status is processing ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **payment** feature, you'll need to modify these architectural layers: **1. Tests** - `cypress-tests/cypress/e2e/configs/Payment/Shift4.js` - `cypress-tests/cypress/e2e/configs/Payment/Utils.js` - `cypress-tests/cypress/support/redirectionHandler.js` **Code Patterns Applied:** - Extend existing types with new fields (583 changes)
{"pr_number": 8385, "pr_title": "ci(cypress): Add shift4 connector test in cypress", "merged_at": "2025-06-20T13:55:33Z", "intent": {"feature_type": "payment", "action": "add_feature", "entities": ["payment", "user", "connector"]}, "hierarchy": {"tests": ["cypress-tests/cypress/e2e/configs/Payment/Shift4.js", "cypress-tests/cypress/e2e/configs/Payment/Utils.js", "cypress-tests/cypress/support/redirectionHandler.js"]}, "change_types": {"fields_added": 583}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
fix(connector): [Cybersource] send type selection indicator for co-batch cards ## 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 --> main pr - https://github.com/juspay/hyperswitch/pull/7828 ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs` **Code Patterns Applied:** - Extend existing types with new fields (2 changes) **Detailed Identifier Changes:** Commit a14de9aa: Files to modify: **crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs** Modify existing code
{"pr_number": 7869, "pr_title": "fix(connector): [Cybersource] send type selection indicator for co-batch cards", "merged_at": "2025-04-22T17:32:47Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs"]}, "change_types": {"fields_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(wasm): fix feature dependencies in `connector_configs` crate for WASM builds ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> fix connector configs for wasm build. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> fix connector configs for wasm build. ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> locally build with ``` TARGET_CC="$(brew --prefix)/opt/llvm/bin/clang" just euclid-wasm v1,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. External Connector Integration** - `crates/connector_configs/Cargo.toml` - `crates/connector_configs/src/connector.rs` - `crates/connector_configs/toml/production.toml` - ... and 1 more files **2. Configuration Files** - `crates/euclid_wasm/Cargo.toml` **Detailed Identifier Changes:** Commit 6eabc824: Files to modify: **crates/connector_configs/src/connector.rs** Modify existing code
{"pr_number": 6832, "pr_title": "fix(wasm): fix feature dependencies in `connector_configs` crate for WASM builds ", "merged_at": "2024-12-23T14:39:31Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["connector"]}, "hierarchy": {"connectors": ["crates/connector_configs/Cargo.toml", "crates/connector_configs/src/connector.rs", "crates/connector_configs/toml/production.toml", "crates/connector_configs/toml/sandbox.toml"], "config": ["crates/euclid_wasm/Cargo.toml"]}, "change_types": {}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
chore(cypress): Update creds for stripe ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [x] CI/CD ## Description Update creds for noon and 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 Ci is failing ## How did you test it? cypress 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": 8069, "pr_title": "chore(cypress): Update creds for stripe", "merged_at": "2025-05-19T09:26:43Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"tests": [".github/workflows/cypress-tests-runner.yml"]}, "change_types": {"fields_added": 1}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
fix(router): update nick_name only if card_token.card_holder_name is non empty and populate additional card_details from payment_attempt if not present in the locker ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Main PR - https://github.com/juspay/hyperswitch/pull/6308 ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Test cases in main PR ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Core Business Logic** - `crates/router/src/core/payment_methods.rs` - `crates/router/src/core/payments/helpers.rs` **Code Patterns Applied:** - Extend existing types with new fields (2 changes) - Add conditional logic for feature flags or filtering (5 changes) **Detailed Identifier Changes:** Commit 4fdf5a52: Files to modify: **crates/router/src/core/payment_methods.rs** Modify existing code **crates/router/src/core/payments/helpers.rs** Modify existing code
{"pr_number": 6320, "pr_title": "fix(router): update nick_name only if card_token.card_holder_name is non empty and populate additional card_details from payment_attempt if not present in the locker", "merged_at": "2024-10-15T11:40:54Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"core_business": ["crates/router/src/core/payment_methods.rs", "crates/router/src/core/payments/helpers.rs"]}, "change_types": {"fields_added": 2, "conditionals_added": 5}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): [FISERV] Added Integrity Check support for all Payment & Refund Flows ## Type of Change - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Populated network_advice_code, network_decline_code and network_error_response in ErrorResponse. Also added integrity check support for Authorize, Capture, Refund, PSync and RSync flows. What is an integrity check? A scenario where there is a discrepancy between the amount sent in the request and the amount received from the connector, which is checked during response handling. https://developer.fiserv.com/product/CommerceHub/api/?type=post&path=/payments/v1/charges&branch=main&version=1.25.0400 ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? For Integrity Checks Case 1: Automatic Capture cURL: ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_8BoyoSPgaCnEZ7hPrLeVLSyEpsxM1d95WnoRRlgyLJfhUD3Rt9vaYiErFlhICRJy' \ --header 'Cookie: PHPSESSID=0b47db9d7de94c37b6b272087a9f2fa7' \ --data-raw '{ "amount": 651200, "currency": "USD", "confirm": true, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "customer_id": "First_Customer", "name": "John Doe", "authentication_type": "three_ds", "return_url": "https://google.com", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4147463011110083", "card_exp_month": "12", "card_exp_year": "27", "card_holder_name": "joseph Doe", "card_cvc": "123" } }, "billing": { "phone": { "number": "8056594427", "country_code": "+91" }, "email": "guest@example.com" } }' ``` Response: ``` { "error": { "type": "api", "message": "Integrity Check Failed! as data mismatched for amount expected 651200 but found 651300", "code": "IE_00", "connector_transaction_id": "CHG0165dcaf19383fef3b997c70f17e33f882" } } ``` We hardcoded the amount at the connector level to a value greater than the one sent in the request. This is verified at response time, causing a discrepancy between the amount passed in the request and the amount passed to the connector, which triggers the integrity check. 2. Manual Capture: cURL : ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_8BoyoSPgaCnEZ7hPrLeVLSyEpsxM1d95WnoRRlgyLJfhUD3Rt9vaYiErFlhICRJy' \ --header 'Cookie: PHPSESSID=0b47db9d7de94c37b6b272087a9f2fa7' \ --data-raw '{ "amount": 651200, "currency": "USD", "confirm": true, "capture_method": "manual", "capture_on": "2022-09-10T10:11:12Z", "customer_id": "First_Customer", "name": "John Doe", "authentication_type": "three_ds", "return_url": "https://google.com", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4147463011110083", "card_exp_month": "12", "card_exp_year": "27", "card_holder_name": "joseph Doe", "card_cvc": "123" } }, "billing": { "phone": { "number": "8056594427", "country_code": "+91" }, "email": "guest@example.com" } }'
 ``` Response: ``` { "error": { "type": "api", "message": "Integrity Check Failed! as data mismatched for amount expected 651200 but found 651300", "code": "IE_00", "connector_transaction_id": "CHG01e6b342a643cf24269162a523ae884b49" } } ``` Reason: We hardcoded the amount in the code to an amount which is more than the one being sent in the connector request. 3. Refund First, do a payments create( a successful one) and donot hardcode anything. cURL : ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_8BoyoSPgaCnEZ7hPrLeVLSyEpsxM1d95WnoRRlgyLJfhUD3Rt9vaYiErFlhICRJy' \ --header 'Cookie: PHPSESSID=0b47db9d7de94c37b6b272087a9f2fa7' \ --data-raw '{ "amount": 651200, "currency": "USD", "confirm": true, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "customer_id": "First_Customer", "name": "John Doe", "authentication_type": "three_ds", "return_url": "https://google.com", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4147463011110083", "card_exp_month": "12", "card_exp_year": "27", "card_holder_name": "joseph Doe", "card_cvc": "123" } }, "billing": { "phone": { "number": "8056594427", "country_code": "+91" }, "email": "guest@example.com" } }'
 ``` Response of Payments - Create : ``` { "payment_id": "pay_9YN7bLpjbmbFkA1laXqC", "merchant_id": "merchant_1747656283", "status": "succeeded", "amount": 651200, "net_amount": 651200, "shipping_cost": null, "amount_capturable": 0, "amount_received": 651200, "connector": "fiserv", "client_secret": "pay_9YN7bLpjbmbFkA1laXqC_secret_onbFfEy4CWh2pd3jAdTt", "created": "2025-05-19T20:59:12.836Z", "currency": "USD", "customer_id": "First_Customer", "customer": { "id": "First_Customer", "name": "John Doe", "email": null, "phone": null, "phone_country_code": null }, "description": null, "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "0083", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "414746", "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": "guest@example.com" }, "order_details": null, "email": null, "name": "John Doe", "phone": null, "return_url": "https://google.com/", "authentication_type": "three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "First_Customer", "created_at": 1747688352, "expires": 1747691952, "secret": "epk_f6e6cc342a9147eb91b4d8144bc28958" }, "manual_retry_allowed": false, "connector_transaction_id": "964bbc9b9e494be8bf575977cf2582b5", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "CHG01012441523bde085d4ec1a37b6c72c768", "payment_link": null, "profile_id": "pro_kg6n3seduV6leLIAxPwL", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_EZ1kF48ElbkcXo52Eu0z", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-05-19T21:14:12.836Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2025-05-19T20:59:14.534Z", "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 } ``` Now attempt a Refund with this payment_id. In code I have hardcoded the refund amount same as the captured amount but in the request will be passing an amount which will be less than that. Refunds - Create cURL: ``` curl --location 'http://localhost:8080/refunds' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_8BoyoSPgaCnEZ7hPrLeVLSyEpsxM1d95WnoRRlgyLJfhUD3Rt9vaYiErFlhICRJy' \ --header 'Cookie: PHPSESSID=0b47db9d7de94c37b6b272087a9f2fa7' \ --data '{ "payment_id": "pay_kshnzcowY4iP7ZhiBArY", "amount": 651100, "reason": "Customer returned product", "refund_type": "instant", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } }' ``` Response : ``` { "refund_id": "ref_qvFT2TJmnx0irSvV5MTX", "payment_id": "pay_kshnzcowY4iP7ZhiBArY", "amount": 651100, "currency": "USD", "status": "review", "reason": "Customer returned product", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" }, "error_message": "Integrity Check Failed! as data mismatched for fields refund_amount expected 651100 but found 651200", "error_code": "IE", "unified_code": null, "unified_message": null, "created_at": "2025-05-19T21:12:21.095Z", "updated_at": "2025-05-19T21:12:22.577Z", "connector": "fiserv", "profile_id": "pro_kg6n3seduV6leLIAxPwL", "merchant_connector_id": "mca_EZ1kF48ElbkcXo52Eu0z", "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 - [ ] 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` **Code Patterns Applied:** - Define new data structures (8 changes) - Extend existing types with new fields (47 changes) **Detailed Identifier Changes:** Commit dbca363f: Files to modify: **crates/hyperswitch_connectors/src/connectors/fiserv.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/fiserv/transformers.rs** Add: - struct: pub::ProcessorResponseDetails - struct: pub::AdditionalInfo - struct: pub::BankAssociationDetails - struct: pub::AvsSecurityCodeResponse - struct: pub::Association - struct: pub::ResponseIndicators - struct: pub::PaymentReceipt - struct: pub::ApprovedAmount
{"pr_number": 8075, "pr_title": "feat(connector): [FISERV] Added Integrity Check support for all Payment & Refund Flows", "merged_at": "2025-06-02T07:07:31Z", "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"]}, "change_types": {"structs_added": 8, "fields_added": 47, "imports_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(payment_methods): card_cvc retrieval through payment_token ## 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 --> use redis to store card cvc temporarily for retrieval through payment 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). --> ## How did you test 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. Core Business Logic** - `crates/router/src/core/payment_methods.rs` - `crates/router/src/core/payment_methods/vault.rs` - `crates/router/src/core/payments/operations/payment_confirm_intent.rs` **Code Patterns Applied:** - Define new data structures (1 changes) - Implement new functions (2 changes) - Extend existing types with new fields (11 changes) - Add conditional logic for feature flags or filtering (1 changes)
{"pr_number": 8429, "pr_title": "feat(payment_methods): card_cvc retrieval through payment_token", "merged_at": "2025-06-22T20:20:26Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "token", "card"]}, "hierarchy": {"core_business": ["crates/router/src/core/payment_methods.rs", "crates/router/src/core/payment_methods/vault.rs", "crates/router/src/core/payments/operations/payment_confirm_intent.rs"]}, "change_types": {"structs_added": 1, "functions_added": 2, "fields_added": 11, "imports_added": 1, "conditionals_added": 1}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}