payment-gateway.app Docs
Features & User Guide

Invoicing & Credit Notes

Managing the lifecycle of compliant invoices, corrections, and refunds.

Invoicing & Credit Notes

Invoices are the legal backbone of your transactions. The Payment Gateway automatically generates mathematically exact, legally compliant PDFs and E-Invoices (XML) for every successful captured payment.

Document Detail Views

In the Admin UI, invoice and credit note detail pages use the same party structure:

  • Seller: The legal entity issuing the document.
  • Client: The billed counterparty shown on the document snapshot.

This keeps invoices, credit notes, and transaction detail views consistent inside the admin control plane.

When the document is linked to a stored Client record, the Client email in the detail view links directly to that Client profile. This gives operators a quick path from a document to the broader relationship history without changing the legal document itself.

The document still preserves its own party snapshot. If the current Client profile changes later, the already-issued invoice or credit note continues to show the original document data that was valid at issuance time.

Invoice Statuses

Invoices exist in strict states to maintain accounting integrity:

  1. draft: The invoice is currently being constructed. You can edit line items, change the billing address, or delete it entirely without leaving an accounting trace.
  2. issued: Once the "Issue" button is clicked (or a transaction succeeds automatically), the invoice is locked. An official sequential InvoiceNumber is permanently assigned. The line items and total amounts can never be changed again.
  3. Payment state (computed): Whether an invoice is open, partially settled, settled, credited, refunded, or overpaid is derived from linked settlements and credit notes rather than stored as a separate mutable invoice status.
  4. Void / refund workflows: If an issued invoice is critically wrong or must be reversed, the platform creates the appropriate reversal artifact and keeps the original invoice on file as part of the permanent accounting record.

Draft Invoice Tax Calculation

When creating or editing a draft invoice manually, VAT can be either automatic or explicit on a per-line basis.

  1. Leave the VAT field blank to let the backend calculate tax automatically.
  2. Enter a VAT percentage only when you intend to override the automatic result for that line item.
  3. The Admin Panel now previews the canonical backend tax result before save, including the resolved rate code when available.

The same tax engine is used for transactions, recurring invoices, API-key draft invoice creation, and the draft-invoice preview endpoint, so the behavior stays consistent across flows. For lifecycle, OSS evidence, and ledger concepts, see Invoicing & Tax architecture; for POST /api/v1/invoices/preview-tax and tax report routes, see Admin API.

The Customer Portal

Rather than emailing large PDF attachments that may be blocked by spam filters, the gateway hosts a secure Customer Portal.

End-users navigate to your custom domain (e.g., invoices.yourcompany.com) and authenticate using a one-time secure link or their client portal password. From there, they can independently:

  • Download their invoice as a PDF.
  • Download their invoice as a machine-readable native E-Invoice (ZUGFeRD, XRechnung, Peppol) if configured.

Credit Notes (Refunds)

Because issued invoices are strictly immutable, you cannot simply edit the total amount to reflect a refund.

Instead, you must issue a Credit Note. A Credit Note is a separate legal document that mathematically counters the original invoice.

The original invoice always remains part of the accounting record. Refund and reversal outcomes are represented by linked settlement totals and credit notes, not by editing or replacing the invoice itself.

If an invoice is linked to payment records, the authoritative reversal workflow is refund-first.

  1. Open the Invoice or the linked successful Transaction.
  2. If exactly one refundable transaction is linked, click Refund Payment directly from the Invoice screen and complete the same refund form used in the Transaction screen.
  3. If multiple refundable transactions are linked, choose the relevant Transaction from the Invoice payment section and process the refund there.
  4. Choose to perform a full or partial refund.
  5. The system communicates the refund request to the upstream Provider (e.g., Stripe), records the refund against the linked invoice settlement state, and generates the Credit Note document for the Client.

When an invoice has no linked payment refund path, the Invoice screen offers a Create Credit Note workflow for document-side full or partial reversals.

Credit notes therefore serve two purposes:

  • They provide the legal reversal document required for accounting and tax records.
  • They explain why the invoice payment state may move to partially refunded, refunded, or fully credited without changing the original invoice contents.

Refund-created credit notes inherit the original invoice's Seller and Client snapshot. That means the reversal document stays legally aligned with the invoice it offsets, even if the current Client profile has changed since the invoice was issued.

[!IMPORTANT] The platform intentionally does not offer a paid-invoice workflow that creates a stand-alone credit note while leaving the linked payment untouched. For paid invoices, the credit note should follow the refund workflow so cash movement, settlement state, and accounting documents remain aligned.

Numbering Configuration

Organizations control invoice and credit note numbering from the invoicing settings page.

Each organization configures two independent document layouts: one for invoices and one for credit notes.

Each layout can define:

  • a dedicated prefix
  • optional middle text between the visible period and the sequence
  • an optional suffix
  • the first sequence number to allocate
  • the zero-padding width of the numeric sequence
  • whether the visible period uses no date, the calendar year, or the fiscal year
  • whether the sequence resets never, every calendar year, or every fiscal year
  • how much of the issue date appears in the number
  • how date parts are separated when month or day are shown

If a layout uses No date, the sequence is appended directly after the prefix unless you provide explicit middle text. This avoids accidental doubled separators for prefixes that already end in punctuation such as -.

Typical layouts include:

  • No date → example: INV-0001
  • Year → example: INV-2026-0001
  • Year + Month → example: INV-2026-03-0001
  • Year + Month + Day → example: INV-2026-03-27-0001
  • Fiscal year with middle text → example: INV2027AR0001
  • Fiscal year with suffix → example: CN-2026-0001-REV

When the separator is set to None, date parts are compacted:

  • INV-20260327-0001

When fiscal numbering is enabled, the backend derives the year label from the actual issue date and the configured fiscal-year start month. That same fiscal definition also drives the optional fiscal-year reset policy.

The sequence itself remains gapless and organization-scoped. Changing the format affects newly allocated numbers only. Existing invoices and credit notes keep their assigned document numbers permanently.

Custom Invoice Templates

Organizations can create custom PDF document templates and use them for invoices, credit notes, and related document flows.

Typical workflow:

  1. Open Settings > Templates > Document Templates.
  2. Create a new document template or duplicate a system default.
  3. Adjust branding, layout, footer content, and supported variables.
  4. Set the template as the organization default for invoicing, or select it when creating or editing a draft invoice.

You can also assign a specific PDF template in invoicing settings so newly generated invoices use that template automatically. Sites may override the inherited organization template when a storefront needs different branding.

This means custom invoice templates are supported both as:

  • organization defaults for invoice generation
  • per-site branding overrides
  • per-invoice selection during draft invoice creation or editing

On this page