Skip to content
Fourohtwo

Compute an invoice or quote correctly before you send or pay it

agents.204-168-199-108.sslip.io/v1/finance/invoice-calc

Compute an invoice or quote correctly before you send or pay it: per line net, tax and gross (quantity × unit price − line discount %), tax breakdown per rate (e.g. 19% + 7%), shipping with its own tax rate, a document discount spread pro rata across rates, subtotal, tax total and grand total. Prices can be tax-exclusive or tax-inclusive (gross, as in EU retail); rounding half-up per line or on to

BasePolygonSolanaaws:baseAnswering
GEThttps://agents.204-168-199-108.sslip.io/v1/finance/invoice-calc

Uptime100% of 1 check in 30 days

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

// npm install fourohtwo
import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://agents.204-168-199-108.sslip.io/v1/finance/invoice-calc?currency=EUR&lines=%5B%7B%22description%22%3A%22Hosting%22%2C%22quantity%22%3A1%2C%22unit_price%22%3A49%7D%2C%7B%22description%22%3A%22Support+hours%22%2C%22quantity%22%3A3%2C%22unit_price%22%3A80%2C%22discount_pct%22%3A10%7D%2C%7B%22description%22%3A%22Printed+manual%22%2C%22quantity%22%3A2%2C%22unit_price%22%3A12.5%2C%22tax_rate%22%3A7%7D%5D&shipping=5&shipping_tax_rate=19&tax_rate=19");
console.log(await res.json());

Example input

{
  "currency": "EUR",
  "lines": "[{\"description\":\"Hosting\",\"quantity\":1,\"unit_price\":49},{\"description\":\"Support hours\",\"quantity\":3,\"unit_price\":80,\"discount_pct\":10},{\"description\":\"Printed manual\",\"quantity\":2,\"unit_price\":12.5,\"tax_rate\":7}]",
  "shipping": "5",
  "shipping_tax_rate": "19",
  "tax_rate": "19"
}