Bug: Rename existing RevenueRecoveryRecordBack trait to InvoiceRecordBack



After a payment is successful for a invoice, we need to record the invoice as paid with the subscription provider. this implementation is already done for revenue recovery usecase. making it generic so that subscription also can use it
diff --git a/crates/hyperswitch_connectors/src/connectors/chargebee.rs b/crates/hyperswitch_connectors/src/connectors/chargebee.rs
index 19ec99fc1d0..5e2e23a8a90 100644
--- a/crates/hyperswitch_connectors/src/connectors/chargebee.rs
+++ b/crates/hyperswitch_connectors/src/connectors/chargebee.rs
@@ -13,28 +13,28 @@ use common_utils::{
 use error_stack::report;
 use error_stack::ResultExt;
 #[cfg(all(feature = "v2", feature = "revenue_recovery"))]
-use hyperswitch_domain_models::{
-    revenue_recovery, router_flow_types::revenue_recovery::RecoveryRecordBack,
-    router_request_types::revenue_recovery::RevenueRecoveryRecordBackRequest,
-    router_response_types::revenue_recovery::RevenueRecoveryRecordBackResponse,
-    types::RevenueRecoveryRecordBackRouterData,
-};
+use hyperswitch_domain_models::revenue_recovery;
 use hyperswitch_domain_models::{
     router_data::{AccessToken, ConnectorAuthType, ErrorResponse, RouterData},
     router_flow_types::{
         access_token_auth::AccessTokenAuth,
         payments::{Authorize, Capture, PSync, PaymentMethodToken, Session, SetupMandate, Void},
         refunds::{Execute, RSync},
+        revenue_recovery::InvoiceRecordBack,
     },
     router_request_types::{
-        AccessTokenRequestData, PaymentMethodTokenizationData, PaymentsAuthorizeData,
-        PaymentsCancelData, PaymentsCaptureData, PaymentsSessionData, PaymentsSyncData,
-        RefundsData, SetupMandateRequestData,
+        revenue_recovery::InvoiceRecordBackRequest, AccessTokenRequestData,
+        PaymentMethodTokenizationData, PaymentsAuthorizeData, PaymentsCancelData,
+        PaymentsCaptureData, PaymentsSessionData, PaymentsSyncData, RefundsData,
+        SetupMandateRequestData,
+    },
+    router_response_types::{
+        revenue_recovery::InvoiceRecordBackResponse, ConnectorInfo, PaymentsResponseData,
+        RefundsResponseData,
     },
-    router_response_types::{ConnectorInfo, PaymentsResponseData, RefundsResponseData},
     types::{
-        PaymentsAuthorizeRouterData, PaymentsCaptureRouterData, PaymentsSyncRouterData,
-        RefundSyncRouterData, RefundsRouterData,
+        InvoiceRecordBackRouterData, PaymentsAuthorizeRouterData, PaymentsCaptureRouterData,
+        PaymentsSyncRouterData, RefundSyncRouterData, RefundsRouterData,
     },
 };
 use hyperswitch_interfaces::{
@@ -560,24 +560,19 @@ impl ConnectorIntegration<RSync, RefundsData, RefundsResponseData> for Chargebee
     }
 }
 
