Preview Invoice Tool
preview-invoiceCalculates a deterministic invoice preview without saving, charging, sending, or creating an invoice. Use to preview invoice in the connected business. Returns document_type, customer_id, pricing, persisted, charged, sent, scope.
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": {
"customer_id": "<customer_id>",
"items": "<items>"
},
"name": "preview-invoice"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | Invoice line items. | |
| tax_mode | No | Tax calculation mode: none or manual. | |
| coupon_code | No | Optional coupon code evaluated by the authorized pricing service. | |
| customer_id | Yes | Resolved customer ID; required for an invoice preview. | |
| tax_rate_id | No | Business-owned tax rate identifier for manual tax calculation. | |
| document_discount_type | No | Document-wide discount mode: none, percentage, or fixed. | |
| document_discount_value | No | Document-wide discount amount or percentage for the selected discount mode. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sent | Yes | Sent flag; previews do not perform this action. | |
| scope | Yes | Authorization scope of this result; data remains restricted to the connected business. | |
| charged | Yes | Charged flag; previews do not perform this action. | |
| pricing | Yes | Pricing data returned by the authorized safe projection. | |
| persisted | Yes | Persisted flag; previews do not perform this action. | |
| customer_id | Yes | Customer id for the returned result. | |
| document_type | Yes | Type of the previewed document. |