Bug: refactor(router): add revenue_recovery_metadata to payment intent in diesel and api model for v2 flow



Add the following fields to the api and diesel models Feature meta data

retry_count: Total number of billing connector + recovery retries for a payment intent.

payment_connector_transmission: It's supposed to tell if the payment_connector has been called or not.

billing_connector_id: To update the invoice at billing connector.

active_attempt_payment_connector_id : Process tracker needs payment merchant connector account id to schedule the retry attempt.

billing_connector_mit_token_details : MIT related information given by billing connector contains two fields.
1. customer_id : Customer Id of the customer in billing connector
2. payment_processor_token : The token used by the payment processor to retry the payment.

payment_method_type: This represents payment Method type like Card,Crypto,Mandate etc..

payment_method_subtype : This represents the subtype of the payment method like Credit, CryptoCurrency etc..


diff --git a/api-reference-v2/openapi_spec.json b/api-reference-v2/openapi_spec.json
index cadae4fa45c..3a43b1bfca2 100644
--- a/api-reference-v2/openapi_spec.json
+++ b/api-reference-v2/openapi_spec.json
@@ -5793,6 +5793,23 @@
           }
         }
       },
+      "BillingConnectorPaymentDetails": {
+        "type": "object",
+        "required": [
+          "payment_processor_token",
+          "connector_customer_id"
+        ],
+        "properties": {
+          "payment_processor_token": {
+            "type": "string",
+            "description": "Payment Processor Token to process the Revenue Recovery Payment"
+          },
+          "connector_customer_id": {
+            "type": "string",
+            "description": "Billing Connector's Customer Id"
+          }
+        }
+      },
       "BlikBankRedirectAdditionalData": {
         "type": "object",
         "properties": {
@@ -9025,6 +9042,14 @@
               }
             ],
             "nullable": true
+          },
+          "payment_revenue_recovery_metadata": {
+            "allOf": [
+              {
+                "$ref": "#/components/schemas/PaymentRevenueRecoveryMetadata"
+              }
+            ],
+            "nullable": true
           }
         }
       },
@@ -13167,6 +13192,13 @@
           "bank_acquirer"
         ]
       },
+      "PaymentConnectorTransmission": {
+        "type": "string",
+        "enum": [
+          "ConnectorCallFailed",
+          "ConnectorCallSucceeded"
+        ]
+      },
       "PaymentCreatePaymentLinkConfig": {
         "allOf": [
           {
@@ -14926,6 +14958,49 @@
           }
         }
       },
