Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation
Rust adyenbeginner-friendlyfeaturedfinancefintechhacktoberfesthigh-performanceopen-sourceorchestrationpaymentpayment-gatewaypayment-integrationpayment-processingpaymentspayments-platformrestful-apirustsdkstripeworks-with-react
feat(prism): Pass payment method details in post-capture void and fix Prism request mappings (#15070)
Shubhodip pal16bab21f7259
diff --git a/Cargo.lock b/Cargo.lockindex 235cd7198e..e919538222 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -2236,7 +2236,7 @@ dependencies = [[[package]]name = "config_patch_derive"version = "0.1.0"-source = "git+https://github.com/juspay/connector-service?tag=2026.10.27.1#e2629dec77e315acb0f109438a304bf06dc564db"+source = "git+https://github.com/juspay/connector-service?tag=2026.10.29.0#887dd7d798e47176293b67df36db5d1169f157aa"dependencies = ["proc-macro2","quote",@@ -4247,7 +4247,7 @@ dependencies = [[[package]]name = "grpc-api-types"version = "0.1.0"-source = "git+https://github.com/juspay/connector-service?tag=2026.10.27.1#e2629dec77e315acb0f109438a304bf06dc564db"+source = "git+https://github.com/juspay/connector-service?tag=2026.10.29.0#887dd7d798e47176293b67df36db5d1169f157aa"dependencies = ["axum 0.8.4","bytes 1.10.1",@@ -8397,7 +8397,7 @@ dependencies = [[[package]]name = "rust-grpc-client"version = "0.1.0"-source = "git+https://github.com/juspay/connector-service?tag=2026.10.27.1#e2629dec77e315acb0f109438a304bf06dc564db"+source = "git+https://github.com/juspay/connector-service?tag=2026.10.29.0#887dd7d798e47176293b67df36db5d1169f157aa"dependencies = ["grpc-api-types",]@@ -11345,7 +11345,7 @@ checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9"[[package]]name = "ucs_cards"version = "0.1.0"-source = "git+https://github.com/juspay/connector-service?tag=2026.10.27.1#e2629dec77e315acb0f109438a304bf06dc564db"+source = "git+https://github.com/juspay/connector-service?tag=2026.10.29.0#887dd7d798e47176293b67df36db5d1169f157aa"dependencies = ["bytes 1.10.1","error-stack 0.4.1",@@ -11361,7 +11361,7 @@ dependencies = [[[package]]name = "ucs_common_enums"version = "0.1.0"-source = "git+https://github.com/juspay/connector-service?tag=2026.10.27.1#e2629dec77e315acb0f109438a304bf06dc564db"+source = "git+https://github.com/juspay/connector-service?tag=2026.10.29.0#887dd7d798e47176293b67df36db5d1169f157aa"dependencies = ["serde","strum 0.26.3",@@ -11372,7 +11372,7 @@ dependencies = [[[package]]name = "ucs_common_utils"version = "0.1.0"-source = "git+https://github.com/juspay/connector-service?tag=2026.10.27.1#e2629dec77e315acb0f109438a304bf06dc564db"+source = "git+https://github.com/juspay/connector-service?tag=2026.10.29.0#887dd7d798e47176293b67df36db5d1169f157aa"dependencies = ["anyhow","base64 0.21.7",diff --git a/crates/external_services/Cargo.toml b/crates/external_services/Cargo.tomlindex f8240dd354..e5fedbbba7 100644--- a/crates/external_services/Cargo.toml+++ b/crates/external_services/Cargo.toml@@ -87,7 +87,7 @@ http = "1.3.1"url = { version = "2.5.4", features = ["serde"] }quick-xml = { version = "0.31.0", features = ["serialize"] }-unified-connector-service-client = { git = "https://github.com/juspay/connector-service", tag = "2026.10.27.1", package = "rust-grpc-client" }+unified-connector-service-client = { git = "https://github.com/juspay/connector-service", tag = "2026.10.29.0", package = "rust-grpc-client" }open-feature = { version = "0.2.5", optional = true }bytes = { version = "1.10.1", optional = true }futures = { version = "0.3.31", optional = true }diff --git a/crates/external_services/src/grpc_client/unified_connector_service.rs b/crates/external_services/src/grpc_client/unified_connector_service.rsindex ea76402360..a79c061f3f 100644--- a/crates/external_services/src/grpc_client/unified_connector_service.rs+++ b/crates/external_services/src/grpc_client/unified_connector_service.rs@@ -1621,9 +1621,7 @@ impl UnifiedConnectorServiceClient {*request.metadata_mut() = metadata;- self.frm_service_client- .clone()- .pre_risk_check(request)+ Box::pin(self.frm_service_client.clone().pre_risk_check(request)).await.map_err(|error| {error_stack::Report::new(UnifiedConnectorServiceError::from_grpc_error(diff --git a/crates/hyperswitch_domain_models/src/router_request_types.rs b/crates/hyperswitch_domain_models/src/router_request_types.rsindex 1cb42b9346..ee90420efb 100644--- a/crates/hyperswitch_domain_models/src/router_request_types.rs+++ b/crates/hyperswitch_domain_models/src/router_request_types.rs@@ -1146,6 +1146,7 @@ pub struct PaymentsCancelPostCaptureData {pub connector_meta: Option<serde_json::Value>,// minor amount data for amount frameworkpub minor_amount: Option<MinorUnit>,+ pub capture_method: Option<storage_enums::CaptureMethod>,pub payment_method_data: Option<PaymentMethodData>,pub mandate_id: Option<mandates::MandateIds>,}diff --git a/crates/hyperswitch_interfaces/Cargo.toml b/crates/hyperswitch_interfaces/Cargo.tomlindex 5b4f6cf339..ed4f9e8983 100644--- a/crates/hyperswitch_interfaces/Cargo.toml+++ b/crates/hyperswitch_interfaces/Cargo.toml@@ -36,7 +36,7 @@ time = "0.3.41"tonic = "0.14"url = { version = "2.5.4", features = ["serde"] }-unified-connector-service-client = { git = "https://github.com/juspay/connector-service", tag = "2026.10.27.1", package = "rust-grpc-client" }+unified-connector-service-client = { git = "https://github.com/juspay/connector-service", tag = "2026.10.29.0", package = "rust-grpc-client" }tokio = { version = "1.45.1", features = ["macros", "rt-multi-thread"] }# First party cratesdiff --git a/crates/router/Cargo.toml b/crates/router/Cargo.tomlindex f7b1f8f700..b7a55c208c 100644--- a/crates/router/Cargo.toml+++ b/crates/router/Cargo.toml@@ -256,8 +256,8 @@ rust_decimal = { version = "1.37.1", features = [] }rust-i18n = { git = "https://github.com/kashif-m/rust-i18n", rev = "f2d8096aaaff7a87a847c35a5394c269f75e077a" }-unified-connector-service-client = { git = "https://github.com/juspay/connector-service", tag = "2026.10.27.1", package = "rust-grpc-client" }-unified-connector-service-cards = { git = "https://github.com/juspay/connector-service", tag = "2026.10.27.1", package = "ucs_cards" }+unified-connector-service-client = { git = "https://github.com/juspay/connector-service", tag = "2026.10.29.0", package = "rust-grpc-client" }+unified-connector-service-cards = { git = "https://github.com/juspay/connector-service", tag = "2026.10.29.0", package = "ucs_cards" }rustc-hash = "1.1.0"rustls = { version = "0.23", default-features = false, features = ["aws-lc-rs",diff --git a/crates/router/src/core/payments/transformers.rs b/crates/router/src/core/payments/transformers.rsindex 1c6ce7574b..a1eda48d28 100644--- a/crates/router/src/core/payments/transformers.rs+++ b/crates/router/src/core/payments/transformers.rs@@ -6309,6 +6309,7 @@ impl<F: Clone> TryFrom<PaymentAdditionalData<'_, F>> for types::PaymentsCancelPopayment_data.payment_attempt.merchant_connector_id.clone(),)?;let amount = payment_data.payment_attempt.get_total_amount();+ let capture_method = payment_data.payment_attempt.get_effective_capture_method();Ok(Self {minor_amount: Some(amount),@@ -6319,6 +6320,7 @@ impl<F: Clone> TryFrom<PaymentAdditionalData<'_, F>> for types::PaymentsCancelPo.ok_or(errors::ApiErrorResponse::ResourceIdNotFound)?,cancellation_reason: payment_data.payment_attempt.cancellation_reason,connector_meta: payment_data.payment_attempt.connector_metadata,+ capture_method,payment_method_data: payment_data.payment_method_data.clone(),mandate_id: payment_data.mandate_id.clone(),})diff --git a/crates/router/src/core/unified_connector_service/transformers.rs b/crates/router/src/core/unified_connector_service/transformers.rsindex f7b4dc01b5..bc17f338ff 100644--- a/crates/router/src/core/unified_connector_service/transformers.rs+++ b/crates/router/src/core/unified_connector_service/transformers.rs@@ -392,6 +392,7 @@ pub(super) fn build_ucs_order_details(.map(|value| value.get_percentage()),discount_type: detail.discount_type.clone(),product_link: None,+ total_amount: detail.total_amount.map(|amount| amount.get_amount_as_i64()),}).collect()})@@ -437,6 +438,7 @@ fn build_ucs_l2_l3_data(l2_l3_data: Option<&L2L3Data>) -> Option<payments_grpc::discount_amount: discount_amount.map(|amount| amount.get_amount_as_i64()),shipping_cost: shipping_cost.map(|amount| amount.get_amount_as_i64()),duty_amount: duty_amount.map(|amount| amount.get_amount_as_i64()),+ order_commodity_code: None,});let tax_info = l2_l3_data@@ -449,6 +451,10 @@ fn build_ucs_l2_l3_data(l2_l3_data: Option<&L2L3Data>) -> Option<payments_grpc::merchant_tax_registration_id,shipping_amount_tax: shipping_amount_tax.map(|amount| amount.get_amount_as_i64()),order_tax_amount: order_tax_amount.map(|tax| tax.get_amount_as_i64()),+ value_added_tax_amount: None,+ value_added_tax_percent: None,+ vat_invoice_reference_number: None,+ merchant_vat_registration_id: None,});if order_info.is_none() && tax_info.is_none() {@@ -545,6 +551,7 @@ impl ForeignFrom<&api_models::payments::AddressDetails> for payments_grpc::Addrecity: details.city.as_ref().map(|s| s.clone().into()),state: details.state.clone(),zip_code: details.zip.clone(),+ origin_zip: details.origin_zip.clone(),country_alpha2_code,email: None,phone_number: None,@@ -4085,7 +4092,10 @@ impl}),connector_transaction_id: router_data.request.connector_transaction_id.clone(),merchant_authorization_id: Some(router_data.connector_request_reference_id.clone()),- additional_amount: None,+ additional_amount: Some(payments_grpc::Money {+ minor_amount: router_data.request.additional_amount,+ currency: currency.into(),+ }),network_transaction_id: None,reason: router_data.request.reason.clone(),connector_feature_data: router_data@@ -5733,6 +5743,8 @@ impl transformers::ForeignTryFrom<hyperswitch_domain_models::payment_address::Pacity: details.and_then(|d| d.city.as_ref().map(|s| s.clone().into())),state: details.and_then(|d| d.state.as_ref().map(|s| s.clone().expose().into())),zip_code: details.and_then(|d| d.zip.as_ref().map(|s| s.clone().expose().into())),+ origin_zip: details+ .and_then(|d| d.origin_zip.as_ref().map(|s| s.clone().expose().into())),country_alpha2_code: country,email: address@@ -5768,6 +5780,8 @@ impl transformers::ForeignTryFrom<hyperswitch_domain_models::payment_address::Pacity: details.and_then(|d| d.city.as_ref().map(|s| s.clone().into())),state: details.and_then(|d| d.state.as_ref().map(|s| s.peek().to_string().into())),zip_code: details.and_then(|d| d.zip.as_ref().map(|s| s.peek().to_string().into())),+ origin_zip: details+ .and_then(|d| d.origin_zip.as_ref().map(|s| s.peek().to_string().into())),country_alpha2_code: country,email: address.email.as_ref().map(|e| e.peek().to_string().into()),phone_number: address@@ -5806,6 +5820,8 @@ impl transformers::ForeignTryFrom<hyperswitch_domain_models::payment_address::Pa.and_then(|d| d.state.as_ref().map(|s| s.peek().to_string().into())),zip_code: details.and_then(|d| d.zip.as_ref().map(|s| s.peek().to_string().into())),+ origin_zip: details+ .and_then(|d| d.origin_zip.as_ref().map(|s| s.peek().to_string().into())),country_alpha2_code: country,email: address@@ -5854,6 +5870,8 @@ impl transformers::ForeignTryFrom<hyperswitch_domain_models::address::Address>city: details.and_then(|d| d.city.as_ref().map(|s| s.clone().into())),state: details.and_then(|d| d.state.as_ref().map(|s| s.peek().to_string().into())),zip_code: details.and_then(|d| d.zip.as_ref().map(|s| s.peek().to_string().into())),+ origin_zip: details+ .and_then(|d| d.origin_zip.as_ref().map(|s| s.peek().to_string().into())),country_alpha2_code: country,email: address.email.as_ref().map(|e| e.peek().to_string().into()),phone_number: address@@ -9252,6 +9270,26 @@ impl}).transpose()?;+ let payment_method = router_data+ .request+ .payment_method_data+ .clone()+ .map(|payment_method_data| {+ unified_connector_service::build_unified_connector_service_payment_method(+ payment_method_data,+ router_data.payment_method_type,+ router_data.payment_method_token.as_ref(),+ router_data.connector_meta_data.as_ref(),+ )+ })+ .transpose()?;++ let capture_method = router_data+ .request+ .capture_method+ .map(payments_grpc::CaptureMethod::foreign_try_from)+ .transpose()?;+Ok(Self {merchant_reverse_id: Some(router_data.connector_request_reference_id.clone()),connector_transaction_id: router_data.request.connector_transaction_id.clone(),@@ -9270,6 +9308,8 @@ implmerchant_request_id: None,test_mode: router_data.test_mode,amount,+ payment_method,+ capture_method: capture_method.map(Into::into),})}}