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
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | number | Unique identifier of the receipt to close. |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
id | number | Yes | Receipt identifier (must match path parameter). |
cid | string | Yes | Transaction UUID. |
payment_methods | array | Yes | List of payment methods with amounts. |
closed_at | string | Yes | Closing timestamp in format "YYYY-MM-DD HH:mm:ss". Must be greater than created_at. |
Do not set
status to 1 (open) when closing a receipt. The receipt will be automatically set to closed status (2) when using this endpoint.Request Example
Response
200 OK — Receipt Closed
The response returns the full receipt data with updated payment methods and closing timestamp:400 Bad Request — Validation Error
404 Not Found — Receipt Not Found
Field Reference
Required Fields
| Field | Type | Description |
|---|---|---|
id | number | Receipt identifier (must match the path parameter). |
cid | string | Transaction UUID. |
payment_methods | array | List of payment methods with amounts. |
closed_at | string | Closing timestamp in format "YYYY-MM-DD HH:mm:ss". |
payment_methods[]
| Field | Type | Required | Description |
|---|---|---|---|
id | number | ✓ | Payment method ID. |
name | string | ✓ | Method name. |
amount | number | ✓ | Amount paid using this method. |
Validation Rules
closed_atmust be greater thancreated_at. The closing timestamp cannot be earlier than the receipt creation time.- The
idin the request body must match theidin the URL path. - At least one payment method is required.
- The sum of amounts in
payment_methods[]should equal the receipt total. - Do not set
statusto1(open) when closing a receipt. The receipt will be automatically set to closed status.
Notes
- This endpoint is specifically for closing receipts that were previously created but not yet closed.
- The receipt status will be automatically set to
2(closed) when using this endpoint. - Payment methods should reference IDs returned by List Payment Methods.
- The
closed_attimestamp must be in the format"YYYY-MM-DD HH:mm:ss"and must be later than the receipt’screated_attimestamp. - Once a receipt is closed, it cannot be reopened through this API.
Authorizations
Access token obtained from /auth endpoint
Brand identifier
Venue identifier
Path Parameters
Receipt ID
Body
application/json