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: include client columns in payment attempts response struct (#4761)

Vrishab Srivatsad686ec7acda6
diff --git a/crates/api_models/src/payments.rs b/crates/api_models/src/payments.rs
index cd405e3ca9..5d767a5001 100644
--- a/crates/api_models/src/payments.rs
+++ b/crates/api_models/src/payments.rs
@@ -630,6 +630,10 @@ pub struct PaymentAttemptResponse {
pub unified_code: Option<String>,
/// error message unified across the connectors is received here if there was an error while calling connector
pub unified_message: Option<String>,
+ /// Value passed in X-CLIENT-SOURCE header during payments confirm request by the client
+ pub client_source: Option<String>,
+ /// Value passed in X-CLIENT-VERSION header during payments confirm request by the client
+ pub client_version: Option<String>,
}
#[derive(
diff --git a/crates/router/src/types/transformers.rs b/crates/router/src/types/transformers.rs
index 59ec42abfd..400c2f9981 100644
--- a/crates/router/src/types/transformers.rs
+++ b/crates/router/src/types/transformers.rs
@@ -933,6 +933,8 @@ impl ForeignFrom<storage::PaymentAttempt> for payments::PaymentAttemptResponse {
reference_id: payment_attempt.connector_response_reference_id,
unified_code: payment_attempt.unified_code,
unified_message: payment_attempt.unified_message,
+ client_source: payment_attempt.client_source,
+ client_version: payment_attempt.client_version,
}
}
}
diff --git a/openapi/openapi_spec.json b/openapi/openapi_spec.json
index 30bd356cd4..93adec74de 100644
--- a/openapi/openapi_spec.json
+++ b/openapi/openapi_spec.json
@@ -12587,6 +12587,16 @@
"type": "string",
"description": "error message unified across the connectors is received here if there was an error while calling connector",
"nullable": true
+ },
+ "client_source": {
+ "type": "string",
+ "description": "Value passed in X-CLIENT-SOURCE header during payments confirm request by the client",
+ "nullable": true
+ },
+ "client_version": {
+ "type": "string",
+ "description": "Value passed in X-CLIENT-VERSION header during payments confirm request by the client",
+ "nullable": true
}
}
},