All Docs
FeaturesCalmony PayUpdated March 14, 2026

Invoice PDF Generation

Invoice PDF Generation

Calmony Pay can render any invoice to a PDF document and return a download URL. This is useful for sharing invoices with customers, attaching them to emails, or storing them for accounting purposes.

Endpoint

GET /v1/invoices/:id/pdf

Path Parameters

ParameterTypeDescription
idstringThe unique identifier of the invoice.

Response

Returns a JSON object containing a durable download URL pointing to the stored PDF file.

{
  "url": "https://..."
}

PDF Contents

Every generated PDF includes the following information:

SectionDetails
BrandingCalmony Pay logo and branded layout
Invoice numberUnique reference number for the invoice
Payment statusCurrent status — e.g. paid, unpaid, overdue
Customer detailsName, address, and contact information
DatesInvoice date and due date
Line itemsDescription, quantity, unit price, and line subtotal for each item
TotalsSubtotal, tax amount, and grand total

Behaviour

  • The PDF is generated on request and stored before the URL is returned. Subsequent calls for the same invoice may return the same stored URL.
  • The download URL is durable — it can be embedded in emails or saved for later retrieval.
  • The endpoint requires a valid invoice id. If the invoice does not exist, a 404 error is returned.

Example Request

curl -X GET https://api.calmonypay.com/v1/invoices/inv_abc123/pdf \
  -H "Authorization: Bearer YOUR_SECRET_KEY"

Example Response

{
  "url": "https://files.calmonypay.com/invoices/inv_abc123.pdf"
}

Related