Skip to content
Fourohtwo

agents.writerslogic.com/api/v1/invoice-audit

Recomputes up to 500 invoice lines in exact decimal arithmetic and compares them with the stated amounts, for an agent about to approve, pay or reconcile an invoice. Checks: quantity x unit price less discount equals the line amount; tax is taken as supplied (tax amounts are summed, never looked up) and, where a rate is given, tax equals rate x line amount under the declared rounding scope (per li

BaseUnchecked
POSThttps://agents.writerslogic.com/api/v1/invoice-audit

UptimeNot checked yet

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

import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain,
// inside the spending rules you set on Fourohtwo.
const pay = createPayer({ privateKey: process.env.AGENT_KEY });
const res = await pay("https://agents.writerslogic.com/api/v1/invoice-audit", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"lines":[{"id":"A","amount":"59.97","taxRate":"8","quantity":"3","taxAmount":"4.80","unitPrice":"19.99"},{"id":"B","amount":"10.01","taxRate":"8","quantity":"2","taxAmount":"0.80","unitPrice":"5.005"}],"stated":{"total":"75.58","subtotal":"69.98","taxTotal":"5.60"},"currency":"USD"}),
});
console.log(await res.json());

Example input

{
  "lines": [
    {
      "id": "A",
      "amount": "59.97",
      "taxRate": "8",
      "quantity": "3",
      "taxAmount": "4.80",
      "unitPrice": "19.99"
    },
    {
      "id": "B",
      "amount": "10.01",
      "taxRate": "8",
      "quantity": "2",
      "taxAmount": "0.80",
      "unitPrice": "5.005"
    }
  ],
  "stated": {
    "total": "75.58",
    "subtotal": "69.98",
    "taxTotal": "5.60"
  },
  "currency": "USD"
}