Invoice Total
invoice_totalInvoice math in exact cents. Each line is quantity × unit price, then an optional line discount, rounded half away from zero to the cent. An invoice-level discount comes off the subtotal, then tax is that percent of the discounted subtotal, rounded the same way. Returns every line, the subtotal, discount, tax, and total. A discount larger than the amount it applies to is rejected. Price: $0.002 USDC per successful call (x402, Solana). Same tool over HTTPS: POST https://scorptech.it.com/api/x402/v1/invoice-total
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": {
"lines": "<lines>"
},
"name": "invoice_total"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lines | Yes | Each line: qty, unitPrice, optional description and discountPct | |
| taxPct | No | Tax percent of the discounted subtotal, default 0 | |
| discountPct | No | Invoice discount percent off the subtotal, default 0 | |
| discountAmount | No | Invoice discount as money, instead of discountPct |