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

feat(core): Adds Billing Connector Invoice Sync flow in Revenue Recovery (#7799)

CHALLA NISHANTH BABU3d0dd5bd1a8d
diff --git a/crates/hyperswitch_connectors/src/default_implementations.rs b/crates/hyperswitch_connectors/src/default_implementations.rs
index 53be711aa6..1dc8dcc28a 100644
--- a/crates/hyperswitch_connectors/src/default_implementations.rs
+++ b/crates/hyperswitch_connectors/src/default_implementations.rs
@@ -4520,3 +4520,109 @@ default_imp_for_revenue_recovery_record_back!(
connectors::Zen,
connectors::Zsl
);
+
+#[cfg(all(feature = "v2", feature = "revenue_recovery"))]
+macro_rules! default_imp_for_billing_connector_invoice_sync {
+ ($($path:ident::$connector:ident),*) => {
+ $( impl recovery_traits::BillingConnectorInvoiceSyncIntegration for $path::$connector {}
+ impl
+ ConnectorIntegration<
+ recovery_router_flows::BillingConnectorInvoiceSync,
+ recovery_request::BillingConnectorInvoiceSyncRequest,
+ recovery_response::BillingConnectorInvoiceSyncResponse
+ > for $path::$connector
+ {}
+ )*
+ };
+}
+
+#[cfg(all(feature = "v2", feature = "revenue_recovery"))]
+default_imp_for_billing_connector_invoice_sync!(
+ connectors::Aci,
+ connectors::Adyen,
+ connectors::Airwallex,
+ connectors::Amazonpay,
+ connectors::Authorizedotnet,
+ connectors::Bambora,
+ connectors::Bamboraapac,
+ connectors::Bankofamerica,
+ connectors::Billwerk,
+ connectors::Bluesnap,
+ connectors::Bitpay,
+ connectors::Braintree,
+ connectors::Boku,
+ connectors::Cashtocode,
+ connectors::Chargebee,
+ connectors::Checkout,
+ connectors::Coinbase,
+ connectors::Coingate,
+ connectors::Cryptopay,
+ connectors::CtpMastercard,
+ connectors::Cybersource,
+ connectors::Datatrans,
+ connectors::Deutschebank,
+ connectors::Digitalvirgo,
+ connectors::Dlocal,
+ connectors::Elavon,
+ connectors::Facilitapay,
+ connectors::Fiserv,
+ connectors::Fiservemea,
+ connectors::Fiuu,
+ connectors::Forte,
+ connectors::Getnet,
+ connectors::Globalpay,
+ connectors::Globepay,
+ connectors::Gocardless,
+ connectors::Helcim,
+ connectors::Hipay,
+ connectors::Iatapay,
+ connectors::Inespay,
+ connectors::Itaubank,
+ connectors::Juspaythreedsserver,
+ connectors::Jpmorgan,
+ connectors::Klarna,
+ connectors::Nomupay,
+ connectors::Nmi,
+ connectors::Noon,
+ connectors::Novalnet,
+ connectors::Nexinets,
+ connectors::Nexixpay,
+ connectors::Nuvei,
+ connectors::Opayo,
+ connectors::Opennode,
+ connectors::Payeezy,
+ connectors::Paystack,
+ connectors::Payu,
+ connectors::Paypal,
+ connectors::Powertranz,
+ connectors::Prophetpay,
+ connectors::Mifinity,
+ connectors::Mollie,
+ connectors::Moneris,
+ connectors::Multisafepay,
+ connectors::Paybox,
+ connectors::Payme,
+ connectors::Payone,
+ connectors::Placetopay,
+ connectors::Rapyd,
+ connectors::Razorpay,
+ connectors::Recurly,
+ connectors::Redsys,
+ connectors::Riskified,
+ connectors::Shift4,
+ connectors::Stax,
+ connectors::Square,
+ connectors::Stripebilling,
+ connectors::Taxjar,
+ connectors::Thunes,
+ connectors::Trustpay,
+ connectors::Tsys,
+ connectors::UnifiedAuthenticationService,
+ connectors::Worldline,
+ connectors::Worldpay,
+ connectors::Wellsfargo,
+ connectors::Volt,
+ connectors::Xendit,
+ connectors::Zen,
+ connectors::Zsl
+);
diff --git a/crates/hyperswitch_connectors/src/default_implementations_v2.rs b/crates/hyperswitch_connectors/src/default_implementations_v2.rs
index 0d8043f613..fb385f6ee3 100644
--- a/crates/hyperswitch_connectors/src/default_implementations_v2.rs
+++ b/crates/hyperswitch_connectors/src/default_implementations_v2.rs
@@ -2,9 +2,9 @@ use hyperswitch_domain_models::{
router_data::AccessToken,
router_data_v2::{
flow_common_types::{
- BillingConnectorPaymentsSyncFlowData, DisputesFlowData, MandateRevokeFlowData,
- PaymentFlowData, RefundFlowData, RevenueRecoveryRecordBackData,
- WebhookSourceVerifyData,
+ BillingConnectorInvoiceSyncFlowData, BillingConnectorPaymentsSyncFlowData,
+ DisputesFlowData, MandateRevokeFlowData, PaymentFlowData, RefundFlowData,
+ RevenueRecoveryRecordBackData, WebhookSourceVerifyData,
},
AccessTokenFlowData, ExternalAuthenticationFlowData, FilesFlowData,
},
@@ -22,13 +22,18 @@ use hyperswitch_domain_models::{
SetupMandate, UpdateMetadata, Void,
},
refunds::{Execute, RSync},
- revenue_recovery::{BillingConnectorPaymentsSync, RecoveryRecordBack},
+ revenue_recovery::{
+ BillingConnectorInvoiceSync, BillingConnectorPaymentsSync, RecoveryRecordBack,
+ },
webhooks::VerifyWebhookSource,
AccessTokenAuth,
},
router_request_types::{
authentication,
- revenue_recovery::{BillingConnectorPaymentsSyncRequest, RevenueRecoveryRecordBackRequest},
+ revenue_recovery::{
+ BillingConnectorInvoiceSyncRequest, BillingConnectorPaymentsSyncRequest,
+ RevenueRecoveryRecordBackRequest,
+ },
AcceptDisputeRequestData, AccessTokenRequestData, AuthorizeSessionTokenData,
CompleteAuthorizeData, ConnectorCustomerData, DefendDisputeRequestData,
MandateRevokeRequestData, PaymentMethodTokenizationData, PaymentsApproveData,
@@ -42,7 +47,8 @@ use hyperswitch_domain_models::{
},
router_response_types::{
revenue_recovery::{
- BillingConnectorPaymentsSyncResponse, RevenueRecoveryRecordBackResponse,
+ BillingConnectorInvoiceSyncResponse, BillingConnectorPaymentsSyncResponse,
+ RevenueRecoveryRecordBackResponse,
},
AcceptDisputeResponse, AuthenticationResponseData, DefendDisputeResponse,
MandateRevokeResponseData, PaymentsResponseData, RefundsResponseData, RetrieveFileResponse,
@@ -98,8 +104,8 @@ use hyperswitch_interfaces::{
},
refunds_v2::{RefundExecuteV2, RefundSyncV2, RefundV2},
revenue_recovery_v2::{
- BillingConnectorPaymentsSyncIntegrationV2, RevenueRecoveryRecordBackV2,
- RevenueRecoveryV2,
+ BillingConnectorInvoiceSyncIntegrationV2, BillingConnectorPaymentsSyncIntegrationV2,
+ RevenueRecoveryRecordBackV2, RevenueRecoveryV2,
},
ConnectorAccessTokenV2, ConnectorMandateRevokeV2, ConnectorVerifyWebhookSourceV2,
},
@@ -2757,13 +2763,14 @@ macro_rules! default_imp_for_new_connector_integration_revenue_recovery {
$( impl RevenueRecoveryV2 for $path::$connector {}
impl BillingConnectorPaymentsSyncIntegrationV2 for $path::$connector {}
impl RevenueRecoveryRecordBackV2 for $path::$connector {}
+ impl BillingConnectorInvoiceSyncIntegrationV2 for $path::$connector {}
impl
ConnectorIntegrationV2<
- RecoveryRecordBack,
- RevenueRecoveryRecordBackData,
- RevenueRecoveryRecordBackRequest,
- RevenueRecoveryRecordBackResponse,
- > for $path::$connector
+ RecoveryRecordBack,
+ RevenueRecoveryRecordBackData,
+ RevenueRecoveryRecordBackRequest,
+ RevenueRecoveryRecordBackResponse,
+ > for $path::$connector
{}
impl
ConnectorIntegrationV2<
@@ -2773,6 +2780,14 @@ macro_rules! default_imp_for_new_connector_integration_revenue_recovery {
BillingConnectorPaymentsSyncResponse,
> for $path::$connector
{}
+ impl
+ ConnectorIntegrationV2<
+ BillingConnectorInvoiceSync,
+ BillingConnectorInvoiceSyncFlowData,
+ BillingConnectorInvoiceSyncRequest,
+ BillingConnectorInvoiceSyncResponse,
+ > for $path::$connector
+ {}
)*
};
}
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 2e689d7844..1d0ca43529 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
@@ -155,3 +155,6 @@ pub struct UasFlowData {
#[derive(Debug, Clone)]
pub struct BillingConnectorPaymentsSyncFlowData;
+
+#[derive(Debug, Clone)]
+pub struct BillingConnectorInvoiceSyncFlowData;
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 56d240614f..ec784f7d46 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
@@ -2,3 +2,6 @@
pub struct BillingConnectorPaymentsSync;
#[derive(Debug, Clone)]
pub struct RecoveryRecordBack;
+
+#[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 a39d27f14f..4d5df3b6fb 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
@@ -15,3 +15,8 @@ pub struct RevenueRecoveryRecordBackRequest {
pub attempt_status: common_enums::AttemptStatus,
pub connector_transaction_id: Option<common_utils::types::ConnectorTransactionId>,
}
+
+#[derive(Debug, Clone)]
+pub struct BillingConnectorInvoiceSyncRequest {
+ pub billing_connector_invoice_id: String,
+}
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 5f79ff7001..6877befa5d 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
@@ -34,3 +34,20 @@ pub struct BillingConnectorPaymentsSyncResponse {
pub struct RevenueRecoveryRecordBackResponse {
pub merchant_reference_id: common_utils::id_type::PaymentReferenceId,
}
+
+pub struct BillingConnectorInvoiceSyncResponse {
+ /// transaction amount against invoice, accepted in minor unit.
+ pub amount: MinorUnit,
+ /// currency of the transaction
+ pub currency: common_enums::enums::Currency,
+ /// merchant reference id at billing connector. ex: invoice_id
+ pub merchant_reference_id: common_utils::id_type::PaymentReferenceId,
+ /// No of attempts made against an invoice
+ pub retry_count: Option<u16>,
+ /// Billing Address of the customer for Invoice
+ pub billing_address: Option<api_models::payments::Address>,
+ /// creation time of the invoice
+ pub created_at: Option<PrimitiveDateTime>,
+ /// Ending time of Invoice
+ pub ends_at: Option<PrimitiveDateTime>,
+}
diff --git a/crates/hyperswitch_domain_models/src/types.rs b/crates/hyperswitch_domain_models/src/types.rs
index 8b7ae7f750..234a1343c8 100644
--- a/crates/hyperswitch_domain_models/src/types.rs
+++ b/crates/hyperswitch_domain_models/src/types.rs
@@ -5,13 +5,16 @@ use crate::{
router_flow_types::{
mandate_revoke::MandateRevoke, revenue_recovery::RecoveryRecordBack, AccessTokenAuth,
Authenticate, AuthenticationConfirmation, Authorize, AuthorizeSessionToken,
- BillingConnectorPaymentsSync, CalculateTax, Capture, CompleteAuthorize,
- CreateConnectorCustomer, Execute, IncrementalAuthorization, PSync, PaymentMethodToken,
- PostAuthenticate, PostSessionTokens, PreAuthenticate, PreProcessing, RSync,
- SdkSessionUpdate, Session, SetupMandate, UpdateMetadata, VerifyWebhookSource, Void,
+ BillingConnectorInvoiceSync, BillingConnectorPaymentsSync, CalculateTax, Capture,
+ CompleteAuthorize, CreateConnectorCustomer, Execute, IncrementalAuthorization, PSync,
+ PaymentMethodToken, PostAuthenticate, PostSessionTokens, PreAuthenticate, PreProcessing,
+ RSync, SdkSessionUpdate, Session, SetupMandate, UpdateMetadata, VerifyWebhookSource, Void,
},
router_request_types::{
- revenue_recovery::{BillingConnectorPaymentsSyncRequest, RevenueRecoveryRecordBackRequest},
+ revenue_recovery::{
+ BillingConnectorInvoiceSyncRequest, BillingConnectorPaymentsSyncRequest,
+ RevenueRecoveryRecordBackRequest,
+ },
unified_authentication_service::{
UasAuthenticationRequestData, UasAuthenticationResponseData,
UasConfirmationRequestData, UasPostAuthenticationRequestData,
@@ -27,7 +30,8 @@ use crate::{
},
router_response_types::{
revenue_recovery::{
- BillingConnectorPaymentsSyncResponse, RevenueRecoveryRecordBackResponse,
+ BillingConnectorInvoiceSyncResponse, BillingConnectorPaymentsSyncResponse,
+ RevenueRecoveryRecordBackResponse,
},
MandateRevokeResponseData, PaymentsResponseData, RefundsResponseData,
TaxCalculationResponseData, VerifyWebhookSourceResponseData,
@@ -109,3 +113,9 @@ pub type BillingConnectorPaymentsSyncRouterData = RouterData<
BillingConnectorPaymentsSyncRequest,
BillingConnectorPaymentsSyncResponse,
>;
+
+pub type BillingConnectorInvoiceSyncRouterData = RouterData<
+ BillingConnectorInvoiceSync,
+ BillingConnectorInvoiceSyncRequest,
+ BillingConnectorInvoiceSyncResponse,
+>;
diff --git a/crates/hyperswitch_interfaces/src/api/revenue_recovery.rs b/crates/hyperswitch_interfaces/src/api/revenue_recovery.rs
index 6bf882159a..053d3cdde3 100644
--- a/crates/hyperswitch_interfaces/src/api/revenue_recovery.rs
+++ b/crates/hyperswitch_interfaces/src/api/revenue_recovery.rs
@@ -1,12 +1,16 @@
//! Revenue Recovery Interface
use hyperswitch_domain_models::{
- router_flow_types::{BillingConnectorPaymentsSync, RecoveryRecordBack},
+ router_flow_types::{
+ BillingConnectorInvoiceSync, BillingConnectorPaymentsSync, RecoveryRecordBack,
+ },
router_request_types::revenue_recovery::{
- BillingConnectorPaymentsSyncRequest, RevenueRecoveryRecordBackRequest,
+ BillingConnectorInvoiceSyncRequest, BillingConnectorPaymentsSyncRequest,
+ RevenueRecoveryRecordBackRequest,
},
router_response_types::revenue_recovery::{
- BillingConnectorPaymentsSyncResponse, RevenueRecoveryRecordBackResponse,
+ BillingConnectorInvoiceSyncResponse, BillingConnectorPaymentsSyncResponse,
+ RevenueRecoveryRecordBackResponse,
},
};
@@ -17,7 +21,10 @@ use super::ConnectorIntegration;
/// trait RevenueRecovery
#[cfg(all(feature = "v2", feature = "revenue_recovery"))]
pub trait RevenueRecovery:
- ConnectorCommon + BillingConnectorPaymentsSyncIntegration + RevenueRecoveryRecordBack
+ ConnectorCommon
+ + BillingConnectorPaymentsSyncIntegration
+ + RevenueRecoveryRecordBack
+ + BillingConnectorInvoiceSyncIntegration
{
}
@@ -41,6 +48,16 @@ pub trait RevenueRecoveryRecordBack:
{
}
+/// trait BillingConnectorInvoiceSyncIntegration
+pub trait BillingConnectorInvoiceSyncIntegration:
+ ConnectorIntegration<
+ BillingConnectorInvoiceSync,
+ BillingConnectorInvoiceSyncRequest,
+ BillingConnectorInvoiceSyncResponse,
+>
+{
+}
+
#[cfg(not(all(feature = "v2", feature = "revenue_recovery")))]
/// trait RevenueRecovery
pub trait RevenueRecovery {}
diff --git a/crates/hyperswitch_interfaces/src/api/revenue_recovery_v2.rs b/crates/hyperswitch_interfaces/src/api/revenue_recovery_v2.rs
index 1fca496ea7..b63021b8bf 100644
--- a/crates/hyperswitch_interfaces/src/api/revenue_recovery_v2.rs
+++ b/crates/hyperswitch_interfaces/src/api/revenue_recovery_v2.rs
@@ -2,14 +2,19 @@
use hyperswitch_domain_models::{
router_data_v2::flow_common_types::{
- BillingConnectorPaymentsSyncFlowData, RevenueRecoveryRecordBackData,
+ BillingConnectorInvoiceSyncFlowData, BillingConnectorPaymentsSyncFlowData,
+ RevenueRecoveryRecordBackData,
+ },
+ router_flow_types::{
+ BillingConnectorInvoiceSync, BillingConnectorPaymentsSync, RecoveryRecordBack,
},
- router_flow_types::{BillingConnectorPaymentsSync, RecoveryRecordBack},
router_request_types::revenue_recovery::{
- BillingConnectorPaymentsSyncRequest, RevenueRecoveryRecordBackRequest,
+ BillingConnectorInvoiceSyncRequest, BillingConnectorPaymentsSyncRequest,
+ RevenueRecoveryRecordBackRequest,
},
router_response_types::revenue_recovery::{
- BillingConnectorPaymentsSyncResponse, RevenueRecoveryRecordBackResponse,
+ BillingConnectorInvoiceSyncResponse, BillingConnectorPaymentsSyncResponse,
+ RevenueRecoveryRecordBackResponse,
},
};
@@ -17,7 +22,9 @@ use crate::connector_integration_v2::ConnectorIntegrationV2;
/// trait RevenueRecoveryV2
pub trait RevenueRecoveryV2:
- BillingConnectorPaymentsSyncIntegrationV2 + RevenueRecoveryRecordBackV2
+ BillingConnectorPaymentsSyncIntegrationV2
+ + RevenueRecoveryRecordBackV2
+ + BillingConnectorInvoiceSyncIntegrationV2
{
}
@@ -42,3 +49,14 @@ pub trait RevenueRecoveryRecordBackV2:
>
{
}
+
+/// trait BillingConnectorInvoiceSyncIntegrationV2
+pub trait BillingConnectorInvoiceSyncIntegrationV2:
+ ConnectorIntegrationV2<
+ BillingConnectorInvoiceSync,
+ BillingConnectorInvoiceSyncFlowData,
+ BillingConnectorInvoiceSyncRequest,
+ BillingConnectorInvoiceSyncResponse,
+>
+{
+}
diff --git a/crates/hyperswitch_interfaces/src/types.rs b/crates/hyperswitch_interfaces/src/types.rs
index b85ce4732a..b30ed8491a 100644
--- a/crates/hyperswitch_interfaces/src/types.rs
+++ b/crates/hyperswitch_interfaces/src/types.rs
@@ -19,9 +19,13 @@ use hyperswitch_domain_models::{
Authenticate, AuthenticationConfirmation, PostAuthenticate, PreAuthenticate,
},
webhooks::VerifyWebhookSource,
+ BillingConnectorInvoiceSync,
},
router_request_types::{
- revenue_recovery::{BillingConnectorPaymentsSyncRequest, RevenueRecoveryRecordBackRequest},
+ revenue_recovery::{
+ BillingConnectorInvoiceSyncRequest, BillingConnectorPaymentsSyncRequest,
+ RevenueRecoveryRecordBackRequest,
+ },
unified_authentication_service::{
UasAuthenticationRequestData, UasAuthenticationResponseData,
UasConfirmationRequestData, UasPostAuthenticationRequestData,
@@ -39,7 +43,8 @@ use hyperswitch_domain_models::{
},
router_response_types::{
revenue_recovery::{
- BillingConnectorPaymentsSyncResponse, RevenueRecoveryRecordBackResponse,
+ BillingConnectorInvoiceSyncResponse, BillingConnectorPaymentsSyncResponse,
+ RevenueRecoveryRecordBackResponse,
},
AcceptDisputeResponse, DefendDisputeResponse, MandateRevokeResponseData,
PaymentsResponseData, RefundsResponseData, RetrieveFileResponse, SubmitEvidenceResponse,
@@ -245,3 +250,10 @@ pub type BillingConnectorPaymentsSyncType = dyn ConnectorIntegration<
BillingConnectorPaymentsSyncRequest,
BillingConnectorPaymentsSyncResponse,
>;
+
+/// Type alias for `ConnectorIntegration<BillingConnectorInvoiceSync, BillingConnectorInvoiceSyncRequest, BillingConnectorInvoiceSyncResponse>`
+pub type BillingConnectorInvoiceSyncType = dyn ConnectorIntegration<
+ BillingConnectorInvoiceSync,
+ BillingConnectorInvoiceSyncRequest,
+ BillingConnectorInvoiceSyncResponse,
+>;
diff --git a/crates/router/src/core/payments/flows.rs b/crates/router/src/core/payments/flows.rs
index cd2740d280..0b6bd6429c 100644
--- a/crates/router/src/core/payments/flows.rs
+++ b/crates/router/src/core/payments/flows.rs
@@ -15,7 +15,7 @@ pub mod update_metadata_flow;
use async_trait::async_trait;
#[cfg(all(feature = "v2", feature = "revenue_recovery"))]
use hyperswitch_domain_models::router_flow_types::{
- BillingConnectorPaymentsSync, RecoveryRecordBack,
+ BillingConnectorInvoiceSync, BillingConnectorPaymentsSync, RecoveryRecordBack,
};
use hyperswitch_domain_models::{
mandates::CustomerAcceptance,
@@ -2018,3 +2018,45 @@ default_imp_for_revenue_recovery_record_back!(
connector::Wellsfargopayout,
connector::Wise
);
+
+#[cfg(all(feature = "v2", feature = "revenue_recovery"))]
+macro_rules! default_imp_for_billing_connector_invoice_sync {
+ ($($path:ident::$connector:ident),*) => {
+ $(
+ impl api::BillingConnectorInvoiceSyncIntegration for $path::$connector {}
+ impl
+ services::ConnectorIntegration<
+ BillingConnectorInvoiceSync,
+ types::BillingConnectorInvoiceSyncRequest,
+ types::BillingConnectorInvoiceSyncResponse,
+ > for $path::$connector
+ {}
+ )*
+ };
+}
+#[cfg(all(feature = "v2", feature = "revenue_recovery"))]
+#[cfg(feature = "dummy_connector")]
+impl<const T: u8> api::BillingConnectorInvoiceSyncIntegration for connector::DummyConnector<T> {}
+#[cfg(all(feature = "v2", feature = "revenue_recovery"))]
+#[cfg(feature = "dummy_connector")]
+impl<const T: u8>
+ services::ConnectorIntegration<
+ BillingConnectorInvoiceSync,
+ types::BillingConnectorInvoiceSyncRequest,
+ types::BillingConnectorInvoiceSyncResponse,
+ > for connector::DummyConnector<T>
+{
+}
+#[cfg(all(feature = "v2", feature = "revenue_recovery"))]
+default_imp_for_billing_connector_invoice_sync!(
+ connector::Adyenplatform,
+ connector::Ebanx,
+ connector::Gpayments,
+ connector::Netcetera,
+ connector::Plaid,
+ connector::Signifyd,
+ connector::Stripe,
+ connector::Threedsecureio,
+ connector::Wellsfargopayout,
+ connector::Wise
+);
diff --git a/crates/router/src/services/api.rs b/crates/router/src/services/api.rs
index ad0b6c4840..a919316026 100644
--- a/crates/router/src/services/api.rs
+++ b/crates/router/src/services/api.rs
@@ -106,6 +106,13 @@ 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>;
+pub type BoxedBillingConnectorInvoiceSyncIntegrationInterface<T, Req, Res> =
+ BoxedConnectorIntegrationInterface<
+ T,
+ common_types::BillingConnectorInvoiceSyncFlowData,
+ Req,
+ Res,
+ >;
pub type BoxedUnifiedAuthenticationServiceInterface<T, Req, Resp> =
BoxedConnectorIntegrationInterface<T, common_types::UasFlowData, Req, Resp>;
diff --git a/crates/router/src/types.rs b/crates/router/src/types.rs
index 057543d963..22a84c66d1 100644
--- a/crates/router/src/types.rs
+++ b/crates/router/src/types.rs
@@ -57,7 +57,10 @@ pub use hyperswitch_domain_models::{
WebhookSourceVerifyData,
},
router_request_types::{
- revenue_recovery::{BillingConnectorPaymentsSyncRequest, RevenueRecoveryRecordBackRequest},
+ revenue_recovery::{
+ BillingConnectorInvoiceSyncRequest, BillingConnectorPaymentsSyncRequest,
+ RevenueRecoveryRecordBackRequest,
+ },
unified_authentication_service::{
UasAuthenticationRequestData, UasAuthenticationResponseData,
UasConfirmationRequestData, UasPostAuthenticationRequestData,
@@ -79,7 +82,8 @@ pub use hyperswitch_domain_models::{
},
router_response_types::{
revenue_recovery::{
- BillingConnectorPaymentsSyncResponse, RevenueRecoveryRecordBackResponse,
+ BillingConnectorInvoiceSyncResponse, BillingConnectorPaymentsSyncResponse,
+ RevenueRecoveryRecordBackResponse,
},
AcceptDisputeResponse, CaptureSyncResponse, DefendDisputeResponse, MandateReference,
MandateRevokeResponseData, PaymentsResponseData, PreprocessingResponseId,
diff --git a/crates/router/src/types/api.rs b/crates/router/src/types/api.rs
index 56519b2647..6b74288014 100644
--- a/crates/router/src/types/api.rs
+++ b/crates/router/src/types/api.rs
@@ -57,7 +57,8 @@ pub use hyperswitch_interfaces::{
},
fraud_check::FraudCheck,
revenue_recovery::{
- BillingConnectorPaymentsSyncIntegration, RevenueRecovery, RevenueRecoveryRecordBack,
+ BillingConnectorInvoiceSyncIntegration, BillingConnectorPaymentsSyncIntegration,
+ RevenueRecovery, RevenueRecoveryRecordBack,
},
revenue_recovery_v2::RevenueRecoveryV2,
BoxedConnector, Connector, ConnectorAccessToken, ConnectorAccessTokenV2, ConnectorCommon,