Skip to content

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

fix(webhooks): prefer parent payment reference for UCS dispute lookups (#14555)

Amitsingh Tanwar3f4a0c7ba181
diff --git a/crates/router/src/core/webhooks/gateway.rs b/crates/router/src/core/webhooks/gateway.rs
index be61e6b54e..c86c7cee17 100644
--- a/crates/router/src/core/webhooks/gateway.rs
+++ b/crates/router/src/core/webhooks/gateway.rs
@@ -950,9 +950,9 @@ fn event_reference_to_object_ref(
}
}
Resource::Dispute(dispute) => dispute
- .connector_dispute_id
+ .connector_transaction_id
.as_ref()
- .or(dispute.connector_transaction_id.as_ref())
+ .or(dispute.connector_dispute_id.as_ref())
.map(|id| {
ObjectReferenceId::PaymentId(api_payments::PaymentIdType::ConnectorTransactionId(
id.clone(),