Documentation Index
Fetch the complete documentation index at: https://developer.clopos.com/llms.txt
Use this file to discover all available pages before exploring further.
Purpose
Close an existing receipt by updating its payment methods and setting the closing timestamp. This endpoint is used to finalize a receipt that was previously created but not yet closed.
HTTP Request
POST https://integrations.clopos.com/open-api/v2/receipts/{id}/close
This endpoint requires authentication. Include your JWT in the x-token header. See Authentication for how to obtain a token and Errors for error responses.
Path Parameters
| Parameter | Type | Description |
|---|
id | number | Unique identifier of the receipt to close. |
Request Body
| Field | Type | Required | Description |
|---|
payment_methods | array | Yes | List of payment methods with amounts. See Payment method. |
closed_at | string | No | Closing timestamp (YYYY-MM-DD HH:mm:ss). Defaults to current time if omitted. |
payment_methods[]
| Field | Type | Required | Description |
|---|
id | number | Yes | Payment method ID. |
name | string | Yes | Payment method name (e.g., “Cash”, “Card”). |
amount | number | Yes | Amount paid using this method. |
Request Example
curl --location --request POST 'https://integrations.clopos.com/open-api/v2/receipts/10950/close' \
--header 'Content-Type: application/json' \
--header 'x-token: oauth_example_token' \
--data '{
"payment_methods": [
{
"id": 2,
"name": "Cash",
"amount": 8140
}
],
"closed_at": "2026-01-20 09:59:54"
}'
Response
200 OK — Receipt Closed
{
"success": true,
"message": "Receipt closed",
"data": {
"id": 10950,
"closed_at": "2026-01-20 09:59:54",
"payment_methods": [
{
"id": 2,
"name": "Cash",
"amount": 8140
}
]
}
}
400 Bad Request — Validation Error
{
"success": false,
"error": "validation_failed",
"message": "closed_at must be greater than created_at"
}
404 Not Found — Receipt Not Found
{
"success": false,
"error": "not_found",
"message": "Receipt not found"
}
Field Reference
Response fields
| Field | Type | Description |
|---|
success | boolean | Indicates the result of the request. |
message | string | Human-readable status message. |
data.id | number | Receipt identifier that was closed. |
data.closed_at | string | Closing timestamp applied to the receipt (YYYY-MM-DD HH:mm:ss). |
data.payment_methods | array | Payment methods recorded on the receipt. |
payment_methods[]
| Field | Type | Description |
|---|
id | number | Payment method ID. |
name | string | Payment method name (e.g., “Cash”, “Card”). |
amount | number | Amount paid using this method. |
Notes
- The receipt must be in an open state (
status: 1) to be closed through this endpoint.
- If
closed_at is omitted, the server uses the current timestamp.
- The
closed_at value must be later than the receipt’s created_at timestamp.
- After closing, the receipt’s
status changes to 2 (closed).