Skip to main content
PUT
/
receipts
/
{id}
Close receipt
curl --request PUT \
  --url https://integrations.clopos.com/open-api/receipts/{id} \
  --header 'Content-Type: application/json' \
  --header 'x-brand: <api-key>' \
  --header 'x-token: <api-key>' \
  --header 'x-venue: <api-key>' \
  --data '{
  "id": 123,
  "cid": "<string>",
  "payment_methods": [
    {
      "id": 123,
      "name": "<string>",
      "amount": 123
    }
  ],
  "closed_at": "<string>"
}'
{
  "success": true,
  "data": {
    "id": 123,
    "venue_id": 123,
    "cash_shift_cid": "<string>",
    "cid": "<string>",
    "user_id": 123,
    "open_by_user_id": 123,
    "close_by_user_id": 123,
    "courier_id": 123,
    "seller_id": 123,
    "terminal_id": 123,
    "source": "<string>",
    "closed_terminal_id": 123,
    "service_notification_id": 123,
    "table_id": 123,
    "hall_id": 123,
    "customer_id": 123,
    "sale_type_id": 123,
    "is_returns": true,
    "guests": 123,
    "status": 123,
    "lock": true,
    "inventory_status": 123,
    "report_status": 123,
    "meta": {
      "preprint_count": 123,
      "sale_type": {
        "name": "<string>"
      },
      "user": {
        "name": "<string>"
      },
      "terminal_updated_at": 123,
      "availiableDeposit": 123,
      "check_close_event": {
        "checked": true,
        "operated_at": "<string>",
        "fails": [
          "<any>"
        ]
      }
    },
    "suspicion": 123,
    "printed": true,
    "total": 123,
    "subtotal": 123,
    "original_subtotal": 123,
    "gift_total": 123,
    "totalCost": 123,
    "payment_methods": [
      {
        "id": 123,
        "name": "<string>",
        "amount": 123
      }
    ],
    "fiscal_id": "<string>",
    "by_cash": 123,
    "by_card": 123,
    "remaining": 123,
    "discount_type": 123,
    "discount_value": 123,
    "discount_rate": 123,
    "rps_discount": 123,
    "service_charge": 123,
    "service_charge_value": 123,
    "i_tax": 123,
    "delivery_fee": 123,
    "e_tax": 123,
    "total_tax": 123,
    "description": "<string>",
    "address": "<string>",
    "terminal_version": "<string>",
    "loyalty_type": "<string>",
    "loyalty_value": 123,
    "order_status": "<string>",
    "order_number": "<string>",
    "created_at": "<string>",
    "updated_at": "<string>",
    "terminal_updated_at": "<string>",
    "closed_at": "<string>",
    "shift_date": "<string>",
    "deleted_at": "<string>",
    "gift_count": 123,
    "total_discount": 123,
    "properties": {
      "daily_id": 123,
      "monthly_id": 123
    },
    "receipt_products": [
      {
        "id": 123,
        "cid": "<string>",
        "product_id": 123,
        "receipt_id": 123,
        "product_hash": "<string>",
        "meta": {},
        "count": 123,
        "portion_size": 123,
        "total": 123,
        "price": 123,
        "cost": 123,
        "is_gift": true,
        "preprint_count": 123,
        "station_printed_count": 123,
        "station_aborted_count": 123,
        "seller_id": 123,
        "loyalty_type": "<string>",
        "loyalty_value": 123,
        "discount_rate": 123,
        "discount_value": 123,
        "discount_type": 123,
        "total_discount": 123,
        "subtotal": 123,
        "receipt_discount": 123,
        "created_at": "<string>",
        "updated_at": "<string>",
        "terminal_updated_at": "<string>",
        "deleted_at": "<string>",
        "receipt_product_modificators": [
          "<any>"
        ],
        "taxes": [
          "<any>"
        ]
      }
    ],
    "stock_operations": [
      "<any>"
    ],
    "customer": {}
  },
  "time": 123,
  "timestamp": "<string>",
  "unix": 123,
  "message": "<string>"
}

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

PUT https://integrations.clopos.com/open-api/receipts/{id}

Path Parameters

ParameterTypeDescription
idnumberUnique identifier of the receipt to close.

Request Body

FieldTypeRequiredDescription
idnumberYesReceipt identifier (must match path parameter).
cidstringYesTransaction UUID.
payment_methodsarrayYesList of payment methods with amounts.
closed_atstringYesClosing 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