-#[cfg(all(feature = "v2", feature = "revenue_recovery"))]
-impl
-    ConnectorIntegration<
-        RecoveryRecordBack,
-        RevenueRecoveryRecordBackRequest,
-        RevenueRecoveryRecordBackResponse,
-    > for Chargebee
+impl ConnectorIntegration<InvoiceRecordBack, InvoiceRecordBackRequest, InvoiceRecordBackResponse>
+    for Chargebee
 {
     fn get_headers(
         &self,
-        req: &RevenueRecoveryRecordBackRouterData,
+        req: &InvoiceRecordBackRouterData,
         connectors: &Connectors,
     ) -> CustomResult<Vec<(String, masking::Maskable<String>)>, errors::ConnectorError> {
         self.build_headers(req, connectors)
     }
     fn get_url(
         &self,
-        req: &RevenueRecoveryRecordBackRouterData,
+        req: &InvoiceRecordBackRouterData,
         connectors: &Connectors,
     ) -> CustomResult<String, errors::ConnectorError> {
         let metadata: chargebee::ChargebeeMetadata =
@@ -600,7 +595,7 @@ impl
 
     fn get_request_body(
         &self,
-        req: &RevenueRecoveryRecordBackRouterData,
+        req: &InvoiceRecordBackRouterData,
         _connectors: &Connectors,
     ) -> CustomResult<RequestContent, errors::ConnectorError> {
         let amount = utils::convert_amount(
@@ -616,20 +611,20 @@ impl
 
     fn build_request(
         &self,
-        req: &RevenueRecoveryRecordBackRouterData,
+        req: &InvoiceRecordBackRouterData,
         connectors: &Connectors,
     ) -> CustomResult<Option<Request>, errors::ConnectorError> {
         Ok(Some(
             RequestBuilder::new()
                 .method(Method::Post)
-                .url(&types::RevenueRecoveryRecordBackType::get_url(
+                .url(&types::InvoiceRecordBackType::get_url(
                     self, req, connectors,
                 )?)
                 .attach_default_headers()
-                .headers(types::RevenueRecoveryRecordBackType::get_headers(
+                .headers(types::InvoiceRecordBackType::get_headers(
                     self, req, connectors,
                 )?)
-                .set_body(types::RevenueRecoveryRecordBackType::get_request_body(
+                .set_body(types::InvoiceRecordBackType::get_request_body(
                     self, req, connectors,
                 )?)
                 .build(),
@@ -638,10 +633,10 @@ impl
 
     fn handle_response(
         &self,
-        data: &RevenueRecoveryRecordBackRouterData,
+        data: &InvoiceRecordBackRouterData,
         event_builder: Option<&mut ConnectorEvent>,
         res: Response,
-    ) -> CustomResult<RevenueRecoveryRecordBackRouterData, errors::ConnectorError> {
+    ) -> CustomResult<InvoiceRecordBackRouterData, errors::ConnectorError> {
         let response: chargebee::ChargebeeRecordbackResponse = res
             .response
             .parse_struct("chargebee ChargebeeRecordbackResponse")
diff --git a/crates/hyperswitch_connectors/src/connectors/chargebee/transformers.rs b/crates/hyperswitch_connectors/src/connectors/chargebee/transformers.rs
index 95f105c67b9..6d942980e2f 100644
--- a/crates/hyperswitch_connectors/src/connectors/chargebee/transformers.rs
+++ b/crates/hyperswitch_connectors/src/connectors/chargebee/transformers.rs
@@ -11,14 +11,13 @@ use hyperswitch_domain_models::{
     router_data::{ConnectorAuthType, RouterData},
     router_flow_types::{
         refunds::{Execute, RSync},
-        RecoveryRecordBack,
+        InvoiceRecordBack,
     },
-    router_request_types::{revenue_recovery::RevenueRecoveryRecordBackRequest, ResponseId},
+    router_request_types::{revenue_recovery::InvoiceRecordBackRequest, ResponseId},
     router_response_types::{
-        revenue_recovery::RevenueRecoveryRecordBackResponse, PaymentsResponseData,
-        RefundsResponseData,
+        revenue_recovery::InvoiceRecordBackResponse, PaymentsResponseData, RefundsResponseData,
     },
-    types::{PaymentsAuthorizeRouterData, RefundsRouterData, RevenueRecoveryRecordBackRouterData},
+    types::{InvoiceRecordBackRouterData, PaymentsAuthorizeRouterData, RefundsRouterData},
 };
 use hyperswitch_interfaces::errors;
 use masking::Secret;
@@ -673,13 +672,10 @@ pub enum ChargebeeRecordStatus {
     Failure,
 }
 
-#[cfg(all(feature = "v2", feature = "revenue_recovery"))]
-impl TryFrom<&ChargebeeRouterData<&RevenueRecoveryRecordBackRouterData>>
-    for ChargebeeRecordPaymentRequest
-{
+impl TryFrom<&ChargebeeRouterData<&InvoiceRecordBackRouterData>> for ChargebeeRecordPaymentRequest {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        item: &ChargebeeRouterData<&RevenueRecoveryRecordBackRouterData>,
+        item: &ChargebeeRouterData<&InvoiceRecordBackRouterData>,
     ) -> Result<Self, Self::Error> {
         let req = &item.router_data.request;
         Ok(Self {
@@ -694,7 +690,6 @@ impl TryFrom<&ChargebeeRouterData<&RevenueRecoveryRecordBackRouterData>>
     }
 }
 
-#[cfg(all(feature = "v2", feature = "revenue_recovery"))]
 impl TryFrom<enums::AttemptStatus> for ChargebeeRecordStatus {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(status: enums::AttemptStatus) -> Result<Self, Self::Error> {
@@ -748,25 +743,25 @@ pub struct ChargebeeRecordbackInvoice {
 impl
     TryFrom<
         ResponseRouterData<
-            RecoveryRecordBack,
+            InvoiceRecordBack,
             ChargebeeRecordbackResponse,
-            RevenueRecoveryRecordBackRequest,
-            RevenueRecoveryRecordBackResponse,
+            InvoiceRecordBackRequest,
+            InvoiceRecordBackResponse,
         >,
-    > for RevenueRecoveryRecordBackRouterData
+    > for InvoiceRecordBackRouterData
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
         item: ResponseRouterData<
-            RecoveryRecordBack,
+            InvoiceRecordBack,
             ChargebeeRecordbackResponse,
-            RevenueRecoveryRecordBackRequest,
-            RevenueRecoveryRecordBackResponse,
+            InvoiceRecordBackRequest,
+            InvoiceRecordBackResponse,
         >,
     ) -> Result<Self, Self::Error> {
         let merchant_reference_id = item.response.invoice.id;
         Ok(Self {
-            response: Ok(RevenueRecoveryRecordBackResponse {
+            response: Ok(InvoiceRecordBackResponse {
                 merchant_reference_id,
             }),
             ..item.data
diff --git a/crates/hyperswitch_connectors/src/connectors/recurly.rs b/crates/hyperswitch_connectors/src/connectors/recurly.rs
index 35b736b844e..693095cfeb9 100644
--- a/crates/hyperswitch_connectors/src/connectors/recurly.rs
+++ b/crates/hyperswitch_connectors/src/connectors/recurly.rs
@@ -300,15 +300,15 @@ impl
 #[cfg(all(feature = "v2", feature = "revenue_recovery"))]
 impl
     ConnectorIntegrationV2<
-        recovery_router_flows::RecoveryRecordBack,
-        recovery_flow_common_types::RevenueRecoveryRecordBackData,
-        recovery_request_types::RevenueRecoveryRecordBackRequest,
-        recovery_response_types::RevenueRecoveryRecordBackResponse,
+        recovery_router_flows::InvoiceRecordBack,
+        recovery_flow_common_types::InvoiceRecordBackData,
+        recovery_request_types::InvoiceRecordBackRequest,
+        recovery_response_types::InvoiceRecordBackResponse,
     > for Recurly
 {
     fn get_headers(
         &self,
-        req: &recovery_router_data_types::RevenueRecoveryRecordBackRouterDataV2,
+        req: &recovery_router_data_types::InvoiceRecordBackRouterDataV2,
     ) -> CustomResult<Vec<(String, masking::Maskable<String>)>, errors::ConnectorError> {
         let mut header = vec![(
             headers::CONTENT_TYPE.to_string(),
@@ -321,7 +321,7 @@ impl
 
     fn get_url(
         &self,
-        req: &recovery_router_data_types::RevenueRecoveryRecordBackRouterDataV2,
+        req: &recovery_router_data_types::InvoiceRecordBackRouterDataV2,
     ) -> CustomResult<String, errors::ConnectorError> {
         let invoice_id = req
             .request
@@ -344,16 +344,14 @@ impl
 
     fn build_request_v2(
         &self,
-        req: &recovery_router_data_types::RevenueRecoveryRecordBackRouterDataV2,
+        req: &recovery_router_data_types::InvoiceRecordBackRouterDataV2,
     ) -> CustomResult<Option<Request>, errors::ConnectorError> {
         Ok(Some(
             RequestBuilder::new()
                 .method(Method::Put)
-                .url(&types::RevenueRecoveryRecordBackTypeV2::get_url(self, req)?)
+                .url(&types::InvoiceRecordBackTypeV2::get_url(self, req)?)
                 .attach_default_headers()
-                .headers(types::RevenueRecoveryRecordBackTypeV2::get_headers(
-                    self, req,
-                )?)
+                .headers(types::InvoiceRecordBackTypeV2::get_headers(self, req)?)
                 .header("Content-Length", "0")
                 .build(),
         ))
@@ -361,11 +359,11 @@ impl
 
     fn handle_response_v2(
         &self,
-        data: &recovery_router_data_types::RevenueRecoveryRecordBackRouterDataV2,
+        data: &recovery_router_data_types::InvoiceRecordBackRouterDataV2,
         event_builder: Option<&mut ConnectorEvent>,
         res: Response,
     ) -> CustomResult<
-        recovery_router_data_types::RevenueRecoveryRecordBackRouterDataV2,
+        recovery_router_data_types::InvoiceRecordBackRouterDataV2,
         errors::ConnectorError,
     > {
         let response: recurly::RecurlyRecordBackResponse = res
@@ -374,13 +372,11 @@ impl
             .change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
         event_builder.map(|i| i.set_response_body(&response));
         router_env::logger::info!(connector_response=?response);
-        recovery_router_data_types::RevenueRecoveryRecordBackRouterDataV2::try_from(
-            ResponseRouterDataV2 {
-                response,
-                data: data.clone(),
-                http_code: res.status_code,
-            },
-        )
+        recovery_router_data_types::InvoiceRecordBackRouterDataV2::try_from(ResponseRouterDataV2 {
+            response,
+            data: data.clone(),
+            http_code: res.status_code,
+        })
     }
 
     fn get_error_response_v2(
diff --git a/crates/hyperswitch_connectors/src/connectors/recurly/transformers.rs b/crates/hyperswitch_connectors/src/connectors/recurly/transformers.rs
index 7338500db80..b17a01952ab 100644
--- a/crates/hyperswitch_connectors/src/connectors/recurly/transformers.rs
+++ b/crates/hyperswitch_connectors/src/connectors/recurly/transformers.rs
@@ -316,27 +316,27 @@ pub struct RecurlyRecordBackResponse {
 impl
     TryFrom<
         ResponseRouterDataV2<
-            recovery_router_flows::RecoveryRecordBack,
+            recovery_router_flows::InvoiceRecordBack,
             RecurlyRecordBackResponse,
-            recovery_flow_common_types::RevenueRecoveryRecordBackData,
-            recovery_request_types::RevenueRecoveryRecordBackRequest,
-            recovery_response_types::RevenueRecoveryRecordBackResponse,
+            recovery_flow_common_types::InvoiceRecordBackData,
+            recovery_request_types::InvoiceRecordBackRequest,
+            recovery_response_types::InvoiceRecordBackResponse,
         >,
-    > for recovery_router_data_types::RevenueRecoveryRecordBackRouterDataV2
+    > for recovery_router_data_types::InvoiceRecordBackRouterDataV2
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
         item: ResponseRouterDataV2<
-            recovery_router_flows::RecoveryRecordBack,
+            recovery_router_flows::InvoiceRecordBack,
             RecurlyRecordBackResponse,
-            recovery_flow_common_types::RevenueRecoveryRecordBackData,
-            recovery_request_types::RevenueRecoveryRecordBackRequest,
-            recovery_response_types::RevenueRecoveryRecordBackResponse,
+            recovery_flow_common_types::InvoiceRecordBackData,
+            recovery_request_types::InvoiceRecordBackRequest,
+            recovery_response_types::InvoiceRecordBackResponse,
         >,
     ) -> Result<Self, Self::Error> {
         let merchant_reference_id = item.response.id;
         Ok(Self {
-            response: Ok(recovery_response_types::RevenueRecoveryRecordBackResponse {
+            response: Ok(recovery_response_types::InvoiceRecordBackResponse {
                 merchant_reference_id,
             }),
             ..item.data
diff --git a/crates/hyperswitch_connectors/src/connectors/stripebilling.rs b/crates/hyperswitch_connectors/src/connectors/stripebilling.rs
index 79f0bcc88d8..99d83e4ef82 100644
--- a/crates/hyperswitch_connectors/src/connectors/stripebilling.rs
+++ b/crates/hyperswitch_connectors/src/connectors/stripebilling.rs
@@ -663,14 +663,14 @@ impl
 #[cfg(all(feature = "v2", feature = "revenue_recovery"))]
 impl
     ConnectorIntegration<
-        recovery_router_flows::RecoveryRecordBack,
-        recovery_request_types::RevenueRecoveryRecordBackRequest,
-        recovery_response_types::RevenueRecoveryRecordBackResponse,
+        recovery_router_flows::InvoiceRecordBack,
+        recovery_request_types::InvoiceRecordBackRequest,
+        recovery_response_types::InvoiceRecordBackResponse,
     > for Stripebilling
 {
     fn get_headers(
         &self,
-        req: &recovery_router_data_types::RevenueRecoveryRecordBackRouterData,
+        req: &recovery_router_data_types::InvoiceRecordBackRouterData,
         connectors: &Connectors,
     ) -> CustomResult<Vec<(String, masking::Maskable<String>)>, errors::ConnectorError> {
         self.build_headers(req, connectors)
@@ -682,7 +682,7 @@ impl
 
     fn get_url(
         &self,
-        req: &recovery_router_data_types::RevenueRecoveryRecordBackRouterData,
+        req: &recovery_router_data_types::InvoiceRecordBackRouterData,
         connectors: &Connectors,
     ) -> CustomResult<String, errors::ConnectorError> {
         let invoice_id = req
@@ -705,17 +705,17 @@ impl
 
     fn build_request(
         &self,
-        req: &recovery_router_data_types::RevenueRecoveryRecordBackRouterData,
+        req: &recovery_router_data_types::InvoiceRecordBackRouterData,
         connectors: &Connectors,
     ) -> CustomResult<Option<Request>, errors::ConnectorError> {
         Ok(Some(
             RequestBuilder::new()
                 .method(Method::Post)
-                .url(&types::RevenueRecoveryRecordBackType::get_url(
+                .url(&types::InvoiceRecordBackType::get_url(
                     self, req, connectors,
                 )?)
                 .attach_default_headers()
-                .headers(types::RevenueRecoveryRecordBackType::get_headers(
+                .headers(types::InvoiceRecordBackType::get_headers(
                     self, req, connectors,
                 )?)
                 .build(),
@@ -724,13 +724,11 @@ impl
 
     fn handle_response(
         &self,
-        data: &recovery_router_data_types::RevenueRecoveryRecordBackRouterData,
+        data: &recovery_router_data_types::InvoiceRecordBackRouterData,
         event_builder: Option<&mut ConnectorEvent>,
         res: Response,
-    ) -> CustomResult<
-        recovery_router_data_types::RevenueRecoveryRecordBackRouterData,
-        errors::ConnectorError,
-    > {
+    ) -> CustomResult<recovery_router_data_types::InvoiceRecordBackRouterData, errors::ConnectorError>
+    {
         let response = res
             .response
             .parse_struct::<stripebilling::StripebillingRecordBackResponse>(
@@ -739,13 +737,11 @@ impl
             .change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
         event_builder.map(|i| i.set_response_body(&response));
         router_env::logger::info!(connector_response=?response);
-        recovery_router_data_types::RevenueRecoveryRecordBackRouterData::try_from(
-            ResponseRouterData {
-                response,
-                data: data.clone(),
-                http_code: res.status_code,
-            },
-        )
+        recovery_router_data_types::InvoiceRecordBackRouterData::try_from(ResponseRouterData {
+            response,
+            data: data.clone(),
+            http_code: res.status_code,
+        })
     }
 
     fn get_error_response(
diff --git a/crates/hyperswitch_connectors/src/connectors/stripebilling/transformers.rs b/crates/hyperswitch_connectors/src/connectors/stripebilling/transformers.rs
index a5e4610ffdb..a44a4d31a95 100644
--- a/crates/hyperswitch_connectors/src/connectors/stripebilling/transformers.rs
+++ b/crates/hyperswitch_connectors/src/connectors/stripebilling/transformers.rs
@@ -627,24 +627,24 @@ pub struct StripebillingRecordBackResponse {
 impl
     TryFrom<
         ResponseRouterData<
-            recovery_router_flows::RecoveryRecordBack,
+            recovery_router_flows::InvoiceRecordBack,
             StripebillingRecordBackResponse,
-            recovery_request_types::RevenueRecoveryRecordBackRequest,
-            recovery_response_types::RevenueRecoveryRecordBackResponse,
+            recovery_request_types::InvoiceRecordBackRequest,
+            recovery_response_types::InvoiceRecordBackResponse,
         >,
-    > for recovery_router_data_types::RevenueRecoveryRecordBackRouterData
+    > for recovery_router_data_types::InvoiceRecordBackRouterData
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
         item: ResponseRouterData<
-            recovery_router_flows::RecoveryRecordBack,
+            recovery_router_flows::InvoiceRecordBack,
             StripebillingRecordBackResponse,
-            recovery_request_types::RevenueRecoveryRecordBackRequest,
-            recovery_response_types::RevenueRecoveryRecordBackResponse,
+            recovery_request_types::InvoiceRecordBackRequest,
+            recovery_response_types::InvoiceRecordBackResponse,
         >,
     ) -> Result<Self, Self::Error> {
         Ok(Self {
-            response: Ok(recovery_response_types::RevenueRecoveryRecordBackResponse {
+            response: Ok(recovery_response_types::InvoiceRecordBackResponse {
                 merchant_reference_id: id_type::PaymentReferenceId::from_str(
                     item.response.id.as_str(),
                 )
diff --git a/crates/hyperswitch_connectors/src/default_implementations.rs b/crates/hyperswitch_connectors/src/default_implementations.rs
index 0535088c884..2d366f3f99e 100644
--- a/crates/hyperswitch_connectors/src/default_implementations.rs
+++ b/crates/hyperswitch_connectors/src/default_implementations.rs
@@ -8,7 +8,7 @@ use common_enums::{CallConnectorAction, PaymentAction};
 use common_utils::errors::CustomResult;
 #[cfg(all(feature = "v2", feature = "revenue_recovery"))]
 use hyperswitch_domain_models::router_flow_types::{
-    BillingConnectorInvoiceSync, BillingConnectorPaymentsSync, RecoveryRecordBack,
+    BillingConnectorInvoiceSync, BillingConnectorPaymentsSync, InvoiceRecordBack,
 };
 #[cfg(feature = "dummy_connector")]
 use hyperswitch_domain_models::router_request_types::authentication::{
@@ -17,12 +17,12 @@ use hyperswitch_domain_models::router_request_types::authentication::{
 #[cfg(all(feature = "v2", feature = "revenue_recovery"))]
 use hyperswitch_domain_models::router_request_types::revenue_recovery::{
     BillingConnectorInvoiceSyncRequest, BillingConnectorPaymentsSyncRequest,
-    RevenueRecoveryRecordBackRequest,
+    InvoiceRecordBackRequest,
 };
 #[cfg(all(feature = "v2", feature = "revenue_recovery"))]
 use hyperswitch_domain_models::router_response_types::revenue_recovery::{
     BillingConnectorInvoiceSyncResponse, BillingConnectorPaymentsSyncResponse,
-    RevenueRecoveryRecordBackResponse,
+    InvoiceRecordBackResponse,
 };
 use hyperswitch_domain_models::{
     router_data::AccessTokenAuthenticationResponse,
@@ -6611,9 +6611,9 @@ macro_rules! default_imp_for_revenue_recovery_record_back {
         $( impl recovery_traits::RevenueRecoveryRecordBack for $path::$connector {}
             impl
             ConnectorIntegration<
-            RecoveryRecordBack,
-            RevenueRecoveryRecordBackRequest,
-            RevenueRecoveryRecordBackResponse
+            InvoiceRecordBack,
+            InvoiceRecordBackRequest,
+            InvoiceRecordBackResponse
             > for $path::$connector
             {}
         )*
@@ -8358,11 +8358,8 @@ impl<const T: u8> api::revenue_recovery::RevenueRecoveryRecordBack
 #[cfg(all(feature = "v2", feature = "revenue_recovery"))]
 #[cfg(feature = "dummy_connector")]
 impl<const T: u8>
-    ConnectorIntegration<
-        RecoveryRecordBack,
-        RevenueRecoveryRecordBackRequest,
-        RevenueRecoveryRecordBackResponse,
-    > for connectors::DummyConnector<T>
+    ConnectorIntegration<InvoiceRecordBack, InvoiceRecordBackRequest, InvoiceRecordBackResponse>
+    for connectors::DummyConnector<T>
 {
 }
 
diff --git a/crates/hyperswitch_connectors/src/default_implementations_v2.rs b/crates/hyperswitch_connectors/src/default_implementations_v2.rs
index 5dc07ab43d4..f175c52e93f 100644
--- a/crates/hyperswitch_connectors/src/default_implementations_v2.rs
+++ b/crates/hyperswitch_connectors/src/default_implementations_v2.rs
@@ -3,8 +3,8 @@ use hyperswitch_domain_models::{
     router_data_v2::{
         flow_common_types::{
             BillingConnectorInvoiceSyncFlowData, BillingConnectorPaymentsSyncFlowData,
-            DisputesFlowData, MandateRevokeFlowData, PaymentFlowData, RefundFlowData,
-            RevenueRecoveryRecordBackData, WebhookSourceVerifyData,
+            DisputesFlowData, InvoiceRecordBackData, MandateRevokeFlowData, PaymentFlowData,
+            RefundFlowData, WebhookSourceVerifyData,
         },
         AccessTokenFlowData, AuthenticationTokenFlowData, ExternalAuthenticationFlowData,
         FilesFlowData, VaultConnectorFlowData,
@@ -24,7 +24,7 @@ use hyperswitch_domain_models::{
         },
         refunds::{Execute, RSync},
         revenue_recovery::{
-            BillingConnectorInvoiceSync, BillingConnectorPaymentsSync, RecoveryRecordBack,
+            BillingConnectorInvoiceSync, BillingConnectorPaymentsSync, InvoiceRecordBack,
         },
         webhooks::VerifyWebhookSource,
         AccessTokenAuth, AccessTokenAuthentication, ExternalVaultCreateFlow,
@@ -34,7 +34,7 @@ use hyperswitch_domain_models::{
         authentication,
         revenue_recovery::{
             BillingConnectorInvoiceSyncRequest, BillingConnectorPaymentsSyncRequest,
-            RevenueRecoveryRecordBackRequest,
+            InvoiceRecordBackRequest,
         },
         AcceptDisputeRequestData, AccessTokenAuthenticationRequestData, AccessTokenRequestData,
         AuthorizeSessionTokenData, CompleteAuthorizeData, ConnectorCustomerData,
@@ -52,7 +52,7 @@ use hyperswitch_domain_models::{
     router_response_types::{
         revenue_recovery::{
             BillingConnectorInvoiceSyncResponse, BillingConnectorPaymentsSyncResponse,
-            RevenueRecoveryRecordBackResponse,
+            InvoiceRecordBackResponse,
         },
         AcceptDisputeResponse, AuthenticationResponseData, DefendDisputeResponse,
         DisputeSyncResponse, FetchDisputesResponse, MandateRevokeResponseData,
@@ -4120,10 +4120,10 @@ macro_rules! default_imp_for_new_connector_integration_revenue_recovery {
             impl BillingConnectorInvoiceSyncIntegrationV2 for $path::$connector {}
             impl
             ConnectorIntegrationV2<
-                RecoveryRecordBack,
-                RevenueRecoveryRecordBackData,
-                RevenueRecoveryRecordBackRequest,
-                RevenueRecoveryRecordBackResponse,
+                InvoiceRecordBack,
+                InvoiceRecordBackData,
+                InvoiceRecordBackRequest,
+                InvoiceRecordBackResponse,
                 > for $path::$connector
             {}
             impl
diff --git a/crates/hyperswitch_domain_models/src/router_data_v2/flow_common_types.rs b/crates/hyperswitch_domain_models/src/router_data_v2/flow_common_types.rs
index 686912c6dca..1b5c48df929 100644
--- a/crates/hyperswitch_domain_models/src/router_data_v2/flow_common_types.rs
+++ b/crates/hyperswitch_domain_models/src/router_data_v2/flow_common_types.rs
@@ -148,7 +148,7 @@ pub struct FilesFlowData {
 }
 
 #[derive(Debug, Clone)]
-pub struct RevenueRecoveryRecordBackData;
+pub struct InvoiceRecordBackData;
 
 #[derive(Debug, Clone)]
 pub struct UasFlowData {
diff --git a/crates/hyperswitch_domain_models/src/router_flow_types/revenue_recovery.rs b/crates/hyperswitch_domain_models/src/router_flow_types/revenue_recovery.rs
index ec784f7d464..da496656c65 100644
--- a/crates/hyperswitch_domain_models/src/router_flow_types/revenue_recovery.rs
+++ b/crates/hyperswitch_domain_models/src/router_flow_types/revenue_recovery.rs
@@ -1,7 +1,7 @@
 #[derive(Debug, Clone)]
 pub struct BillingConnectorPaymentsSync;
 #[derive(Debug, Clone)]
-pub struct RecoveryRecordBack;
+pub struct InvoiceRecordBack;
 
 #[derive(Debug, Clone)]
 pub struct BillingConnectorInvoiceSync;
diff --git a/crates/hyperswitch_domain_models/src/router_request_types/revenue_recovery.rs b/crates/hyperswitch_domain_models/src/router_request_types/revenue_recovery.rs
index 9e1a59110f9..197de0b0fb5 100644
--- a/crates/hyperswitch_domain_models/src/router_request_types/revenue_recovery.rs
+++ b/crates/hyperswitch_domain_models/src/router_request_types/revenue_recovery.rs
@@ -11,7 +11,7 @@ pub struct BillingConnectorPaymentsSyncRequest {
 }
 
 #[derive(Debug, Clone)]
-pub struct RevenueRecoveryRecordBackRequest {
+pub struct InvoiceRecordBackRequest {
     pub merchant_reference_id: common_utils::id_type::PaymentReferenceId,
     pub amount: common_utils::types::MinorUnit,
     pub currency: enums::Currency,
diff --git a/crates/hyperswitch_domain_models/src/router_response_types/revenue_recovery.rs b/crates/hyperswitch_domain_models/src/router_response_types/revenue_recovery.rs
index 65a62f62125..dabdf981e3d 100644
--- a/crates/hyperswitch_domain_models/src/router_response_types/revenue_recovery.rs
+++ b/crates/hyperswitch_domain_models/src/router_response_types/revenue_recovery.rs
@@ -35,7 +35,7 @@ pub struct BillingConnectorPaymentsSyncResponse {
 }
 
 #[derive(Debug, Clone)]
-pub struct RevenueRecoveryRecordBackResponse {
+pub struct InvoiceRecordBackResponse {
     pub merchant_reference_id: common_utils::id_type::PaymentReferenceId,
 }
 
diff --git a/crates/hyperswitch_domain_models/src/types.rs b/crates/hyperswitch_domain_models/src/types.rs
index bcca0ba12a9..e907bbdfa20 100644
--- a/crates/hyperswitch_domain_models/src/types.rs
+++ b/crates/hyperswitch_domain_models/src/types.rs
@@ -4,7 +4,7 @@ use crate::{
     router_data::{AccessToken, AccessTokenAuthenticationResponse, RouterData},
     router_data_v2::{self, RouterDataV2},
     router_flow_types::{
-        mandate_revoke::MandateRevoke, revenue_recovery::RecoveryRecordBack, AccessTokenAuth,
+        mandate_revoke::MandateRevoke, revenue_recovery::InvoiceRecordBack, AccessTokenAuth,
         AccessTokenAuthentication, Authenticate, AuthenticationConfirmation, Authorize,
         AuthorizeSessionToken, BillingConnectorInvoiceSync, BillingConnectorPaymentsSync,
         CalculateTax, Capture, CompleteAuthorize, CreateConnectorCustomer, CreateOrder, Execute,
@@ -15,7 +15,7 @@ use crate::{
     router_request_types::{
         revenue_recovery::{
             BillingConnectorInvoiceSyncRequest, BillingConnectorPaymentsSyncRequest,
-            RevenueRecoveryRecordBackRequest,
+            InvoiceRecordBackRequest,
         },
         unified_authentication_service::{
             UasAuthenticationRequestData, UasAuthenticationResponseData,
@@ -35,7 +35,7 @@ use crate::{
     router_response_types::{
         revenue_recovery::{
             BillingConnectorInvoiceSyncResponse, BillingConnectorPaymentsSyncResponse,
-            RevenueRecoveryRecordBackResponse,
+            InvoiceRecordBackResponse,
         },
         MandateRevokeResponseData, PaymentsResponseData, RefundsResponseData,
         TaxCalculationResponseData, VaultResponseData, VerifyWebhookSourceResponseData,
@@ -114,11 +114,8 @@ pub type VerifyWebhookSourceRouterData = RouterData<
 #[cfg(feature = "payouts")]
 pub type PayoutsRouterData<F> = RouterData<F, PayoutsData, PayoutsResponseData>;
 
-pub type RevenueRecoveryRecordBackRouterData = RouterData<
-    RecoveryRecordBack,
-    RevenueRecoveryRecordBackRequest,
-    RevenueRecoveryRecordBackResponse,
->;
+pub type InvoiceRecordBackRouterData =
+    RouterData<InvoiceRecordBack, InvoiceRecordBackRequest, InvoiceRecordBackResponse>;
 
 pub type UasAuthenticationRouterData =
     RouterData<Authenticate, UasAuthenticationRequestData, UasAuthenticationResponseData>;
@@ -149,11 +146,11 @@ pub type BillingConnectorPaymentsSyncRouterDataV2 = RouterDataV2<
     BillingConnectorPaymentsSyncResponse,
 >;
 
-pub type RevenueRecoveryRecordBackRouterDataV2 = RouterDataV2<
-    RecoveryRecordBack,
-    router_data_v2::flow_common_types::RevenueRecoveryRecordBackData,
-    RevenueRecoveryRecordBackRequest,
-    RevenueRecoveryRecordBackResponse,
+pub type InvoiceRecordBackRouterDataV2 = RouterDataV2<
+    InvoiceRecordBack,
+    router_data_v2::flow_common_types::InvoiceRecordBackData,
+    InvoiceRecordBackRequest,
+    InvoiceRecordBackResponse,
 >;
 
 pub type VaultRouterData<F> = RouterData<F, VaultRequestData, VaultResponseData>;
diff --git a/crates/hyperswitch_interfaces/src/api/revenue_recovery.rs b/crates/hyperswitch_interfaces/src/api/revenue_recovery.rs
index 053d3cdde35..998c1888e64 100644
--- a/crates/hyperswitch_interfaces/src/api/revenue_recovery.rs
+++ b/crates/hyperswitch_interfaces/src/api/revenue_recovery.rs
@@ -2,15 +2,15 @@
 
 use hyperswitch_domain_models::{
     router_flow_types::{
-        BillingConnectorInvoiceSync, BillingConnectorPaymentsSync, RecoveryRecordBack,
+        BillingConnectorInvoiceSync, BillingConnectorPaymentsSync, InvoiceRecordBack,
     },
     router_request_types::revenue_recovery::{
         BillingConnectorInvoiceSyncRequest, BillingConnectorPaymentsSyncRequest,
-        RevenueRecoveryRecordBackRequest,
+        InvoiceRecordBackRequest,
     },
     router_response_types::revenue_recovery::{
         BillingConnectorInvoiceSyncResponse, BillingConnectorPaymentsSyncResponse,
-        RevenueRecoveryRecordBackResponse,
+        InvoiceRecordBackResponse,
     },
 };
 
@@ -40,11 +40,7 @@ pub trait BillingConnectorPaymentsSyncIntegration:
 
 /// trait RevenueRecoveryRecordBack
 pub trait RevenueRecoveryRecordBack:
-    ConnectorIntegration<
-    RecoveryRecordBack,
-    RevenueRecoveryRecordBackRequest,
-    RevenueRecoveryRecordBackResponse,
->
+    ConnectorIntegration<InvoiceRecordBack, InvoiceRecordBackRequest, InvoiceRecordBackResponse>
 {
 }
 
diff --git a/crates/hyperswitch_interfaces/src/api/revenue_recovery_v2.rs b/crates/hyperswitch_interfaces/src/api/revenue_recovery_v2.rs
index 11a854c6dec..08efb664f9b 100644
--- a/crates/hyperswitch_interfaces/src/api/revenue_recovery_v2.rs
+++ b/crates/hyperswitch_interfaces/src/api/revenue_recovery_v2.rs
@@ -3,18 +3,18 @@
 use hyperswitch_domain_models::{
     router_data_v2::flow_common_types::{
         BillingConnectorInvoiceSyncFlowData, BillingConnectorPaymentsSyncFlowData,
-        RevenueRecoveryRecordBackData,
+        InvoiceRecordBackData,
     },
     router_flow_types::{
-        BillingConnectorInvoiceSync, BillingConnectorPaymentsSync, RecoveryRecordBack,
+        BillingConnectorInvoiceSync, BillingConnectorPaymentsSync, InvoiceRecordBack,
     },
     router_request_types::revenue_recovery::{
         BillingConnectorInvoiceSyncRequest, BillingConnectorPaymentsSyncRequest,
-        RevenueRecoveryRecordBackRequest,
+        InvoiceRecordBackRequest,
     },
     router_response_types::revenue_recovery::{
         BillingConnectorInvoiceSyncResponse, BillingConnectorPaymentsSyncResponse,
-        RevenueRecoveryRecordBackResponse,
+        InvoiceRecordBackResponse,
     },
 };
 
@@ -47,10 +47,10 @@ pub trait BillingConnectorPaymentsSyncIntegrationV2:
 /// trait RevenueRecoveryRecordBackV2
 pub trait RevenueRecoveryRecordBackV2:
     ConnectorIntegrationV2<
-    RecoveryRecordBack,
-    RevenueRecoveryRecordBackData,
-    RevenueRecoveryRecordBackRequest,
-    RevenueRecoveryRecordBackResponse,
+    InvoiceRecordBack,
+    InvoiceRecordBackData,
+    InvoiceRecordBackRequest,
+    InvoiceRecordBackResponse,
 >
 {
 }
diff --git a/crates/hyperswitch_interfaces/src/conversion_impls.rs b/crates/hyperswitch_interfaces/src/conversion_impls.rs
index 23fb9e76bcd..d0612172561 100644
--- a/crates/hyperswitch_interfaces/src/conversion_impls.rs
+++ b/crates/hyperswitch_interfaces/src/conversion_impls.rs
@@ -11,9 +11,9 @@ use hyperswitch_domain_models::{
         flow_common_types::{
             AccessTokenFlowData, AuthenticationTokenFlowData, BillingConnectorInvoiceSyncFlowData,
             BillingConnectorPaymentsSyncFlowData, DisputesFlowData, ExternalAuthenticationFlowData,
-            ExternalVaultProxyFlowData, FilesFlowData, MandateRevokeFlowData, PaymentFlowData,
-            RefundFlowData, RevenueRecoveryRecordBackData, UasFlowData, VaultConnectorFlowData,
-            WebhookSourceVerifyData,
+            ExternalVaultProxyFlowData, FilesFlowData, InvoiceRecordBackData,
+            MandateRevokeFlowData, PaymentFlowData, RefundFlowData, UasFlowData,
+            VaultConnectorFlowData, WebhookSourceVerifyData,
         },
         RouterDataV2,
     },
@@ -759,9 +759,7 @@ impl<T, Req: Clone, Resp: Clone> RouterDataConversion<T, Req, Resp>
     }
 }
 
-impl<T, Req: Clone, Resp: Clone> RouterDataConversion<T, Req, Resp>
-    for RevenueRecoveryRecordBackData
-{
+impl<T, Req: Clone, Resp: Clone> RouterDataConversion<T, Req, Resp> for InvoiceRecordBackData {
     fn from_old_router_data(
         old_router_data: &RouterData<T, Req, Resp>,
     ) -> CustomResult<RouterDataV2<T, Self, Req, Resp>, ConnectorError>
diff --git a/crates/hyperswitch_interfaces/src/types.rs b/crates/hyperswitch_interfaces/src/types.rs
index eed89fe00ba..acb3dcfaa28 100644
--- a/crates/hyperswitch_interfaces/src/types.rs
+++ b/crates/hyperswitch_interfaces/src/types.rs
@@ -15,7 +15,7 @@ use hyperswitch_domain_models::{
             SdkSessionUpdate, Session, SetupMandate, UpdateMetadata, Void,
         },
         refunds::{Execute, RSync},
-        revenue_recovery::{BillingConnectorPaymentsSync, RecoveryRecordBack},
+        revenue_recovery::{BillingConnectorPaymentsSync, InvoiceRecordBack},
         unified_authentication_service::{
             Authenticate, AuthenticationConfirmation, PostAuthenticate, PreAuthenticate,
         },
@@ -29,7 +29,7 @@ use hyperswitch_domain_models::{
     router_request_types::{
         revenue_recovery::{
             BillingConnectorInvoiceSyncRequest, BillingConnectorPaymentsSyncRequest,
-            RevenueRecoveryRecordBackRequest,
+            InvoiceRecordBackRequest,
         },
         unified_authentication_service::{
             UasAuthenticationRequestData, UasAuthenticationResponseData,
@@ -51,7 +51,7 @@ use hyperswitch_domain_models::{
     router_response_types::{
         revenue_recovery::{
             BillingConnectorInvoiceSyncResponse, BillingConnectorPaymentsSyncResponse,
-            RevenueRecoveryRecordBackResponse,
+            InvoiceRecordBackResponse,
         },
         AcceptDisputeResponse, DefendDisputeResponse, DisputeSyncResponse, FetchDisputesResponse,
         MandateRevokeResponseData, PaymentsResponseData, RefundsResponseData, RetrieveFileResponse,
@@ -264,11 +264,11 @@ pub type UasAuthenticationType = dyn ConnectorIntegration<
     UasAuthenticationResponseData,
 >;
 
-/// Type alias for `ConnectorIntegration<RecoveryRecordBack, RevenueRecoveryRecordBackRequest, RevenueRecoveryRecordBackResponse>`
-pub type RevenueRecoveryRecordBackType = dyn ConnectorIntegration<
-    RecoveryRecordBack,
-    RevenueRecoveryRecordBackRequest,
-    RevenueRecoveryRecordBackResponse,
+/// Type alias for `ConnectorIntegration<InvoiceRecordBack, InvoiceRecordBackRequest, InvoiceRecordBackResponse>`
+pub type InvoiceRecordBackType = dyn ConnectorIntegration<
+    InvoiceRecordBack,
+    InvoiceRecordBackRequest,
+    InvoiceRecordBackResponse,
 >;
 
 /// Type alias for `ConnectorIntegration<BillingConnectorPaymentsSync, BillingConnectorPaymentsSyncRequest, BillingConnectorPaymentsSyncResponse>`
@@ -285,12 +285,12 @@ pub type BillingConnectorInvoiceSyncType = dyn ConnectorIntegration<
     BillingConnectorInvoiceSyncResponse,
 >;
 
-/// Type alias for `ConnectorIntegrationV2<RecoveryRecordBack, RevenueRecoveryRecordBackData, RevenueRecoveryRecordBackRequest, RevenueRecoveryRecordBackResponse>`
-pub type RevenueRecoveryRecordBackTypeV2 = dyn ConnectorIntegrationV2<
-    RecoveryRecordBack,
-    flow_common_types::RevenueRecoveryRecordBackData,
-    RevenueRecoveryRecordBackRequest,
-    RevenueRecoveryRecordBackResponse,
+/// Type alias for `ConnectorIntegrationV2<InvoiceRecordBack, InvoiceRecordBackData, InvoiceRecordBackRequest, InvoiceRecordBackResponse>`
+pub type InvoiceRecordBackTypeV2 = dyn ConnectorIntegrationV2<
+    InvoiceRecordBack,
+    flow_common_types::InvoiceRecordBackData,
+    InvoiceRecordBackRequest,
+    InvoiceRecordBackResponse,
 >;
 
 /// Type alias for `ConnectorIntegrationV2<BillingConnectorPaymentsSync, BillingConnectorPaymentsSyncRequest, BillingConnectorPaymentsSyncResponse>`
diff --git a/crates/router/src/core/payments/flows.rs b/crates/router/src/core/payments/flows.rs
index d9e3e9ee34b..4f63e0005cc 100644
--- a/crates/router/src/core/payments/flows.rs
+++ b/crates/router/src/core/payments/flows.rs
@@ -19,7 +19,7 @@ use async_trait::async_trait;
 use common_types::payments::CustomerAcceptance;
 #[cfg(all(feature = "v2", feature = "revenue_recovery"))]
 use hyperswitch_domain_models::router_flow_types::{
-    BillingConnectorInvoiceSync, BillingConnectorPaymentsSync, RecoveryRecordBack,
+    BillingConnectorInvoiceSync, BillingConnectorPaymentsSync, InvoiceRecordBack,
 };
 use hyperswitch_domain_models::router_request_types::PaymentsCaptureData;
 
diff --git a/crates/router/src/core/revenue_recovery/types.rs b/crates/router/src/core/revenue_recovery/types.rs
index d2667cc63b0..f63259b0c85 100644
--- a/crates/router/src/core/revenue_recovery/types.rs
+++ b/crates/router/src/core/revenue_recovery/types.rs
@@ -1361,12 +1361,12 @@ async fn record_back_to_billing_connector(
     .attach_printable("invalid connector name received in billing merchant connector account")?;
 
     let connector_integration: services::BoxedRevenueRecoveryRecordBackInterface<
-        router_flow_types::RecoveryRecordBack,
-        revenue_recovery_request::RevenueRecoveryRecordBackRequest,
-        revenue_recovery_response::RevenueRecoveryRecordBackResponse,
+        router_flow_types::InvoiceRecordBack,
+        revenue_recovery_request::InvoiceRecordBackRequest,
+        revenue_recovery_response::InvoiceRecordBackResponse,
     > = connector_data.connector.get_connector_integration();
 
-    let router_data = construct_recovery_record_back_router_data(
+    let router_data = construct_invoice_record_back_router_data(
         state,
         billing_mca,
         payment_attempt,
@@ -1396,13 +1396,13 @@ async fn record_back_to_billing_connector(
     Ok(())
 }
 
-pub fn construct_recovery_record_back_router_data(
+pub fn construct_invoice_record_back_router_data(
     state: &SessionState,
     billing_mca: &merchant_connector_account::MerchantConnectorAccount,
     payment_attempt: &PaymentAttempt,
     payment_intent: &PaymentIntent,
-) -> RecoveryResult<hyperswitch_domain_models::types::RevenueRecoveryRecordBackRouterData> {
-    logger::info!("Entering construct_recovery_record_back_router_data");
+) -> RecoveryResult<hyperswitch_domain_models::types::InvoiceRecordBackRouterData> {
+    logger::info!("Entering construct_invoice_record_back_router_data");
 
     let auth_type: types::ConnectorAuthType =
         helpers::MerchantConnectorAccountType::DbVal(Box::new(billing_mca.clone()))
@@ -1433,11 +1433,11 @@ pub fn construct_recovery_record_back_router_data(
         ))?;
 
     let router_data = router_data_v2::RouterDataV2 {
-        flow: PhantomData::<router_flow_types::RecoveryRecordBack>,
+        flow: PhantomData::<router_flow_types::InvoiceRecordBack>,
         tenant_id: state.tenant.tenant_id.clone(),
-        resource_common_data: flow_common_types::RevenueRecoveryRecordBackData,
+        resource_common_data: flow_common_types::InvoiceRecordBackData,
         connector_auth_type: auth_type,
-        request: revenue_recovery_request::RevenueRecoveryRecordBackRequest {
+        request: revenue_recovery_request::InvoiceRecordBackRequest {
             merchant_reference_id,
             amount: payment_attempt.get_total_amount(),
             currency: payment_intent.amount_details.currency,
@@ -1451,10 +1451,9 @@ pub fn construct_recovery_record_back_router_data(
         },
         response: Err(types::ErrorResponse::default()),
     };
-    let old_router_data =
-        flow_common_types::RevenueRecoveryRecordBackData::to_old_router_data(router_data)
-            .change_context(errors::RecoveryError::RecordBackToBillingConnectorFailed)
-            .attach_printable("Cannot construct record back router data")?;
+    let old_router_data = flow_common_types::InvoiceRecordBackData::to_old_router_data(router_data)
+        .change_context(errors::RecoveryError::RecordBackToBillingConnectorFailed)
+        .attach_printable("Cannot construct record back router data")?;
     Ok(old_router_data)
 }
 
diff --git a/crates/router/src/services/api.rs b/crates/router/src/services/api.rs
index fa8e840fdea..7d59a1cad30 100644
--- a/crates/router/src/services/api.rs
+++ b/crates/router/src/services/api.rs
@@ -105,7 +105,7 @@ pub type BoxedAccessTokenConnectorIntegrationInterface<T, Req, Resp> =
 pub type BoxedFilesConnectorIntegrationInterface<T, Req, Resp> =
     BoxedConnectorIntegrationInterface<T, common_types::FilesFlowData, Req, Resp>;
 pub type BoxedRevenueRecoveryRecordBackInterface<T, Req, Res> =
-    BoxedConnectorIntegrationInterface<T, common_types::RevenueRecoveryRecordBackData, Req, Res>;
+    BoxedConnectorIntegrationInterface<T, common_types::InvoiceRecordBackData, Req, Res>;
 pub type BoxedBillingConnectorInvoiceSyncIntegrationInterface<T, Req, Res> =
     BoxedConnectorIntegrationInterface<
         T,
diff --git a/crates/router/src/types.rs b/crates/router/src/types.rs
index 525c25f7369..a4f024eb81c 100644
--- a/crates/router/src/types.rs
+++ b/crates/router/src/types.rs
@@ -61,7 +61,7 @@ pub use hyperswitch_domain_models::{
     router_request_types::{
         revenue_recovery::{
             BillingConnectorInvoiceSyncRequest, BillingConnectorPaymentsSyncRequest,
-            RevenueRecoveryRecordBackRequest,
+            InvoiceRecordBackRequest,
         },
         unified_authentication_service::{
             UasAuthenticationRequestData, UasAuthenticationResponseData,
@@ -87,7 +87,7 @@ pub use hyperswitch_domain_models::{
     router_response_types::{
         revenue_recovery::{
             BillingConnectorInvoiceSyncResponse, BillingConnectorPaymentsSyncResponse,
-            RevenueRecoveryRecordBackResponse,
+            InvoiceRecordBackResponse,
         },
         AcceptDisputeResponse, CaptureSyncResponse, DefendDisputeResponse, DisputeSyncResponse,
         FetchDisputesResponse, MandateReference, MandateRevokeResponseData, PaymentsResponseData,


## 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 -->
Make the RevenueRecoveryRecordBack functionality generic to make it usable by subscription after making a successful payment.
This pull request refactors the "record back" functionality in the revenue recovery flow by renaming types and data structures from RevenueRecoveryRecordBack* and RecoveryRecordBack to InvoiceRecordBack* and InvoiceRecordBack. This change is applied consistently across domain models, connector implementations, interfaces, and transformers, improving clarity and aligning naming with their purpose (handling invoice record backs).

### 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)?
-->
Only removing the feature flag and renamed it. compilation and PR checks should be sufficient

## 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
