Business

Invoice PDF Template

Generate professional, pixel-perfect invoices via API. Dynamic tables, client logos, tax calculations. Perfect for e-commerce, SaaS billing, and accounting automation.

11 customizable variables

How It Works

1. Get Your API Key

Sign up for free and generate an API key from your dashboard.

2. Send JSON Payload

Make a POST request with your template variables as JSON.

3. Receive PDF URL

Get a direct URL to your generated PDF document.

Template Variables

Customize your PDF by providing values for these variables in your API request.

Variable NameTypeDefault Value
{{invoice_number}}textINV-001
{{date}}date-
{{company_name}}textMy Company
{{company_address}}text123 Main St
{{client_name}}textClient Name
{{client_address}}text456 Client St
{{item_description}}textService
{{item_qty}}number1
{{item_price}}text$100
{{item_total}}text$100
{{total}}text$100

Code Examples

Copy and paste these examples to start generating PDFs with this template.

curl -X POST 'https://api.pdf-sign.com/functions/v1/generate-pdf-preview' \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: pdfsign_YOUR_API_KEY' \
  -d '{
    "templateId": "f86e0233-39bd-4884-80ca-c5da4774a3db",
    "variables": {
      "invoice_number": "INV-001",
      "date": "your_date",
      "company_name": "My Company",
      "company_address": "123 Main St",
      "client_name": "Client Name",
      "client_address": "456 Client St",
      "item_description": "Service",
      "item_qty": "1",
      "item_price": "$100",
      "item_total": "$100",
      "total": "$100"
    }
  }'

Example JSON Payload

Here's a complete example of the variables object you'll send in your API request.

{
  "templateId": "f86e0233-39bd-4884-80ca-c5da4774a3db",
  "variables": {
    "invoice_number": "INV-001",
    "date": "your_date",
    "company_name": "My Company",
    "company_address": "123 Main St",
    "client_name": "Client Name",
    "client_address": "456 Client St",
    "item_description": "Service",
    "item_qty": "1",
    "item_price": "$100",
    "item_total": "$100",
    "total": "$100"
  }
}

Other Templates

Ready to Generate Invoices?

Sign up for free and start generating professional PDF documents in minutes. No credit card required.