---
agentTools:
  projectIndex: https://developer.mxmerchant.com/llms.txt
---

# Close a Batch

Manually close a batch

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Checkout API",
    "version": "1.00"
  },
  "servers": [
    {
      "url": "https://sandbox.api.mxmerchant.com/checkout"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/v3/batch/{batchId}": {
      "put": {
        "summary": "Close a Batch",
        "description": "Manually close a batch",
        "operationId": "close-a-batch",
        "parameters": [
          {
            "name": "batchId",
            "in": "path",
            "description": "Batch Id",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "required": true
          }
        ],
        "responses": {
          "201": {
            "description": "201",
            "content": {
              "text/plain": {
                "examples": {
                  "Result": {
                    "value": "A 201 HTTP response confirms the batch did close."
                  }
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "text/plain": {
                "examples": {
                  "Result": {
                    "value": "If the batch has already been closed, you will receive a 404."
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": false
  },
  "x-readme-fauxas": true,
  "_id": "644bb860dd3d4600261d0de7:644bb860dd3d4600261d0e4c"
}
```