---
title: "Close Open Batch"
method: PUT
path: "/rest/v2/terminal/batches/open"
tags: ["Semi-Integrated Batches"]
---

# Close Open Batch

`PUT /rest/v2/terminal/batches/open`

## Request

- The document declares no server URL.
- Auth: none declared. Required headers: `api-key`
- TypeScript: <https://skmtc.dev/xplorpay/apis/external-us-onboarding-workflow/docs/rest/v2/terminal/batches/open/put.ts> (a function with typed inputs; its response is checked against the schema)

Close the currently open batch on a semi-integrated terminal and return the batch settlement details.

## Headers

- `api-key` string, required

## Response `200`

Successful Batch

- ClearentBatchResponsePayload: payload
  - `batch` Payload: Batches
    - `id` string: Unique identifier for the batch.
    - `status` 'OPEN' | 'CLOSED': Current status of the batch. Available statuses: Open, Close, Pending, Failed.
    - `settled` string: Date and time when the batch was settled.
    - `refund-count` string: Total number of refund transactions processed in the batch.
    - `refund-total` string: Total amount refunded in the batch.
    - `sales-count` string: Total number of sales transactions processed in the batch.
    - `sales-total` string: Total amount of all sale transactions in the batch.
    - `net-amount` string: Net amount after processing sale and refund transactions, in currency format.
    - `total-count` string: Total number of transactions, including sales and refunds.
    - `confirmation-code` string: The batch confirmation code.
    - `merchant-id` string: Identifier for the merchant associated with the batch.
    - `terminal-id` string: Identifier of the terminal that processed the batch.
    - `terminal-name` string: Name of the terminal.
    - `date-opened` string: Date when the batch was opened.
    - `switch-batch-id` string: Identifier used by the payment switch for the batch.
  - `payloadType` string: Type of payload returned in the response.

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `402`: Business Exception
- `403`: Forbidden
- `404`: Not Found
- `500`: Internal server error

---

[API](https://skmtc.dev/xplorpay/apis/external-us-onboarding-workflow.md) - [All operations](https://skmtc.dev/xplorpay/apis/external-us-onboarding-workflow/llms.txt) - [OpenAPI document](https://skmtc.dev/xplorpay/apis/external-us-onboarding-workflow/revisions/f37077c24b66?raw)
