Skip to content
Fourohtwo

Generate a finished, professional invoice PDF from JSON

stackbill.app/routes/x402/invoice-from-data

Generate a finished, professional invoice PDF from JSON — recipient and line items in, a ready-to-send application/pdf out. Layouts: standard, legal, creative. Totals and tax are computed server-side so the numbers always add up. First payment auto-creates a wallet profile (token + API key in response headers); returning wallets get sequential invoice numbering and can save a sender letterhead. US

BaseAnswering
POSThttps://stackbill.app/routes/x402/invoice-from-data

Uptime100% of 2 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://stackbill.app/routes/x402/invoice-from-data", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"currency":"USD","dueDate":"2026-08-01","invoiceNumber":"INV-2026-042","lineItems":[{"description":"Backend development","quantity":10,"unitPrice":95},{"description":"Code review","quantity":2,"unitPrice":120}],"notes":"Payment due within 30 days.","recipient":{"address":"456 Oak Ave, Chicago, IL 60601","name":"Acme Corp"},"sender":{"address":"123 Main St, Springfield, IL 62701","name":"Jane Doe ),
});
console.log(await res.json());

Example input

{"currency":"USD","dueDate":"2026-08-01","invoiceNumber":"INV-2026-042","lineItems":[{"description":"Backend development","quantity":10,"unitPrice":95},{"description":"Code review","quantity":2,"unitPrice":120}],"notes":"Payment due within 30 days.","recipient":{"address":"456 Oak Ave, Chicago, IL 60601","name":"Acme Corp"},"sender":{"address":"123 Main St, Springfield, IL 62701","name":"Jane Doe