Cash discount (Skonto) expressed as an annual interest rate
rechen.halowerk.com/v1/discount-apr
Cash discount (Skonto) expressed as an annual interest rate: rule of thumb, exact simple rate and compounded effective rate, plus the financing comparison for an invoice. For terms such as "2 % within 10 days, net 30" the discount buys (net days − discount days) of credit. Rule of thumb: s × B / (z − k); exact simple rate: s / (100 − s) × B / (z − k) × 100, with B = 360 (default, commercial year)
POST
https://rechen.halowerk.com/v1/discount-aprUptime100% of 5 checks 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://rechen.halowerk.com/v1/discount-apr", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({"discount_days":10,"discount_percent":2,"financing_rate":9,"invoice_amount":10000,"net_days":30}),
});
console.log(await res.json());Example input
{
"discount_days": 10,
"discount_percent": 2,
"financing_rate": 9,
"invoice_amount": 10000,
"net_days": 30
}