Payments

[POST] .../v1/retailreport/payments

Returns retail sale and return amounts grouped by payment type. Retrieve retail sale and return amounts grouped by payment type for a selected reporting period. The request requires start_date and end_date as Unix time in seconds, optionally limits data by operating_cash_ids and returns result with sale_amount and return_amount per payment method. The method reads report data only and does not change documents; it requires the current request user to have retail report access, validates that start_date is before end_date and that the period is not longer than one month and returns validation, permission and storage failures as HTTP 200 ErrorResult.

Request Parameters

Name Type Required Description
end_date Int64 Required Period end date as Unix time in seconds.
operating_cash_ids Array of Int64 Optional Operating cash register IDs.
start_date Int64 Required Period start date as Unix time in seconds.

Request Example

{
  "end_date": 1,
  "operating_cash_ids": [
    1
  ],
  "start_date": 1
}

Response Parameters

Name Type Description
ok Boolean Indicates whether the request completed successfully.
result Array of RetailReportPayment Result array.

Response Example

{
  "ok": true,
  "result": [
    {
      "payment_type_name": "string",
      "return_amount": 1.0,
      "sale_amount": 1.0
    }
  ]
}