---
title: "Invoices API: read your top-ups and grab a PDF"
description: "See each credited top-up on your account, card or crypto, with its number, amount and method, and render any one as a PDF drawn from your billing details."
canonical: https://pentestllm.ai/docs/invoices
generated: 2026-11-27T06:25:49.123Z
source: https://pentestllm.ai/docs/invoices
base_url: https://api.pentestllm.ai/v1
---

[Docs](https://pentestllm.ai/docs) / API reference

# Invoices API

Updated 2026-11-22. Published by PentestLLM.

Each time a top-up credits your balance it leaves an invoice, and two routes at `https://api.pentestllm.ai/v1` read them. A number looks like `INV-<year>-<n>`, kept per account and begun afresh each UTC year.

## List invoices

`GET /v1/invoices` hands back `data`: every credited top-up, card or crypto alike, latest first, each carrying its number, the amount, the method and the path to its PDF.

| Field | Notes |
| --- | --- |
| `number` | The invoice number, INV-<year>-<n>. |
| `payment_id` | The payment this invoice records. |
| `amount_micro` | The sum paid, in micro-dollars. |
| `refunded_micro` | Anything refunded since, in micro-dollars; 0 if none. |
| `bonus_micro` | Bonus credit that came with the payment, in micro-dollars, never charged. |
| `method` | Card or Crypto. |
| `created_at` | When the credit landed, in Unix milliseconds. |
| `pdf_url` | The PDF path, /v1/invoices/<number>.pdf. |

Figures mirror whatever actually credited, so this page prints none of them.

## Download one as a PDF

`GET /v1/invoices/{invoice_number}.pdf` builds the document when you request it, drawing on the billing details the account holds right then (the [billing-details reference](https://pentestllm.ai/docs/billing-details) covers those): the seller and the customer, the amount paid, the method under the name the console gives it, the date, and the credit added. The response type is `application/pdf`, marked for download. Because every copy is composed at the moment of the call, getting a correct “Bill to” (company, address, tax id) in place beforehand is worth the minute.

## Example

```bash
curl https://api.pentestllm.ai/v1/invoices \
  -H "Authorization: Bearer sk-ptl-live-…"
```

Each entry’s `pdf_url` is the path you then request to fetch that invoice as a file. An admin key opens either route; a key scoped only to model calls will not. Without a valid key the route returns `invalid_api_key` (401); a PDF whose invoice number is not yours comes back `not_found` (404).

## Questions

### What turns into an invoice?

Every top-up that credits your balance, whichever way it was paid, by card or by crypto. A payment still pending or failed yields none; the INV-<year>-<n> number is issued the instant the credit posts.

### Can my company and tax id show on it?

Yes. Each PDF is built from your current billing details, so fill in the company, address and tax number through the billing-details route first, and the following download carries them in the "Bill to" block.

### Does an invoice double as a usage statement?

No. An invoice marks a top-up you funded, while a usage statement is the signed month-end record of your spend, which the public key on the verifier lets you validate.

## Read next

- [MCP servers](https://pentestllm.ai/docs/mcp-servers)
- [Log export](https://pentestllm.ai/docs/exports)
- [Billing details](https://pentestllm.ai/docs/billing-details)
- [Statement signing key](https://pentestllm.ai/docs/statements-public-key)
- [Keys and scopes](https://pentestllm.ai/docs/keys)
- [Usage and signed receipts](https://pentestllm.ai/docs/usage-and-receipts)
- [Spend limits and balance](https://pentestllm.ai/docs/spend-limits)
- [Redaction and guardrails](https://pentestllm.ai/docs/redaction-and-guardrails)
- [Sessions](https://pentestllm.ai/docs/sessions)
- [Embeddings, rerank and moderation](https://pentestllm.ai/docs/retrieval-and-moderation)
- [Batch files](https://pentestllm.ai/docs/files)
- [Batches](https://pentestllm.ai/docs/batches)
- [Status and proof feeds](https://pentestllm.ai/docs/status-and-proof)
- [Count tokens](https://pentestllm.ai/docs/count-tokens)
- [Usage by app](https://pentestllm.ai/docs/stats-apps)
- [App sign-in keys](https://pentestllm.ai/docs/auth-keys)
- [Webhook deliveries](https://pentestllm.ai/docs/webhooks-deliveries)
- [Docs: connect in two minutes](https://pentestllm.ai/docs)
- [Verify a statement](https://pentestllm.ai/statements/verify)
- [Pricing](https://pentestllm.ai/pricing)
