Issue an invoice
fawtar_create_invoiceIssue a tax or ordinary invoice. This is a real financial document: it takes the next sequential number, computes VAT, generates the ZATCA QR code and posts to the general ledger. It cannot be edited afterwards — correct it with a credit note. Confirm the amounts with the user before calling.
Use taxTreatment "tax" for a VAT-registered business, "ordinary" for one that is not registered. Use type "simplified" for individuals, "standard" for businesses (which requires the buyer's VAT number).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"taxTreatment": "<taxTreatment>",
"type": "<type>",
"lines": "<lines>"
},
"name": "fawtar_create_invoice"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | ZATCA document type: "simplified" for a sale to an individual (B2C), "standard" for a sale to a business (B2B), which requires the buyer's name and VAT number. | |
| buyer | No | Who the invoice is for. Required for a standard (B2B) invoice, where name and vatNumber must both be present. | |
| lines | Yes | The invoice lines. At least one. Amounts are in Saudi riyals unless the org bills in another currency. | |
| notes | No | Free text printed on the invoice, visible to the buyer. | |
| dueDate | No | YYYY-MM-DD | |
| taxTreatment | Yes | "tax" for a VAT invoice from a VAT-registered seller, "ordinary" when the seller is not VAT registered. An ordinary invoice carries no VAT and no QR code. | |
| pricesIncludeVat | No | True when each line unitPrice already contains VAT, so it is divided out rather than added on. |