+      "PaymentRevenueRecoveryMetadata": {
+        "type": "object",
+        "required": [
+          "total_retry_count",
+          "payment_connector_transmission",
+          "billing_connector_id",
+          "active_attempt_payment_connector_id",
+          "billing_connector_payment_details",
+          "payment_method_type",
+          "payment_method_subtype"
+        ],
+        "properties": {
+          "total_retry_count": {
+            "type": "integer",
+            "format": "int32",
+            "description": "Total number of billing connector + recovery retries for a payment intent.",
+            "example": "1",
+            "minimum": 0
+          },
+          "payment_connector_transmission": {
+            "$ref": "#/components/schemas/PaymentConnectorTransmission"
+          },
+          "billing_connector_id": {
+            "type": "string",
+            "description": "Billing Connector Id to update the invoices",
+            "example": "mca_1234567890"
+          },
+          "active_attempt_payment_connector_id": {
+            "type": "string",
+            "description": "Payment Connector Id to retry the payments",
+            "example": "mca_1234567890"
+          },
+          "billing_connector_payment_details": {
+            "$ref": "#/components/schemas/BillingConnectorPaymentDetails"
+          },
+          "payment_method_type": {
+            "$ref": "#/components/schemas/PaymentMethod"
+          },
+          "payment_method_subtype": {
+            "$ref": "#/components/schemas/PaymentMethodType"
+          }
+        }
+      },
       "PaymentType": {
         "type": "string",
         "description": "The type of the payment that differentiates between normal and various types of mandate payments. Use 'setup_mandate' in case of zero auth flow.",
diff --git a/crates/api_models/src/payments.rs b/crates/api_models/src/payments.rs
index bec25529af9..01e6343ffcd 100644
--- a/crates/api_models/src/payments.rs
+++ b/crates/api_models/src/payments.rs
@@ -5,6 +5,8 @@ use std::{
 };
 pub mod additional_info;
 use cards::CardNumber;
+#[cfg(feature = "v2")]
+use common_enums::enums::PaymentConnectorTransmission;
 use common_enums::ProductType;
 #[cfg(feature = "v2")]
 use common_utils::id_type::GlobalPaymentId;
@@ -7102,12 +7104,28 @@ pub struct PaymentsStartRequest {
 }
 
 /// additional data that might be required by hyperswitch
+#[cfg(feature = "v2")]
+#[derive(Debug, Clone, serde::Deserialize, serde::Serialize, ToSchema)]
+pub struct FeatureMetadata {
+    /// Redirection response coming in request as metadata field only for redirection scenarios
+    #[schema(value_type = Option<RedirectResponse>)]
+    pub redirect_response: Option<RedirectResponse>,
+    /// Additional tags to be used for global search
+    #[schema(value_type = Option<Vec<String>>)]
+    pub search_tags: Option<Vec<HashedString<WithType>>>,
+    /// Recurring payment details required for apple pay Merchant Token
+    pub apple_pay_recurring_details: Option<ApplePayRecurringDetails>,
+    /// revenue recovery data for payment intent
+    pub payment_revenue_recovery_metadata: Option<PaymentRevenueRecoveryMetadata>,
+}
+
+/// additional data that might be required by hyperswitch
+#[cfg(feature = "v1")]
 #[derive(Debug, Clone, serde::Deserialize, serde::Serialize, ToSchema)]
 pub struct FeatureMetadata {
     /// Redirection response coming in request as metadata field only for redirection scenarios
     #[schema(value_type = Option<RedirectResponse>)]
     pub redirect_response: Option<RedirectResponse>,
-    // TODO: Convert this to hashedstrings to avoid PII sensitive data
     /// Additional tags to be used for global search
     #[schema(value_type = Option<Vec<String>>)]
     pub search_tags: Option<Vec<HashedString<WithType>>>,
@@ -7968,3 +7986,36 @@ mod billing_from_payment_method_data {
         assert!(billing_details.is_none());
     }
 }
+
+#[cfg(feature = "v2")]
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+pub struct PaymentRevenueRecoveryMetadata {
+    /// Total number of billing connector + recovery retries for a payment intent.
+    #[schema(value_type = u16,example = "1")]
+    pub total_retry_count: u16,
+    /// Flag for the payment connector's call
+    pub payment_connector_transmission: PaymentConnectorTransmission,
+    /// Billing Connector Id to update the invoices
+    #[schema(value_type = String, example = "mca_1234567890")]
+    pub billing_connector_id: id_type::MerchantConnectorAccountId,
+    /// Payment Connector Id to retry the payments
+    #[schema(value_type = String, example = "mca_1234567890")]
+    pub active_attempt_payment_connector_id: id_type::MerchantConnectorAccountId,
+    /// Billing Connector Payment Details
+    #[schema(value_type = BillingConnectorPaymentDetails)]
+    pub billing_connector_payment_details: BillingConnectorPaymentDetails,
+    /// Payment Method Type
+    #[schema(example = "pay_later", value_type = PaymentMethod)]
+    pub payment_method_type: common_enums::PaymentMethod,
+    /// PaymentMethod Subtype
+    #[schema(example = "klarna", value_type = PaymentMethodType)]
+    pub payment_method_subtype: common_enums::PaymentMethodType,
+}
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[cfg(feature = "v2")]
+pub struct BillingConnectorPaymentDetails {
+    /// Payment Processor Token to process the Revenue Recovery Payment
+    pub payment_processor_token: String,
+    /// Billing Connector's Customer Id
+    pub connector_customer_id: String,
+}
diff --git a/crates/common_enums/src/enums.rs b/crates/common_enums/src/enums.rs
index 2a5219f4dea..015160d7cdf 100644
--- a/crates/common_enums/src/enums.rs
+++ b/crates/common_enums/src/enums.rs
@@ -3767,3 +3767,12 @@ pub enum AdyenSplitType {
     /// The value-added tax charged on the payment, booked to your platforms liable balance account.
     Vat,
 }
+
+#[derive(Clone, Copy, Debug, Eq, PartialEq, serde::Serialize, serde::Deserialize, ToSchema)]
+#[serde(rename = "snake_case")]
+pub enum PaymentConnectorTransmission {
+    /// Failed to call the payment connector
+    ConnectorCallFailed,
+    /// Payment Connector call succeeded
+    ConnectorCallSucceeded,
+}
diff --git a/crates/diesel_models/src/types.rs b/crates/diesel_models/src/types.rs
index 7806a7c6e1b..6bc8aee2893 100644
--- a/crates/diesel_models/src/types.rs
+++ b/crates/diesel_models/src/types.rs
@@ -1,10 +1,12 @@
+#[cfg(feature = "v2")]
+use common_enums::{enums::PaymentConnectorTransmission, PaymentMethod, PaymentMethodType};
 use common_utils::{hashing::HashedString, pii, types::MinorUnit};
 use diesel::{
     sql_types::{Json, Jsonb},
     AsExpression, FromSqlRow,
 };
 use masking::{Secret, WithType};
-use serde::{Deserialize, Serialize};
+use serde::{self, Deserialize, Serialize};
 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, FromSqlRow, AsExpression)]
 #[diesel(sql_type = Jsonb)]
 pub struct OrderDetailsWithAmount {
@@ -40,12 +42,26 @@ impl masking::SerializableSecret for OrderDetailsWithAmount {}
 
 common_utils::impl_to_sql_from_sql_json!(OrderDetailsWithAmount);
 
+#[cfg(feature = "v2")]
+#[derive(Debug, Clone, PartialEq, Deserialize, Serialize, FromSqlRow, AsExpression)]
+#[diesel(sql_type = Json)]
+pub struct FeatureMetadata {
+    /// Redirection response coming in request as metadata field only for redirection scenarios
+    pub redirect_response: Option<RedirectResponse>,
+    /// Additional tags to be used for global search
+    pub search_tags: Option<Vec<HashedString<WithType>>>,
+    /// Recurring payment details required for apple pay Merchant Token
+    pub apple_pay_recurring_details: Option<ApplePayRecurringDetails>,
+    /// revenue recovery data for payment intent
+    pub payment_revenue_recovery_metadata: Option<PaymentRevenueRecoveryMetadata>,
+}
+
+#[cfg(feature = "v1")]
 #[derive(Debug, Clone, PartialEq, Deserialize, Serialize, FromSqlRow, AsExpression)]
 #[diesel(sql_type = Json)]
 pub struct FeatureMetadata {
     /// Redirection response coming in request as metadata field only for redirection scenarios
     pub redirect_response: Option<RedirectResponse>,
-    // TODO: Convert this to hashedstrings to avoid PII sensitive data
     /// Additional tags to be used for global search
     pub search_tags: Option<Vec<HashedString<WithType>>>,
     /// Recurring payment details required for apple pay Merchant Token
@@ -106,3 +122,31 @@ pub struct RedirectResponse {
 }
 impl masking::SerializableSecret for RedirectResponse {}
 common_utils::impl_to_sql_from_sql_json!(RedirectResponse);
+
+#[cfg(feature = "v2")]
+#[derive(Debug, Clone, PartialEq, Deserialize, Serialize)]
+pub struct PaymentRevenueRecoveryMetadata {
+    /// Total number of billing connector + recovery retries for a payment intent.
+    pub total_retry_count: u16,
+    /// Flag for the payment connector's call
+    pub payment_connector_transmission: PaymentConnectorTransmission,
+    /// Billing Connector Id to update the invoices
+    pub billing_connector_id: common_utils::id_type::MerchantConnectorAccountId,
+    /// Payment Connector Id to retry the payments
+    pub active_attempt_payment_connector_id: common_utils::id_type::MerchantConnectorAccountId,
+    /// Billing Connector Payment Details
+    pub billing_connector_payment_details: BillingConnectorPaymentDetails,
+    ///Payment Method Type
+    pub payment_method_type: PaymentMethod,
+    /// PaymentMethod Subtype
+    pub payment_method_subtype: PaymentMethodType,
+}
+
+#[derive(Debug, Clone, PartialEq, Deserialize, Serialize)]
+#[cfg(feature = "v2")]
+pub struct BillingConnectorPaymentDetails {
+    /// Payment Processor Token to process the Revenue Recovery Payment
+    pub payment_processor_token: String,
+    /// Billing Connector's Customer Id
+    pub connector_customer_id: String,
+}
diff --git a/crates/hyperswitch_domain_models/src/lib.rs b/crates/hyperswitch_domain_models/src/lib.rs
index bd6dd2e5371..b2546e3a049 100644
--- a/crates/hyperswitch_domain_models/src/lib.rs
+++ b/crates/hyperswitch_domain_models/src/lib.rs
@@ -40,10 +40,17 @@ use api_models::payments::{
     RecurringPaymentIntervalUnit as ApiRecurringPaymentIntervalUnit,
     RedirectResponse as ApiRedirectResponse,
 };
+#[cfg(feature = "v2")]
+use api_models::payments::{
+    BillingConnectorPaymentDetails as ApiBillingConnectorPaymentDetails,
+    PaymentRevenueRecoveryMetadata as ApiRevenueRecoveryMetadata,
+};
 use diesel_models::types::{
     ApplePayRecurringDetails, ApplePayRegularBillingDetails, FeatureMetadata,
     OrderDetailsWithAmount, RecurringPaymentIntervalUnit, RedirectResponse,
 };
+#[cfg(feature = "v2")]
+use diesel_models::types::{BillingConnectorPaymentDetails, PaymentRevenueRecoveryMetadata};
 
 #[derive(Clone, Debug, Eq, PartialEq, serde::Serialize)]
 pub enum RemoteStorageObject<T: ForeignIDRef> {
@@ -78,18 +85,57 @@ pub trait ApiModelToDieselModelConvertor<F> {
     fn convert_back(self) -> F;
 }
 
+#[cfg(feature = "v1")]
+impl ApiModelToDieselModelConvertor<ApiFeatureMetadata> for FeatureMetadata {
+    fn convert_from(from: ApiFeatureMetadata) -> Self {
+        let ApiFeatureMetadata {
+            redirect_response,
+            search_tags,
+            apple_pay_recurring_details,
+        } = from;
+
+        Self {
+            redirect_response: redirect_response.map(RedirectResponse::convert_from),
+            search_tags,
+            apple_pay_recurring_details: apple_pay_recurring_details
+                .map(ApplePayRecurringDetails::convert_from),
+        }
+    }
+
+    fn convert_back(self) -> ApiFeatureMetadata {
+        let Self {
+            redirect_response,
+            search_tags,
+            apple_pay_recurring_details,
+        } = self;
+
+        ApiFeatureMetadata {
+            redirect_response: redirect_response
+                .map(|redirect_response| redirect_response.convert_back()),
+            search_tags,
+            apple_pay_recurring_details: apple_pay_recurring_details
+                .map(|value| value.convert_back()),
+        }
+    }
+}
+
+#[cfg(feature = "v2")]
 impl ApiModelToDieselModelConvertor<ApiFeatureMetadata> for FeatureMetadata {
     fn convert_from(from: ApiFeatureMetadata) -> Self {
         let ApiFeatureMetadata {
             redirect_response,
             search_tags,
             apple_pay_recurring_details,
+            payment_revenue_recovery_metadata,
         } = from;
+
         Self {
             redirect_response: redirect_response.map(RedirectResponse::convert_from),
             search_tags,
             apple_pay_recurring_details: apple_pay_recurring_details
                 .map(ApplePayRecurringDetails::convert_from),
+            payment_revenue_recovery_metadata: payment_revenue_recovery_metadata
+                .map(PaymentRevenueRecoveryMetadata::convert_from),
         }
     }
 
@@ -98,13 +144,17 @@ impl ApiModelToDieselModelConvertor<ApiFeatureMetadata> for FeatureMetadata {
             redirect_response,
             search_tags,
             apple_pay_recurring_details,
+            payment_revenue_recovery_metadata,
         } = self;
+
         ApiFeatureMetadata {
             redirect_response: redirect_response
                 .map(|redirect_response| redirect_response.convert_back()),
             search_tags,
             apple_pay_recurring_details: apple_pay_recurring_details
                 .map(|value| value.convert_back()),
+            payment_revenue_recovery_metadata: payment_revenue_recovery_metadata
+                .map(|value| value.convert_back()),
         }
     }
 }
@@ -204,6 +254,56 @@ impl ApiModelToDieselModelConvertor<ApiApplePayRecurringDetails> for ApplePayRec
     }
 }
 
