Skip to main content
POST
/
v1
/
invoices
/
generate
Generate Invoice
curl --request POST \
  --url https://api.finepdf.dev/v1/invoices/generate \
  --header 'Content-Type: application/json' \
  --data '
{
  "template": "<string>",
  "invoice_number": "<string>",
  "items": [
    {}
  ]
}
'
{
  "invoiceUrl": "<string>",
  "jobId": "<string>"
}

Query Parameters

async
boolean
default:"false"
If true, the generation will happen in the background and results will be sent via webhook.

Body Parameters

template
string
required
The name of the template to use (e.g., minimal, bold).
invoice_number
string
required
Your internal invoice reference number.
items
array
required
List of line items. Each item should have description, quantity, and unit_price.

Response

invoiceUrl
string
The URL to the generated PDF hosted on Cloudflare R2.
jobId
string
(Only for async=true) The ID of the background job.