preview_custom_invoice
Read-only, script-tier/no-model-token check. Calculate the exact pricing preview for a custom client invoice (itemized lines, reimbursable markup, saved adjustments, service fee, platform fee, due date, and total in cents) WITHOUT saving a draft or emailing the client. Call this to confirm totals before create_custom_invoice_draft or send_custom_invoice. Requires the Owner or Admin role. Storefront Pro.
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": {
"items": "<items>",
"proAccessToken": "<proAccessToken>"
},
"name": "preview_custom_invoice"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dueAt | No | Explicit due date/timestamp in ISO 8601 format (e.g. "2026-12-15"). Overrides dueDays when set. | |
| items | Yes | Line items to price (1 to 40). Prices in cents; markups in basis points. | |
| dueDays | No | Days until due (0 = due on receipt, up to 90). Ignored if dueAt is provided. | |
| clientId | No | Saved client id from list_invoice_clients. Automatically fills defaults (email, terms, markup, CC, payment methods) unless overridden. | |
| customerName | No | Client/customer name shown on the invoice (required if clientId is not set). | |
| adjustmentIds | No | Optional saved shop adjustment ids (from list_adjustments, e.g. sales tax or discount), up to 20. | |
| customerEmail | No | Client/customer email where the invoice will be sent (required before sending if clientId is not set). | |
| proAccessToken | Yes | The proAccessToken printed by confirm_pro_signup or renew_pro_access. It names the pro's storefront for this call and is valid for 24 hours. | |
| markupDisplayMode | No | 'separate_line' shows reimbursable markup on its own line; 'included_in_line' folds markup into each line. |