+#[cfg(feature = "v2")]
+impl ApiModelToDieselModelConvertor<ApiRevenueRecoveryMetadata> for PaymentRevenueRecoveryMetadata {
+    fn convert_from(from: ApiRevenueRecoveryMetadata) -> Self {
+        Self {
+            total_retry_count: from.total_retry_count,
+            payment_connector_transmission: from.payment_connector_transmission,
+            billing_connector_id: from.billing_connector_id,
+            active_attempt_payment_connector_id: from.active_attempt_payment_connector_id,
+            billing_connector_payment_details: BillingConnectorPaymentDetails::convert_from(
+                from.billing_connector_payment_details,
+            ),
+            payment_method_type: from.payment_method_type,
+            payment_method_subtype: from.payment_method_subtype,
+        }
+    }
+
+    fn convert_back(self) -> ApiRevenueRecoveryMetadata {
+        ApiRevenueRecoveryMetadata {
+            total_retry_count: self.total_retry_count,
+            payment_connector_transmission: self.payment_connector_transmission,
+            billing_connector_id: self.billing_connector_id,
+            active_attempt_payment_connector_id: self.active_attempt_payment_connector_id,
+            billing_connector_payment_details: self
+                .billing_connector_payment_details
+                .convert_back(),
+            payment_method_type: self.payment_method_type,
+            payment_method_subtype: self.payment_method_subtype,
+        }
+    }
+}
+
+#[cfg(feature = "v2")]
+impl ApiModelToDieselModelConvertor<ApiBillingConnectorPaymentDetails>
+    for BillingConnectorPaymentDetails
+{
+    fn convert_from(from: ApiBillingConnectorPaymentDetails) -> Self {
+        Self {
+            payment_processor_token: from.payment_processor_token,
+            connector_customer_id: from.connector_customer_id,
+        }
+    }
+
+    fn convert_back(self) -> ApiBillingConnectorPaymentDetails {
+        ApiBillingConnectorPaymentDetails {
+            payment_processor_token: self.payment_processor_token,
+            connector_customer_id: self.connector_customer_id,
+        }
+    }
+}
+
 impl ApiModelToDieselModelConvertor<ApiOrderDetailsWithAmount> for OrderDetailsWithAmount {
     fn convert_from(from: ApiOrderDetailsWithAmount) -> Self {
         let ApiOrderDetailsWithAmount {
diff --git a/crates/openapi/src/openapi_v2.rs b/crates/openapi/src/openapi_v2.rs
index cc6f1b0e411..e5c9c6fa81f 100644
--- a/crates/openapi/src/openapi_v2.rs
+++ b/crates/openapi/src/openapi_v2.rs
@@ -466,6 +466,9 @@ Never share your secret api keys. Keep them guarded and secure.
         api_models::payments::BacsBankTransferInstructions,
         api_models::payments::RedirectResponse,
         api_models::payments::RequestSurchargeDetails,
+        api_models::payments::PaymentRevenueRecoveryMetadata,
+        api_models::payments::BillingConnectorPaymentDetails,
+        api_models::enums::PaymentConnectorTransmission,
         api_models::payments::PaymentAttemptResponse,
         api_models::payments::PaymentAttemptAmountDetails,
         api_models::payments::CaptureResponse,

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

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

## Description
Adds the following fields to the api and diesel models Feature meta data

retry_count: Total number of billing connector + recovery retries for a payment intent.

payment_connector_transmission: It's supposed to tell if the payment_connector has been called or not. 

billing_connector_id: To update the invoice at billing connector.
 
active_attempt_payment_connector_id : Process tracker needs payment merchant connector account id to schedule the retry attempt.

billing_connector_mit_token_details: MIT related information given by billing connector contains two fields.
    1. customer_id : Customer Id of the customer in billing connector
    2.  payment_processor_token : The token used by the payment processor to retry the payment.

payment_method_type: This represents payment Method type like Card,Crypto,Mandate etc..

payment_method_subtype : This represents the subtype of the payment method like Credit, CryptoCurrency etc..



Note This PR closes #7177


### Additional Changes

- [ ] This PR modifies the API contract
- [x] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables



## Motivation and Context

## How did you test it?

Create Intent Request

```
   curl --location 'http://localhost:8080/v2/payments/create-intent' \
--header 'api-key: dev_7iySXObGOGY3S9g2OgXlwnQIYJACCsn72FDRXcs6lNlSpheMRHD8bzg0WcUpb9KL' \
--header 'Content-Type: application/json' \
--header 'x-profile-id: pro_vxOhrwYLpaKZXp6llHo1' \
--data-raw '{
    "amount_details": {
        "order_amount": 100,
        "currency": "USD"
    },
    "capture_method":"manual",
    "authentication_type": "no_three_ds",
    "billing": {
        "address": {
            "first_name": "John",
            "last_name": "Dough"
        },
        "email": "example@example.com"
    },
    "shipping": {
        "address": {
            "first_name": "John",
            "last_name": "Dough",
            "city": "Karwar",
            "zip": "581301",
            "state": "Karnataka"
        },
        "email": "example@example.com"
    },
    "feature_metadata":{
        "revenue_recovery_metadata" : {
            "retry_count": 3,
            "payment_connector_transmission" : true,
            "billing_connector_id" : "test12345678",
            "active_attempt_payment_connector_id" : "test123456",
            "billing_connector_mit_token_details":{
                "payment_processor_token":"payment_12312466363",
                "connector_customer_id" : "customer_id123"
            },
            "payment_method_type" : "card",
            "payment_method_subtype": "credit"
        }
    }
}'
```

create-intent response

```
{
    "id": "12345_pay_0194cccc5bdd74f0bcd98e2fe0800208",
    "status": "requires_payment_method",
    "amount_details": {
        "order_amount": 100,
        "currency": "USD",
        "shipping_cost": null,
        "order_tax_amount": null,
        "external_tax_calculation": "skip",
        "surcharge_calculation": "skip",
        "surcharge_amount": null,
        "tax_on_surcharge": null
    },
    "client_secret": "12345_pay_0194cccc5bdd74f0bcd98e2fe0800208_secret_0194cccc5bf17ac3b8513527e11145c5",
    "profile_id": "pro_vxOhrwYLpaKZXp6llHo1",
    "merchant_reference_id": null,
    "routing_algorithm_id": null,
    "capture_method": "manual",
    "authentication_type": "no_three_ds",
    "billing": {
        "address": {
            "city": null,
            "country": null,
            "line1": null,
            "line2": null,
            "line3": null,
            "zip": null,
            "state": null,
            "first_name": "John",
            "last_name": "Dough"
        },
        "phone": null,
        "email": "example@example.com"
    },
    "shipping": {
        "address": {
            "city": "Karwar",
            "country": null,
            "line1": null,
            "line2": null,
            "line3": null,
            "zip": "581301",
            "state": "Karnataka",
            "first_name": "John",
            "last_name": "Dough"
        },
        "phone": null,
        "email": "example@example.com"
    },
    "customer_id": null,
    "customer_present": "present",
    "description": null,
    "return_url": null,
    "setup_future_usage": "on_session",
    "apply_mit_exemption": "Skip",
    "statement_descriptor": null,
    "order_details": null,
    "allowed_payment_method_types": null,
    "metadata": null,
    "connector_metadata": null,
    "feature_metadata": {
        "redirect_response": null,
        "search_tags": null,
        "apple_pay_recurring_details": null,
        "revenue_recovery_metadata": {
            "retry_count": 3,
            "payment_connector_transmission": true,
            "billing_connector_id": "test12345678",
            "active_attempt_payment_connector_id": "test123456",
            "billing_connector_mit_token_details": {
                "payment_processor_token": "payment_12312466363",
                "connector_customer_id": "customer_id123"
            },
            "payment_method_type": "card",
            "payment_method_subtype": "credit"
        }
    },
    "payment_link_enabled": "Skip",
    "payment_link_config": null,
    "request_incremental_authorization": "default",
    "expires_on": "2025-02-03T17:27:12.529Z",
    "frm_metadata": null,
    "request_external_three_ds_authentication": "Skip"
}
```

get intent response 

```
{
    "id": "12345_pay_0194cccc5bdd74f0bcd98e2fe0800208",
    "status": "requires_payment_method",
    "amount_details": {
        "order_amount": 100,
        "currency": "USD",
        "shipping_cost": null,
        "order_tax_amount": null,
        "external_tax_calculation": "skip",
        "surcharge_calculation": "skip",
        "surcharge_amount": null,
        "tax_on_surcharge": null
    },
    "client_secret": "12345_pay_0194cccc5bdd74f0bcd98e2fe0800208_secret_0194cccc5bf17ac3b8513527e11145c5",
    "profile_id": "pro_vxOhrwYLpaKZXp6llHo1",
    "merchant_reference_id": null,
    "routing_algorithm_id": null,
    "capture_method": "manual",
    "authentication_type": "no_three_ds",
    "billing": {
        "address": {
            "city": null,
            "country": null,
            "line1": null,
            "line2": null,
            "line3": null,
            "zip": null,
            "state": null,
            "first_name": "John",
            "last_name": "Dough"
        },
        "phone": null,
        "email": "example@example.com"
    },
    "shipping": {
        "address": {
            "city": "Karwar",
            "country": null,
            "line1": null,
            "line2": null,
            "line3": null,
            "zip": "581301",
            "state": "Karnataka",
            "first_name": "John",
            "last_name": "Dough"
        },
        "phone": null,
        "email": "example@example.com"
    },
    "customer_id": null,
    "customer_present": "present",
    "description": null,
    "return_url": null,
    "setup_future_usage": "on_session",
    "apply_mit_exemption": "Skip",
    "statement_descriptor": null,
    "order_details": null,
    "allowed_payment_method_types": null,
    "metadata": null,
    "connector_metadata": null,
    "feature_metadata": {
        "redirect_response": null,
        "search_tags": null,
        "apple_pay_recurring_details": null,
        "revenue_recovery_metadata": {
            "retry_count": 3,
            "payment_connector_transmission": true,
            "billing_connector_id": "test12345678",
            "active_attempt_payment_connector_id": "test123456",
            "billing_connector_mit_token_details": {
                "payment_processor_token": "payment_12312466363",
                "connector_customer_id": "customer_id123"
            },
            "payment_method_type": "card",
            "payment_method_subtype": "credit"
        }
    },
    "payment_link_enabled": "Skip",
    "payment_link_config": null,
    "request_incremental_authorization": "default",
    "expires_on": "2025-02-03T17:27:12.529Z",
    "frm_metadata": null,
    "request_external_three_ds_authentication": "Skip"
}

```


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

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