Appearance
Invoices And Discounts
POST /invoices creates a fiscal-only record. It never creates a receivable or duplicates the ERP's accounting. V1 supports KES, tax-inclusive unit prices and one line per registered product. Quantities support three decimals; prices and discount inputs support two.
Tax categories and rates come from the account's product setup. Callers cannot override tax rates in a sales request. The buyer name is required. A valid buyer KRA PIN is optional and must be omitted, not invented, when unavailable.
Line discounts
For three units at 116.00 each, these are equivalent:
json
{"type":"PERCENTAGE","value":"10.00"}json
{"type":"FIXED","value":"34.80"}A fixed discount applies to the whole line, not each unit. At a configured 16% rate:
| Amount | KES |
|---|---|
| Before discount | 348.00 |
| Discount | 34.80 |
| Taxable amount | 270.00 |
| Total Tax | 43.20 |
| Total Amount | 313.20 |
Tax is already included in Total Amount. Do not add it again.
Invoice discounts
The optional top-level discount uses the same FIXED or PERCENTAGE shape. It applies after line discounts, is allocated across the remaining line amounts, and participates in the tax calculation. Rounding is handled centrally; use the returned totals as the fiscal source of truth.
Omitting a discount means no discount. NONE requires zero. Negative discounts, percentages above 100, fixed discounts above the available amount and duplicate product lines are rejected.
Immutable evidence
After a request is stored, its submitted fiscal values cannot be edited. A product edit does not change an existing receipt. Correct an accepted invoice with a credit note, not a new submission identity for the same sale.