Bug: [FIX] add doc for merchant KV flip




diff --git a/crates/openapi/src/openapi.rs b/crates/openapi/src/openapi.rs
index dc38181a683..cb41c8eb05c 100644
--- a/crates/openapi/src/openapi.rs
+++ b/crates/openapi/src/openapi.rs
@@ -90,6 +90,7 @@ Never share your secret api keys. Keep them guarded and secure.
         routes::merchant_account::retrieve_merchant_account,
         routes::merchant_account::update_merchant_account,
         routes::merchant_account::delete_merchant_account,
+        routes::merchant_account::merchant_account_kv_status,
 
         // Routes for merchant connector account
         routes::merchant_connector_account::payment_connector_create,
@@ -413,6 +414,8 @@ Never share your secret api keys. Keep them guarded and secure.
         api_models::admin::MerchantAccountResponse,
         api_models::admin::MerchantConnectorId,
         api_models::admin::MerchantDetails,
+        api_models::admin::ToggleKVRequest,
+        api_models::admin::ToggleKVResponse,
         api_models::admin::WebhookDetails,
         api_models::api_keys::ApiKeyExpiration,
         api_models::api_keys::CreateApiKeyRequest,
diff --git a/crates/openapi/src/routes/merchant_account.rs b/crates/openapi/src/routes/merchant_account.rs
index 967e28225c2..6301844bf3c 100644
--- a/crates/openapi/src/routes/merchant_account.rs
+++ b/crates/openapi/src/routes/merchant_account.rs
@@ -123,3 +123,35 @@ pub async fn update_merchant_account() {}
     security(("admin_api_key" = []))
 )]
 pub async fn delete_merchant_account() {}
+
+/// Merchant Account - KV Status
+///
+/// Toggle KV mode for the Merchant Account
+#[utoipa::path(
+    post,
+    path = "/accounts/{account_id}/kv",
+    request_body (
+        content = ToggleKVRequest,
+        examples (
+            ("Enable KV for Merchant" = (
+                value = json!({
+                "kv_enabled": "true"
+                })
+        )),
+        ("Disable KV for Merchant" = (
+                value = json!({
+                "kv_enabled": "false"
+                })
+        )))
+    ),
+    params (("account_id" = String, Path, description = "The unique identifier for the merchant account")),
+    responses(
+        (status = 200, description = "KV mode is enabled/disabled for Merchant Account", body = ToggleKVResponse),
+        (status = 400, description = "Invalid data"),
+        (status = 404, description = "Merchant account not found")
+    ),
+    tag = "Merchant Account",
+    operation_id = "Enable/Disable KV for a Merchant Account",
+    security(("admin_api_key" = []))
+)]
+pub async fn merchant_account_kv_status() {}
diff --git a/openapi/openapi_spec.json b/openapi/openapi_spec.json
index 9e64f3e9d03..dfc95f9235c 100644
--- a/openapi/openapi_spec.json
+++ b/openapi/openapi_spec.json
@@ -913,6 +913,72 @@
         ]
       }
     },
+    "/accounts/{account_id}/kv": {
+      "post": {
+        "tags": [
+          "Merchant Account"
+        ],
+        "summary": "Merchant Account - KV Status",
+        "description": "Merchant Account - KV Status\n\nToggle KV mode for the Merchant Account",
+        "operationId": "Enable/Disable KV for a Merchant Account",
+        "parameters": [
+          {
+            "name": "account_id",
+            "in": "path",
+            "description": "The unique identifier for the merchant account",
+            "required": true,
+            "schema": {
+              "type": "string"
+            }
+          }
+        ],
+        "requestBody": {
+          "content": {
+            "application/json": {
+              "schema": {
+                "$ref": "#/components/schemas/ToggleKVRequest"
+              },
+              "examples": {
+                "Disable KV for Merchant": {
+                  "value": {
+                    "kv_enabled": "false"
+                  }
+                },
+                "Enable KV for Merchant": {
+                  "value": {
+                    "kv_enabled": "true"
+                  }
+                }
+              }
+            }
+          },
+          "required": true
+        },
+        "responses": {
+          "200": {
+            "description": "KV mode is enabled/disabled for Merchant Account",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/ToggleKVResponse"
+                }
+              }
+            }
+          },
+          "400": {
+            "description": "Invalid data"
+          },
+          "404": {
+            "description": "Merchant account not found"
+          }
+        },
+        "security": [
+          {
+            "admin_api_key": []
+          }
+        ]
+      }
+    },
     "/api_keys/{merchant_id)": {
       "post": {
         "tags": [
@@ -16228,6 +16294,39 @@
           }
         }
       },
+      "ToggleKVRequest": {
+        "type": "object",
+        "required": [
+          "kv_enabled"
+        ],
+        "properties": {
+          "kv_enabled": {
+            "type": "boolean",
+            "description": "Status of KV for the specific merchant",
+            "example": true
+          }
+        }
+      },
+      "ToggleKVResponse": {
+        "type": "object",
+        "required": [
+          "merchant_id",
+          "kv_enabled"
+        ],
+        "properties": {
+          "merchant_id": {
+            "type": "string",
+            "description": "The identifier for the Merchant Account",
+            "example": "y3oqhf46pyzuxjbcn2giaqnb44",
+            "maxLength": 255
+          },
+          "kv_enabled": {
+            "type": "boolean",
+            "description": "Status of KV for the specific merchant",
+            "example": true
+          }
+        }
+      },
       "TouchNGoRedirection": {
         "type": "object"
       },

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

## Description
<!-- Describe your changes in detail -->
Added API reference for enabling/disabling KV for a merchant

## 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).
-->
Added doc for KV toggle APi

## 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)?
-->
NA

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