Skip to main content

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

Path Parameters

ParameterTypeDescription
idnumberUnique identifier of the receipt to close.

Request Body

FieldTypeRequiredDescription
payment_methodsarrayYesList of payment methods with amounts.
closed_atstringNoClosing timestamp. Defaults to current time if omitted.

Payload fields

Required

  • payment_methods[] — array of payment methods with:
    • id (number)
    • name (string)
    • amount (number)

Optional

  • closed_at — string timestamp; if omitted, server sets current time.

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": 8.14
      }
    ],
    "closed_at": "2025-11-07 09:59:54"
  }'

Response

200 OK — Receipt Closed

{
  "success": true,
  "message": "Receipt closed",
  "data": {
    "id": 10950,
    "closed_at": "2025-11-07 09:59:54",
    "payment_methods": [
      {
        "id": 2,
        "name": "Cash",
        "amount": 8.14
      }
    ]
  }
}

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"
}