Create invoice
create_invoiceIssue a new invoice for a normal sale in SmartBill Cloud. Returns the document series, number, and a direct URL to the invoice.
Instructions
Issue a new invoice (factura) in SmartBill for a normal sale. Returns { series, number, url }, where url links to the document in SmartBill Cloud.
Before calling: use list_taxes to get valid taxName/taxPercentage values rather than guessing a VAT rate, and list_series if you do not know which series to issue into.
Do not use this to invoice an existing proforma — use create_invoice_from_estimate, which links the two documents. Do not use it to reverse an invoice — use create_reverse_invoice.
An issued invoice is a fiscal document that generally cannot be deleted afterwards. Confirm the client, the amounts and the VAT rate with the user before calling, and pass isDraft: true while details are still unsettled — a draft can be edited or discarded in SmartBill.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| aviz | No | Delivery note number when invoicing an aviz. | |
| No | Email overrides used when sendEmail is true. | ||
| client | Yes | The client the document is issued to. | |
| dueDate | No | Due date (YYYY-MM-DD). | |
| isDraft | No | Issue as a draft instead of a final document. | |
| payment | No | Record a payment at the same time as the invoice is issued. | |
| currency | No | Document currency. Default RON. | |
| language | No | Document language: RO, EN, DE, IT, ES, FR, HU. Default RO. | |
| mentions | No | Free text printed on the document. | |
| products | Yes | Line items on the document. | |
| useStock | No | Deduct the invoiced quantities from stock. | |
| issueDate | No | Issue date (YYYY-MM-DD). Defaults to today at SmartBill. | |
| issuerCnp | No | Personal numeric code of the issuing person. | |
| precision | No | Number of decimals used for amounts. Default 2. | |
| sendEmail | No | Email the document to the client on issue. | |
| issuerName | No | Name of the issuing person. | |
| paymentUrl | No | Payment link printed on the PDF. | |
| seriesName | No | Document series. Falls back to the configured default. | |
| colectedTax | No | Collected VAT amount, when usePaymentTax is true. | |
| paymentBase | No | Collected base amount, when usePaymentTax is true. | |
| paymentDate | No | Date of the payment recorded with the invoice. | |
| delegateAuto | No | Delegate vehicle; only printed when delegateName and delegateIdentityCard are also sent. | |
| delegateName | No | Person collecting the goods (delegat), printed on the document. | |
| deliveryDate | No | Delivery date (YYYY-MM-DD). | |
| exchangeRate | No | Exchange rate to RON when currency is not RON. | |
| observations | No | Internal note; not printed on the document. | |
| paymentTotal | No | Total collected, when usePaymentTax is true. | |
| usePaymentTax | No | Apply VAT on collection (TVA la incasare). | |
| companyVatCode | No | Issuing company CIF. Falls back to SMARTBILL_VAT_CODE. | |
| delegateIdentityCard | No | Delegate ID card series and number; only printed when delegateName is also sent. |