« All modules

Payments

Încasări și plăți (receipts and payments).

Filters on list endpoints are URL path segments, not query strings — see Conventions. The Swagger tester works best for JSON body endpoints.
GET /sales/{bv_id}/payment/ Payment schema for a sale

Returns the JSON schema and allowed payment types for creating a payment on the given sale. Useful for building your integration UI.

Parameters

NameInTypeRequiredDescription
bv_id path integer yes BOCP ID of the sale.

Responses

StatusDescription
200 OK — response uses the shared envelope.
404 The requested resource does not exist.
POST /sales/{bv_id}/payment/ Register a payment on a sale

Records an incasso (or payment) against an existing sale receipt.

Notes:
- You can register multiple payments on the same sale (partial payments, installments).
- incasare_id in the response identifies the payment inside /payments/list/.
- payment_type accepts the string codes returned by /payments/types/.

Parameters

NameInTypeRequiredDescription
bv_id path integer yes BOCP ID of the sale.

Request body (JSON)

{
    "amount": 250,
    "payment_type": "bank_transfer",
    "date": "2026-05-20",
    "currency": "RON",
    "mentions": "OP 1234 BT",
    "external_ref": "TXN-98765"
}

Responses

StatusDescription
200 Payment registered.
400 Missing/invalid fields, or the sale is cancelled.
401 Missing or invalid Basic Auth credentials.
404 The requested resource does not exist.
GET /payments/list/ List payments and receipts

Returns a paginated list of payments and receipts (încasări și plăți).

Standard filters: year, yearmonth, yearmonthday, date, modifiedafter, modifiedthrough, id, minid, page.

Custom filter — allocation_status:
- any — all payments
- not_allocated — only unallocated
- some_allocated — has some allocation, not fully
- fully_allocated — fully allocated
- has_allocated — has at least one allocation

Include: allocations.

Responses

StatusDescription
200 OK — response uses the shared envelope.
400 Request is malformed or a required field is missing / invalid.
GET /payments/types/ List payment methods

Enumerates the predefined payment method codes accepted by payment_type fields in other endpoints (e.g. POST /sales/{bv_id}/payment/). Includes bank_transfer, cash, card, voucher, foodstamps, modern_payment, and any custom types defined in your account.

Responses

StatusDescription
200 OK — response uses the shared envelope.
GET /payments/fiscalreceipt/ Schema for POSTing fiscal receipts

Returns a plain-text schema showing the expected shape of the POST payload for attaching one or more fiscal receipts to sales.

Responses

StatusDescription
200 Schema description (text/html).
POST /payments/fiscalreceipt/ Attach fiscal receipts to sales (batch)

Registers one or more fiscal receipts and their payments against existing sales.

Effect on the sale:
- Deletes all existing payments (incasari) on the sale.
- Creates new payments based on the fiscal receipt totals (cash, card, voucher, food stamps, modern, other).
- If an invoice exists on the sale, it must have the same date as the fiscal receipt.

Request body (JSON)

{
    "receipts": [
        {
            "pos_receipt_id": 1,
            "bv_id": 198,
            "status_id": 3,
            "bf_date": "2025-05-05",
            "bon_nr": 145,
            "z_nr": 2,
            "paid_cash": 10,
            "paid_card": 5,
            "paid_foodstamp": 14,
            "paid_voucher": 44,
            "paid_modern_payment": 30,
            "paid_other_payment": 0,
            "print_confirmed_ts": "2025-05-05 12:00:00",
            "reimport_existing_bf": 0
        }
    ]
}

Responses

StatusDescription
200 OK — response uses the shared envelope.
400 Request is malformed or a required field is missing / invalid.
401 Missing or invalid Basic Auth credentials.

This page is generated from openapi.json.