{"slug":"www-tradepilotusa-com-api-agent-commerce-v1-services-invoice-180f28","title":"Calculate subtotal, per-line tax, discount and deposit from supplied invoice lin","host":"www.tradepilotusa.com","method":"POST","resource":"https://www.tradepilotusa.com/api/agent-commerce/v1/services/invoice_totals_calculate/execute","category":"code","description":"Calculate subtotal, per-line tax, discount and deposit from supplied invoice line items. Per-line tax percent (not a single flat rate), discount applied to the pre-tax subtotal, deposit as a percent-of-total or fixed amount clamped to the total. Pure arithmetic; does not create, store or send an inv","price_listed":0.01,"price_asked":null,"state":"effects","state_label":"Not tested: has real-world effects","checks_7d":0,"answered_7d":0,"latency_ms_median":null,"reported_calls_30d":1,"reported_payers_30d":1,"networks":["eip155:8453"],"badge":"unverified","paid_checks_7d":0,"paid_ok_7d":0,"example_input":{"body":{"deposit_enabled":true,"deposit_type":"percent","deposit_value":25,"discount_percent":10,"line_items":[{"quantity":2,"rate":150,"tax_percent":8.25},{"quantity":1,"rate":75,"tax_percent":0}]},"bodyType":"json","method":"POST","type":"http"},"output_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"input":{"additionalProperties":false,"properties":{"body":{"additionalProperties":false,"properties":{"deposit_enabled":{"type":"boolean"},"deposit_type":{"enum":["percent","fixed"]},"deposit_value":{"minimum":0,"type":"number"},"discount_percent":{"maximum":100,"minimum":0,"type":"number"},"line_items":{"items":{"additionalProperties":false,"properties":{"quantity":{"minimum":0,"type":"number"},"rate":{"minimum":0,"type":"number"},"tax_percent":{"minimum":0,"type":"number"}},"required":["quantity","rate"],"type":"object"},"maxItems":200,"minItems":1,"type":"array"}},"required":["line_items"],"type":"object"},"bodyType":{"enum":["json","form-data","text"],"type":"string"},"method":{"enum":["POST"],"type":"string"},"type":{"const":"http","type":"string"}},"required":["type","method","bodyType","body"],"type":"object"}},"required":["input"],"type":"object"},"history":[],"description_full":"Calculate subtotal, per-line tax, discount and deposit from supplied invoice line items. Per-line tax percent (not a single flat rate), discount applied to the pre-tax subtotal, deposit as a percent-of-total or fixed amount clamped to the total. Pure arithmetic; does not create, store or send an invoice.","last_updated":"2026-09-26T02:26:10.279Z","schemes":["exact"]}