Design your invoice template once, then generate pixel-perfect invoice PDFs from billing data with a single API call — and optionally email them to clients automatically.
Build an HTML or Word invoice template with your branding, logo, and Handlebars {{variable}} placeholders for line items, amounts, client details, and dates.
POST your template to DocuStream. It's stored in your account and reused every time you generate a new invoice — no re-uploads needed.
Send a JSON payload with invoice number, client name, line items, and totals. DocuStream renders the PDF and returns a signed URL instantly.
Include an email object in the same request to have DocuStream send the invoice directly to your client. Or pass the signed URL back through your billing system.
DocuStream's API lets you generate the PDF and email it to your client in a single call. No separate email step, no manual attachment — it just works.
// Generate an invoice PDF from a template
const response = await fetch('https://your-docustream.app/api/pdfs/generate', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-Key': 'YOUR_API_KEY',
},
body: JSON.stringify({
templateId: 'tmpl_invoice',
variables: {
invoiceNumber: 'INV-2026-0042',
issueDate: 'May 5, 2026',
dueDate: 'May 19, 2026',
clientName: 'Acme Corp',
lineItems: [
{ description: 'Consulting – April', qty: 10, rate: '$150', total: '$1,500' },
{ description: 'Platform fee', qty: 1, rate: '$99', total: '$99' },
],
subtotal: '$1,599',
tax: '$127.92',
total: '$1,726.92',
},
// Optionally send to the client by email in the same request
email: {
to: 'billing@acmecorp.com',
subject: 'Invoice INV-2026-0042 from Your Company',
},
}),
});
const { signedUrl } = await response.json();Your logo, colors, and typography — rendered exactly as designed. No generic invoice layouts.
Invoice PDFs are generated in seconds, not minutes. Deliver professional documents the moment a payment is due.
Send invoices to clients directly from DocuStream. Every send is logged so you have a full delivery audit trail.
Share invoices via time-limited signed URLs — secure, trackable, and accessible without logging in.
Run your entire monthly billing cycle in one API call. Generate all invoices at once and send each one to the right client.
Works with any language or platform. If your billing tool can make an HTTP request, it can generate DocuStream invoices.
Free plan available — no credit card required. Start generating professional invoice PDFs in minutes.
Get started free