feat(core): Added Capture flow support for Hyperswitch <> UCS Integration #9735
Merged
likhinbopanna merged 10 commits intomainfrom Oct 27, 2025
Merged
feat(core): Added Capture flow support for Hyperswitch <> UCS Integration #9735likhinbopanna merged 10 commits intomainfrom
likhinbopanna merged 10 commits intomainfrom
Conversation
Changed Files |
2 tasks
hrithikesh026
previously approved these changes
Oct 8, 2025
hrithikesh026
previously approved these changes
Oct 21, 2025
hrithikesh026
previously approved these changes
Oct 24, 2025
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #9735 +/- ##
=======================================
Coverage ? 3.93%
=======================================
Files ? 1223
Lines ? 299847
Branches ? 0
=======================================
Hits ? 11795
Misses ? 288052
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
chaitak-gorai
previously approved these changes
Oct 24, 2025
c43e46b
chaitak-gorai
previously approved these changes
Oct 27, 2025
hrithikesh026
previously approved these changes
Oct 27, 2025
ae0b27e
hrithikesh026
approved these changes
Oct 27, 2025
AmitsinghTanwar007
approved these changes
Oct 27, 2025
aadityaguptaa
pushed a commit
that referenced
this pull request
Nov 10, 2025
…tion (#9735) Co-authored-by: Chaitak Gorai <77141674+chaitak-gorai@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of Change
Description
This PR implements UCS(Unified Connector Service) Integration for Capture flow.
Tested for Stripe and Cybersource using DIff check fix branch in UCS:
juspay/connector-service#226
If tested using UCS main branch it will show diffs
Additional Changes
Motivation and Context
How did you test it?
Curl Testing for Fiuu vis UCS
Create Payment Fiuu
{ "amount":100, "currency": "MYR", "confirm": true, "payment_link" : false, "capture_method": "manual", "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": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "5105105105105100", "card_exp_month": "12", "card_exp_year": "2029", "card_holder_name": "Max Mustermann", "card_cvc": "123", "card_network": "VISA" } }, "billing": { "address": { "line1": "1467", "line2": "CA", "line3": "CA", "city": "Musterhausen", "state": "California", "zip": "12345", "country": "MY", "first_name": "Max", "last_name": "Mustermann" }, "email": "test@novalnet.de", "phone": { "number": "8056594427", "country_code": "+91" } }, "shipping": { "address": { "line1": "Musterstr", "line2": "CA", "line3": "CA", "city": "Musterhausen", "state": "California", "zip": "94122", "country": "MY", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "browser_info": { "user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36", "accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,\/;q=0.8", "language": "nl-NL", "color_depth": 24, "ip_address": "103.77.139.95", "screen_height": 723, "screen_width": 1536, "time_zone": 0, "java_enabled": true, "java_script_enabled": true }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } }Response
{ "payment_id": "pay_Yw8BEg1MtB3fxTQiGEbK", "merchant_id": "merchant_1759845271", "status": "requires_capture", "amount": 100, "net_amount": 100, "shipping_cost": null, "amount_capturable": 100, "amount_received": null, "connector": "fiuu", "client_secret": "pay_Yw8BEg1MtB3fxTQiGEbK_secret_qKYBcIK9HGhObfH3WR0b", "created": "2025-10-08T05:21:32.383Z", "currency": "MYR", "customer_id": "StripeCustomer", "customer": { "id": "StripeCustomer", "name": "John Doe", "email": "guest@example.com", "phone": "999999999", "phone_country_code": "+1" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "manual", "payment_method": "card", "payment_method_data": { "card": { "last4": "5100", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "510510", "card_extended_bin": null, "card_exp_month": "12", "card_exp_year": "2029", "card_holder_name": "Max Mustermann", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": { "address": { "city": "Musterhausen", "country": "MY", "line1": "Musterstr", "line2": "CA", "line3": "CA", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "billing": { "address": { "city": "Musterhausen", "country": "MY", "line1": "1467", "line2": "CA", "line3": "CA", "zip": "12345", "state": "California", "first_name": "Max", "last_name": "Mustermann", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "test@novalnet.de" }, "order_details": null, "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "return_url": "https://google.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "StripeCustomer", "created_at": 1759900892, "expires": 1759904492, "secret": "epk_434f4a935459447abb2d51f03ad751d0" }, "manual_retry_allowed": null, "connector_transaction_id": "31054437", "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2019-09-10T10:11:12Z", "new_customer": "true" }, "connector_metadata": null, "feature_metadata": { "redirect_response": null, "search_tags": null, "apple_pay_recurring_details": null, "gateway_system": "unified_connector_service" }, "reference_id": null, "payment_link": null, "profile_id": "pro_vf3FxmC3YhXkNfcUpo8v", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_SgM7weRWVGcYHmuRvLWi", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-10-08T05:36:32.383Z", "fingerprint": null, "browser_info": { "language": "nl-NL", "time_zone": 0, "ip_address": "103.77.139.95", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "color_depth": 24, "java_enabled": true, "screen_width": 1536, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,/;q=0.8", "screen_height": 723, "java_script_enabled": true }, "payment_channel": null, "payment_method_id": null, "network_transaction_id": null, "payment_method_status": null, "updated": "2025-10-08T05:21:34.083Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "request_extended_authorization": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": "{\"MerchantID\":\"SBpp\",\"ReferenceNo\":\"pay_Yw8BEg1MtB3fxTQiGEbK_1\",\"TxnID\":\"31054437\",\"TxnType\":\"AUTS\",\"TxnCurrency\":\"MYR\",\"TxnAmount\":\"1.00\",\"TxnChannel\":\"CREDITAN\",\"TxnData\":{\"RequestURL\":\"\",\"RequestMethod\":\"\",\"RequestType\":\"RESPONSE\",\"RequestData\":{\"skey\":\"130f1b95224f5cbb5359f5cd96600ff3\",\"tranID\":\"31054437\",\"domain\":\"SB_zurichgdpp\",\"status\":\"00\",\"amount\":\"1.00\",\"currency\":\"MYR\",\"paydate\":\"2025-10-08 13:21:34\",\"orderid\":\"pay_Yw8BEg1MtB3fxTQiGEbK_1\",\"appcode\":728349,\"channel\":\"CREDIT\",\"extraP\":{\"ccbrand\":\"MASTERCARD\",\"cclast4\":\"5100\",\"cctype\":\"CREDIT\",\"token\":\"TK_2902_35512301472677909531\"}}}}", "enable_partial_authorization": null, "enable_overcapture": null, "is_overcapture_enabled": null, "network_details": null, "is_stored_credential": null, "mit_category": null }Capture Payment Fiuu
{ "amount_to_capture": 100, "statement_descriptor_name": "Joseph", "statement_descriptor_prefix" :"joseph", "statement_descriptor_suffix": "JS" }Response
{ "payment_id": "pay_Yw8BEg1MtB3fxTQiGEbK", "merchant_id": "merchant_1759845271", "status": "succeeded", "amount": 100, "net_amount": 100, "shipping_cost": null, "amount_capturable": 0, "amount_received": 100, "connector": "fiuu", "client_secret": "pay_Yw8BEg1MtB3fxTQiGEbK_secret_qKYBcIK9HGhObfH3WR0b", "created": "2025-10-08T05:21:32.383Z", "currency": "MYR", "customer_id": "StripeCustomer", "customer": { "id": "StripeCustomer", "name": "John Doe", "email": "guest@example.com", "phone": "999999999", "phone_country_code": "+1" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "manual", "payment_method": "card", "payment_method_data": { "card": { "last4": "5100", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "510510", "card_extended_bin": null, "card_exp_month": "12", "card_exp_year": "2029", "card_holder_name": "Max Mustermann", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": { "address": { "city": "Musterhausen", "country": "MY", "line1": "Musterstr", "line2": "CA", "line3": "CA", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "billing": { "address": { "city": "Musterhausen", "country": "MY", "line1": "1467", "line2": "CA", "line3": "CA", "zip": "12345", "state": "California", "first_name": "Max", "last_name": "Mustermann", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "test@novalnet.de" }, "order_details": null, "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "return_url": "https://google.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": null, "manual_retry_allowed": null, "connector_transaction_id": "31054437", "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2019-09-10T10:11:12Z", "new_customer": "true" }, "connector_metadata": null, "feature_metadata": { "redirect_response": null, "search_tags": null, "apple_pay_recurring_details": null, "gateway_system": "unified_connector_service" }, "reference_id": null, "payment_link": null, "profile_id": "pro_vf3FxmC3YhXkNfcUpo8v", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_SgM7weRWVGcYHmuRvLWi", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-10-08T05:36:32.383Z", "fingerprint": null, "browser_info": { "language": "nl-NL", "time_zone": 0, "ip_address": "103.77.139.95", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "color_depth": 24, "java_enabled": true, "screen_width": 1536, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,/;q=0.8", "screen_height": 723, "java_script_enabled": true }, "payment_channel": null, "payment_method_id": null, "network_transaction_id": null, "payment_method_status": null, "updated": "2025-10-08T05:21:42.989Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "request_extended_authorization": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null, "enable_partial_authorization": null, "enable_overcapture": null, "is_overcapture_enabled": null, "network_details": null, "is_stored_credential": null, "mit_category": null }Cypress test for auth.net via UCS gateway



The payment checks fail fix will be fixed in another PR for authorize flow, it is not related to this PR
Test results from fix branch
ucs-authorizedotnet-fixCypress test for auth.net Integ Direct gateway

Diff check for stripe


Request
RouterData(Integrity check is handled at UCS, separate PR for connector_customer fix)
Diff check for Cybersource


Request: Only Timestamp & hence Signature is different, request body is Identical
RouterData
Checklist
cargo +nightly fmt --allcargo clippy