ForHosting KIT · Documents & PDF

Create an invoice PDF

Turn a renewed subscription, a completed marketplace order or an approved quote into a branded, itemized invoice PDF with subtotal, tax breakdown and grand total clearly separated, without anyone typing numbers into a template. You pay per invoice, with no monthly fee.

● StablePer request + per document$0.040
Use it from WebAPIEmailTelegramApp soon

Run this on our servers with your account. Free tools run in your browser; this one bills your KIT balance per the price above.

branded, from JSON

Why invoices should not depend on someone typing them

Every sale, subscription renewal or completed order eventually needs a document the customer can open, check and keep for their own accounting. The data behind it already sits in your system the moment the transaction happens: who sells, who buys, the line items, the tax and the totals. Retyping all of that into an invoicing template is slow, and it is exactly where mistakes creep in. Here you send that information as it is and receive a finished, itemized invoice PDF, laid out the way an accountant expects to read it, with the subtotal, the tax breakdown and the grand total clearly separated, so it reads as a real invoice rather than a spreadsheet dump.

Typical ways to put it to work

A subscription service can produce a branded invoice the instant a plan renews and attach it to the confirmation email. A marketplace can issue an invoice in each seller's own branding for every completed order, so buyers receive paperwork that looks like it came from that seller. An accounting team can invoice every open account at month close as one automated batch instead of one document at a time. An ordering tool can turn an approved quote into a formal invoice with the same line items and totals carried over exactly. If a document cannot be produced, it is retried three times and you are not charged for the failure.

Transparent pricing and safe handling

A task that fails is never charged; we retry three times before returning a clear error instead of a silent failure. Invoice data is deleted after the retention window and never used to train anything.

Subscription renewal billing

A SaaS platform generates a branded invoice PDF the instant a subscription renews and attaches it automatically to the confirmation email.

Marketplace seller invoices

A marketplace produces a seller-branded invoice for every completed order so each vendor's customers receive paperwork that looks like it came from that specific seller.

End-of-month batch invoicing

An accounting system generates invoices for every open account at month close, running the batch as a single automated job instead of one document at a time.

Custom quotes turned into invoices

A B2B ordering tool converts an approved quote into a formal invoice PDF the moment the customer confirms, with the same line items and totals carried over exactly.

Does it calculate tax and totals automatically?

Yes. You send line items and the applicable tax rate, and the service computes the subtotal, tax breakdown, and grand total, presenting them the way a formal invoice is expected to read.

What happens if invoice generation fails?

A failed task is never charged. We retry three times with backoff, and if the document still cannot be built you get a clear error instead of a silent failure or a charge.

How long can I access the generated invoice?

After the retention window it's deleted and never used for training.

What information do I need to send for an invoice?

The issuer and recipient details, the line items with quantities and unit prices, the applicable tax and the due date. Branding such as a logo and color accents is added on top, and the subtotal, tax and grand total are computed and laid out for you.

Can the invoice carry my logo and brand colors?

Yes. Send your logo and color accents with the invoice data and they appear on the finished PDF, so a marketplace can even issue invoices that look as if each one came from the individual seller.

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/pdf/invoice

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/pdf/invoice \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com"}'
{
  "url": "https://example.com"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "pdf.invoice",
  "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.040
Per document$0.001

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

max_mb25
max_pages200
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.
422task_failedThe task failed after 3 retries. You are never charged for it.

The Invoice PDF Generator API turns a JSON payload — line items, tax, totals, your branding — into a finished invoice PDF, ready to send or file the moment an order closes. It exists so billing a customer never depends on someone opening a template and typing numbers in by hand.

Invoicing as a byproduct of software, not a chore

Every sale, subscription renewal, or completed order eventually needs a document a customer can open, check, and keep for their own accounting — but the data behind it already lives in your system the instant the transaction happens. The invoice pdf generator api is built for that gap: you already know the line items, the tax, the totals; this endpoint turns that data into the document your customer actually expects, without a person ever touching an invoicing tool.

What goes into the request

Totals are computed and presented the way an accountant expects to see them: subtotal, tax breakdown, and grand total clearly separated, so the document reads as a real invoice rather than a spreadsheet dump. You send structured JSON describing the invoice — issuer and recipient details, line items with quantities and unit prices, applicable tax, due date, and your branding elements such as logo and color accents — and the service lays it out as a properly formatted, itemized PDF.

How generation and delivery work

Call POST /pdf/invoice with your payload and you receive a task_id immediately, without waiting on an open connection. The PDF is built asynchronously on our global edge, and once it's ready you're notified by a signed webhook — the natural fit for billing systems that need to attach the invoice to an email or a customer portal automatically — or by a signed link valid for 24 hours when a person just needs to fetch one document.

Where it slots into billing automation

This is designed to run unattended: a subscription platform generating one invoice per renewal, a marketplace producing a seller-branded invoice per completed order, an accounting system batching end-of-month invoices for every open account. Because each call returns a task_id and confirms delivery by webhook, invoice generation becomes one step triggered by the transaction itself — the same moment payment is captured or an order is confirmed — rather than a separate task on someone's to-do list.

Transparent pricing and safe handling

Billing is $0.040 per request plus $0.001 per document, a published rate with no tokens and no invented credits. Access requires prepaid balance — there is no free tier or trial — which is what keeps the service fast and free of abuse; requests without balance return 402.

How do I generate an invoice PDF with an API?

Send JSON with line items, totals, and branding to POST /pdf/invoice and you get a task_id back. The invoice pdf generator api builds the document asynchronously and delivers it by signed webhook or a signed link valid for 24 hours.

Is this API free to use?

There's no free tier — free tiers get abused and slow everyone down. Access runs on a prepaid ForHosting KIT balance: top up from $10.00 (it never expires) and each request is charged at its published price, so a call with no balance returns HTTP 402. No subscription, no tokens, no invented credits, and a failed task is never charged.

Can I add my own logo and branding?

Yes. The request accepts your logo and branding elements such as color accents, so the generated invoice looks like it came from your business, not a generic template.

Can I generate invoices in bulk, for example at month end?

Yes. Because the endpoint is asynchronous and returns a task_id per request, you can generate a full batch of invoices in parallel from a billing run or cron job.

Is the output a legally valid invoice?

The API produces a correctly formatted, itemized PDF from the data you provide; whether it meets a specific jurisdiction's legal requirements depends on the fields and tax details you include, which remain your responsibility.

Read the full KIT documentation →