Bug: [FEATURE] [FISERVEMEA] Integrate card payments



### Feature Description

Integrate card payments for new connector Fiserv-EMEA
https://docs.fiserv.dev/

### Possible Implementation

Integrate card payments for new connector Fiserv-EMEA
https://docs.fiserv.dev/

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

- [X] I checked and didn't find a 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 5c57891d103..7b9cf0e48c8 100644
--- a/api-reference-v2/openapi_spec.json
+++ b/api-reference-v2/openapi_spec.json
@@ -4738,6 +4738,7 @@
           "dlocal",
           "ebanx",
           "fiserv",
+          "fiservemea",
           "forte",
           "globalpay",
           "globepay",
@@ -16776,6 +16777,7 @@
           "dlocal",
           "ebanx",
           "fiserv",
+          "fiservemea",
           "forte",
           "globalpay",
           "globepay",
diff --git a/config/config.example.toml b/config/config.example.toml
index 0a88c3896f2..229dabfeefc 100644
--- a/config/config.example.toml
+++ b/config/config.example.toml
@@ -206,7 +206,7 @@ dlocal.base_url = "https://sandbox.dlocal.com/"
 dummyconnector.base_url = "http://localhost:8080/dummy-connector"
 ebanx.base_url = "https://sandbox.ebanxpay.com/"
 fiserv.base_url = "https://cert.api.fiservapps.com/"
-fiservemea.base_url = "https://prod.emea.api.fiservapps.com/sandbox/ipp/payments-gateway/v2"
+fiservemea.base_url = "https://prod.emea.api.fiservapps.com/sandbox"
 forte.base_url = "https://sandbox.forte.net/api/v3"
 globalpay.base_url = "https://apis.sandbox.globalpay.com/ucp/"
 globepay.base_url = "https://pay.globepay.co/"
diff --git a/config/deployments/integration_test.toml b/config/deployments/integration_test.toml
index c6cb9ff6c36..3d91e2dfda3 100644
--- a/config/deployments/integration_test.toml
+++ b/config/deployments/integration_test.toml
@@ -46,7 +46,7 @@ dlocal.base_url = "https://sandbox.dlocal.com/"
 dummyconnector.base_url = "http://localhost:8080/dummy-connector"
 ebanx.base_url = "https://sandbox.ebanxpay.com/"
 fiserv.base_url = "https://cert.api.fiservapps.com/"
-fiservemea.base_url = "https://prod.emea.api.fiservapps.com/sandbox/ipp/payments-gateway/v2"
+fiservemea.base_url = "https://prod.emea.api.fiservapps.com/sandbox"
 forte.base_url = "https://sandbox.forte.net/api/v3"
 globalpay.base_url = "https://apis.sandbox.globalpay.com/ucp/"
 globepay.base_url = "https://pay.globepay.co/"
diff --git a/config/deployments/production.toml b/config/deployments/production.toml
index 67256cf34d7..e33b4ece805 100644
--- a/config/deployments/production.toml
+++ b/config/deployments/production.toml
@@ -50,7 +50,7 @@ dlocal.base_url = "https://sandbox.dlocal.com/"
 dummyconnector.base_url = "http://localhost:8080/dummy-connector"
 ebanx.base_url = "https://sandbox.ebanxpay.com/"
 fiserv.base_url = "https://cert.api.fiservapps.com/"
-fiservemea.base_url = "https://prod.emea.api.fiservapps.com/ipp/payments-gateway/v2"
+fiservemea.base_url = "https://prod.emea.api.fiservapps.com"
 forte.base_url = "https://sandbox.forte.net/api/v3"
 globalpay.base_url = "https://apis.sandbox.globalpay.com/ucp/"
 globepay.base_url = "https://pay.globepay.co/"
diff --git a/config/deployments/sandbox.toml b/config/deployments/sandbox.toml
index 5496c4ae102..af249369a12 100644
--- a/config/deployments/sandbox.toml
+++ b/config/deployments/sandbox.toml
@@ -50,7 +50,7 @@ dlocal.base_url = "https://sandbox.dlocal.com/"
 dummyconnector.base_url = "http://localhost:8080/dummy-connector"
 ebanx.base_url = "https://sandbox.ebanxpay.com/"
 fiserv.base_url = "https://cert.api.fiservapps.com/"
-fiservemea.base_url = "https://prod.emea.api.fiservapps.com/sandbox/ipp/payments-gateway/v2"
+fiservemea.base_url = "https://prod.emea.api.fiservapps.com/sandbox"
 forte.base_url = "https://sandbox.forte.net/api/v3"
 globalpay.base_url = "https://apis.sandbox.globalpay.com/ucp/"
 globepay.base_url = "https://pay.globepay.co/"
diff --git a/config/development.toml b/config/development.toml
index 401b1487843..87f952508e8 100644
--- a/config/development.toml
+++ b/config/development.toml
@@ -212,7 +212,7 @@ dlocal.base_url = "https://sandbox.dlocal.com/"
 dummyconnector.base_url = "http://localhost:8080/dummy-connector"
 ebanx.base_url = "https://sandbox.ebanxpay.com/"
 fiserv.base_url = "https://cert.api.fiservapps.com/"
-fiservemea.base_url = "https://prod.emea.api.fiservapps.com/sandbox/ipp/payments-gateway/v2"
+fiservemea.base_url = "https://prod.emea.api.fiservapps.com/sandbox"
 forte.base_url = "https://sandbox.forte.net/api/v3"
 globalpay.base_url = "https://apis.sandbox.globalpay.com/ucp/"
 globepay.base_url = "https://pay.globepay.co/"
diff --git a/config/docker_compose.toml b/config/docker_compose.toml
index 136864c9f98..6bf009c19f7 100644
--- a/config/docker_compose.toml
+++ b/config/docker_compose.toml
@@ -135,7 +135,7 @@ dlocal.base_url = "https://sandbox.dlocal.com/"
 dummyconnector.base_url = "http://localhost:8080/dummy-connector"
 ebanx.base_url = "https://sandbox.ebanxpay.com/"
 fiserv.base_url = "https://cert.api.fiservapps.com/"
-fiservemea.base_url = "https://prod.emea.api.fiservapps.com/sandbox/ipp/payments-gateway/v2"
+fiservemea.base_url = "https://prod.emea.api.fiservapps.com/sandbox"
 forte.base_url = "https://sandbox.forte.net/api/v3"
 globalpay.base_url = "https://apis.sandbox.globalpay.com/ucp/"
 globepay.base_url = "https://pay.globepay.co/"