curl --location --request PUT 'https://integrations.clopos.com/open-api/receipts/10950' \
  --header 'Content-Type: application/json' \
  --header 'x-token: oauth_example_token' \
  --header 'x-brand: openapitest' \
  --header 'x-venue: 1' \
  --data '{
    "id": 10950,
    "cid": "494ebbcb-2a5b-4484-9635-d73e9609f0f8",
    "payment_methods": [
      {
        "id": 2,
        "name": "Cash",
        "amount": 8.14
      }
    ],
    "closed_at": "2025-11-07 09:59:54"
  }'

Response

200 OK — Receipt Closed

The response returns the full receipt data with updated payment methods and closing timestamp:
{
    "success": true,
    "data": {
        "id": 10950,
        "venue_id": 1,
        "cash_shift_cid": null,
        "cid": "494ebbcb-2a5b-4484-9635-d73e9609f0f8",
        "user_id": 1,
        "open_by_user_id": null,
        "close_by_user_id": null,
        "courier_id": null,
        "seller_id": null,
        "terminal_id": 1,
        "source": "web",
        "closed_terminal_id": null,
        "service_notification_id": null,
        "table_id": null,
        "hall_id": null,
        "customer_id": null,
        "sale_type_id": 1000,
        "is_returns": null,
        "guests": 1,
        "status": 2,
        "lock": false,
        "inventory_status": 0,
        "report_status": 3,
        "meta": {
            "preprint_count": 0,
            "sale_type": {
                "name": "Satis usulu 1"
            },
            "user": {
                "name": "Clopos"
            },
            "terminal_updated_at": 1755524813947,
            "availiableDeposit": 8.14
        },
        "suspicion": 0,
        "printed": false,
        "total": 8.14,
        "subtotal": 8.14,
        "original_subtotal": 8.14,
        "gift_total": 0,
        "totalCost": 0,
        "payment_methods": [
            {
                "id": 2,
                "name": "Cash",
                "amount": 8.14
            }
        ],
        "fiscal_id": null,
        "by_cash": 8.14,
        "by_card": 0,
        "remaining": 0,
        "discount_type": 0,
        "discount_value": 0,
        "discount_rate": 0,
        "rps_discount": 0,
        "service_charge": 0,
        "service_charge_value": 0,
        "i_tax": 0,
        "delivery_fee": 0,
        "e_tax": 0,
        "total_tax": 0,
        "description": null,
        "address": null,
        "terminal_version": null,
        "loyalty_type": null,
        "loyalty_value": null,
        "order_status": null,
        "order_number": null,
        "created_at": "2025-11-07 09:00:00",
        "updated_at": "2025-11-07 09:59:54",
        "terminal_updated_at": null,
        "closed_at": "2025-11-07 09:59:54",
        "shift_date": "2025-11-07",
        "deleted_at": null,
        "total_discount": 0,
        "properties": {
            "daily_id": 1,
            "monthly_id": 1
        }
    },
    "message": "Əməliyyat uğurla həyata keçirildi",
    "time": 92,
    "timestamp": "2025-11-07 09:59:54",
    "unix": 1761741787
}

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

Required Fields

FieldTypeDescription
idnumberReceipt identifier (must match the path parameter).
cidstringTransaction UUID.
payment_methodsarrayList of payment methods with amounts.
closed_atstringClosing timestamp in format "YYYY-MM-DD HH:mm:ss".

payment_methods[]

FieldTypeRequiredDescription
idnumberPayment method ID.
namestringMethod name.
amountnumberAmount paid using this method.

Validation Rules

  • closed_at must be greater than created_at. The closing timestamp cannot be earlier than the receipt creation time.
  • The id in the request body must match the id in 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 status to 1 (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_at timestamp must be in the format "YYYY-MM-DD HH:mm:ss" and must be later than the receipt’s created_at timestamp.
  • Once a receipt is closed, it cannot be reopened through this API.

Authorizations

x-token
string
header
required

Access token obtained from /auth endpoint

x-brand
string
header
required

Brand identifier

x-venue
string
header
required

Venue identifier

Path Parameters

id
integer
required

Receipt ID

Body

application/json
id
integer
required

Receipt identifier (must match path parameter)

cid
string
required

Transaction UUID

payment_methods
object[]
required

List of payment methods with amounts

Minimum length: 1
closed_at
string
required

Closing timestamp in format 'YYYY-MM-DD HH:mm:ss'. Must be greater than created_at.

Response

Receipt closed successfully

success
boolean
data
object
time
integer
timestamp
string
unix
integer
message
string