Invoicing and finance

Statement PDF API for account and billing exports

Generate account, billing, and activity statement PDFs with multi-page rows, totals, metadata, and optional PDF/A archival settings.

PRIMARY API JSON Render
ENDPOINT /api/v1/pdf/render
SYSTEMS billing backend / account system / ERP export service / SaaS reporting service
Job to be done

Render customer, account, or billing statement PDFs from period data, opening balances, line items, adjustments, and totals so users can download a consistent record for review or retention.

When to use this API

  • Your system already owns balances, statement periods, transaction rows, and totals.
  • You need a PDF export for account history, billing summaries, or finance workflows.
  • You need repeatable multi-page output with headers, footers, and summary sections.
  • You may need PDF/A output for archival workflows.

What it does not replace

  • You need bank connectivity, ledger reconciliation, or financial advice.
  • You need encrypted statements and PDF/A in the same render request. The public Render API treats security settings and PDF/A profile settings as mutually exclusive.
  • You need e-invoice XML packaging. Use the E-Invoice Render endpoint for that.

Which endpoint to call

PRIMARY

/api/v1/pdf/render

JSON Render is the default path for this workflow.

SECONDARY 1

/api/v1/template-render

Use this when the workflow needs the related API path, template contract, or capabilities lookup.

Minimal request

POST /api/v1/pdf/render - statement cover page with period totals.

{
  "settings": {
    "profile": "pdfa-2b"
  },
  "pages": [
    {
      "size": "letter",
      "elements": [
        {
          "type": "text",
          "x": 18,
          "y": 20,
          "content": "Account Statement",
          "style": { "font_size": 18, "font_family": "NotoSans-Regular" }
        },
        {
          "type": "text",
          "x": 18,
          "y": 38,
          "content": "Period: 2026-05-01 to 2026-05-31\nOpening balance: $1,240.00\nClosing balance: $1,890.25",
          "style": { "font_size": 11, "font_family": "NotoSans-Regular" }
        }
      ]
    }
  ]
}

What gPdf handles

  • DocumentRequest rendering for statement pages.
  • Text blocks, tables, totals sections, page numbering, metadata, and PDF/A profile settings.
  • Template Render for a stable statement layout and field contract.
  • Binary PDF output suitable for download or storage by your system.

What your system owns

  • Statement period logic, account balances, transaction data, currency rules, and customer identity.
  • Archival policy, access control, file naming, and secure delivery.
  • Any reconciliation, audit approval, or regulated financial representation.

Production checklist

  1. Test long transaction descriptions, high row counts, empty periods, and negative balances.
  2. Generate a request ID for every statement render.
  3. Decide whether to render on demand or store each statement after period close.
  4. Use PDF/A only when the statement's archival policy requires it.
  5. Keep access control and customer authentication outside the render API.

Claim boundaries

  • gPdf does not compute account balances or reconcile ledgers.
  • The API renders statement PDFs; your system owns financial correctness.
  • PDF/A output is a render setting, not a substitute for a retention policy.

Statements are period documents

A statement page should start from a closed set of business facts: account, period, opening balance, activity rows, adjustments, and closing balance. gPdf does not decide those facts. It renders them into a PDF layout that your users can download or your system can store.

Handling large row sets

For high row counts, design the statement as a repeatable layout with table regions, summary sections, and page numbers. Use JSON Render while tuning the layout. Move to Template Render when the field contract is stable.

FAQ

Can gPdf calculate statement balances?
No. Your system sends the period, balances, rows, and totals. gPdf renders the PDF.
Can statement PDFs use PDF/A?
Yes, JSON Render supports PDF/A profile settings. Your archival policy decides whether PDF/A is required.
Should statements use Template Render?
Usually yes after the layout is stable. Template Render lets callers send period data without repeating page coordinates.
Does gPdf store statements?
No. Standard render requests return the PDF response. Your system owns storage and access control.