Bug: Feat(connector): [Paybox] Implement Paybox Payment Flows



### Feature Description

Payone is payment connector
Documentation link: http://www1.paybox.com/wp-content/uploads/2017/08/ManuelIntegrationVerifone_PayboxDirect_V8.1_EN.pdf
Website url: [Paybox.com](http://paybox.com/)

### Have you spent some time to check if this feature request has been raised before?

- [X] I checked and didn't find similar issue

### Have you read the Contributing Guidelines?

- [X] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md)

### Are you willing to submit a PR?

Yes I am willing to submit a PR!
diff --git a/api-reference-v2/openapi_spec.json b/api-reference-v2/openapi_spec.json
index 8974f940bac..0498c52cd36 100644
--- a/api-reference-v2/openapi_spec.json
+++ b/api-reference-v2/openapi_spec.json
@@ -3577,6 +3577,7 @@
           "noon",
           "nuvei",
           "opennode",
+          "paybox",
           "payme",
           "payone",
           "paypal",
@@ -15493,6 +15494,7 @@
           "noon",
           "nuvei",
           "opennode",
+          "paybox",
           "payme",
           "payone",
           "paypal",
diff --git a/config/deployments/production.toml b/config/deployments/production.toml
index b27f3696e30..bac5ec206e6 100644
--- a/config/deployments/production.toml
+++ b/config/deployments/production.toml
@@ -70,7 +70,7 @@ noon.key_mode = "Live"
 nuvei.base_url = "https://ppp-test.nuvei.com/"
 opayo.base_url = "https://pi-live.sagepay.com/"
 opennode.base_url = "https://api.opennode.com"
-paybox.base_url = "https://preprod-ppps.paybox.com/PPPS.php"
+paybox.base_url = "https://ppps.paybox.com/PPPS.php"
 payeezy.base_url = "https://api.payeezy.com/"
 payme.base_url = "https://live.payme.io/"
 payone.base_url = "https://payment.payone.com/"
