{"uid":"cap_f83icTXUUuMynRDSz-VC4","slug":"gig-worker-finance-api-invoice-generator-df15aea2","name":"Gig Worker Finance API – Invoice Generator","description":"Pay-per-call finance tools for US gig workers, paid in USDC on Base via x402. Not tax or financial advice.","url":"https://safe-weekly-spend-api-production.gigfinancetools.workers.dev/v1/invoice?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"to":{"type":"object","required":["name"],"properties":{"name":{"type":"string","maxLength":500},"email":{"type":"string","maxLength":500},"phone":{"type":"string","maxLength":500},"tax_id":{"type":"string","maxLength":500},"address":{"type":"string","maxLength":500}},"additionalProperties":false},"from":{"type":"object","required":["name"],"properties":{"name":{"type":"string","maxLength":500},"email":{"type":"string","maxLength":500},"phone":{"type":"string","maxLength":500},"tax_id":{"type":"string","maxLength":500},"address":{"type":"string","maxLength":500}},"additionalProperties":false},"notes":{"type":"string","maxLength":2000},"output":{"type":"object","properties":{"pdf":{"type":"boolean","default":true},"html":{"type":"boolean","default":true}}},"currency":{"type":"string","default":"USD","pattern":"^[A-Z]{3}$"},"discount":{"type":"number","minimum":0,"description":"Flat pre-tax discount"},"due_date":{"type":"string","format":"date","description":"YYYY-MM-DD"},"tax_rate":{"type":"number","maximum":1,"minimum":0,"description":"Default tax rate for items without one"},"issue_date":{"type":"string","format":"date","description":"YYYY-MM-DD"},"line_items":{"type":"array","items":{"type":"object","required":["description","quantity","unit_price"],"properties":{"quantity":{"type":"number","exclusiveMinimum":0},"tax_rate":{"type":"number","maximum":1,"minimum":0},"unit_price":{"type":"number","minimum":0},"description":{"type":"string","maxLength":500,"minLength":1}},"additionalProperties":false},"maxItems":100,"minItems":1},"payment_terms":{"type":"string","maxLength":2000},"invoice_number":{"type":"string","maxLength":64,"minLength":1},"payment_instructions":{"type":"string","maxLength":2000}}},"responseSchema":{"type":"json","example":{"to":{"name":"Acme Co.","email":"ap@acme.example","address":"500 Market St, San Francisco, CA 94105"},"tax":99.8,"from":{"name":"Acme Design LLC","email":"billing@example.com","address":"123 Main St, Austin, TX 78701"},"html":"<!doctype html><html><head><meta charset=\"utf-8\"><title>Invoice INV-2026-0042</t…(truncated)","lines":[{"tax":67.86,"amount":850,"quantity":1,"tax_rate":0.0825,"unit_price":850,"description":"Logo design (3 concepts, 2 revision rounds)"},{"tax":31.94,"amount":400,"quantity":1,"tax_rate":0.0825,"unit_price":400,"description":"Brand guidelines PDF"},{"tax":0,"amount":300,"quantity":2.5,"tax_rate":0,"unit_price":120,"description":"Consulting call"}],"total":1599.8,"currency":"USD","discount":50,"due_date":"2026-10-30","subtotal":1550,"pdf_bytes":3825,"issue_date":"2026-10-16","pdf_base64":"JVBERi0xLjcKJYGBgYEKCjEgMCBvYmoKPDwKL1R5cGUgL1BhZ2VzCi9LaWRzIFsgNiAwIFIgXQovQ291…(truncated)","invoice_number":"INV-2026-0042"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.25","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.25/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.25","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.25","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_ti5-pSIfWvDXm3Gw8G1GI","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.25","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Generates a professional invoice (PDF and HTML) for gig workers, with line items, tax, discounts, and payment terms","exampleAgentPrompt":"Create an invoice for my freelance logo design project: bill Acme Co. (ap@acme.example, 500 Market St, San Francisco, CA 94105) from my company Acme Design LLC (billing@example.com, 123 Main St, Austin, TX 78701), invoice number INV-2026-0042, issued today and due November 15 2026, with two line items — 'Logo design' at $850 and 'Brand guidelines PDF' at $400, apply 8.25% sales tax, and give me the PDF and HTML versions.","exampleUseCases":[{"title":"Freelance designer billing a client","prompt":"Create an invoice for my client Riverside Media (accounts@riverside.io) from my design studio PixelCraft LLC (studio@pixelcraft.io). Invoice number INV-100, issued today, due December 1 2026. Line items: 'Homepage redesign' 1 unit at $1,200, 'Mobile mockups' 1 unit at $500. Apply 8.25% tax and add payment terms 'Net 30'. I need both PDF and HTML."},{"title":"Rideshare driver invoicing a corporate account","prompt":"I need a professional invoice from John Doe Driver (john@johndoe.io, Austin TX) to Globex Corp (billing@globex.io, 100 Industrial Way, Chicago IL). Invoice INV-2026-001, issued today, due in 14 days. One line item: 'Executive transport services — October 2026' 20 trips at $35 each, no tax. Include payment instructions: 'Please pay via ACH to account on file.' Generate PDF and HTML."},{"title":"Consultant invoicing for hourly work","prompt":"Make me an invoice for my consulting hours — from my company Sharp Insight LLC (me@sharpinsight.com) to DataCo Inc. (finance@dataco.com, 88 Park Ave, New York NY 10017). Invoice number CI-0055, issued today, due November 30 2026. Line items: 'Strategy consulting' 10 hours at $150/hr, 'Workshop facilitation' 3 hours at $200/hr. Apply a flat $50 discount and 7% tax. Output both PDF and HTML."}],"resultDescription":"Returns a JSON object containing the rendered invoice HTML string, base64-encoded PDF bytes, computed line totals (amount, tax per line), subtotal, total discount, total tax, and grand total, along with echoed metadata like invoice number, issue date, due date, and currency.","failureModes":["Missing required line_items array or empty array — returns validation error","Missing required 'from.name' or 'to.name' — returns schema validation error","Invalid date format for issue_date or due_date (must be YYYY-MM-DD) — returns format error","tax_rate outside 0–1 range — returns validation error","quantity or unit_price below minimum — returns validation error","Payment failure (USDC/x402) — returns 402 Payment Required before processing","line_items exceeding 100 items — returns validation error"],"whenToPreferThis":"Choose this endpoint when a gig worker, freelancer, or independent contractor needs to generate a polished, print-ready invoice with automatic tax and total calculations in both PDF and HTML format, especially within a pay-per-use agent workflow using USDC on Base. Prefer it over generic document tools when you need structured invoice fields (line items, tax rates, discounts, payment terms) computed server-side and returned as ready-to-send documents.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-17T12:40:07.062Z","isFirstParty":false,"canonicalSlug":"gig-worker-finance-api-invoice-generator-df15aea2"}