receipts_create
Create draft POS receipts with payment details, line items, and optional fiscal register info. Retry-safe via idempotency keys for queued offline sales.
Instructions
Create a new receipt (bon fiscal) in draft status. Receipts document point-of-sale transactions with payment method details and optional fiscal register information. Can later be issued and converted to invoices. A default receipt series is auto-assigned if neither seriesId nor documentSeriesId is provided.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lines | Yes | Array of line items (minimum 1 required) | |
| notes | No | Public notes on the receipt | |
| clientId | No | UUID of the client (optional for receipts) | |
| currency | Yes | Currency code (e.g., RON, EUR, USD) | |
| issuerId | No | UUID of the issuer user | |
| mentions | No | Additional mentions or instructions | |
| seriesId | No | UUID of the receipt series (uses default series if not provided) | |
| companyId | No | Company UUID (overrides configured default) | |
| issueDate | Yes | Date of issue (YYYY-MM-DD) | |
| issuerName | No | Name of person issuing the receipt | |
| salesAgent | No | Sales agent name | |
| cardPayment | No | Amount paid by card (for mixed payments) | |
| cashPayment | No | Amount paid in cash (for mixed payments) | |
| customerCif | No | Customer tax ID / CIF (when no clientId is provided) | |
| customerName | No | Customer name (when no clientId is provided) | |
| exchangeRate | No | Exchange rate to base currency (default: 1.0 for RON) | |
| fiscalNumber | No | Fiscal receipt number assigned by the cash register | |
| internalNote | No | Internal note (not visible to customer) | |
| otherPayment | No | Amount paid by other method, e.g. meal ticket (for mixed payments) | |
| paymentMethod | No | Payment method used for the transaction | |
| idempotencyKey | No | Unique key for retry-safe submissions. Repeat calls with the same key return the originally created receipt instead of creating a duplicate. Recommended for queued offline POS sales and ambiguous timeouts. | |
| cashRegisterName | No | Name or identifier of the cash register / fiscal printer | |
| documentSeriesId | No | UUID of the document series to use (alternative to seriesId; uses default receipt series if neither is provided) | |
| projectReference | No | Related project or order reference |