diff --git a/crates/api_models/src/enums.rs b/crates/api_models/src/enums.rs
index 06ac98f59d3..a7738133ca0 100644
--- a/crates/api_models/src/enums.rs
+++ b/crates/api_models/src/enums.rs
@@ -116,7 +116,7 @@ pub enum Connector {
     Nuvei,
     // Opayo, added as template code for future usage
     Opennode,
-    // Paybox, added as template code for future usage
+    Paybox,
     // Payeezy, As psync and rsync are not supported by this connector, it is added as template code for future usage
     Payme,
     Payone,
@@ -244,8 +244,8 @@ impl Connector {
             | Self::Nexinets
             | Self::Nuvei
             | Self::Opennode
-			// | Self::Paybox  added as template code for future usage
-            | Self::Payme
+			| Self::Paybox
+			| Self::Payme
             | Self::Payone
             | Self::Paypal
             | Self::Payu
diff --git a/crates/common_enums/src/enums.rs b/crates/common_enums/src/enums.rs
index 015bf2d6c68..f4807bd0b0a 100644
--- a/crates/common_enums/src/enums.rs
+++ b/crates/common_enums/src/enums.rs
@@ -229,7 +229,7 @@ pub enum RoutableConnectors {
     // Opayo, added as template code for future usage
     Opennode,
     // Payeezy, As psync and rsync are not supported by this connector, it is added as template code for future usage
-    // Paybox, added as template code for future usage
+    Paybox,
     Payme,
     Payone,
     Paypal,
diff --git a/crates/connector_configs/src/connector.rs b/crates/connector_configs/src/connector.rs
index 6cc32fe9553..51713f6166f 100644
--- a/crates/connector_configs/src/connector.rs
+++ b/crates/connector_configs/src/connector.rs
@@ -175,7 +175,7 @@ pub struct ConnectorConfig {
     pub nmi: Option<ConnectorTomlConfig>,
     pub noon: Option<ConnectorTomlConfig>,
     pub nuvei: Option<ConnectorTomlConfig>,
-    // pub paybox: Option<ConnectorTomlConfig>, added for future usage
+    pub paybox: Option<ConnectorTomlConfig>,
     pub payme: Option<ConnectorTomlConfig>,
     #[cfg(feature = "payouts")]
     pub payone_payout: Option<ConnectorTomlConfig>,
@@ -323,6 +323,7 @@ impl ConnectorConfig {
             Connector::Nmi => Ok(connector_data.nmi),
             Connector::Noon => Ok(connector_data.noon),
             Connector::Nuvei => Ok(connector_data.nuvei),
+            Connector::Paybox => Ok(connector_data.paybox),
             Connector::Payme => Ok(connector_data.payme),
             Connector::Payone => Err("Use get_payout_connector_config".to_string()),
             Connector::Paypal => Ok(connector_data.paypal),
@@ -363,7 +364,6 @@ impl ConnectorConfig {
             #[cfg(feature = "dummy_connector")]
             Connector::DummyConnector7 => Ok(connector_data.paypal_test),
             Connector::Netcetera => Ok(connector_data.netcetera),
-            // Connector::Paybox => Ok(connector_data.paybox), added for future usage
         }
     }
 }
diff --git a/crates/connector_configs/toml/development.toml b/crates/connector_configs/toml/development.toml
index 95b22f8f77f..cc2ad85e56c 100644
--- a/crates/connector_configs/toml/development.toml
+++ b/crates/connector_configs/toml/development.toml
@@ -3803,6 +3803,46 @@ key1="Public Api Key"
 api_key = "Passcode"
 key1 = "datatrans MerchantId"
 
+[paybox]
+[[paybox.credit]]
+  payment_method_type = "Mastercard"
+[[paybox.credit]]
+  payment_method_type = "Visa"
+[[paybox.credit]]
+  payment_method_type = "Interac"
+[[paybox.credit]]
+  payment_method_type = "AmericanExpress"
+[[paybox.credit]]
+  payment_method_type = "JCB"
+[[paybox.credit]]
+  payment_method_type = "DinersClub"
+[[paybox.credit]]
+  payment_method_type = "Discover"
+[[paybox.credit]]
+  payment_method_type = "CartesBancaires"
+[[paybox.credit]]
+  payment_method_type = "UnionPay"
+[[paybox.debit]]
+  payment_method_type = "Mastercard"
+[[paybox.debit]]
+  payment_method_type = "Visa"
+[[paybox.debit]]
+  payment_method_type = "Interac"
+[[paybox.debit]]
+  payment_method_type = "AmericanExpress"
+[[paybox.debit]]
+  payment_method_type = "JCB"
+[[paybox.debit]]
+  payment_method_type = "DinersClub"
+[[paybox.debit]]
+  payment_method_type = "Discover"
+[[paybox.debit]]
+  payment_method_type = "CartesBancaires"
+[paybox.connector_auth.SignatureKey]
+api_key="SITE Key"
+key1="Rang Identifier"
+api_secret="CLE Secret"
+
 [wellsfargo]
 [[wellsfargo.credit]]
   payment_method_type = "Mastercard"
diff --git a/crates/connector_configs/toml/production.toml b/crates/connector_configs/toml/production.toml
index a2c118f572b..a61911b9da1 100644
--- a/crates/connector_configs/toml/production.toml
+++ b/crates/connector_configs/toml/production.toml
@@ -2680,6 +2680,46 @@ key1 = "Merchant ID"
 api_key="Private Api Key"
 key1="Public Api Key"
 
+[paybox]
+[[paybox.credit]]
+  payment_method_type = "Mastercard"
+[[paybox.credit]]
+  payment_method_type = "Visa"
+[[paybox.credit]]
+  payment_method_type = "Interac"
+[[paybox.credit]]
+  payment_method_type = "AmericanExpress"
+[[paybox.credit]]
+  payment_method_type = "JCB"
+[[paybox.credit]]
+  payment_method_type = "DinersClub"
+[[paybox.credit]]
+  payment_method_type = "Discover"
+[[paybox.credit]]
+  payment_method_type = "CartesBancaires"
+[[paybox.credit]]
+  payment_method_type = "UnionPay"
+[[paybox.debit]]
+  payment_method_type = "Mastercard"
+[[paybox.debit]]
+  payment_method_type = "Visa"
+[[paybox.debit]]
+  payment_method_type = "Interac"
+[[paybox.debit]]
+  payment_method_type = "AmericanExpress"
+[[paybox.debit]]
+  payment_method_type = "JCB"
+[[paybox.debit]]
+  payment_method_type = "DinersClub"
+[[paybox.debit]]
+  payment_method_type = "Discover"
+[[paybox.debit]]
+  payment_method_type = "CartesBancaires"
+[paybox.connector_auth.SignatureKey]
+api_key="SITE Key"
+key1="Rang Identifier"
+api_secret="CLE Secret"
+
 [datatrans]
 [[datatrans.credit]]
   payment_method_type = "Mastercard"
diff --git a/crates/connector_configs/toml/sandbox.toml b/crates/connector_configs/toml/sandbox.toml
index 1c4b61db41c..b61187def75 100644
--- a/crates/connector_configs/toml/sandbox.toml
+++ b/crates/connector_configs/toml/sandbox.toml
@@ -3796,6 +3796,46 @@ key1="Public Api Key"
 api_key = "Passcode"
 key1 = "datatrans MerchantId"
 
+[paybox]
+[[paybox.credit]]
+  payment_method_type = "Mastercard"
+[[paybox.credit]]
+  payment_method_type = "Visa"
+[[paybox.credit]]
+  payment_method_type = "Interac"
+[[paybox.credit]]
+  payment_method_type = "AmericanExpress"
+[[paybox.credit]]
+  payment_method_type = "JCB"
+[[paybox.credit]]
+  payment_method_type = "DinersClub"
+[[paybox.credit]]
+  payment_method_type = "Discover"
+[[paybox.credit]]
+  payment_method_type = "CartesBancaires"
+[[paybox.credit]]
+  payment_method_type = "UnionPay"
+[[paybox.debit]]
+  payment_method_type = "Mastercard"
+[[paybox.debit]]
+  payment_method_type = "Visa"
+[[paybox.debit]]
+  payment_method_type = "Interac"
+[[paybox.debit]]
+  payment_method_type = "AmericanExpress"
+[[paybox.debit]]
+  payment_method_type = "JCB"
+[[paybox.debit]]
+  payment_method_type = "DinersClub"
+[[paybox.debit]]
+  payment_method_type = "Discover"
+[[paybox.debit]]
+  payment_method_type = "CartesBancaires"
+[paybox.connector_auth.SignatureKey]
+api_key="SITE Key"
+key1="Rang Identifier"
+api_secret="CLE Secret"
+
 [wellsfargo]
 [[wellsfargo.credit]]
   payment_method_type = "Mastercard"
diff --git a/crates/router/src/connector/paybox.rs b/crates/router/src/connector/paybox.rs
index 720f0a00c6a..0a7f74a048f 100644
--- a/crates/router/src/connector/paybox.rs
+++ b/crates/router/src/connector/paybox.rs
@@ -1,5 +1,6 @@
 pub mod transformers;
 
+use common_enums::enums;
 use common_utils::types::{AmountConvertor, MinorUnit, MinorUnitForConnector};
 use error_stack::{report, ResultExt};
 use masking::ExposeInterface;
@@ -8,6 +9,7 @@ use transformers as paybox;
 use super::utils::{self as connector_utils};
 use crate::{
     configs::settings,
+    connector::utils,
     core::errors::{self, CustomResult},
     events::connector_api_logs::ConnectorEvent,
     headers,
@@ -49,6 +51,10 @@ impl api::Refund for Paybox {}
 impl api::RefundExecute for Paybox {}
 impl api::RefundSync for Paybox {}
 impl api::PaymentToken for Paybox {}
+impl ConnectorIntegration<api::Void, types::PaymentsCancelData, types::PaymentsResponseData>
+    for Paybox
+{
+}
 
 impl
     ConnectorIntegration<
@@ -57,7 +63,6 @@ impl
         types::PaymentsResponseData,
     > for Paybox
 {
-    // Not Implemented (R)
 }
 
 impl<Flow, Request, Response> ConnectorCommonExt<Flow, Request, Response> for Paybox
@@ -66,15 +71,13 @@ where
 {
     fn build_headers(
         &self,
-        req: &types::RouterData<Flow, Request, Response>,
+        _req: &types::RouterData<Flow, Request, Response>,
         _connectors: &settings::Connectors,
     ) -> CustomResult<Vec<(String, request::Maskable<String>)>, errors::ConnectorError> {
-        let mut header = vec![(
+        let header = vec![(
             headers::CONTENT_TYPE.to_string(),
             self.get_content_type().to_string().into(),
         )];
-        let mut api_key = self.get_auth_header(&req.connector_auth_type)?;
-        header.append(&mut api_key);
         Ok(header)
     }
 }
@@ -84,15 +87,8 @@ impl ConnectorCommon for Paybox {
         "paybox"
     }
 
-    // fn get_currency_unit(&self) -> api::CurrencyUnit {
-    //     // todo!()
-    //     //    TODO! Check connector documentation, on which unit they are processing the currency.
-    //     //    If the connector accepts amount in lower unit ( i.e cents for USD) then return api::CurrencyUnit::Minor,
-    //     //    if connector accepts amount in base unit (i.e dollars for USD) then return api::CurrencyUnit::Base
-    // }
-
     fn common_get_content_type(&self) -> &'static str {
-        "application/json"
+        "application/x-www-form-urlencoded"
     }
 
     fn base_url<'a>(&self, connectors: &'a settings::Connectors) -> &'a str {
@@ -107,7 +103,7 @@ impl ConnectorCommon for Paybox {
             .change_context(errors::ConnectorError::FailedToObtainAuthType)?;
         Ok(vec![(
             headers::AUTHORIZATION.to_string(),
-            auth.api_key.expose().into_masked(),
+            auth.cle.expose().into_masked(),
         )])
     }
 
@@ -136,13 +132,24 @@ impl ConnectorCommon for Paybox {
 }
 
 impl ConnectorValidation for Paybox {
-    //TODO: implement functions when support enabled
+    fn validate_capture_method(
+        &self,
+        capture_method: Option<enums::CaptureMethod>,
+        _pmt: Option<enums::PaymentMethodType>,
+    ) -> CustomResult<(), errors::ConnectorError> {
+        let capture_method = capture_method.unwrap_or_default();
+        match capture_method {
+            enums::CaptureMethod::Automatic | enums::CaptureMethod::Manual => Ok(()),
+            enums::CaptureMethod::ManualMultiple | enums::CaptureMethod::Scheduled => Err(
+                utils::construct_not_implemented_error_report(capture_method, self.id()),
+            ),
+        }
+    }
 }
 
 impl ConnectorIntegration<api::Session, types::PaymentsSessionData, types::PaymentsResponseData>
     for Paybox
 {
-    //TODO: implement sessions flow
 }
 
 impl ConnectorIntegration<api::AccessTokenAuth, types::AccessTokenRequestData, types::AccessToken>
@@ -158,7 +165,6 @@ impl
     > for Paybox
 {
 }
-
 impl ConnectorIntegration<api::Authorize, types::PaymentsAuthorizeData, types::PaymentsResponseData>
     for Paybox
 {
@@ -177,9 +183,9 @@ impl ConnectorIntegration<api::Authorize, types::PaymentsAuthorizeData, types::P
     fn get_url(
         &self,
         _req: &types::PaymentsAuthorizeRouterData,
-        _connectors: &settings::Connectors,
+        connectors: &settings::Connectors,
     ) -> CustomResult<String, errors::ConnectorError> {
-        Err(errors::ConnectorError::NotImplemented("get_url method".to_string()).into())
+        Ok(self.base_url(connectors).to_string())
     }
 
     fn get_request_body(
@@ -195,7 +201,7 @@ impl ConnectorIntegration<api::Authorize, types::PaymentsAuthorizeData, types::P
 
         let connector_router_data = paybox::PayboxRouterData::from((amount, req));
         let connector_req = paybox::PayboxPaymentsRequest::try_from(&connector_router_data)?;
-        Ok(RequestContent::Json(Box::new(connector_req)))
+        Ok(RequestContent::FormUrlEncoded(Box::new(connector_req)))
     }
 
     fn build_request(
@@ -210,9 +216,6 @@ impl ConnectorIntegration<api::Authorize, types::PaymentsAuthorizeData, types::P
                     self, req, connectors,
                 )?)
                 .attach_default_headers()
-                .headers(types::PaymentsAuthorizeType::get_headers(
-                    self, req, connectors,
-                )?)
                 .set_body(types::PaymentsAuthorizeType::get_request_body(
                     self, req, connectors,
                 )?)
@@ -226,10 +229,7 @@ impl ConnectorIntegration<api::Authorize, types::PaymentsAuthorizeData, types::P
         event_builder: Option<&mut ConnectorEvent>,
         res: Response,
     ) -> CustomResult<types::PaymentsAuthorizeRouterData, errors::ConnectorError> {
-        let response: paybox::PayboxPaymentsResponse = res
-            .response
-            .parse_struct("Paybox PaymentsAuthorizeResponse")
-            .change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
+        let response: paybox::PayboxResponse = paybox::parse_url_encoded_to_struct(res.response)?;
         event_builder.map(|i| i.set_response_body(&response));
         router_env::logger::info!(connector_response=?response);
         types::RouterData::try_from(types::ResponseRouterData {
@@ -262,13 +262,20 @@ impl ConnectorIntegration<api::PSync, types::PaymentsSyncData, types::PaymentsRe
     fn get_content_type(&self) -> &'static str {
         self.common_get_content_type()
     }
-
+    fn get_request_body(
+        &self,
+        req: &types::PaymentsSyncRouterData,
+        _connectors: &settings::Connectors,
+    ) -> CustomResult<RequestContent, errors::ConnectorError> {
+        let connector_req = paybox::PayboxPSyncRequest::try_from(req)?;
+        Ok(RequestContent::FormUrlEncoded(Box::new(connector_req)))
+    }
     fn get_url(
         &self,
         _req: &types::PaymentsSyncRouterData,
-        _connectors: &settings::Connectors,
+        connectors: &settings::Connectors,
     ) -> CustomResult<String, errors::ConnectorError> {
-        Err(errors::ConnectorError::NotImplemented("get_url method".to_string()).into())
+        Ok(self.base_url(connectors).to_string())
     }
 
     fn build_request(
@@ -278,10 +285,12 @@ impl ConnectorIntegration<api::PSync, types::PaymentsSyncData, types::PaymentsRe
     ) -> CustomResult<Option<services::Request>, errors::ConnectorError> {
         Ok(Some(
             services::RequestBuilder::new()
-                .method(services::Method::Get)
+                .method(services::Method::Post)
                 .url(&types::PaymentsSyncType::get_url(self, req, connectors)?)
                 .attach_default_headers()
-                .headers(types::PaymentsSyncType::get_headers(self, req, connectors)?)
+                .set_body(types::PaymentsSyncType::get_request_body(
+                    self, req, connectors,
+                )?)
                 .build(),
         ))
     }
@@ -292,10 +301,8 @@ impl ConnectorIntegration<api::PSync, types::PaymentsSyncData, types::PaymentsRe
         event_builder: Option<&mut ConnectorEvent>,
         res: Response,
     ) -> CustomResult<types::PaymentsSyncRouterData, errors::ConnectorError> {
-        let response: paybox::PayboxPaymentsResponse = res
-            .response
-            .parse_struct("paybox PaymentsSyncResponse")
-            .change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
+        let response: paybox::PayboxSyncResponse =
+            paybox::parse_url_encoded_to_struct(res.response)?;
         event_builder.map(|i| i.set_response_body(&response));
         router_env::logger::info!(connector_response=?response);
         types::RouterData::try_from(types::ResponseRouterData {
@@ -332,17 +339,25 @@ impl ConnectorIntegration<api::Capture, types::PaymentsCaptureData, types::Payme
     fn get_url(
         &self,
         _req: &types::PaymentsCaptureRouterData,
-        _connectors: &settings::Connectors,
+        connectors: &settings::Connectors,
     ) -> CustomResult<String, errors::ConnectorError> {
-        Err(errors::ConnectorError::NotImplemented("get_url method".to_string()).into())
+        Ok(self.base_url(connectors).to_string())
     }
 
     fn get_request_body(
         &self,
-        _req: &types::PaymentsCaptureRouterData,
+        req: &types::PaymentsCaptureRouterData,
         _connectors: &settings::Connectors,
     ) -> CustomResult<RequestContent, errors::ConnectorError> {
-        Err(errors::ConnectorError::NotImplemented("get_request_body method".to_string()).into())
+        let amount = connector_utils::convert_amount(
+            self.amount_converter,
+            req.request.minor_amount_to_capture,
+            req.request.currency,
+        )?;
+
+        let connector_router_data = paybox::PayboxRouterData::from((amount, req));
+        let connector_req = paybox::PayboxCaptureRequest::try_from(&connector_router_data)?;
+        Ok(RequestContent::FormUrlEncoded(Box::new(connector_req)))
     }
 
     fn build_request(
@@ -355,9 +370,6 @@ impl ConnectorIntegration<api::Capture, types::PaymentsCaptureData, types::Payme
                 .method(services::Method::Post)
                 .url(&types::PaymentsCaptureType::get_url(self, req, connectors)?)
                 .attach_default_headers()
-                .headers(types::PaymentsCaptureType::get_headers(
-                    self, req, connectors,
-                )?)
                 .set_body(types::PaymentsCaptureType::get_request_body(
                     self, req, connectors,
                 )?)
@@ -371,10 +383,9 @@ impl ConnectorIntegration<api::Capture, types::PaymentsCaptureData, types::Payme
         event_builder: Option<&mut ConnectorEvent>,
         res: Response,
     ) -> CustomResult<types::PaymentsCaptureRouterData, errors::ConnectorError> {
-        let response: paybox::PayboxPaymentsResponse = res
-            .response
-            .parse_struct("Paybox PaymentsCaptureResponse")
-            .change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
+        let response: paybox::PayboxCaptureResponse =
+            paybox::parse_url_encoded_to_struct(res.response)?;
+
         event_builder.map(|i| i.set_response_body(&response));
         router_env::logger::info!(connector_response=?response);
         types::RouterData::try_from(types::ResponseRouterData {
@@ -393,11 +404,6 @@ impl ConnectorIntegration<api::Capture, types::PaymentsCaptureData, types::Payme
     }
 }
 
-impl ConnectorIntegration<api::Void, types::PaymentsCancelData, types::PaymentsResponseData>
-    for Paybox
-{
-}
-
 impl ConnectorIntegration<api::Execute, types::RefundsData, types::RefundsResponseData> for Paybox {
     fn get_headers(
         &self,
@@ -414,9 +420,9 @@ impl ConnectorIntegration<api::Execute, types::RefundsData, types::RefundsRespon
     fn get_url(
         &self,
         _req: &types::RefundsRouterData<api::Execute>,
-        _connectors: &settings::Connectors,
+        connectors: &settings::Connectors,
     ) -> CustomResult<String, errors::ConnectorError> {
-        Err(errors::ConnectorError::NotImplemented("get_url method".to_string()).into())
+        Ok(self.base_url(connectors).to_string())
     }
 
     fn get_request_body(
@@ -432,7 +438,7 @@ impl ConnectorIntegration<api::Execute, types::RefundsData, types::RefundsRespon
 
         let connector_router_data = paybox::PayboxRouterData::from((refund_amount, req));
         let connector_req = paybox::PayboxRefundRequest::try_from(&connector_router_data)?;
-        Ok(RequestContent::Json(Box::new(connector_req)))
+        Ok(RequestContent::FormUrlEncoded(Box::new(connector_req)))
     }
 
     fn build_request(
@@ -444,9 +450,6 @@ impl ConnectorIntegration<api::Execute, types::RefundsData, types::RefundsRespon
             .method(services::Method::Post)
             .url(&types::RefundExecuteType::get_url(self, req, connectors)?)
             .attach_default_headers()
-            .headers(types::RefundExecuteType::get_headers(
-                self, req, connectors,
-            )?)
             .set_body(types::RefundExecuteType::get_request_body(
                 self, req, connectors,
             )?)
@@ -460,10 +463,7 @@ impl ConnectorIntegration<api::Execute, types::RefundsData, types::RefundsRespon
         event_builder: Option<&mut ConnectorEvent>,
         res: Response,
     ) -> CustomResult<types::RefundsRouterData<api::Execute>, errors::ConnectorError> {
-        let response: paybox::RefundResponse =
-            res.response
-                .parse_struct("paybox RefundResponse")
-                .change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
+        let response: paybox::PayboxResponse = paybox::parse_url_encoded_to_struct(res.response)?;
         event_builder.map(|i| i.set_response_body(&response));
         router_env::logger::info!(connector_response=?response);
         types::RouterData::try_from(types::ResponseRouterData {
@@ -498,9 +498,18 @@ impl ConnectorIntegration<api::RSync, types::RefundsData, types::RefundsResponse
     fn get_url(
         &self,
         _req: &types::RefundSyncRouterData,
-        _connectors: &settings::Connectors,
+        connectors: &settings::Connectors,
     ) -> CustomResult<String, errors::ConnectorError> {
-        Err(errors::ConnectorError::NotImplemented("get_url method".to_string()).into())
+        Ok(self.base_url(connectors).to_string())
+    }
+
+    fn get_request_body(
+        &self,
+        req: &types::RefundSyncRouterData,
+        _connectors: &settings::Connectors,
+    ) -> CustomResult<RequestContent, errors::ConnectorError> {
+        let connector_req = paybox::PayboxRsyncRequest::try_from(req)?;
+        Ok(RequestContent::FormUrlEncoded(Box::new(connector_req)))
     }
 
     fn build_request(
@@ -510,10 +519,9 @@ impl ConnectorIntegration<api::RSync, types::RefundsData, types::RefundsResponse
     ) -> CustomResult<Option<services::Request>, errors::ConnectorError> {
         Ok(Some(
             services::RequestBuilder::new()
-                .method(services::Method::Get)
+                .method(services::Method::Post)
                 .url(&types::RefundSyncType::get_url(self, req, connectors)?)
                 .attach_default_headers()
-                .headers(types::RefundSyncType::get_headers(self, req, connectors)?)
                 .set_body(types::RefundSyncType::get_request_body(
                     self, req, connectors,
                 )?)
@@ -527,10 +535,8 @@ impl ConnectorIntegration<api::RSync, types::RefundsData, types::RefundsResponse
         event_builder: Option<&mut ConnectorEvent>,
         res: Response,
     ) -> CustomResult<types::RefundSyncRouterData, errors::ConnectorError> {
-        let response: paybox::RefundResponse = res
-            .response
-            .parse_struct("paybox RefundSyncResponse")
-            .change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
+        let response: paybox::PayboxSyncResponse =
+            paybox::parse_url_encoded_to_struct(res.response)?;
         event_builder.map(|i| i.set_response_body(&response));
         router_env::logger::info!(connector_response=?response);
         types::RouterData::try_from(types::ResponseRouterData {
diff --git a/crates/router/src/connector/paybox/transformers.rs b/crates/router/src/connector/paybox/transformers.rs
index d83c4261c19..fd9129c8a84 100644
--- a/crates/router/src/connector/paybox/transformers.rs
+++ b/crates/router/src/connector/paybox/transformers.rs
@@ -1,14 +1,17 @@
-use common_utils::types::MinorUnit;
+use bytes::Bytes;
+use common_utils::{date_time::DateFormat, errors::CustomResult, types::MinorUnit};
+use error_stack::ResultExt;
+use hyperswitch_connectors::utils::CardData;
+use hyperswitch_domain_models::router_data::ConnectorAuthType;
 use masking::Secret;
-use serde::{Deserialize, Serialize};
+use serde::{de::DeserializeOwned, Deserialize, Serialize};
 
 use crate::{
-    connector::utils::PaymentsAuthorizeRequestData,
+    connector::utils,
     core::errors,
     types::{self, api, domain, storage::enums},
 };
 
-//TODO: Fill the struct with respective fields
 pub struct PayboxRouterData<T> {
     pub amount: MinorUnit, // The type of amount that a connector accepts, for example, String, i64, f64, etc.
     pub router_data: T,
@@ -16,7 +19,6 @@ pub struct PayboxRouterData<T> {
 
 impl<T> From<(MinorUnit, T)> for PayboxRouterData<T> {
     fn from((amount, item): (MinorUnit, T)) -> Self {
-        //Todo :  use utils to convert the amount to the type of amount that a connector accepts
         Self {
             amount,
             router_data: item,
@@ -24,20 +26,294 @@ impl<T> From<(MinorUnit, T)> for PayboxRouterData<T> {
     }
 }
 
-//TODO: Fill the struct with respective fields
-#[derive(Default, Debug, Serialize, PartialEq)]
+const AUTH_REQUEST: &str = "00001";
+const CAPTURE_REQUEST: &str = "00002";
+const AUTH_AND_CAPTURE_REQUEST: &str = "00003";
+const SYNC_REQUEST: &str = "00017";
+const REFUND_REQUEST: &str = "00014";
+
+const SUCCESS_CODE: &str = "00000";
+
+const VERSION_PAYBOX: &str = "00104";
+
+const PAY_ORIGIN_INTERNET: &str = "024";
+
+type Error = error_stack::Report<errors::ConnectorError>;
+
+#[derive(Debug, Serialize, Eq, PartialEq)]
 pub struct PayboxPaymentsRequest {
-    amount: MinorUnit,
-    card: PayboxCard,
+    #[serde(rename = "DATEQ")]
+    pub date: String,
+
+    #[serde(rename = "TYPE")]
+    pub transaction_type: String,
+
+    #[serde(rename = "NUMQUESTION")]
+    pub paybox_request_number: String,
+
+    #[serde(rename = "MONTANT")]
+    pub amount: MinorUnit,
+
+    #[serde(rename = "REFERENCE")]
+    pub description_reference: String,
+
+    #[serde(rename = "VERSION")]
+    pub version: String,
+
+    #[serde(rename = "DEVISE")]
+    pub currency: String,
+
+    #[serde(rename = "PORTEUR")]
+    pub card_number: cards::CardNumber,
+
+    #[serde(rename = "DATEVAL")]
+    pub expiration_date: Secret<String>,
+
+    #[serde(rename = "CVV")]
+    pub cvv: Secret<String>,
+
+    #[serde(rename = "ACTIVITE")]
+    pub activity: String,
+
+    #[serde(rename = "SITE")]
+    pub site: Secret<String>,
+
+    #[serde(rename = "RANG")]
+    pub rank: Secret<String>,
+
+    #[serde(rename = "CLE")]
+    pub key: Secret<String>,
+}
+
+#[derive(Debug, Serialize, Eq, PartialEq)]
+pub struct PayboxCaptureRequest {
+    #[serde(rename = "DATEQ")]
+    pub date: String,
+
+    #[serde(rename = "TYPE")]
+    pub transaction_type: String,
+
+    #[serde(rename = "NUMQUESTION")]
+    pub paybox_request_number: String,
+
+    #[serde(rename = "MONTANT")]
+    pub amount: MinorUnit,
+
+    #[serde(rename = "REFERENCE")]
+    pub reference: String,
+
+    #[serde(rename = "VERSION")]
+    pub version: String,
+
+    #[serde(rename = "DEVISE")]
+    pub currency: String,
+
+    #[serde(rename = "SITE")]
+    pub site: Secret<String>,
+
+    #[serde(rename = "RANG")]
+    pub rank: Secret<String>,
+
+    #[serde(rename = "CLE")]
+    pub key: Secret<String>,
+
+    #[serde(rename = "NUMTRANS")]
+    pub transaction_number: String,
+
+    #[serde(rename = "NUMAPPEL")]
+    pub paybox_order_id: String,
+}
+
+impl TryFrom<&PayboxRouterData<&types::PaymentsCaptureRouterData>> for PayboxCaptureRequest {
+    type Error = error_stack::Report<errors::ConnectorError>;
+    fn try_from(
+        item: &PayboxRouterData<&types::PaymentsCaptureRouterData>,
+    ) -> Result<Self, Self::Error> {
+        let auth_data: PayboxAuthType =
+            PayboxAuthType::try_from(&item.router_data.connector_auth_type)
+                .change_context(errors::ConnectorError::FailedToObtainAuthType)?;
+        let currency = diesel_models::enums::Currency::iso_4217(&item.router_data.request.currency)
+            .to_string();
+        let paybox_meta_data: PayboxMeta =
+            utils::to_connector_meta(item.router_data.request.connector_meta.clone())?;
+        let format_time = common_utils::date_time::format_date(
+            common_utils::date_time::now(),
+            DateFormat::YYYYMMDDHHmmss,
+        )
+        .change_context(errors::ConnectorError::RequestEncodingFailed)?;
+        Ok(Self {
+            date: format_time.clone(),
+            transaction_type: CAPTURE_REQUEST.to_string(),
+            paybox_request_number: get_paybox_request_number()?,
+            version: VERSION_PAYBOX.to_string(),
+            currency,
+            site: auth_data.site,
+            rank: auth_data.rang,
+            key: auth_data.cle,
+            transaction_number: paybox_meta_data.connector_request_id,
+            paybox_order_id: item.router_data.request.connector_transaction_id.clone(),
+            amount: item.amount,
+            reference: item.router_data.connector_request_reference_id.to_string(),
+        })
+    }
 }
 
-#[derive(Default, Debug, Serialize, Eq, PartialEq)]
-pub struct PayboxCard {
-    number: cards::CardNumber,
-    expiry_month: Secret<String>,
-    expiry_year: Secret<String>,
-    cvc: Secret<String>,
-    complete: bool,
+#[derive(Debug, Serialize, Eq, PartialEq)]
+pub struct PayboxRsyncRequest {
+    #[serde(rename = "DATEQ")]
+    pub date: String,
+
+    #[serde(rename = "TYPE")]
+    pub transaction_type: String,
+
+    #[serde(rename = "NUMQUESTION")]
+    pub paybox_request_number: String,
+
+    #[serde(rename = "VERSION")]
+    pub version: String,
+
+    #[serde(rename = "SITE")]
+    pub site: Secret<String>,
+
+    #[serde(rename = "RANG")]
+    pub rank: Secret<String>,
+
+    #[serde(rename = "CLE")]
+    pub key: Secret<String>,
+
+    #[serde(rename = "NUMTRANS")]
+    pub transaction_number: String,
+
+    #[serde(rename = "NUMAPPEL")]
+    pub paybox_order_id: String,
+}
+
+impl TryFrom<&types::RefundSyncRouterData> for PayboxRsyncRequest {
+    type Error = error_stack::Report<errors::ConnectorError>;
+    fn try_from(item: &types::RefundSyncRouterData) -> Result<Self, Self::Error> {
+        let auth_data: PayboxAuthType = PayboxAuthType::try_from(&item.connector_auth_type)
+            .change_context(errors::ConnectorError::FailedToObtainAuthType)?;
+        let format_time = common_utils::date_time::format_date(
+            common_utils::date_time::now(),
+            DateFormat::YYYYMMDDHHmmss,
+        )
+        .change_context(errors::ConnectorError::RequestEncodingFailed)?;
+        Ok(Self {
+            date: format_time.clone(),
+            transaction_type: SYNC_REQUEST.to_string(),
+            paybox_request_number: get_paybox_request_number()?,
+            version: VERSION_PAYBOX.to_string(),
+            site: auth_data.site,
+            rank: auth_data.rang,
+            key: auth_data.cle,
+            transaction_number: item
+                .request
+                .connector_refund_id
+                .clone()
+                .ok_or(errors::ConnectorError::RequestEncodingFailed)?,
+            paybox_order_id: item.request.connector_transaction_id.clone(),
+        })
+    }
+}
+#[derive(Debug, Serialize, Eq, PartialEq)]
+pub struct PayboxPSyncRequest {
+    #[serde(rename = "DATEQ")]
+    pub date: String,
+
+    #[serde(rename = "TYPE")]
+    pub transaction_type: String,
+
+    #[serde(rename = "NUMQUESTION")]
+    pub paybox_request_number: String,
+
+    #[serde(rename = "VERSION")]
+    pub version: String,
+
+    #[serde(rename = "SITE")]
+    pub site: Secret<String>,
+
+    #[serde(rename = "RANG")]
+    pub rank: Secret<String>,
+
+    #[serde(rename = "CLE")]
+    pub key: Secret<String>,
+
+    #[serde(rename = "NUMTRANS")]
+    pub transaction_number: String,
+
+    #[serde(rename = "NUMAPPEL")]
+    pub paybox_order_id: String,
+}
+
+impl TryFrom<&types::PaymentsSyncRouterData> for PayboxPSyncRequest {
+    type Error = error_stack::Report<errors::ConnectorError>;
+    fn try_from(item: &types::PaymentsSyncRouterData) -> Result<Self, Self::Error> {
+        let auth_data: PayboxAuthType = PayboxAuthType::try_from(&item.connector_auth_type)
+            .change_context(errors::ConnectorError::FailedToObtainAuthType)?;
+        let format_time = common_utils::date_time::format_date(
+            common_utils::date_time::now(),
+            DateFormat::YYYYMMDDHHmmss,
+        )
+        .change_context(errors::ConnectorError::RequestEncodingFailed)?;
+        let paybox_meta_data: PayboxMeta =
+            utils::to_connector_meta(item.request.connector_meta.clone())?;
+        Ok(Self {
+            date: format_time.clone(),
+            transaction_type: SYNC_REQUEST.to_string(),
+            paybox_request_number: get_paybox_request_number()?,
+            version: VERSION_PAYBOX.to_string(),
+            site: auth_data.site,
+            rank: auth_data.rang,
+            key: auth_data.cle,
+            transaction_number: paybox_meta_data.connector_request_id,
+            paybox_order_id: item
+                .request
+                .connector_transaction_id
+                .get_connector_transaction_id()
+                .change_context(errors::ConnectorError::MissingConnectorTransactionID)?,
+        })
+    }
+}
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct PayboxMeta {
+    pub connector_request_id: String,
+}
+
+#[derive(Debug, Serialize, Eq, PartialEq)]
+pub struct PayboxRefundRequest {
+    #[serde(rename = "DATEQ")]
+    pub date: String,
+
+    #[serde(rename = "TYPE")]
+    pub transaction_type: String,
+
+    #[serde(rename = "NUMQUESTION")]
+    pub paybox_request_number: String,
+
+    #[serde(rename = "MONTANT")]
+    pub amount: MinorUnit,
+
+    #[serde(rename = "VERSION")]
+    pub version: String,
+
+    #[serde(rename = "DEVISE")]
+    pub currency: String,
+
+    #[serde(rename = "SITE")]
+    pub site: Secret<String>,
+
+    #[serde(rename = "RANG")]
+    pub rank: Secret<String>,
+
+    #[serde(rename = "CLE")]
+    pub key: Secret<String>,
+
+    #[serde(rename = "NUMTRANS")]
+    pub transaction_number: String,
+
+    #[serde(rename = "NUMAPPEL")]
+    pub paybox_order_id: String,
 }
 
 impl TryFrom<&PayboxRouterData<&types::PaymentsAuthorizeRouterData>> for PayboxPaymentsRequest {
@@ -47,16 +323,37 @@ impl TryFrom<&PayboxRouterData<&types::PaymentsAuthorizeRouterData>> for PayboxP
     ) -> Result<Self, Self::Error> {
         match item.router_data.request.payment_method_data.clone() {
             domain::PaymentMethodData::Card(req_card) => {
-                let card = PayboxCard {
-                    number: req_card.card_number,
-                    expiry_month: req_card.card_exp_month,
-                    expiry_year: req_card.card_exp_year,
-                    cvc: req_card.card_cvc,
-                    complete: item.router_data.request.is_auto_capture()?,
-                };
+                let auth_data: PayboxAuthType =
+                    PayboxAuthType::try_from(&item.router_data.connector_auth_type)
+                        .change_context(errors::ConnectorError::FailedToObtainAuthType)?;
+                let transaction_type =
+                    get_transaction_type(item.router_data.request.capture_method)?;
+                let currency =
+                    diesel_models::enums::Currency::iso_4217(&item.router_data.request.currency)
+                        .to_string();
+                let expiration_date =
+                    req_card.get_card_expiry_month_year_2_digit_with_delimiter("".to_owned())?;
+                let format_time = common_utils::date_time::format_date(
+                    common_utils::date_time::now(),
+                    DateFormat::YYYYMMDDHHmmss,
+                )
+                .change_context(errors::ConnectorError::RequestEncodingFailed)?;
+
                 Ok(Self {
+                    date: format_time.clone(),
+                    transaction_type,
+                    paybox_request_number: get_paybox_request_number()?,
                     amount: item.amount,
-                    card,
+                    description_reference: item.router_data.connector_request_reference_id.clone(),
+                    version: VERSION_PAYBOX.to_string(),
+                    currency,
+                    card_number: req_card.card_number,
+                    expiration_date,
+                    cvv: req_card.card_cvc,
+                    activity: PAY_ORIGIN_INTERNET.to_string(),
+                    site: auth_data.site,
+                    rank: auth_data.rang,
+                    key: auth_data.cle,
                 })
             }
             _ => Err(errors::ConnectorError::NotImplemented("Payment methods".to_string()).into()),
@@ -64,31 +361,59 @@ impl TryFrom<&PayboxRouterData<&types::PaymentsAuthorizeRouterData>> for PayboxP
     }
 }
 
-//TODO: Fill the struct with respective fields
-// Auth Struct
+fn get_transaction_type(capture_method: Option<enums::CaptureMethod>) -> Result<String, Error> {
+    match capture_method {
+        Some(enums::CaptureMethod::Automatic) => Ok(AUTH_AND_CAPTURE_REQUEST.to_string()),
+        Some(enums::CaptureMethod::Manual) => Ok(AUTH_REQUEST.to_string()),
+        _ => Err(errors::ConnectorError::CaptureMethodNotSupported)?,
+    }
+}
+fn get_paybox_request_number() -> Result<String, Error> {
+    let time_stamp = std::time::SystemTime::now()
+        .duration_since(std::time::UNIX_EPOCH)
+        .ok()
+        .ok_or(errors::ConnectorError::RequestEncodingFailed)?
+        .as_millis()
+        .to_string();
+    // unix time (in milliseconds) has 13 digits.if we consider 8 digits(the number digits to make day deterministic) there is no collision in the paybox_request_number as it will reset the paybox_request_number for each day  and paybox accepting maximum length is 10 so we gonna take 9 (13-9)
+    let request_number = time_stamp
+        .get(4..)
+        .ok_or(errors::ConnectorError::ParsingFailed)?;
+    Ok(request_number.to_string())
+}
+
+#[derive(Debug, Serialize, Eq, PartialEq)]
 pub struct PayboxAuthType {
-    pub(super) api_key: Secret<String>,
+    pub(super) site: Secret<String>,
+    pub(super) rang: Secret<String>,
+    pub(super) cle: Secret<String>,
 }
 
-impl TryFrom<&types::ConnectorAuthType> for PayboxAuthType {
+impl TryFrom<&ConnectorAuthType> for PayboxAuthType {
     type Error = error_stack::Report<errors::ConnectorError>;
-    fn try_from(auth_type: &types::ConnectorAuthType) -> Result<Self, Self::Error> {
-        match auth_type {
-            types::ConnectorAuthType::HeaderKey { api_key } => Ok(Self {
-                api_key: api_key.to_owned(),
-            }),
-            _ => Err(errors::ConnectorError::FailedToObtainAuthType.into()),
+    fn try_from(auth_type: &ConnectorAuthType) -> Result<Self, Self::Error> {
+        if let ConnectorAuthType::SignatureKey {
+            api_key,
+            key1,
+            api_secret,
+        } = auth_type
+        {
+            Ok(Self {
+                site: api_key.to_owned(),
+                rang: key1.to_owned(),
+                cle: api_secret.to_owned(),
+            })
+        } else {
+            Err(errors::ConnectorError::FailedToObtainAuthType)?
         }
     }
 }
-// PaymentsResponse
-//TODO: Append the remaining status flags
-#[derive(Debug, Clone, Default, Serialize, Deserialize, PartialEq)]
+
+#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
 #[serde(rename_all = "lowercase")]
 pub enum PayboxPaymentStatus {
     Succeeded,
     Failed,
-    #[default]
     Processing,
 }
 
@@ -102,96 +427,279 @@ impl From<PayboxPaymentStatus> for enums::AttemptStatus {
     }
 }
 
-//TODO: Fill the struct with respective fields
-#[derive(Default, Debug, Clone, Serialize, Deserialize, PartialEq)]
-pub struct PayboxPaymentsResponse {
-    status: PayboxPaymentStatus,
-    id: String,
+#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
+pub struct PayboxResponse {
+    #[serde(rename = "NUMTRANS")]
+    pub transaction_number: String,
+
+    #[serde(rename = "NUMAPPEL")]
+    pub paybox_order_id: String,
+
+    #[serde(rename = "CODEREPONSE")]
+    pub response_code: String,
+
+    #[serde(rename = "COMMENTAIRE")]
+    pub response_message: String,
+}
+
+pub fn parse_url_encoded_to_struct<T: DeserializeOwned>(
+    query_bytes: Bytes,
+) -> CustomResult<T, errors::ConnectorError> {
+    let (cow, _, _) = encoding_rs::ISO_8859_10.decode(&query_bytes);
+    serde_qs::from_str::<T>(cow.as_ref()).change_context(errors::ConnectorError::ParsingFailed)
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
+pub enum PayboxStatus {
+    #[serde(rename = "Remboursé")]
+    Refunded,
+
+    #[serde(rename = "Annulé")]
+    Cancelled,
+
+    #[serde(rename = "Autorisé")]
+    Authorised,
+
+    #[serde(rename = "Capturé")]
+    Captured,
+
+    #[serde(rename = "Refusé")]
+    Rejected,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
+pub struct PayboxSyncResponse {
+    #[serde(rename = "NUMTRANS")]
+    pub transaction_number: String,
+
+    #[serde(rename = "NUMAPPEL")]
+    pub paybox_order_id: String,
+
+    #[serde(rename = "CODEREPONSE")]
+    pub response_code: String,
+
+    #[serde(rename = "COMMENTAIRE")]
+    pub response_message: String,
+
+    #[serde(rename = "STATUS")]
+    pub status: PayboxStatus,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
+pub struct PayboxCaptureResponse {
+    #[serde(rename = "NUMTRANS")]
+    pub transaction_number: String,
+
+    #[serde(rename = "NUMAPPEL")]
+    pub paybox_order_id: String,
+
+    #[serde(rename = "CODEREPONSE")]
+    pub response_code: String,
+
+    #[serde(rename = "COMMENTAIRE")]
+    pub response_message: String,
 }
 
 impl<F, T>
-    TryFrom<types::ResponseRouterData<F, PayboxPaymentsResponse, T, types::PaymentsResponseData>>
+    TryFrom<types::ResponseRouterData<F, PayboxCaptureResponse, T, types::PaymentsResponseData>>
     for types::RouterData<F, T, types::PaymentsResponseData>
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        item: types::ResponseRouterData<F, PayboxPaymentsResponse, T, types::PaymentsResponseData>,
+        item: types::ResponseRouterData<F, PayboxCaptureResponse, T, types::PaymentsResponseData>,
     ) -> Result<Self, Self::Error> {
-        Ok(Self {
-            status: enums::AttemptStatus::from(item.response.status),
-            response: Ok(types::PaymentsResponseData::TransactionResponse {
-                resource_id: types::ResponseId::ConnectorTransactionId(item.response.id),
-                redirection_data: None,
-                mandate_reference: None,
-                connector_metadata: None,
-                network_txn_id: None,
-                connector_response_reference_id: None,
-                incremental_authorization_allowed: None,
-                charge_id: None,
+        let response = item.response.clone();
+        let status = get_status_of_request(response.response_code.clone());
+        match status {
+            true => Ok(Self {
+                status: enums::AttemptStatus::Pending,
+                response: Ok(types::PaymentsResponseData::TransactionResponse {
+                    resource_id: types::ResponseId::ConnectorTransactionId(
+                        response.paybox_order_id,
+                    ),
+                    redirection_data: None,
+                    mandate_reference: None,
+                    connector_metadata: Some(serde_json::json!(PayboxMeta {
+                        connector_request_id: response.transaction_number.clone()
+                    })),
+                    network_txn_id: None,
+                    connector_response_reference_id: None,
+                    incremental_authorization_allowed: None,
+                    charge_id: None,
+                }),
+                amount_captured: None,
+                ..item.data
             }),
-            ..item.data
-        })
+            false => Ok(Self {
+                response: Err(types::ErrorResponse {
+                    code: response.response_code.clone(),
+                    message: response.response_message.clone(),
+                    reason: Some(response.response_message),
+                    status_code: item.http_code,
+                    attempt_status: None,
+                    connector_transaction_id: Some(item.response.transaction_number),
+                }),
+                ..item.data
+            }),
+        }
     }
 }
 
-//TODO: Fill the struct with respective fields
-// REFUND :
-// Type definition for RefundRequest
-#[derive(Default, Debug, Serialize)]
-pub struct PayboxRefundRequest {
-    pub amount: MinorUnit,
-}
-
-impl<F> TryFrom<&PayboxRouterData<&types::RefundsRouterData<F>>> for PayboxRefundRequest {
+impl<F, T> TryFrom<types::ResponseRouterData<F, PayboxResponse, T, types::PaymentsResponseData>>
+    for types::RouterData<F, T, types::PaymentsResponseData>
+{
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        item: &PayboxRouterData<&types::RefundsRouterData<F>>,
+        item: types::ResponseRouterData<F, PayboxResponse, T, types::PaymentsResponseData>,
     ) -> Result<Self, Self::Error> {
-        Ok(Self {
-            amount: item.amount.to_owned(),
-        })
+        let response = item.response.clone();
+        let status = get_status_of_request(response.response_code.clone());
+        match status {
+            true => Ok(Self {
+                response: Ok(types::PaymentsResponseData::TransactionResponse {
+                    resource_id: types::ResponseId::ConnectorTransactionId(
+                        response.paybox_order_id,
+                    ),
+                    redirection_data: None,
+                    mandate_reference: None,
+                    connector_metadata: Some(serde_json::json!(PayboxMeta {
+                        connector_request_id: response.transaction_number.clone()
+                    })),
+                    network_txn_id: None,
+                    connector_response_reference_id: None,
+                    incremental_authorization_allowed: None,
+                    charge_id: None,
+                }),
+                ..item.data
+            }),
+            false => Ok(Self {
+                response: Err(types::ErrorResponse {
+                    code: response.response_code.clone(),
+                    message: response.response_message.clone(),
+                    reason: Some(response.response_message),
+                    status_code: item.http_code,
+                    attempt_status: None,
+                    connector_transaction_id: Some(item.response.transaction_number),
+                }),
+                ..item.data
+            }),
+        }
     }
 }
 
-// Type definition for Refund Response
+impl<F, T> TryFrom<types::ResponseRouterData<F, PayboxSyncResponse, T, types::PaymentsResponseData>>
+    for types::RouterData<F, T, types::PaymentsResponseData>
+{
+    type Error = error_stack::Report<errors::ConnectorError>;
+    fn try_from(
+        item: types::ResponseRouterData<F, PayboxSyncResponse, T, types::PaymentsResponseData>,
+    ) -> Result<Self, Self::Error> {
+        let response = item.response.clone();
+        let status = get_status_of_request(response.response_code.clone());
+        let connector_payment_status = item.response.status;
+        match status {
+            true => Ok(Self {
+                status: enums::AttemptStatus::from(connector_payment_status),
 
-#[allow(dead_code)]
-#[derive(Debug, Serialize, Default, Deserialize, Clone)]
-pub enum RefundStatus {
-    Succeeded,
-    Failed,
-    #[default]
-    Processing,
+                response: Ok(types::PaymentsResponseData::TransactionResponse {
+                    resource_id: types::ResponseId::ConnectorTransactionId(
+                        response.paybox_order_id,
+                    ),
+                    redirection_data: None,
+                    mandate_reference: None,
+                    connector_metadata: Some(serde_json::json!(PayboxMeta {
+                        connector_request_id: response.transaction_number.clone()
+                    })),
+                    network_txn_id: None,
+                    connector_response_reference_id: None,
+                    incremental_authorization_allowed: None,
+                    charge_id: None,
+                }),
+                ..item.data
+            }),
+            false => Ok(Self {
+                response: Err(types::ErrorResponse {
+                    code: response.response_code.clone(),
+                    message: response.response_message.clone(),
+                    reason: Some(response.response_message),
+                    status_code: item.http_code,
+                    attempt_status: None,
+                    connector_transaction_id: Some(item.response.transaction_number),
+                }),
+                ..item.data
+            }),
+        }
+    }
 }
 
-impl From<RefundStatus> for enums::RefundStatus {
-    fn from(item: RefundStatus) -> Self {
+impl From<PayboxStatus> for common_enums::RefundStatus {
+    fn from(item: PayboxStatus) -> Self {
+        match item {
+            PayboxStatus::Refunded => Self::Success,
+            PayboxStatus::Cancelled
+            | PayboxStatus::Authorised
+            | PayboxStatus::Captured
+            | PayboxStatus::Rejected => Self::Failure,
+        }
+    }
+}
+impl From<PayboxStatus> for enums::AttemptStatus {
+    fn from(item: PayboxStatus) -> Self {
         match item {
-            RefundStatus::Succeeded => Self::Success,
-            RefundStatus::Failed => Self::Failure,
-            RefundStatus::Processing => Self::Pending,
-            //TODO: Review mapping
+            PayboxStatus::Cancelled => Self::Voided,
+            PayboxStatus::Authorised => Self::Authorized,
+            PayboxStatus::Captured | PayboxStatus::Refunded => Self::Charged,
+            PayboxStatus::Rejected => Self::Failure,
         }
     }
 }
+fn get_status_of_request(item: String) -> bool {
+    item == *SUCCESS_CODE
+}
 
-//TODO: Fill the struct with respective fields
-#[derive(Default, Debug, Clone, Serialize, Deserialize)]
-pub struct RefundResponse {
-    id: String,
-    status: RefundStatus,
+impl<F> TryFrom<&PayboxRouterData<&types::RefundsRouterData<F>>> for PayboxRefundRequest {
+    type Error = error_stack::Report<errors::ConnectorError>;
+    fn try_from(
+        item: &PayboxRouterData<&types::RefundsRouterData<F>>,
+    ) -> Result<Self, Self::Error> {
+        let auth_data: PayboxAuthType =
+            PayboxAuthType::try_from(&item.router_data.connector_auth_type)
+                .change_context(errors::ConnectorError::FailedToObtainAuthType)?;
+        let currency = diesel_models::enums::Currency::iso_4217(&item.router_data.request.currency)
+            .to_string();
+        let format_time = common_utils::date_time::format_date(
+            common_utils::date_time::now(),
+            DateFormat::YYYYMMDDHHmmss,
+        )
+        .change_context(errors::ConnectorError::RequestEncodingFailed)?;
+        let paybox_meta_data: PayboxMeta =
+            utils::to_connector_meta(item.router_data.request.connector_metadata.clone())?;
+        Ok(Self {
+            date: format_time.clone(),
+            transaction_type: REFUND_REQUEST.to_string(),
+            paybox_request_number: get_paybox_request_number()?,
+            version: VERSION_PAYBOX.to_string(),
+            currency,
+            site: auth_data.site,
+            rank: auth_data.rang,
+            key: auth_data.cle,
+            transaction_number: paybox_meta_data.connector_request_id,
+            paybox_order_id: item.router_data.request.connector_transaction_id.clone(),
+            amount: item.amount,
+        })
+    }
 }
 
-impl TryFrom<types::RefundsResponseRouterData<api::Execute, RefundResponse>>
-    for types::RefundsRouterData<api::Execute>
+impl TryFrom<types::RefundsResponseRouterData<api::RSync, PayboxSyncResponse>>
+    for types::RefundsRouterData<api::RSync>
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        item: types::RefundsResponseRouterData<api::Execute, RefundResponse>,
+        item: types::RefundsResponseRouterData<api::RSync, PayboxSyncResponse>,
     ) -> Result<Self, Self::Error> {
         Ok(Self {
             response: Ok(types::RefundsResponseData {
-                connector_refund_id: item.response.id.to_string(),
+                connector_refund_id: item.response.transaction_number,
                 refund_status: enums::RefundStatus::from(item.response.status),
             }),
             ..item.data
@@ -199,25 +707,23 @@ impl TryFrom<types::RefundsResponseRouterData<api::Execute, RefundResponse>>
     }
 }
 
-impl TryFrom<types::RefundsResponseRouterData<api::RSync, RefundResponse>>
-    for types::RefundsRouterData<api::RSync>
+impl TryFrom<types::RefundsResponseRouterData<api::Execute, PayboxResponse>>
+    for types::RefundsRouterData<api::Execute>
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        item: types::RefundsResponseRouterData<api::RSync, RefundResponse>,
+        item: types::RefundsResponseRouterData<api::Execute, PayboxResponse>,
     ) -> Result<Self, Self::Error> {
         Ok(Self {
             response: Ok(types::RefundsResponseData {
-                connector_refund_id: item.response.id.to_string(),
-                refund_status: enums::RefundStatus::from(item.response.status),
+                connector_refund_id: item.response.transaction_number,
+                refund_status: common_enums::RefundStatus::Pending,
             }),
             ..item.data
         })
     }
 }
-
-//TODO: Fill the struct with respective fields
-#[derive(Default, Debug, Serialize, Deserialize, PartialEq)]
+#[derive(Debug, Serialize, Deserialize, PartialEq)]
 pub struct PayboxErrorResponse {
     pub status_code: u16,
     pub code: String,
diff --git a/crates/router/src/core/admin.rs b/crates/router/src/core/admin.rs
index 89cd956c995..aca76322722 100644
--- a/crates/router/src/core/admin.rs
+++ b/crates/router/src/core/admin.rs
@@ -1434,7 +1434,10 @@ impl<'a> ConnectorAuthTypeAndMetadataValidation<'a> {
                 opennode::transformers::OpennodeAuthType::try_from(self.auth_type)?;
                 Ok(())
             }
-            // api_enums::Connector::Paybox => todo!(), added for future usage
+            api_enums::Connector::Paybox => {
+                paybox::transformers::PayboxAuthType::try_from(self.auth_type)?;
+                Ok(())
+            }
             api_enums::Connector::Payme => {
                 payme::transformers::PaymeAuthType::try_from(self.auth_type)?;
                 Ok(())
diff --git a/crates/router/src/types/api.rs b/crates/router/src/types/api.rs
index aa4f3d8a1a3..5f125ab9939 100644
--- a/crates/router/src/types/api.rs
+++ b/crates/router/src/types/api.rs
@@ -418,7 +418,9 @@ impl ConnectorData {
                 enums::Connector::Opennode => {
                     Ok(ConnectorEnum::Old(Box::new(&connector::Opennode)))
                 }
-                // enums::Connector::Paybox => Ok(ConnectorEnum::Old(Box::new(connector::Paybox::new()))), // added for future use
+                enums::Connector::Paybox => {
+                    Ok(ConnectorEnum::Old(Box::new(connector::Paybox::new())))
+                }
                 // "payeezy" => Ok(ConnectorIntegrationEnum::Old(Box::new(&connector::Payeezy)), As psync and rsync are not supported by this connector, it is added as template code for future usage
                 enums::Connector::Payme => {
                     Ok(ConnectorEnum::Old(Box::new(connector::Payme::new())))
diff --git a/crates/router/src/types/transformers.rs b/crates/router/src/types/transformers.rs
index cc8d947738b..67af63b154e 100644
--- a/crates/router/src/types/transformers.rs
+++ b/crates/router/src/types/transformers.rs
@@ -271,7 +271,7 @@ impl ForeignTryFrom<api_enums::Connector> for common_enums::RoutableConnectors {
             api_enums::Connector::Noon => Self::Noon,
             api_enums::Connector::Nuvei => Self::Nuvei,
             api_enums::Connector::Opennode => Self::Opennode,
-            // api_enums::Connector::Paybox => Self::Paybox, added for future usage
+            api_enums::Connector::Paybox => Self::Paybox,
             api_enums::Connector::Payme => Self::Payme,
             api_enums::Connector::Payone => Self::Payone,
             api_enums::Connector::Paypal => Self::Paypal,

## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] New feature

## Description
<!-- Describe your changes in detail -->
Implemented Flows Authorize,Capture,PSync,Refund and RSync for card Payments.
For Paybox after the Payment we have to to do PSync as Force to get the status of Payment and same applies for Refund also.

### 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).
-->
https://github.com/juspay/hyperswitch/issues/5590

## 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)?
-->
Payment:
```
curl --location 'http://127.0.0.1:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_IUCGqoaqFnbYXDFcyRerYSYqx44KRHsJNsCHetqjQ0kqjsijMmBzZKsNOfcjDsUa' \
--data-raw '{
    "amount": 1000,
    "currency": "EUR",
    "confirm": true,
    "capture_method": "automatic",
    "capture_on": "2022-09-10T10:11:12Z",
    "amount_to_capture": 1000,
    "customer_id": "BamboraCustomer",
    "email": "guest@example.com",
    "name": "John Doe",
    "phone": "999999999",
    "phone_country_code": "+1",
    "description": "Its my first payment request",
    "authentication_type": "no_three_ds",
    "return_url": "https://duck.com",
    "payment_method": "card",
    "payment_method_type": "credit",
    "payment_method_data": {
        "card": {
            "card_number": "1111222233334444",
            "card_exp_month": "05",
            "card_exp_year": "27",
            "card_holder_name": "John Doe",
            "card_cvc": "222"
        }
    },
    "billing": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "California",
            "zip": "94122",
            "country": "US",
            "first_name": "joseph",
            "last_name": "Doe"
        },
        "phone": {
            "number": "9123456789",
            "country_code": "+91"
        }
    },
    "shipping": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "California",
            "zip": "94122",
            "country": "US",
            "first_name": "joseph",
            "last_name": "Doe"
        },
        "phone": {
            "number": "9123456789",
            "country_code": "+91"
        }
    },
    "statement_descriptor_name": "joseph",
    "statement_descriptor_suffix": "JS"
}'
```
Response:
```
{
    "payment_id": "pay_dA1GIgbVyqaXsDcES4dw",
    "merchant_id": "postman_merchant_GHAction_f962d351-d38d-431c-9c09-788d9fd68c8a",
    "status": "processing",
    "amount": 1000,
    "net_amount": 1000,
    "amount_capturable": 0,
    "amount_received": null,
    "connector": "paybox",
    "client_secret": "pay_dA1GIgbVyqaXsDcES4dw_secret_zAS5Q8sgJonxnvIq9WRy",
    "created": "2024-08-12T05:18:40.883Z",
    "currency": "EUR",
    "customer_id": "BamboraCustomer",
    "customer": {
        "id": "BamboraCustomer",
        "name": "John Doe",
        "email": "guest@example.com",
        "phone": "999999999",
        "phone_country_code": "+1"
    },
    "description": "Its my first payment request",
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": null,
    "off_session": null,
    "capture_on": null,
    "capture_method": "automatic",
    "payment_method": "card",
    "payment_method_data": {
        "card": {
            "last4": "4444",
            "card_type": null,
            "card_network": null,
            "card_issuer": null,
            "card_issuing_country": null,
            "card_isin": "111122",
            "card_extended_bin": null,
            "card_exp_month": "05",
            "card_exp_year": "27",
            "card_holder_name": "John Doe",
            "payment_checks": null,
            "authentication_data": null
        },
        "billing": null
    },
    "payment_token": null,
    "shipping": {
        "address": {
            "city": "San Fransico",
            "country": "US",
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "zip": "94122",
            "state": "California",
            "first_name": "joseph",
            "last_name": "Doe"
        },
        "phone": {
            "number": "9123456789",
            "country_code": "+91"
        },
        "email": null
    },
    "billing": {
        "address": {
            "city": "San Fransico",
            "country": "US",
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "zip": "94122",
            "state": "California",
            "first_name": "joseph",
            "last_name": "Doe"
        },
        "phone": {
            "number": "9123456789",
            "country_code": "+91"
        },
        "email": null
    },
    "order_details": null,
    "email": "guest@example.com",
    "name": "John Doe",
    "phone": "999999999",
    "return_url": "https://duck.com/",
    "authentication_type": "no_three_ds",
    "statement_descriptor_name": "joseph",
    "statement_descriptor_suffix": "JS",
    "next_action": null,
    "cancellation_reason": null,
    "error_code": null,
    "error_message": null,
    "unified_code": null,
    "unified_message": null,
    "payment_experience": null,
    "payment_method_type": "credit",
    "connector_label": null,
    "business_country": null,
    "business_label": "default",
    "business_sub_label": null,
    "allowed_payment_method_types": null,
    "ephemeral_key": {
        "customer_id": "BamboraCustomer",
        "created_at": 1723439920,
        "expires": 1723443520,
        "secret": "epk_0cfd96fa1dbc4391bea59a4bdcd49dc1"
    },
    "manual_retry_allowed": false,
    "connector_transaction_id": "0079564764",
    "frm_message": null,
    "metadata": null,
    "connector_metadata": null,
    "feature_metadata": null,
    "reference_id": "0038137048",
    "payment_link": null,
    "profile_id": "pro_lBL8sGEInU4ElAMrG82j",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_gNU267CSqzmqeBjI31Xz",
    "incremental_authorization_allowed": null,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2024-08-12T05:33:40.881Z",
    "fingerprint": null,
    "browser_info": null,
    "payment_method_id": null,
    "payment_method_status": null,
    "updated": "2024-08-12T05:18:43.645Z",
    "charges": null,
    "frm_metadata": null,
    "merchant_order_reference_id": null
}
```
Force Psync:
request:
```
curl --location 'http://127.0.0.1:8080/payments/pay_dA1GIgbVyqaXsDcES4dw?force_sync=true' \
--header 'Accept: application/json' \
--header 'api-key: dev_IUCGqoaqFnbYXDFcyRerYSYqx44KRHsJNsCHetqjQ0kqjsijMmBzZKsNOfcjDsUa'
```
response:
```
{
    "payment_id": "pay_dA1GIgbVyqaXsDcES4dw",
    "merchant_id": "postman_merchant_GHAction_f962d351-d38d-431c-9c09-788d9fd68c8a",
    "status": "succeeded",
    "amount": 1000,
    "net_amount": 1000,
    "amount_capturable": 0,
    "amount_received": 1000,
    "connector": "paybox",
    "client_secret": "pay_dA1GIgbVyqaXsDcES4dw_secret_zAS5Q8sgJonxnvIq9WRy",
    "created": "2024-08-12T05:18:40.883Z",
    "currency": "EUR",
    "customer_id": "BamboraCustomer",
    "customer": {
        "id": "BamboraCustomer",
        "name": "John Doe",
        "email": "guest@example.com",
        "phone": "999999999",
        "phone_country_code": "+1"
    },
    "description": "Its my first payment request",
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": null,
    "off_session": null,
    "capture_on": null,
    "capture_method": "automatic",
    "payment_method": "card",
    "payment_method_data": {
        "card": {
            "last4": "4444",
            "card_type": null,
            "card_network": null,
            "card_issuer": null,
            "card_issuing_country": null,
            "card_isin": "111122",
            "card_extended_bin": null,
            "card_exp_month": "05",
            "card_exp_year": "27",
            "card_holder_name": "John Doe",
            "payment_checks": null,
            "authentication_data": null
        },
        "billing": null
    },
    "payment_token": null,
    "shipping": {
        "address": {
            "city": "San Fransico",
            "country": "US",
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "zip": "94122",
            "state": "California",
            "first_name": "joseph",
            "last_name": "Doe"
        },
        "phone": {
            "number": "9123456789",
            "country_code": "+91"
        },
        "email": null
    },
    "billing": {
        "address": {
            "city": "San Fransico",
            "country": "US",
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "zip": "94122",
            "state": "California",
            "first_name": "joseph",
            "last_name": "Doe"
        },
        "phone": {
            "number": "9123456789",
            "country_code": "+91"
        },
        "email": null
    },
    "order_details": null,
    "email": "guest@example.com",
    "name": "John Doe",
    "phone": "999999999",
    "return_url": "https://duck.com/",
    "authentication_type": "no_three_ds",
    "statement_descriptor_name": "joseph",
    "statement_descriptor_suffix": "JS",
    "next_action": null,
    "cancellation_reason": null,
    "error_code": null,
    "error_message": null,
    "unified_code": null,
    "unified_message": null,
    "payment_experience": null,
    "payment_method_type": "credit",
    "connector_label": null,
    "business_country": null,
    "business_label": "default",
    "business_sub_label": null,
    "allowed_payment_method_types": null,
    "ephemeral_key": null,
    "manual_retry_allowed": false,
    "connector_transaction_id": "0079564764",
    "frm_message": null,
    "metadata": null,
    "connector_metadata": null,
    "feature_metadata": null,
    "reference_id": "0038137048",
    "payment_link": null,
    "profile_id": "pro_lBL8sGEInU4ElAMrG82j",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_gNU267CSqzmqeBjI31Xz",
    "incremental_authorization_allowed": null,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2024-08-12T05:33:40.881Z",
    "fingerprint": null,
    "browser_info": null,
    "payment_method_id": null,
    "payment_method_status": null,
    "updated": "2024-08-12T05:24:12.303Z",
    "charges": null,
    "frm_metadata": null,
    "merchant_order_reference_id": null
}
```

Refund:
request:
```
curl --location 'http://127.0.0.1:8080/refunds' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_IUCGqoaqFnbYXDFcyRerYSYqx44KRHsJNsCHetqjQ0kqjsijMmBzZKsNOfcjDsUa' \
--data '{
    "payment_id": "pay_dA1GIgbVyqaXsDcES4dw",
    "amount": 1000,
    "reason": "Customer returned product",
    "refund_type": "instant",
    "metadata": {
        "udf1": "value1",
        "new_customer": "true",
        "login_date": "2019-09-10T10:11:12Z"
    }
}'
```
response:
```
{
    "refund_id": "ref_CL9wUYOMtrvST4IaY7pX",
    "payment_id": "pay_dA1GIgbVyqaXsDcES4dw",
    "amount": 1000,
    "currency": "EUR",
    "status": "pending",
    "reason": "Customer returned product",
    "metadata": {
        "udf1": "value1",
        "new_customer": "true",
        "login_date": "2019-09-10T10:11:12Z"
    },
    "error_message": null,
    "error_code": null,
    "created_at": "2024-08-12T05:24:44.370Z",
    "updated_at": "2024-08-12T05:24:46.081Z",
    "connector": "paybox",
    "profile_id": "pro_lBL8sGEInU4ElAMrG82j",
    "merchant_connector_id": "mca_gNU267CSqzmqeBjI31Xz",
    "charges": null
}
```
Refund ForceSync:
request:
```
curl --location 'http://127.0.0.1:8080/refunds/ref_7FR2uWPPcB3BCu0SPgoQ?force_sync=true' \
--header 'Accept: application/json' \
--header 'api-key: dev_IUCGqoaqFnbYXDFcyRerYSYqx44KRHsJNsCHetqjQ0kqjsijMmBzZKsNOfcjDsUa'
```
response:
```
{
    "refund_id": "ref_7FR2uWPPcB3BCu0SPgoQ",
    "payment_id": "pay_I355vemf48KDFwqGPpyy",
    "amount": 1000,
    "currency": "EUR",
    "status": "succeeded",
    "reason": "Customer returned product",
    "metadata": {
        "udf1": "value1",
        "new_customer": "true",
        "login_date": "2019-09-10T10:11:12Z"
    },
    "error_message": null,
    "error_code": null,
    "created_at": "2024-08-10T20:18:24.724Z",
    "updated_at": "2024-08-11T10:46:31.950Z",
    "connector": "paybox",
    "profile_id": "pro_lBL8sGEInU4ElAMrG82j",
    "merchant_connector_id": "mca_gNU267CSqzmqeBjI31Xz",
    "charges": null
}
```
Cypress Test Results:
<img width="687" alt="image" src="https://github.com/user-attachments/assets/ef572471-2ca5-408d-a71d-791ab5b7d622">


## Checklist
<!-- Put an `x` in the boxes that apply -->

- [x] 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