diff --git a/crates/api_models/src/enums.rs b/crates/api_models/src/enums.rs
index 150d69f1e8d..b154341fb8b 100644
--- a/crates/api_models/src/enums.rs
+++ b/crates/api_models/src/enums.rs
@@ -48,7 +48,6 @@ pub enum RoutingAlgorithm {
 pub enum Connector {
     // Novalnet,
     // Nexixpay,
-    // Fiservemea,
     Adyenplatform,
     #[cfg(feature = "dummy_connector")]
     #[serde(rename = "phonypay")]
@@ -99,6 +98,7 @@ pub enum Connector {
     Dlocal,
     Ebanx,
     Fiserv,
+    Fiservemea,
     Forte,
     Globalpay,
     Globepay,
@@ -214,7 +214,6 @@ impl Connector {
 			// | Self::Novalnet
 			// | Self::Nexixpay
 			// | Self::Taxjar
-			// | Self::Fiservemea
             | Self::Adyen
             | Self::Adyenplatform
             | Self::Airwallex
@@ -233,6 +232,7 @@ impl Connector {
             | Self::Dlocal
             | Self::Ebanx
             | Self::Fiserv
+			| Self::Fiservemea
             | Self::Forte
             | Self::Globalpay
             | Self::Globepay
diff --git a/crates/common_enums/src/enums.rs b/crates/common_enums/src/enums.rs
index 078f490b800..dd935b9a50e 100644
--- a/crates/common_enums/src/enums.rs
+++ b/crates/common_enums/src/enums.rs
@@ -211,7 +211,7 @@ pub enum RoutableConnectors {
     Dlocal,
     Ebanx,
     Fiserv,
-    // Fiservemea,
+    Fiservemea,
     Forte,
     Globalpay,
     Globepay,
diff --git a/crates/connector_configs/src/connector.rs b/crates/connector_configs/src/connector.rs
index 51713f6166f..0bd69623599 100644
--- a/crates/connector_configs/src/connector.rs
+++ b/crates/connector_configs/src/connector.rs
@@ -161,6 +161,7 @@ pub struct ConnectorConfig {
     pub dlocal: Option<ConnectorTomlConfig>,
     pub ebanx_payout: Option<ConnectorTomlConfig>,
     pub fiserv: Option<ConnectorTomlConfig>,
+    pub fiservemea: Option<ConnectorTomlConfig>,
     pub forte: Option<ConnectorTomlConfig>,
     pub globalpay: Option<ConnectorTomlConfig>,
     pub globepay: Option<ConnectorTomlConfig>,
@@ -308,6 +309,7 @@ impl ConnectorConfig {
             Connector::Dlocal => Ok(connector_data.dlocal),
             Connector::Ebanx => Ok(connector_data.ebanx_payout),
             Connector::Fiserv => Ok(connector_data.fiserv),
+            Connector::Fiservemea => Ok(connector_data.fiservemea),
             Connector::Forte => Ok(connector_data.forte),
             Connector::Globalpay => Ok(connector_data.globalpay),
             Connector::Globepay => Ok(connector_data.globepay),
diff --git a/crates/connector_configs/toml/development.toml b/crates/connector_configs/toml/development.toml
index 4a2f09be69e..c4becca74ee 100644
--- a/crates/connector_configs/toml/development.toml
+++ b/crates/connector_configs/toml/development.toml
@@ -1455,6 +1455,47 @@ type="Text"
 [fiserv.connector_webhook_details]
 merchant_secret="Source verification key"
 
+[fiservemea]
+[[fiservemea.credit]]
+  payment_method_type = "Mastercard"
+[[fiservemea.credit]]
+  payment_method_type = "Visa"
+[[fiservemea.credit]]
+  payment_method_type = "Interac"
+[[fiservemea.credit]]
+  payment_method_type = "AmericanExpress"
+[[fiservemea.credit]]
+  payment_method_type = "JCB"
+[[fiservemea.credit]]
+  payment_method_type = "DinersClub"
+[[fiservemea.credit]]
+  payment_method_type = "Discover"
+[[fiservemea.credit]]
+  payment_method_type = "CartesBancaires"
+[[fiservemea.credit]]
+  payment_method_type = "UnionPay"
+[[fiservemea.debit]]
+  payment_method_type = "Mastercard"
+[[fiservemea.debit]]
+  payment_method_type = "Visa"
+[[fiservemea.debit]]
+  payment_method_type = "Interac"
+[[fiservemea.debit]]
+  payment_method_type = "AmericanExpress"
+[[fiservemea.debit]]
+  payment_method_type = "JCB"
+[[fiservemea.debit]]
+  payment_method_type = "DinersClub"
+[[fiservemea.debit]]
+  payment_method_type = "Discover"
+[[fiservemea.debit]]
+  payment_method_type = "CartesBancaires"
+[[fiservemea.debit]]
+  payment_method_type = "UnionPay"
+[fiservemea.connector_auth.BodyKey]
+api_key="API Key"
+key1="Secret Key"
+
 [forte]
 [[forte.credit]]
   payment_method_type = "Mastercard"
@@ -2954,7 +2995,7 @@ merchant_secret="Source verification key"
   payment_method_type = "CartesBancaires"
 [[square.debit]]
   payment_method_type = "UnionPay"
-[square_payout.connector_auth.BodyKey]
+[square.connector_auth.BodyKey]
 api_key = "Square API Key"
 key1 = "Square Client Id"
 [square.connector_webhook_details]
diff --git a/crates/connector_configs/toml/production.toml b/crates/connector_configs/toml/production.toml
index ea7aafed858..52cee886c3d 100644
--- a/crates/connector_configs/toml/production.toml
+++ b/crates/connector_configs/toml/production.toml
@@ -1221,6 +1221,47 @@ placeholder="Enter Terminal ID"
 required=true
 type="Text"
 
+[fiservemea]
+[[fiservemea.credit]]
+  payment_method_type = "Mastercard"
+[[fiservemea.credit]]
+  payment_method_type = "Visa"
+[[fiservemea.credit]]
+  payment_method_type = "Interac"
+[[fiservemea.credit]]
+  payment_method_type = "AmericanExpress"
+[[fiservemea.credit]]
+  payment_method_type = "JCB"
+[[fiservemea.credit]]
+  payment_method_type = "DinersClub"
+[[fiservemea.credit]]
+  payment_method_type = "Discover"
+[[fiservemea.credit]]
+  payment_method_type = "CartesBancaires"
+[[fiservemea.credit]]
+  payment_method_type = "UnionPay"
+[[fiservemea.debit]]
+  payment_method_type = "Mastercard"
+[[fiservemea.debit]]
+  payment_method_type = "Visa"
+[[fiservemea.debit]]
+  payment_method_type = "Interac"
+[[fiservemea.debit]]
+  payment_method_type = "AmericanExpress"
+[[fiservemea.debit]]
+  payment_method_type = "JCB"
+[[fiservemea.debit]]
+  payment_method_type = "DinersClub"
+[[fiservemea.debit]]
+  payment_method_type = "Discover"
+[[fiservemea.debit]]
+  payment_method_type = "CartesBancaires"
+[[fiservemea.debit]]
+  payment_method_type = "UnionPay"
+[fiservemea.connector_auth.BodyKey]
+api_key="API Key"
+key1="Secret Key"
+
 [forte]
 [[forte.credit]]
   payment_method_type = "Mastercard"
diff --git a/crates/connector_configs/toml/sandbox.toml b/crates/connector_configs/toml/sandbox.toml
index 21b4c0a4120..5ad65ab514e 100644
--- a/crates/connector_configs/toml/sandbox.toml
+++ b/crates/connector_configs/toml/sandbox.toml
@@ -1453,6 +1453,47 @@ placeholder="Enter Terminal ID"
 required=true
 type="Text"
 
+[fiservemea]
+[[fiservemea.credit]]
+  payment_method_type = "Mastercard"
+[[fiservemea.credit]]
+  payment_method_type = "Visa"
+[[fiservemea.credit]]
+  payment_method_type = "Interac"
+[[fiservemea.credit]]
+  payment_method_type = "AmericanExpress"
+[[fiservemea.credit]]
+  payment_method_type = "JCB"
+[[fiservemea.credit]]
+  payment_method_type = "DinersClub"
+[[fiservemea.credit]]
+  payment_method_type = "Discover"
+[[fiservemea.credit]]
+  payment_method_type = "CartesBancaires"
+[[fiservemea.credit]]
+  payment_method_type = "UnionPay"
+[[fiservemea.debit]]
+  payment_method_type = "Mastercard"
+[[fiservemea.debit]]
+  payment_method_type = "Visa"
+[[fiservemea.debit]]
+  payment_method_type = "Interac"
+[[fiservemea.debit]]
+  payment_method_type = "AmericanExpress"
+[[fiservemea.debit]]
+  payment_method_type = "JCB"
+[[fiservemea.debit]]
+  payment_method_type = "DinersClub"
+[[fiservemea.debit]]
+  payment_method_type = "Discover"
+[[fiservemea.debit]]
+  payment_method_type = "CartesBancaires"
+[[fiservemea.debit]]
+  payment_method_type = "UnionPay"
+[fiservemea.connector_auth.BodyKey]
+api_key="API Key"
+key1="Secret Key"
+
 [forte]
 [[forte.credit]]
   payment_method_type = "Mastercard"
@@ -2947,7 +2988,7 @@ merchant_secret="Source verification key"
   payment_method_type = "CartesBancaires"
 [[square.debit]]
   payment_method_type = "UnionPay"
-[square_payout.connector_auth.BodyKey]
+[square.connector_auth.BodyKey]
 api_key = "Square API Key"
 key1 = "Square Client Id"
 [square.connector_webhook_details]
diff --git a/crates/hyperswitch_connectors/src/connectors/fiservemea.rs b/crates/hyperswitch_connectors/src/connectors/fiservemea.rs
index 83674893724..a7eed07d30c 100644
--- a/crates/hyperswitch_connectors/src/connectors/fiservemea.rs
+++ b/crates/hyperswitch_connectors/src/connectors/fiservemea.rs
@@ -1,14 +1,16 @@
 pub mod transformers;
 
+use base64::Engine;
+use common_enums::enums;
 use common_utils::{
     errors::CustomResult,
     ext_traits::BytesExt,
     request::{Method, Request, RequestBuilder, RequestContent},
-    types::{AmountConvertor, StringMinorUnit, StringMinorUnitForConnector},
+    types::{AmountConvertor, StringMajorUnit, StringMajorUnitForConnector},
 };
 use error_stack::{report, ResultExt};
 use hyperswitch_domain_models::{
-    router_data::{AccessToken, ConnectorAuthType, ErrorResponse, RouterData},
+    router_data::{AccessToken, ErrorResponse, RouterData},
     router_flow_types::{
         access_token_auth::AccessTokenAuth,
         payments::{Authorize, Capture, PSync, PaymentMethodToken, Session, SetupMandate, Void},
@@ -21,34 +23,60 @@ use hyperswitch_domain_models::{
     },
     router_response_types::{PaymentsResponseData, RefundsResponseData},
     types::{
-        PaymentsAuthorizeRouterData, PaymentsCaptureRouterData, PaymentsSyncRouterData,
-        RefundSyncRouterData, RefundsRouterData,
+        PaymentsAuthorizeRouterData, PaymentsCancelRouterData, PaymentsCaptureRouterData,
+        PaymentsSyncRouterData, RefundSyncRouterData, RefundsRouterData,
     },
 };
 use hyperswitch_interfaces::{
     api::{self, ConnectorCommon, ConnectorCommonExt, ConnectorIntegration, ConnectorValidation},
     configs::Connectors,
-    errors,
+    consts, errors,
     events::connector_api_logs::ConnectorEvent,
     types::{self, Response},
     webhooks,
 };
-use masking::{ExposeInterface, Mask};
+use masking::{ExposeInterface, Mask, PeekInterface};
+use ring::hmac;
+use time::OffsetDateTime;
 use transformers as fiservemea;
+use uuid::Uuid;
 
-use crate::{constants::headers, types::ResponseRouterData, utils};
+use crate::{
+    constants::headers,
+    types::ResponseRouterData,
+    utils::{self, RefundsRequestData as _},
+};
 
 #[derive(Clone)]
 pub struct Fiservemea {
-    amount_converter: &'static (dyn AmountConvertor<Output = StringMinorUnit> + Sync),
+    amount_converter: &'static (dyn AmountConvertor<Output = StringMajorUnit> + Sync),
 }
 
 impl Fiservemea {
     pub fn new() -> &'static Self {
         &Self {
-            amount_converter: &StringMinorUnitForConnector,
+            amount_converter: &StringMajorUnitForConnector,
         }
     }
+
+    pub fn generate_authorization_signature(
+        &self,
+        auth: fiservemea::FiservemeaAuthType,
+        request_id: &str,
+        payload: &str,
+        timestamp: i128,
+    ) -> CustomResult<String, errors::ConnectorError> {
+        let fiservemea::FiservemeaAuthType {
+            api_key,
+            secret_key,
+        } = auth;
+        let raw_signature = format!("{}{request_id}{timestamp}{payload}", api_key.peek());
+
+        let key = hmac::Key::new(hmac::HMAC_SHA256, secret_key.expose().as_bytes());
+        let signature_value = common_utils::consts::BASE64_ENGINE
+            .encode(hmac::sign(&key, raw_signature.as_bytes()).as_ref());
+        Ok(signature_value)
+    }
 }
 
 impl api::Payment for Fiservemea {}
@@ -64,10 +92,28 @@ impl api::RefundExecute for Fiservemea {}
 impl api::RefundSync for Fiservemea {}
 impl api::PaymentToken for Fiservemea {}
 
+impl ConnectorIntegration<Session, PaymentsSessionData, PaymentsResponseData> for Fiservemea {}
+
+impl ConnectorIntegration<AccessTokenAuth, AccessTokenRequestData, AccessToken> for Fiservemea {}
+
+impl ConnectorIntegration<SetupMandate, SetupMandateRequestData, PaymentsResponseData>
+    for Fiservemea
+{
+    fn build_request(
+        &self,
+        _req: &RouterData<SetupMandate, SetupMandateRequestData, PaymentsResponseData>,
+        _connectors: &Connectors,
+    ) -> CustomResult<Option<Request>, errors::ConnectorError> {
+        Err(
+            errors::ConnectorError::NotImplemented("Setup Mandate flow for Fiservemea".to_string())
+                .into(),
+        )
+    }
+}
+
 impl ConnectorIntegration<PaymentMethodToken, PaymentMethodTokenizationData, PaymentsResponseData>
     for Fiservemea
 {
-    // Not Implemented (R)
 }
 
 impl<Flow, Request, Response> ConnectorCommonExt<Flow, Request, Response> for Fiservemea
@@ -77,15 +123,42 @@ where
     fn build_headers(
         &self,
         req: &RouterData<Flow, Request, Response>,
-        _connectors: &Connectors,
+        connectors: &Connectors,
     ) -> CustomResult<Vec<(String, masking::Maskable<String>)>, errors::ConnectorError> {
-        let mut 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)
+        let timestamp = OffsetDateTime::now_utc().unix_timestamp_nanos() / 1_000_000;
+        let auth: fiservemea::FiservemeaAuthType =
+            fiservemea::FiservemeaAuthType::try_from(&req.connector_auth_type)?;
+
+        let client_request_id = Uuid::new_v4().to_string();
+        let http_method = self.get_http_method();
+        let hmac = match http_method {
+            Method::Get => self
+                .generate_authorization_signature(auth.clone(), &client_request_id, "", timestamp)
+                .change_context(errors::ConnectorError::RequestEncodingFailed)?,
+            Method::Post | Method::Put | Method::Delete | Method::Patch => {
+                let fiserv_req = self.get_request_body(req, connectors)?;
+                self.generate_authorization_signature(
+                    auth.clone(),
+                    &client_request_id,
+                    fiserv_req.get_inner_value().peek(),
+                    timestamp,
+                )
+                .change_context(errors::ConnectorError::RequestEncodingFailed)?
+            }
+        };
+        let headers = vec![
+            (
+                headers::CONTENT_TYPE.to_string(),
+                types::PaymentsAuthorizeType::get_content_type(self)
+                    .to_string()
+                    .into(),
+            ),
+            ("Client-Request-Id".to_string(), client_request_id.into()),
+            (headers::API_KEY.to_string(), auth.api_key.expose().into()),
+            (headers::TIMESTAMP.to_string(), timestamp.to_string().into()),
+            (headers::MESSAGE_SIGNATURE.to_string(), hmac.into_masked()),
+        ];
+        Ok(headers)
     }
 }
 
@@ -96,9 +169,6 @@ impl ConnectorCommon for Fiservemea {
 
     fn get_currency_unit(&self) -> api::CurrencyUnit {
         api::CurrencyUnit::Base
-        //    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 {
@@ -109,18 +179,6 @@ impl ConnectorCommon for Fiservemea {
         connectors.fiservemea.base_url.as_ref()
     }
 
-    fn get_auth_header(
-        &self,
-        auth_type: &ConnectorAuthType,
-    ) -> CustomResult<Vec<(String, masking::Maskable<String>)>, errors::ConnectorError> {
-        let auth = fiservemea::FiservemeaAuthType::try_from(auth_type)
-            .change_context(errors::ConnectorError::FailedToObtainAuthType)?;
-        Ok(vec![(
-            headers::AUTHORIZATION.to_string(),
-            auth.api_key.expose().into_masked(),
-        )])
-    }
-
     fn build_error_response(
         &self,
         res: Response,
@@ -134,30 +192,74 @@ impl ConnectorCommon for Fiservemea {
         event_builder.map(|i| i.set_response_body(&response));
         router_env::logger::info!(connector_response=?response);
 
-        Ok(ErrorResponse {
-            status_code: res.status_code,
-            code: response.code,
-            message: response.message,
-            reason: response.reason,
-            attempt_status: None,
-            connector_transaction_id: None,
-        })
+        match response.error {
+            Some(error) => {
+                let details = error.details.map(|details| {
+                    details
+                        .iter()
+                        .map(|detail| {
+                            format!(
+                                "{}: {}",
+                                detail
+                                    .field
+                                    .clone()
+                                    .unwrap_or("No Field Provided".to_string()),
+                                detail
+                                    .message
+                                    .clone()
+                                    .unwrap_or("No Message Provided".to_string())
+                            )
+                        })
+                        .collect::<Vec<String>>()
+                        .join(", ")
+                });
+                Ok(ErrorResponse {
+                    status_code: res.status_code,
+                    code: error.code.unwrap_or(consts::NO_ERROR_CODE.to_string()),
+                    message: response
+                        .response_type
+                        .unwrap_or(consts::NO_ERROR_MESSAGE.to_string()),
+                    reason: match details {
+                        Some(details) => Some(format!(
+                            "{} {}",
+                            error.message.unwrap_or("".to_string()),
+                            details
+                        )),
+                        None => error.message,
+                    },
+                    attempt_status: None,
+                    connector_transaction_id: None,
+                })
+            }
+            None => Ok(ErrorResponse {
+                status_code: res.status_code,
+                code: consts::NO_ERROR_CODE.to_string(),
+                message: response
+                    .response_type
+                    .clone()
+                    .unwrap_or(consts::NO_ERROR_MESSAGE.to_string()),
+                reason: response.response_type,
+                attempt_status: None,
+                connector_transaction_id: None,
+            }),
+        }
     }
 }
 
 impl ConnectorValidation for Fiservemea {
-    //TODO: implement functions when support enabled
-}
-
-impl ConnectorIntegration<Session, PaymentsSessionData, PaymentsResponseData> for Fiservemea {
-    //TODO: implement sessions flow
-}
-
-impl ConnectorIntegration<AccessTokenAuth, AccessTokenRequestData, AccessToken> for Fiservemea {}
-
-impl ConnectorIntegration<SetupMandate, SetupMandateRequestData, PaymentsResponseData>
-    for Fiservemea
-{
+    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<Authorize, PaymentsAuthorizeData, PaymentsResponseData> for Fiservemea {
@@ -176,9 +278,12 @@ impl ConnectorIntegration<Authorize, PaymentsAuthorizeData, PaymentsResponseData
     fn get_url(
         &self,
         _req: &PaymentsAuthorizeRouterData,
-        _connectors: &Connectors,
+        connectors: &Connectors,
     ) -> CustomResult<String, errors::ConnectorError> {
-        Err(errors::ConnectorError::NotImplemented("get_url method".to_string()).into())
+        Ok(format!(
+            "{}/ipp/payments-gateway/v2/payments",
+            self.base_url(connectors)
+        ))
     }
 
     fn get_request_body(
@@ -261,12 +366,24 @@ impl ConnectorIntegration<PSync, PaymentsSyncData, PaymentsResponseData> for Fis
         self.common_get_content_type()
     }
 
+    fn get_http_method(&self) -> Method {
+        Method::Get
+    }
+
     fn get_url(
         &self,
-        _req: &PaymentsSyncRouterData,
-        _connectors: &Connectors,
+        req: &PaymentsSyncRouterData,
+        connectors: &Connectors,
     ) -> CustomResult<String, errors::ConnectorError> {
-        Err(errors::ConnectorError::NotImplemented("get_url method".to_string()).into())
+        let connector_payment_id = req
+            .request
+            .connector_transaction_id
+            .get_connector_transaction_id()
+            .change_context(errors::ConnectorError::MissingConnectorTransactionID)?;
+        Ok(format!(
+            "{}/ipp/payments-gateway/v2/payments/{connector_payment_id}",
+            self.base_url(connectors)
+        ))
     }
 
     fn build_request(
@@ -327,18 +444,30 @@ impl ConnectorIntegration<Capture, PaymentsCaptureData, PaymentsResponseData> fo
 
     fn get_url(
         &self,
-        _req: &PaymentsCaptureRouterData,
-        _connectors: &Connectors,
+        req: &PaymentsCaptureRouterData,
+        connectors: &Connectors,
     ) -> CustomResult<String, errors::ConnectorError> {
-        Err(errors::ConnectorError::NotImplemented("get_url method".to_string()).into())
+        let connector_payment_id = req.request.connector_transaction_id.clone();
+        Ok(format!(
+            "{}/ipp/payments-gateway/v2/payments/{connector_payment_id}",
+            self.base_url(connectors)
+        ))
     }
 
     fn get_request_body(
         &self,
-        _req: &PaymentsCaptureRouterData,
+        req: &PaymentsCaptureRouterData,
         _connectors: &Connectors,
     ) -> CustomResult<RequestContent, errors::ConnectorError> {
-        Err(errors::ConnectorError::NotImplemented("get_request_body method".to_string()).into())
+        let amount = utils::convert_amount(
+            self.amount_converter,
+            req.request.minor_amount_to_capture,
+            req.request.currency,
+        )?;
+
+        let connector_router_data = fiservemea::FiservemeaRouterData::from((amount, req));
+        let connector_req = fiservemea::FiservemeaCaptureRequest::try_from(&connector_router_data)?;
+        Ok(RequestContent::Json(Box::new(connector_req)))
     }
 
     fn build_request(
@@ -389,7 +518,85 @@ impl ConnectorIntegration<Capture, PaymentsCaptureData, PaymentsResponseData> fo
     }
 }
 
-impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Fiservemea {}
+impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Fiservemea {
+    fn get_headers(
+        &self,
+        req: &PaymentsCancelRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Vec<(String, masking::Maskable<String>)>, errors::ConnectorError> {
+        self.build_headers(req, connectors)
+    }
+
+    fn get_content_type(&self) -> &'static str {
+        self.common_get_content_type()
+    }
+
+    fn get_url(
+        &self,
+        req: &PaymentsCancelRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<String, errors::ConnectorError> {
+        let connector_payment_id = req.request.connector_transaction_id.clone();
+        Ok(format!(
+            "{}/ipp/payments-gateway/v2/payments/{connector_payment_id}",
+            self.base_url(connectors)
+        ))
+    }
+
+    fn get_request_body(
+        &self,
+        req: &PaymentsCancelRouterData,
+        _connectors: &Connectors,
+    ) -> CustomResult<RequestContent, errors::ConnectorError> {
+        let connector_req = fiservemea::FiservemeaVoidRequest::try_from(req)?;
+        Ok(RequestContent::Json(Box::new(connector_req)))
+    }
+
+    fn build_request(
+        &self,
+        req: &PaymentsCancelRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Option<Request>, errors::ConnectorError> {
+        Ok(Some(
+            RequestBuilder::new()
+                .method(Method::Post)
+                .url(&types::PaymentsVoidType::get_url(self, req, connectors)?)
+                .attach_default_headers()
+                .headers(types::PaymentsVoidType::get_headers(self, req, connectors)?)
+                .set_body(types::PaymentsVoidType::get_request_body(
+                    self, req, connectors,
+                )?)
+                .build(),
+        ))
+    }
+
+    fn handle_response(
+        &self,
+        data: &PaymentsCancelRouterData,
+        event_builder: Option<&mut ConnectorEvent>,
+        res: Response,
+    ) -> CustomResult<PaymentsCancelRouterData, errors::ConnectorError> {
+        let response: fiservemea::FiservemeaPaymentsResponse = res
+            .response
+            .parse_struct("Fiservemea PaymentsCaptureResponse")
+            .change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
+        event_builder.map(|i| i.set_response_body(&response));
+        router_env::logger::info!(connector_response=?response);
+        RouterData::try_from(ResponseRouterData {
+            response,
+            data: data.clone(),
+            http_code: res.status_code,
+        })
+    }
+
+    fn get_error_response(
+        &self,
+        res: Response,
+        event_builder: Option<&mut ConnectorEvent>,
+    ) -> CustomResult<ErrorResponse, errors::ConnectorError> {
+        self.build_error_response(res, event_builder)
+    }
+}
 
 impl ConnectorIntegration<Execute, RefundsData, RefundsResponseData> for Fiservemea {
     fn get_headers(
@@ -406,10 +613,14 @@ impl ConnectorIntegration<Execute, RefundsData, RefundsResponseData> for Fiserve
 
     fn get_url(
         &self,
-        _req: &RefundsRouterData<Execute>,
-        _connectors: &Connectors,
+        req: &RefundsRouterData<Execute>,
+        connectors: &Connectors,
     ) -> CustomResult<String, errors::ConnectorError> {
-        Err(errors::ConnectorError::NotImplemented("get_url method".to_string()).into())
+        let connector_payment_id = req.request.connector_transaction_id.clone();
+        Ok(format!(
+            "{}/ipp/payments-gateway/v2/payments/{connector_payment_id}",
+            self.base_url(connectors)
+        ))
     }
 
     fn get_request_body(
@@ -453,7 +664,7 @@ impl ConnectorIntegration<Execute, RefundsData, RefundsResponseData> for Fiserve
         event_builder: Option<&mut ConnectorEvent>,
         res: Response,
     ) -> CustomResult<RefundsRouterData<Execute>, errors::ConnectorError> {
-        let response: fiservemea::RefundResponse = res
+        let response: fiservemea::FiservemeaPaymentsResponse = res
             .response
             .parse_struct("fiservemea RefundResponse")
             .change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
@@ -488,12 +699,20 @@ impl ConnectorIntegration<RSync, RefundsData, RefundsResponseData> for Fiserveme
         self.common_get_content_type()
     }
 
+    fn get_http_method(&self) -> Method {
+        Method::Get
+    }
+
     fn get_url(
         &self,
-        _req: &RefundSyncRouterData,
-        _connectors: &Connectors,
+        req: &RefundSyncRouterData,
+        connectors: &Connectors,
     ) -> CustomResult<String, errors::ConnectorError> {
-        Err(errors::ConnectorError::NotImplemented("get_url method".to_string()).into())
+        let connector_payment_id = req.request.get_connector_refund_id()?;
+        Ok(format!(
+            "{}/ipp/payments-gateway/v2/payments/{connector_payment_id}",
+            self.base_url(connectors)
+        ))
     }
 
     fn build_request(
@@ -520,7 +739,7 @@ impl ConnectorIntegration<RSync, RefundsData, RefundsResponseData> for Fiserveme
         event_builder: Option<&mut ConnectorEvent>,
         res: Response,
     ) -> CustomResult<RefundSyncRouterData, errors::ConnectorError> {
-        let response: fiservemea::RefundResponse = res
+        let response: fiservemea::FiservemeaPaymentsResponse = res
             .response
             .parse_struct("fiservemea RefundSyncResponse")
             .change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
diff --git a/crates/hyperswitch_connectors/src/connectors/fiservemea/transformers.rs b/crates/hyperswitch_connectors/src/connectors/fiservemea/transformers.rs
index e6307b4bdf5..fdec3d0e1eb 100644
--- a/crates/hyperswitch_connectors/src/connectors/fiservemea/transformers.rs
+++ b/crates/hyperswitch_connectors/src/connectors/fiservemea/transformers.rs
@@ -1,12 +1,15 @@
 use common_enums::enums;
-use common_utils::types::StringMinorUnit;
+use common_utils::types::StringMajorUnit;
 use hyperswitch_domain_models::{
     payment_method_data::PaymentMethodData,
     router_data::{ConnectorAuthType, RouterData},
     router_flow_types::refunds::{Execute, RSync},
     router_request_types::ResponseId,
     router_response_types::{PaymentsResponseData, RefundsResponseData},
-    types::{PaymentsAuthorizeRouterData, RefundsRouterData},
+    types::{
+        PaymentsAuthorizeRouterData, PaymentsCancelRouterData, PaymentsCaptureRouterData,
+        RefundsRouterData,
+    },
 };
 use hyperswitch_interfaces::errors;
 use masking::Secret;
@@ -14,17 +17,17 @@ use serde::{Deserialize, Serialize};
 
 use crate::{
     types::{RefundsResponseRouterData, ResponseRouterData},
-    utils::PaymentsAuthorizeRequestData,
+    utils::CardData as _,
 };
 
 //TODO: Fill the struct with respective fields
 pub struct FiservemeaRouterData<T> {
-    pub amount: StringMinorUnit, // The type of amount that a connector accepts, for example, String, i64, f64, etc.
+    pub amount: StringMajorUnit, // The type of amount that a connector accepts, for example, String, i64, f64, etc.
     pub router_data: T,
 }
 
-impl<T> From<(StringMinorUnit, T)> for FiservemeaRouterData<T> {
-    fn from((amount, item): (StringMinorUnit, T)) -> Self {
+impl<T> From<(StringMajorUnit, T)> for FiservemeaRouterData<T> {
+    fn from((amount, item): (StringMajorUnit, T)) -> Self {
         //Todo :  use utils to convert the amount to the type of amount that a connector accepts
         Self {
             amount,
@@ -33,20 +36,56 @@ impl<T> From<(StringMinorUnit, T)> for FiservemeaRouterData<T> {
     }
 }
 
-//TODO: Fill the struct with respective fields
-#[derive(Default, Debug, Serialize, PartialEq)]
-pub struct FiservemeaPaymentsRequest {
-    amount: StringMinorUnit,
-    card: FiservemeaCard,
+#[derive(Debug, Serialize)]
+pub struct FiservemeaTransactionAmount {
+    total: StringMajorUnit,
+    currency: common_enums::Currency,
+}
+
+#[derive(Debug, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct FiservemeaOrder {
+    order_id: String,
+}
+
+#[derive(Debug, Serialize)]
+pub enum FiservemeaRequestType {
+    PaymentCardSaleTransaction,
+    PaymentCardPreAuthTransaction,
+    PostAuthTransaction,
+    VoidPreAuthTransactions,
+    ReturnTransaction,
+}
+
+#[derive(Debug, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct FiservemeaExpiryDate {
+    month: Secret<String>,
+    year: Secret<String>,
 }
 
-#[derive(Default, Debug, Serialize, Eq, PartialEq)]
-pub struct FiservemeaCard {
+#[derive(Debug, Serialize)]
+#[serde(rename_all = "camelCase")]
+pub struct FiservemeaPaymentCard {
     number: cards::CardNumber,
-    expiry_month: Secret<String>,
-    expiry_year: Secret<String>,
-    cvc: Secret<String>,
-    complete: bool,
+    expiry_date: FiservemeaExpiryDate,
+    security_code: Secret<String>,
+}
+
+#[derive(Debug, Serialize)]
+#[serde(rename_all = "camelCase")]
+pub enum FiservemeaPaymentMethods {
+    PaymentCard(FiservemeaPaymentCard),
+}
+
+#[derive(Debug, Serialize)]
+#[serde(rename_all = "camelCase")]
+pub struct FiservemeaPaymentsRequest {
+    request_type: FiservemeaRequestType,
+    merchant_transaction_id: String,
+    transaction_amount: FiservemeaTransactionAmount,
+    order: FiservemeaOrder,
+    payment_method: FiservemeaPaymentMethods,
 }
 
 impl TryFrom<&FiservemeaRouterData<&PaymentsAuthorizeRouterData>> for FiservemeaPaymentsRequest {
@@ -56,66 +95,262 @@ impl TryFrom<&FiservemeaRouterData<&PaymentsAuthorizeRouterData>> for Fiservemea
     ) -> Result<Self, Self::Error> {
         match item.router_data.request.payment_method_data.clone() {
             PaymentMethodData::Card(req_card) => {
-                let card = FiservemeaCard {
-                    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 card = FiservemeaPaymentCard {
+                    number: req_card.card_number.clone(),
+                    expiry_date: FiservemeaExpiryDate {
+                        month: req_card.card_exp_month.clone(),
+                        year: req_card.get_card_expiry_year_2_digit()?,
+                    },
+                    security_code: req_card.card_cvc,
+                };
+                let request_type = if item.router_data.request.capture_method
+                    == Some(enums::CaptureMethod::Automatic)
+                {
+                    FiservemeaRequestType::PaymentCardSaleTransaction
+                } else {
+                    FiservemeaRequestType::PaymentCardPreAuthTransaction
                 };
                 Ok(Self {
-                    amount: item.amount.clone(),
-                    card,
+                    request_type,
+                    merchant_transaction_id: item
+                        .router_data
+                        .request
+                        .merchant_order_reference_id
+                        .clone()
+                        .unwrap_or(item.router_data.connector_request_reference_id.clone()),
+                    transaction_amount: FiservemeaTransactionAmount {
+                        total: item.amount.clone(),
+                        currency: item.router_data.request.currency,
+                    },
+                    order: FiservemeaOrder {
+                        order_id: item.router_data.connector_request_reference_id.clone(),
+                    },
+                    payment_method: FiservemeaPaymentMethods::PaymentCard(card),
                 })
             }
-            _ => Err(errors::ConnectorError::NotImplemented("Payment methods".to_string()).into()),
+            _ => Err(errors::ConnectorError::NotImplemented(
+                "Selected payment method through fiservemea".to_string(),
+            )
+            .into()),
         }
     }
 }
 
-//TODO: Fill the struct with respective fields
 // Auth Struct
+#[derive(Clone)]
 pub struct FiservemeaAuthType {
     pub(super) api_key: Secret<String>,
+    pub(super) secret_key: Secret<String>,
 }
 
 impl TryFrom<&ConnectorAuthType> for FiservemeaAuthType {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(auth_type: &ConnectorAuthType) -> Result<Self, Self::Error> {
         match auth_type {
-            ConnectorAuthType::HeaderKey { api_key } => Ok(Self {
+            ConnectorAuthType::BodyKey { api_key, key1 } => Ok(Self {
                 api_key: api_key.to_owned(),
+                secret_key: key1.to_owned(),
             }),
             _ => Err(errors::ConnectorError::FailedToObtainAuthType.into()),
         }
     }
 }
+
 // PaymentsResponse
-//TODO: Append the remaining status flags
-#[derive(Debug, Clone, Default, Serialize, Deserialize, PartialEq)]
-#[serde(rename_all = "lowercase")]
+#[derive(Debug, Serialize, Deserialize)]
+pub enum ResponseType {
+    BadRequest,
+    Unauthenticated,
+    Unauthorized,
+    NotFound,
+    GatewayDeclined,
+    EndpointDeclined,
+    ServerError,
+    EndpointCommunicationError,
+    UnsupportedMediaType,
+}
+
+#[derive(Debug, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub enum FiservemeaResponseType {
+    TransactionResponse,
+    ErrorResponse,
+}
+
+#[derive(Debug, Serialize, Deserialize, PartialEq)]
+#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
+pub enum FiservemeaTransactionType {
+    Sale,
+    Preauth,
+    Credit,
+    ForcedTicket,
+    Void,
+    Return,
+    Postauth,
+    PayerAuth,
+    Disbursement,
+}
+
+#[derive(Debug, Serialize, Deserialize)]
+#[serde(rename_all = "UPPERCASE")]
+pub enum FiservemeaTransactionOrigin {
+    Ecom,
+    Moto,
+    Mail,
+    Phone,
+    Retail,
+}
+
+#[derive(Debug, Serialize, Deserialize)]
+#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
 pub enum FiservemeaPaymentStatus {
-    Succeeded,
+    Approved,
+    Waiting,
+    Partial,
+    ValidationFailed,
+    ProcessingFailed,
+    Declined,
+}
+
+#[derive(Debug, Serialize, Deserialize)]
+#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
+pub enum FiservemeaPaymentResult {
+    Approved,
+    Declined,
     Failed,
-    #[default]
-    Processing,
+    Waiting,
+    Partial,
+    Fraud,
 }
 
-impl From<FiservemeaPaymentStatus> for common_enums::AttemptStatus {
-    fn from(item: FiservemeaPaymentStatus) -> Self {
-        match item {
-            FiservemeaPaymentStatus::Succeeded => Self::Charged,
-            FiservemeaPaymentStatus::Failed => Self::Failure,
-            FiservemeaPaymentStatus::Processing => Self::Authorizing,
-        }
+#[derive(Debug, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct FiservemeaPaymentCardResponse {
+    expiry_date: Option<FiservemeaExpiryDate>,
+    bin: Option<String>,
+    last4: Option<String>,
+    brand: Option<String>,
+}
+
+#[derive(Debug, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct FiservemeaPaymentMethodDetails {
+    payment_card: Option<FiservemeaPaymentCardResponse>,
+    payment_method_type: Option<String>,
+    payment_method_brand: Option<String>,
+}
+
+#[derive(Debug, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct Components {
+    subtotal: Option<f64>,
+}
+
+#[derive(Debug, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct AmountDetails {
+    total: Option<f64>,
+    currency: Option<common_enums::Currency>,
+    components: Option<Components>,
+}
+
+#[derive(Debug, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct AvsResponse {
+    street_match: Option<String>,
+    postal_code_match: Option<String>,
+}
+
+#[derive(Debug, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct Processor {
+    reference_number: Option<String>,
+    authorization_code: Option<String>,
+    response_code: Option<String>,
+    response_message: Option<String>,
+    avs_response: Option<AvsResponse>,
+    security_code_response: Option<String>,
+}
+
+fn map_status(
+    fiservemea_status: Option<FiservemeaPaymentStatus>,
+    fiservemea_result: Option<FiservemeaPaymentResult>,
+    transaction_type: FiservemeaTransactionType,
+) -> common_enums::AttemptStatus {
+    match fiservemea_status {
+        Some(status) => match status {
+            FiservemeaPaymentStatus::Approved => match transaction_type {
+                FiservemeaTransactionType::Preauth => common_enums::AttemptStatus::Authorized,
+                FiservemeaTransactionType::Void => common_enums::AttemptStatus::Voided,
+                FiservemeaTransactionType::Sale | FiservemeaTransactionType::Postauth => {
+                    common_enums::AttemptStatus::Charged
+                }
+                FiservemeaTransactionType::Credit
+                | FiservemeaTransactionType::ForcedTicket
+                | FiservemeaTransactionType::Return
+                | FiservemeaTransactionType::PayerAuth
+                | FiservemeaTransactionType::Disbursement => common_enums::AttemptStatus::Failure,
+            },
+            FiservemeaPaymentStatus::Waiting => common_enums::AttemptStatus::Pending,
+            FiservemeaPaymentStatus::Partial => common_enums::AttemptStatus::PartialCharged,
+            FiservemeaPaymentStatus::ValidationFailed
+            | FiservemeaPaymentStatus::ProcessingFailed
+            | FiservemeaPaymentStatus::Declined => common_enums::AttemptStatus::Failure,
+        },
+        None => match fiservemea_result {
+            Some(result) => match result {
+                FiservemeaPaymentResult::Approved => match transaction_type {
+                    FiservemeaTransactionType::Preauth => common_enums::AttemptStatus::Authorized,
+                    FiservemeaTransactionType::Void => common_enums::AttemptStatus::Voided,
+                    FiservemeaTransactionType::Sale | FiservemeaTransactionType::Postauth => {
+                        common_enums::AttemptStatus::Charged
+                    }
+                    FiservemeaTransactionType::Credit
+                    | FiservemeaTransactionType::ForcedTicket
+                    | FiservemeaTransactionType::Return
+                    | FiservemeaTransactionType::PayerAuth
+                    | FiservemeaTransactionType::Disbursement => {
+                        common_enums::AttemptStatus::Failure
+                    }
+                },
+                FiservemeaPaymentResult::Waiting => common_enums::AttemptStatus::Pending,
+                FiservemeaPaymentResult::Partial => common_enums::AttemptStatus::PartialCharged,
+                FiservemeaPaymentResult::Declined
+                | FiservemeaPaymentResult::Failed
+                | FiservemeaPaymentResult::Fraud => common_enums::AttemptStatus::Failure,
+            },
+            None => common_enums::AttemptStatus::Pending,
+        },
     }
 }
 
-//TODO: Fill the struct with respective fields
-#[derive(Default, Debug, Clone, Serialize, Deserialize, PartialEq)]
+#[derive(Debug, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
 pub struct FiservemeaPaymentsResponse {
-    status: FiservemeaPaymentStatus,
-    id: String,
+    response_type: Option<ResponseType>,
+    #[serde(rename = "type")]
+    fiservemea_type: Option<FiservemeaResponseType>,
+    client_request_id: Option<String>,
+    api_trace_id: Option<String>,
+    ipg_transaction_id: String,
+    order_id: Option<String>,
+    transaction_type: FiservemeaTransactionType,
+    transaction_origin: Option<FiservemeaTransactionOrigin>,
+    payment_method_details: Option<FiservemeaPaymentMethodDetails>,
+    country: Option<Secret<String>>,
+    terminal_id: Option<String>,
+    merchant_id: Option<String>,
+    merchant_transaction_id: Option<String>,
+    transaction_time: Option<i64>,
+    approved_amount: Option<AmountDetails>,
+    transaction_amount: Option<AmountDetails>,
+    transaction_status: Option<FiservemeaPaymentStatus>, // FiservEMEA Docs mention that this field is deprecated. We are using it for now because transaction_result is not present in the response.
+    transaction_result: Option<FiservemeaPaymentResult>,
+    approval_code: Option<String>,
+    error_message: Option<String>,
+    transaction_state: Option<String>,
+    scheme_transaction_id: Option<String>,
+    processor: Option<Processor>,
 }
 
 impl<F, T> TryFrom<ResponseRouterData<F, FiservemeaPaymentsResponse, T, PaymentsResponseData>>
@@ -126,14 +361,18 @@ impl<F, T> TryFrom<ResponseRouterData<F, FiservemeaPaymentsResponse, T, Payments
         item: ResponseRouterData<F, FiservemeaPaymentsResponse, T, PaymentsResponseData>,
     ) -> Result<Self, Self::Error> {
         Ok(Self {
-            status: common_enums::AttemptStatus::from(item.response.status),
+            status: map_status(
+                item.response.transaction_status,
+                item.response.transaction_result,
+                item.response.transaction_type,
+            ),
             response: Ok(PaymentsResponseData::TransactionResponse {
-                resource_id: ResponseId::ConnectorTransactionId(item.response.id),
+                resource_id: ResponseId::ConnectorTransactionId(item.response.ipg_transaction_id),
                 redirection_data: None,
                 mandate_reference: None,
                 connector_metadata: None,
                 network_txn_id: None,
-                connector_response_reference_id: None,
+                connector_response_reference_id: item.response.order_id,
                 incremental_authorization_allowed: None,
                 charge_id: None,
             }),
@@ -142,87 +381,154 @@ impl<F, T> TryFrom<ResponseRouterData<F, FiservemeaPaymentsResponse, T, Payments
     }
 }
 
-//TODO: Fill the struct with respective fields
-// REFUND :
-// Type definition for RefundRequest
-#[derive(Default, Debug, Serialize)]
-pub struct FiservemeaRefundRequest {
-    pub amount: StringMinorUnit,
+#[derive(Debug, Serialize)]
+#[serde(rename_all = "camelCase")]
+pub struct FiservemeaCaptureRequest {
+    request_type: FiservemeaRequestType,
+    transaction_amount: FiservemeaTransactionAmount,
 }
 
-impl<F> TryFrom<&FiservemeaRouterData<&RefundsRouterData<F>>> for FiservemeaRefundRequest {
+impl TryFrom<&FiservemeaRouterData<&PaymentsCaptureRouterData>> for FiservemeaCaptureRequest {
     type Error = error_stack::Report<errors::ConnectorError>;
-    fn try_from(item: &FiservemeaRouterData<&RefundsRouterData<F>>) -> Result<Self, Self::Error> {
+    fn try_from(
+        item: &FiservemeaRouterData<&PaymentsCaptureRouterData>,
+    ) -> Result<Self, Self::Error> {
         Ok(Self {
-            amount: item.amount.to_owned(),
+            request_type: FiservemeaRequestType::PostAuthTransaction,
+            transaction_amount: FiservemeaTransactionAmount {
+                total: item.amount.clone(),
+                currency: item.router_data.request.currency,
+            },
         })
     }
 }
 
-// Type definition for Refund Response
+#[derive(Debug, Serialize)]
+#[serde(rename_all = "camelCase")]
+pub struct FiservemeaVoidRequest {
+    request_type: FiservemeaRequestType,
+}
 
-#[allow(dead_code)]
-#[derive(Debug, Serialize, Default, Deserialize, Clone)]
-pub enum RefundStatus {
-    Succeeded,
-    Failed,
-    #[default]
-    Processing,
+impl TryFrom<&PaymentsCancelRouterData> for FiservemeaVoidRequest {
+    type Error = error_stack::Report<errors::ConnectorError>;
+    fn try_from(_item: &PaymentsCancelRouterData) -> Result<Self, Self::Error> {
+        Ok(Self {
+            request_type: FiservemeaRequestType::VoidPreAuthTransactions,
+        })
+    }
 }
 
-impl From<RefundStatus> for enums::RefundStatus {
-    fn from(item: RefundStatus) -> Self {
-        match item {
-            RefundStatus::Succeeded => Self::Success,
-            RefundStatus::Failed => Self::Failure,
-            RefundStatus::Processing => Self::Pending,
-            //TODO: Review mapping
-        }
+// REFUND :
+#[derive(Debug, Serialize)]
+#[serde(rename_all = "camelCase")]
+pub struct FiservemeaRefundRequest {
+    request_type: FiservemeaRequestType,
+    transaction_amount: FiservemeaTransactionAmount,
+}
+
+impl<F> TryFrom<&FiservemeaRouterData<&RefundsRouterData<F>>> for FiservemeaRefundRequest {
+    type Error = error_stack::Report<errors::ConnectorError>;
+    fn try_from(item: &FiservemeaRouterData<&RefundsRouterData<F>>) -> Result<Self, Self::Error> {
+        Ok(Self {
+            request_type: FiservemeaRequestType::ReturnTransaction,
+            transaction_amount: FiservemeaTransactionAmount {
+                total: item.amount.clone(),
+                currency: item.router_data.request.currency,
+            },
+        })
     }
 }
 
-//TODO: Fill the struct with respective fields
-#[derive(Default, Debug, Clone, Serialize, Deserialize)]
-pub struct RefundResponse {
-    id: String,
-    status: RefundStatus,
+fn map_refund_status(
+    fiservemea_status: Option<FiservemeaPaymentStatus>,
+    fiservemea_result: Option<FiservemeaPaymentResult>,
+) -> Result<enums::RefundStatus, errors::ConnectorError> {
+    match fiservemea_status {
+        Some(status) => match status {
+            FiservemeaPaymentStatus::Approved => Ok(enums::RefundStatus::Success),
+            FiservemeaPaymentStatus::Partial | FiservemeaPaymentStatus::Waiting => {
+                Ok(enums::RefundStatus::Pending)
+            }
+            FiservemeaPaymentStatus::ValidationFailed
+            | FiservemeaPaymentStatus::ProcessingFailed
+            | FiservemeaPaymentStatus::Declined => Ok(enums::RefundStatus::Failure),
+        },
+        None => match fiservemea_result {
+            Some(result) => match result {
+                FiservemeaPaymentResult::Approved => Ok(enums::RefundStatus::Success),
+                FiservemeaPaymentResult::Partial | FiservemeaPaymentResult::Waiting => {
+                    Ok(enums::RefundStatus::Pending)
+                }
+                FiservemeaPaymentResult::Declined
+                | FiservemeaPaymentResult::Failed
+                | FiservemeaPaymentResult::Fraud => Ok(enums::RefundStatus::Failure),
+            },
+            None => Err(errors::ConnectorError::MissingRequiredField {
+                field_name: "transactionResult",
+            }),
+        },
+    }
 }
 
-impl TryFrom<RefundsResponseRouterData<Execute, RefundResponse>> for RefundsRouterData<Execute> {
+impl TryFrom<RefundsResponseRouterData<Execute, FiservemeaPaymentsResponse>>
+    for RefundsRouterData<Execute>
+{
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        item: RefundsResponseRouterData<Execute, RefundResponse>,
+        item: RefundsResponseRouterData<Execute, FiservemeaPaymentsResponse>,
     ) -> Result<Self, Self::Error> {
         Ok(Self {
             response: Ok(RefundsResponseData {
-                connector_refund_id: item.response.id.to_string(),
-                refund_status: enums::RefundStatus::from(item.response.status),
+                connector_refund_id: item.response.ipg_transaction_id,
+                refund_status: map_refund_status(
+                    item.response.transaction_status,
+                    item.response.transaction_result,
+                )?,
             }),
             ..item.data
         })
     }
 }
 
-impl TryFrom<RefundsResponseRouterData<RSync, RefundResponse>> for RefundsRouterData<RSync> {
+impl TryFrom<RefundsResponseRouterData<RSync, FiservemeaPaymentsResponse>>
+    for RefundsRouterData<RSync>
+{
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        item: RefundsResponseRouterData<RSync, RefundResponse>,
+        item: RefundsResponseRouterData<RSync, FiservemeaPaymentsResponse>,
     ) -> Result<Self, Self::Error> {
         Ok(Self {
             response: Ok(RefundsResponseData {
-                connector_refund_id: item.response.id.to_string(),
-                refund_status: enums::RefundStatus::from(item.response.status),
+                connector_refund_id: item.response.ipg_transaction_id,
+                refund_status: map_refund_status(
+                    item.response.transaction_status,
+                    item.response.transaction_result,
+                )?,
             }),
             ..item.data
         })
     }
 }
 
-//TODO: Fill the struct with respective fields
-#[derive(Default, Debug, Serialize, Deserialize, PartialEq)]
+#[derive(Debug, Serialize, Deserialize)]
+pub struct ErrorDetails {
+    pub field: Option<String>,
+    pub message: Option<String>,
+}
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct FiservemeaError {
+    pub code: Option<String>,
+    pub message: Option<String>,
+    pub details: Option<Vec<ErrorDetails>>,
+}
+
+#[derive(Debug, Serialize, Deserialize)]
 pub struct FiservemeaErrorResponse {
-    pub status_code: u16,
-    pub code: String,
-    pub message: String,
-    pub reason: Option<String>,
+    #[serde(rename = "type")]
+    fiservemea_type: Option<FiservemeaResponseType>,
+    client_request_id: Option<String>,
+    api_trace_id: Option<String>,
+    pub response_type: Option<String>,
+    pub error: Option<FiservemeaError>,
 }
diff --git a/crates/hyperswitch_connectors/src/constants.rs b/crates/hyperswitch_connectors/src/constants.rs
index a8d08424190..1fd61689307 100644
--- a/crates/hyperswitch_connectors/src/constants.rs
+++ b/crates/hyperswitch_connectors/src/constants.rs
@@ -5,6 +5,7 @@ pub(crate) mod headers {
     pub(crate) const AUTHORIZATION: &str = "Authorization";
     pub(crate) const CONTENT_TYPE: &str = "Content-Type";
     pub(crate) const IDEMPOTENCY_KEY: &str = "Idempotency-Key";
+    pub(crate) const MESSAGE_SIGNATURE: &str = "Message-Signature";
     pub(crate) const TIMESTAMP: &str = "Timestamp";
     pub(crate) const X_ACCEPT_VERSION: &str = "X-Accept-Version";
 }
diff --git a/crates/router/src/core/admin.rs b/crates/router/src/core/admin.rs
index cb95feee9e9..59ed7ae605c 100644
--- a/crates/router/src/core/admin.rs
+++ b/crates/router/src/core/admin.rs
@@ -1351,6 +1351,10 @@ impl<'a> ConnectorAuthTypeAndMetadataValidation<'a> {
                 fiserv::transformers::FiservSessionObject::try_from(self.connector_meta_data)?;
                 Ok(())
             }
+            api_enums::Connector::Fiservemea => {
+                fiservemea::transformers::FiservemeaAuthType::try_from(self.auth_type)?;
+                Ok(())
+            }
             api_enums::Connector::Forte => {
                 forte::transformers::ForteAuthType::try_from(self.auth_type)?;
                 Ok(())
diff --git a/crates/router/src/types/api.rs b/crates/router/src/types/api.rs
index 681cd6fd110..352e5c45030 100644
--- a/crates/router/src/types/api.rs
+++ b/crates/router/src/types/api.rs
@@ -390,9 +390,9 @@ impl ConnectorData {
                     Ok(ConnectorEnum::Old(Box::new(connector::Ebanx::new())))
                 }
                 enums::Connector::Fiserv => Ok(ConnectorEnum::Old(Box::new(&connector::Fiserv))),
-                // enums::Connector::Fiservemea => {
-                //     Ok(ConnectorEnum::Old(Box::new(connector::Fiservemea)))
-                // }
+                enums::Connector::Fiservemea => {
+                    Ok(ConnectorEnum::Old(Box::new(connector::Fiservemea::new())))
+                }
                 enums::Connector::Forte => {
                     Ok(ConnectorEnum::Old(Box::new(connector::Forte::new())))
                 }
diff --git a/crates/router/src/types/transformers.rs b/crates/router/src/types/transformers.rs
index 5d5e72efd15..15eb8ba541c 100644
--- a/crates/router/src/types/transformers.rs
+++ b/crates/router/src/types/transformers.rs
@@ -278,7 +278,7 @@ impl ForeignTryFrom<api_enums::Connector> for common_enums::RoutableConnectors {
             api_enums::Connector::Dlocal => Self::Dlocal,
             api_enums::Connector::Ebanx => Self::Ebanx,
             api_enums::Connector::Fiserv => Self::Fiserv,
-            // api_enums::Connector::Fiservemea => Self::Fiservemea,
+            api_enums::Connector::Fiservemea => Self::Fiservemea,
             api_enums::Connector::Forte => Self::Forte,
             api_enums::Connector::Globalpay => Self::Globalpay,
             api_enums::Connector::Globepay => Self::Globepay,
diff --git a/loadtest/config/development.toml b/loadtest/config/development.toml
index efdef8fc88d..ddcafa87ed0 100644
--- a/loadtest/config/development.toml
+++ b/loadtest/config/development.toml
@@ -100,7 +100,7 @@ dlocal.base_url = "https://sandbox.dlocal.com/"
 dummyconnector.base_url = "http://localhost:8080/dummy-connector"
 ebanx.base_url = "https://sandbox.ebanxpay.com/"
 fiserv.base_url = "https://cert.api.fiservapps.com/"
-fiservemea.base_url = "https://prod.emea.api.fiservapps.com/sandbox/ipp/payments-gateway/v2"
+fiservemea.base_url = "https://prod.emea.api.fiservapps.com/sandbox"
 forte.base_url = "https://sandbox.forte.net/api/v3"
 globalpay.base_url = "https://apis.sandbox.globalpay.com/ucp/"
 globepay.base_url = "https://pay.globepay.co/"

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

- [ ] Bugfix
- [x] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD

## Description
<!-- Describe your changes in detail -->
Integrate card payments for new connector Fiserv-EMEA
https://docs.fiserv.dev/

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

## 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)?
-->
Following flows need to be tested for card payments for new connector FiservEMEA:

1. Authorize:
Request:
```
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_patS2PyLZVJvSG2Ik9brOOFlHKdIWJdkDaRBnfgNe5qNKNMAlTaYugK5gEIbxlks' \
--data-raw '{
    "amount": 1212,
    "currency": "EUR",
    "confirm": true,
    "profile_id": "pro_NP3j3oHUpby6juMfh84Q",
    "capture_method": "automatic",
    "customer": {
        "id": "custom1234",
        "name": "John Doe",
        "email": "customer@gmail.com"
    },
    "routing": { 
        "type": "single",
        "data": "fiservemea"
    },
    "payment_method": "card",
    "payment_method_type": "credit",
    "payment_method_data": {
        "card": {
            "card_number": "5204740000001002",
            "card_exp_month": "10",
            "card_exp_year": "24",
            "card_holder_name": "joseph Doe",
            "card_cvc": "002"
        }
    }
}'
```

Response:
```
{
    "payment_id": "pay_GIEAyY9nxrGPnOdnJiMV",
    "merchant_id": "merchant_1724327816",
    "status": "succeeded",
    "amount": 1212,
    "net_amount": 1212,
    "amount_capturable": 0,
    "amount_received": 1212,
    "connector": "fiservemea",
    "client_secret": "pay_GIEAyY9nxrGPnOdnJiMV_secret_PHfwCA6AfIxfhQjweIYA",
    "created": "2024-08-26T12:17:59.861Z",
    "currency": "EUR",
    "customer_id": "custom1234",
    "customer": {
        "id": "custom1234",
        "name": "John Doe",
        "email": "customer@gmail.com",
        "phone": null,
        "phone_country_code": null
    },
    "description": null,
    "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": "1002",
            "card_type": null,
            "card_network": null,
            "card_issuer": null,
            "card_issuing_country": null,
            "card_isin": "520474",
            "card_extended_bin": null,
            "card_exp_month": "10",
            "card_exp_year": "24",
            "card_holder_name": null,
            "payment_checks": null,
            "authentication_data": null
        },
        "billing": null
    },
    "payment_token": null,
    "shipping": null,
    "billing": null,
    "order_details": null,
    "email": "customer@gmail.com",
    "name": "John Doe",
    "phone": null,
    "return_url": null,
    "authentication_type": "no_three_ds",
    "statement_descriptor_name": null,
    "statement_descriptor_suffix": null,
    "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": "custom1234",
        "created_at": 1724674679,
        "expires": 1724678279,
        "secret": "epk_c3ab3c993c5847febcda59695a87b1e1"
    },
    "manual_retry_allowed": false,
    "connector_transaction_id": "84665967780",
    "frm_message": null,
    "metadata": null,
    "connector_metadata": null,
    "feature_metadata": null,
    "reference_id": "pay_GIEAyY9nxrGPnOdnJiMV_1",
    "payment_link": null,
    "profile_id": "pro_NP3j3oHUpby6juMfh84Q",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_c0KwedmN1LCB446Q3E14",
    "incremental_authorization_allowed": null,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2024-08-26T12:32:59.861Z",
    "fingerprint": null,
    "browser_info": null,
    "payment_method_id": null,
    "payment_method_status": null,
    "updated": "2024-08-26T12:18:02.551Z",
    "charges": null,
    "frm_metadata": null,
    "merchant_order_reference_id": null
}
```

2. Capture:
Request:
```
curl --location 'http://localhost:8080/payments/pay_3gqMd6a03V9O81pzFitu/capture' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_patS2PyLZVJvSG2Ik9brOOFlHKdIWJdkDaRBnfgNe5qNKNMAlTaYugK5gEIbxlks' \
--data '{
  "statement_descriptor_name": "Joseph",
  "statement_descriptor_prefix" :"joseph",
  "statement_descriptor_suffix": "JS"
}'
```

Response:
```
{
    "payment_id": "pay_3gqMd6a03V9O81pzFitu",
    "merchant_id": "merchant_1724327816",
    "status": "succeeded",
    "amount": 1212,
    "net_amount": 1212,
    "amount_capturable": 0,
    "amount_received": 1212,
    "connector": "fiservemea",
    "client_secret": "pay_3gqMd6a03V9O81pzFitu_secret_fv0iv7EjtuZgOR1StM6e",
    "created": "2024-08-26T12:23:18.684Z",
    "currency": "EUR",
    "customer_id": "custom1234",
    "customer": {
        "id": "custom1234",
        "name": "John Doe",
        "email": "customer@gmail.com",
        "phone": null,
        "phone_country_code": null
    },
    "description": null,
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": null,
    "off_session": null,
    "capture_on": null,
    "capture_method": "manual",
    "payment_method": "card",
    "payment_method_data": {
        "card": {
            "last4": "1002",
            "card_type": null,
            "card_network": null,
            "card_issuer": null,
            "card_issuing_country": null,
            "card_isin": "520474",
            "card_extended_bin": null,
            "card_exp_month": "10",
            "card_exp_year": "24",
            "card_holder_name": null,
            "payment_checks": null,
            "authentication_data": null
        },
        "billing": null
    },
    "payment_token": null,
    "shipping": null,
    "billing": null,
    "order_details": null,
    "email": "customer@gmail.com",
    "name": "John Doe",
    "phone": null,
    "return_url": null,
    "authentication_type": "no_three_ds",
    "statement_descriptor_name": null,
    "statement_descriptor_suffix": null,
    "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": "84665968022",
    "frm_message": null,
    "metadata": null,
    "connector_metadata": null,
    "feature_metadata": null,
    "reference_id": "pay_3gqMd6a03V9O81pzFitu_1",
    "payment_link": null,
    "profile_id": "pro_NP3j3oHUpby6juMfh84Q",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_c0KwedmN1LCB446Q3E14",
    "incremental_authorization_allowed": null,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2024-08-26T12:38:18.683Z",
    "fingerprint": null,
    "browser_info": null,
    "payment_method_id": null,
    "payment_method_status": null,
    "updated": "2024-08-26T12:23:30.244Z",
    "charges": null,
    "frm_metadata": null,
    "merchant_order_reference_id": null
}
```

3. Void:
Request:
```
curl --location 'http://localhost:8080/payments/pay_60FywCJo2ZpuMRPzFCQZ/cancel' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_patS2PyLZVJvSG2Ik9brOOFlHKdIWJdkDaRBnfgNe5qNKNMAlTaYugK5gEIbxlks' \
--data '{
}'
```

Response:
```
{
    "payment_id": "pay_60FywCJo2ZpuMRPzFCQZ",
    "merchant_id": "merchant_1724327816",
    "status": "cancelled",
    "amount": 1212,
    "net_amount": 1212,
    "amount_capturable": 0,
    "amount_received": null,
    "connector": "fiservemea",
    "client_secret": "pay_60FywCJo2ZpuMRPzFCQZ_secret_rnSGK2xGOtwbMF8YDLQR",
    "created": "2024-08-26T12:23:45.007Z",
    "currency": "EUR",
    "customer_id": "custom1234",
    "customer": {
        "id": "custom1234",
        "name": "John Doe",
        "email": "customer@gmail.com",
        "phone": null,
        "phone_country_code": null
    },
    "description": null,
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": null,
    "off_session": null,
    "capture_on": null,
    "capture_method": "manual",
    "payment_method": "card",
    "payment_method_data": {
        "card": {
            "last4": "1002",
            "card_type": null,
            "card_network": null,
            "card_issuer": null,
            "card_issuing_country": null,
            "card_isin": "520474",
            "card_extended_bin": null,
            "card_exp_month": "10",
            "card_exp_year": "24",
            "card_holder_name": null,
            "payment_checks": null,
            "authentication_data": null
        },
        "billing": null
    },
    "payment_token": null,
    "shipping": null,
    "billing": null,
    "order_details": null,
    "email": "customer@gmail.com",
    "name": "John Doe",
    "phone": null,
    "return_url": null,
    "authentication_type": "no_three_ds",
    "statement_descriptor_name": null,
    "statement_descriptor_suffix": null,
    "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": "84665968043",
    "frm_message": null,
    "metadata": null,
    "connector_metadata": null,
    "feature_metadata": null,
    "reference_id": "pay_60FywCJo2ZpuMRPzFCQZ_1",
    "payment_link": null,
    "profile_id": "pro_NP3j3oHUpby6juMfh84Q",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_c0KwedmN1LCB446Q3E14",
    "incremental_authorization_allowed": null,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2024-08-26T12:38:45.007Z",
    "fingerprint": null,
    "browser_info": null,
    "payment_method_id": null,
    "payment_method_status": null,
    "updated": "2024-08-26T12:23:52.932Z",
    "charges": null,
    "frm_metadata": null,
    "merchant_order_reference_id": null
}
```

4. Refunds:
Request:
```
curl --location 'http://localhost:8080/refunds' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_patS2PyLZVJvSG2Ik9brOOFlHKdIWJdkDaRBnfgNe5qNKNMAlTaYugK5gEIbxlks' \
--data '{
    "payment_id": "pay_3gqMd6a03V9O81pzFitu",
    "refund_type": "instant"
}'
```

Response:
```
{
    "refund_id": "ref_EbXtA5W6YIYZOYvjf0k1",
    "payment_id": "pay_3gqMd6a03V9O81pzFitu",
    "amount": 1212,
    "currency": "EUR",
    "status": "succeeded",
    "reason": null,
    "metadata": null,
    "error_message": null,
    "error_code": null,
    "created_at": "2024-08-26T12:24:20.690Z",
    "updated_at": "2024-08-26T12:24:23.132Z",
    "connector": "fiservemea",
    "profile_id": "pro_NP3j3oHUpby6juMfh84Q",
    "merchant_connector_id": "mca_c0KwedmN1LCB446Q3E14",
    "charges": null
}
```

Cypress Test Cases also added for Non-3DS Cards:
<img width="972" alt="Screenshot 2024-08-26 at 7 13 41 PM" src="https://github.com/user-attachments/assets/17a47afe-b7d9-4765-9ab4-a585dea0d549">


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

- [x] I formatted the code `cargo +nightly fmt --all`
- [x] I addressed lints thrown by `cargo clippy`
- [x] I reviewed the submitted code
- [ ] I added unit tests for my changes where possible
