Generate a finished, professional invoice PDF from JSON — recipient and line ite
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. USD only.
Paid test badge: not yet. The checks above are free: we call the tool without paying and read the payment request it sends back. The Verified badge needs paid calls whose answers match the promised output, and nobody can buy a badge.
Endpoint
POST https://stackbill.app/routes/x402/invoice-from-data
| Category | Market data |
|---|---|
| Provider host | stackbill.app |
| Networks | eip155:8453 |
| Payment schemes | exact |
| Self-reported calls, 30 days | 1 from 1 payers (the provider's figure, not ours) |
Our checks, last 30 days
We never call tools that send, buy, move money or file anything, not even without paying.
Example input (from the provider)
{
"body": {
"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 Consulting"
},
"taxRate": 7.5
},
"bodyType": "json",
"method": "POST",
"type": "http"
}
Promised output schema (from the provider)
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"input": {
"additionalProperties": false,
"properties": {
"body": {
"properties": {
"currency": {
"description": "Optional; must be \"USD\" if present (v1 renders USD only)",
"type": "string"
},
"dueDate": {
"description": "Optional due date, YYYY-MM-DD",
"type": "string"
},
"invoiceNumber": {
"description": "Invoice number printed on the PDF. Optional when the request carries an X-StackApps-Token header from a previous paid call \u2014 the next sequential number for that wallet is used and returned in the X-Invoice-Number response header",
"type": "string"
},
"lineItems": {
"description": "At least one line item; amount per line, subtotal, tax and total are computed server-side",
"items": {
"properties": {
"description": {
"type": "string"
},
"quantity": {
"exclusiveMinimum": 0,
"type": "number"
},
"unitPrice": {
"minimum": 0,
"type": "number"
}
},
"required": [
"description",
"quantity",
"unitPrice"
],
"type": "object"
},
"type": "array"
},
"notes": {
"description": "Optional notes printed at the bottom of the invoice",
"type": "string"
},
"recipient": {
"description": "Who the invoice is billed to",
"properties": {
"address": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"name",
"address"
],
"type": "object"
},
"sender": {
"description": "Who the invoice is from. Optional for activated wallet profiles (send X-StackApps-Token) \u2014 the profile's saved name and address are used",
"properties": {
"address": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"name",
"address"
],
"type": "object"
},
"taxRate": {
"description": "Optional tax percent applied to the subtotal (e.g. 7.5)",
"minimum": 0,
"type": "number"
},
"template": {
"description": "Optional PDF layout (default standard): legal = billing statement with a per-line Date column (populated when descriptions start with 'Work session on YYYY-MM-DD: '); creative = service/fee layout without hours-rate columns (service name taken from the text before ': ' in each description)",
"enum": [
"standard",
"legal",
"creative"
],
"type": "string"
}
},
"required": [
"recipient",
"lineItems"
]
},
"bodyType": {
"enum": [
"json",
"form-data",
"text"
],
"type": "string"
},
"method": {
"enum": [
"POST",
"PUT",
"PATCH"
],
"type": "string"
},
"type": {
"const": "http",
"type": "string"
}
},
"required": [
"type",
"method",
"bodyType",
"body"
],
"type": "object"
},
"output": {
"properties": {
"example": {
"type": "object"
},
"type": {
"type": "string"
}
},
"required": [
"type"
],
"type": "object"
}
},
"required": [
"input"
],
"type": "object"
}