Evyoo POS API v1

Payments

List payments received from customers

Payments received from customers against their account (the Receive Payment module). Not to be confused with the payment of an invoice at the counter, which is part of the invoice (see the payments of an invoice).

Statuses: regular, void. A void payment keeps its identity but its amounts are zero.

needs payments:read Sales

Endpoints#

List: GET/api/v1/payments   One record: GET/api/v1/payments/{id}

Example request#

List with a page size and a sort:

bash
curl "https://votre-entreprise.evyooht.com/api/v1/payments?per_page=5&sort=-date" \
  -H "Authorization: Bearer evy_at_votre_jeton"
powershell
$headers = @{ Authorization = "Bearer evy_at_votre_jeton" }
Invoke-RestMethod -Uri "https://votre-entreprise.evyooht.com/api/v1/payments?per_page=5&sort=-date" -Headers $headers
javascript
const response = await fetch("https://votre-entreprise.evyooht.com/api/v1/payments?per_page=5&sort=-date", {
  headers: { Authorization: "Bearer evy_at_votre_jeton" },
});
const data = await response.json();
console.log(data);
php
$ch = curl_init("https://votre-entreprise.evyooht.com/api/v1/payments?per_page=5&sort=-date");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ["Authorization: Bearer evy_at_votre_jeton"],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
python
import requests

response = requests.get(
    "https://votre-entreprise.evyooht.com/api/v1/payments",
    params={"per_page": 5, "sort": "-date"},
    headers={"Authorization": "Bearer evy_at_votre_jeton"},
)
print(response.json())

One record by its identifier:

bash
curl "https://votre-entreprise.evyooht.com/api/v1/payments/2201" \
  -H "Authorization: Bearer evy_at_votre_jeton"
powershell
$headers = @{ Authorization = "Bearer evy_at_votre_jeton" }
Invoke-RestMethod -Uri "https://votre-entreprise.evyooht.com/api/v1/payments/2201" -Headers $headers
javascript
const response = await fetch("https://votre-entreprise.evyooht.com/api/v1/payments/2201", {
  headers: { Authorization: "Bearer evy_at_votre_jeton" },
});
const data = await response.json();
console.log(data);
php
$ch = curl_init("https://votre-entreprise.evyooht.com/api/v1/payments/2201");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ["Authorization: Bearer evy_at_votre_jeton"],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
python
import requests

response = requests.get(
    "https://votre-entreprise.evyooht.com/api/v1/payments/2201",
    headers={"Authorization": "Bearer evy_at_votre_jeton"},
)
print(response.json())

Query parameters of the list#

All filters can be combined: they add up (AND). An unknown parameter or an invalid value is refused with a 400 error, never ignored.

ParameterTypeDescription
pageintegerPage number, starting at 1. A page beyond the data is empty, not an error. At most 10000 pages: filter instead of paging deeper. Default: 1.
per_pageintegerResults per page, from 1 to 100. Default: 25.
sortstringSort fields, separated by commas, with - in front for descending order. Up to 3 fields. Sortable fields: id, date, amount_received, updated_at. Default: -date. Default: -date.
statusstringregular or void. Allowed values: regular, void.
customer_idintegerOnly records of this customer.
store_idintegerOnly documents of this store.
currencystringOnly documents in this currency (USD or HTG).
date_fromstring (date)Only documents dated on or after this day (YYYY-MM-DD).
date_tostring (date)Only documents dated on or before this day (YYYY-MM-DD), the whole day included.
searchstringText contained in the payment number or the customer name.
updated_sincestringOnly records modified since this date (YYYY-MM-DD) or date and time (YYYY-MM-DDTHH:MM:SS).

Response fields#

The list and the detail route return these fields. A field is null when the value is not recorded. A field marked needs permission is absent (not empty) unless your client holds that permission.

FieldTypeDescription
idintegerUnique identifier. Use it in the detail route.
numberstring| nullHuman-readable document number, for example I1-4149.
store_idinteger| nullIdentifier of the store that owns the document (see the stores resource).
datestring(date-time, local) | nullDocument date and time (store local time, no time zone).
customer_idinteger| nullIdentifier of the customer (see the customers resource).
customer_namestring| nullFull name of the customer.
status"regular"| "void" | nullregular or void.
payment_typestring| nullPayment method as recorded (for example Cash, Cheque, Db/Cr).
currencystring| nullCurrency of the document: USD or HTG.
exchange_ratenumber| nullExchange rate between USD and HTG recorded on the document.
amount_receivednumber| nullTotal amount received. Zero when the payment is void.
cashnumber| nullPart paid in cash.
cardnumber| nullPart paid by debit or credit card.
chequenumber| nullPart paid by cheque.
cheque_numberstring| nullCheque number.
notesstring| nullFree-text notes printed on the document.
created_atstring(date-time, local) | nullWhen the record was created (local time, no time zone).
updated_atstring(date-time, local) | nullWhen the record was last modified (local time, no time zone). Use it with the updated_since filter to synchronize.

Relation: applied_to#

Returned by the detail route only. The invoices this payment was applied to.

FieldTypeDescription
invoice_idinteger| nullIdentifier of the invoice (see the invoices resource).
invoice_numberstring| nullNumber of the invoice.
amountnumber| nullAmount applied to this invoice.
datestring(date-time, local) | nullDate and time of the application.

Example response: list#

json
{
  "data": [
    {
      "id": 2201,
      "number": "P1-2201",
      "store_id": 1,
      "date": "2026-03-15T14:30:00",
      "customer_id": 58,
      "customer_name": "Marie Dupont",
      "status": "regular",
      "payment_type": "Cash",
      "currency": "USD",
      "exchange_rate": 130.5,
      "amount_received": 1250,
      "cash": 1250,
      "card": 0,
      "cheque": 0,
      "cheque_number": "",
      "notes": "Delivered on Friday.",
      "created_at": "2026-03-15T14:30:00",
      "updated_at": "2026-03-15T14:30:00"
    }
  ],
  "meta": {
    "page": 1,
    "per_page": 25,
    "total": 1,
    "total_pages": 1
  }
}

Example response: one record#

json
{
  "data": {
    "id": 2201,
    "number": "P1-2201",
    "store_id": 1,
    "date": "2026-03-15T14:30:00",
    "customer_id": 58,
    "customer_name": "Marie Dupont",
    "status": "regular",
    "payment_type": "Cash",
    "currency": "USD",
    "exchange_rate": 130.5,
    "amount_received": 1250,
    "cash": 1250,
    "card": 0,
    "cheque": 0,
    "cheque_number": "",
    "notes": "Delivered on Friday.",
    "created_at": "2026-03-15T14:30:00",
    "updated_at": "2026-03-15T14:30:00",
    "applied_to": [
      {
        "invoice_id": 4149,
        "invoice_number": "I1-4149",
        "amount": 1250,
        "date": "2026-03-15T14:30:00"
      }
    ]
  }
}

Errors#

The error format and the full list of codes are described in Errors.

StatusWhen
400A query parameter is invalid or unknown. Every fault is reported at once in error.details. Nothing is ignored silently.
401The token is missing, malformed, expired or revoked (missing_token or invalid_token). Ask for a new token.
403Your token does not carry the permission this route needs (insufficient_scope), or the request was not made over HTTPS (https_required).
429Too many requests this minute. Wait for the number of seconds in the Retry-After header.