ForHosting KIT · Documents & PDF

Generate a credit note document from an invoice

Create a consistent credit note record from an original invoice reference, a clear reason, and the exact lines that need to be reversed.

● BetaFree · in your browser
Use it from WebAPIEmailTelegramApp soon

The generator calculates every line subtotal and tax amount, adds the final credit, and checks that the result does not exceed the original invoice total. The response is structured JSON, making it suitable for review, storage, accounting workflows, or conversion into a branded printable document by your own system.

Start with the source invoice and a precise reason

A useful credit note must connect unambiguously to the transaction it corrects. Enter the original invoice reference exactly as it appears in your billing or accounting system, then provide the tax-inclusive original invoice total and its three-letter currency code. The reason should explain the business event rather than merely repeat that a credit is being issued. Examples include returned goods, an agreed service reduction, damaged stock, a pricing correction, or an overcharge. A specific reason gives approvers, customers, bookkeepers, and auditors enough context to understand why revenue and tax are being reversed. This generator preserves that text in the structured document but does not invent a credit note number, issue date, customer identity, legal wording, or authorization status. Those fields depend on your organization and jurisdiction and should be added by the system that controls document numbering and issuance. Keeping source facts separate from generated identifiers makes the calculation deterministic and avoids creating a document that appears officially issued before it has passed your normal approval process.

Describe each credited line and let the calculator total it

Add one row for every product, service, fee, or adjustment being credited. Each row requires a description, a positive quantity, and a non-negative unit price before tax. The optional tax rate is a percentage and defaults to zero when omitted. For each row, the generator multiplies quantity by unit price, rounds the resulting subtotal to two decimal places, calculates tax on that rounded line subtotal, and then calculates the line total. It adds all line subtotals and line tax amounts to produce the credit total. Rounding by line is intentional because it matches the way many invoice systems display and post itemized documents, while also ensuring that every displayed line reconciles with the summary. Use positive values: the document type already communicates that these amounts reverse part of the invoice, so negative quantities or prices would create a confusing double negative. If the original invoice used discounts or special rounding, represent the amount actually being reversed as its own clear adjustment line so the generated total can be reconciled against the source invoice.

Validate the result before issuing the final document

The completed response contains a document type, the original invoice reference, reason, currency, numbered item rows, and a totals section. The totals show the credited subtotal, credited tax, overall credit total, original invoice total, and the amount left after this credit. The generator rejects a request when the calculated credit total is greater than the supplied original invoice total. That guard prevents a common data-entry mistake, but it is not a substitute for checking earlier credit notes against the same invoice. Because the tool receives only the current request and uses no network or stored history, your billing system must verify the cumulative amount if several credits are issued over time. Before approval, compare descriptions, quantities, prices, tax treatment, currency, and customer details with the original invoice. Then assign the official credit note number and issue date according to your accounting controls and local requirements. The structured response can feed a template, ledger workflow, approval queue, or PDF renderer without forcing those presentation and compliance choices into the arithmetic step.

Credit returned goods

Turn returned quantities, original prices, and tax rates into an itemized credit note ready for approval.

Correct an invoice overcharge

Document a price or fee adjustment and calculate the exact amount that should be reversed.

Prepare accounting workflow data

Create consistent structured totals that can be stored, reviewed, or passed to a branded document renderer.

What does a request cost?

Each API request costs $0.002. The browser version runs locally without a paid API request.

Does this issue an official credit note number?

No. It assembles the calculated document data but leaves official numbering and issue dates to your controlled billing process.

How is tax calculated?

Tax is calculated for each line from its rounded subtotal and tax rate, then the line tax amounts are added together.

What happens if the credit is larger than the invoice?

The request fails with an invalid-input error when the calculated credit total exceeds the supplied original invoice total.

Can it detect previous credits against the same invoice?

No. It has no network or stored history, so your billing system must check cumulative credits before issuance.

Can I use a zero tax rate?

Yes. Omit tax_rate or set it to zero for a line that should not add tax.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/doc/credit-note-generate

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/doc/credit-note-generate \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"original_invoice_reference":"INV-2026-0042","original_invoice_total":250,"currency":"USD","reason":"Two items were returned unopened.","items":[{"description":"Wireless keyboard","quantity":2,"unit_price":45,"tax_rate":10},{"description":"Shipping adjustment","quantity":1,"unit_price":5}]}'
{
  "original_invoice_reference": "INV-2026-0042",
  "original_invoice_total": 250,
  "currency": "USD",
  "reason": "Two items were returned unopened.",
  "items": [
    {
      "description": "Wireless keyboard",
      "quantity": 2,
      "unit_price": 45,
      "tax_rate": 10
    },
    {
      "description": "Shipping adjustment",
      "quantity": 1,
      "unit_price": 5
    }
  ]
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "doc.credit_note_generate",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

max_items200
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Read the full KIT documentation →