{"openapi":"3.1.0","info":{"title":"PaidPilot Invoice API","version":"1.2.0","description":"JSON in, invoice PDF out. Pay per PDF in USDC over x402. No accounts, no API keys.","contact":{"url":"https://paidpilot-invoice-api.dario-9fa.workers.dev/llms.txt"},"x-guidance":"JSON in, invoice PDF out. Pay per PDF in USDC over x402. No accounts, no API keys. Call a paid route without payment to get an x402 v2 challenge (402 + PAYMENT-REQUIRED header), pay in USDC, retry with PAYMENT-SIGNATURE. Invalid input -> 400, never charged. More: https://paidpilot-invoice-api.dario-9fa.workers.dev/llms.txt"},"servers":[{"url":"https://paidpilot-invoice-api.dario-9fa.workers.dev"}],"x-discovery":{"wellKnown":"https://paidpilot-invoice-api.dario-9fa.workers.dev/.well-known/x402","llms":"https://paidpilot-invoice-api.dario-9fa.workers.dev/llms.txt"},"paths":{"/v1/invoice.pdf":{"post":{"operationId":"v1_invoice_pdf","summary":"Render one invoice PDF from JSON","description":"Line items, tax, discount and totals computed server-side (integer minor units); 12 currencies; multi-page. Validate free first at POST /v1/invoice/validate.","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.02"},"protocols":[{"x402":{"version":2,"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x2dAF658B01e257206375798a15832E9f547D65dD"}}]},"responses":{"200":{"description":"Success (payment settled)","content":{"application/pdf":{}}},"400":{"description":"Invalid input. Never charged."},"402":{"description":"Payment required. x402 v2 challenge in the PAYMENT-REQUIRED header."},"502":{"description":"Upstream data source failed. Payment NOT settled."}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"seller":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"address":{"type":"string","maxLength":400},"email":{"type":"string","maxLength":254,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"type":"string","maxLength":40},"tax_id":{"type":"string","maxLength":60}},"required":["name"]},"buyer":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"address":{"type":"string","maxLength":400},"email":{"type":"string","maxLength":254,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"type":"string","maxLength":40},"tax_id":{"type":"string","maxLength":60}},"required":["name"]},"invoice_number":{"type":"string","minLength":1,"maxLength":64},"issue_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"due_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"currency":{"default":"USD","type":"string"},"line_items":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"object","properties":{"description":{"type":"string","minLength":1,"maxLength":300},"quantity":{"type":"number","exclusiveMinimum":0,"maximum":1000000},"unit_price":{"type":"number","minimum":0,"maximum":1000000000}},"required":["description","quantity","unit_price"]}},"tax_rate":{"description":"percent, e.g. 7.5","type":"number","minimum":0,"maximum":100},"discount":{"description":"absolute amount subtracted before tax","type":"number","minimum":0,"maximum":1000000000},"notes":{"type":"string","maxLength":2000},"payment_instructions":{"type":"string","maxLength":1000}},"required":["seller","buyer","invoice_number","issue_date","line_items"],"additionalProperties":false},"example":{"seller":{"name":"Acme Web Studio LLC","address":"123 Main St, Omaha, NE 68102","email":"billing@acme.example"},"buyer":{"name":"Blue River Bakery","address":"45 Dodge St, Omaha, NE 68102"},"invoice_number":"INV-1001","issue_date":"2026-10-09","due_date":"2026-11-08","currency":"USD","line_items":[{"description":"Website redesign (fixed fee)","quantity":1,"unit_price":1200},{"description":"Hosting, October","quantity":1,"unit_price":25},{"description":"Support hours","quantity":3.5,"unit_price":80}],"tax_rate":7,"notes":"Thank you for your business.","payment_instructions":"ACH to account ending 1234 within 30 days."}}}}}}}}