---
title: "Download a credit note PDF"
url: https://docs.corefinity.com/api/reference/billing/download-credit-note-pdf
type: endpoint
last_updated: 2026-11-13
feature: billing
related:
  - https://docs.corefinity.com/guides/billing/billing-overview.md
  - https://docs.corefinity.com/mcp/tools/corestack_billing_credit_note_pdf_get.md
---
# Download a credit note PDF

Answers the PDF of one of the invoice's credit notes, which exists once the note's `pdf_href` on the invoice
is not `null`. Each download is recorded in the company's activity.

```http
GET /api/corestack/billing/invoices/{invoice}/credit-notes/{number}/pdf
```

- Scope: `read`
- Two-factor: required on your account (all)
- Rate limit: 120 a minute
- Try it in the console: off. It has not been cleared for the console. Copy the request and run it yourself when you are sure.

## Path parameters

- `invoice` (integer, required): The invoice's `id`. Digits only.
- `number` (string, required): The credit note's `number`, from the invoice's `credit_notes`. Letters, digits and hyphens.

## Query parameters

- `account` (integer): The billing account to read, by its `id` (see `GET /corestack/billing/account`). Left out, the request acts on your company's default billing account. An account that does not exist and one that is not your company's answer the same 404.
- `account_id` (integer): The same as `account`, under the name the MCP tools use. Send one of the two: when they name different accounts the request is refused `422 invalid` on `account_id`.

## Request

### curl

```bash
curl https://manage.corefinity.com/api/corestack/billing/invoices/1/credit-notes/string/pdf \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json"
```

### PHP

```php
use Illuminate\Support\Facades\Http;

$response = Http::withToken(env('COREFINITY_TOKEN'))
    ->acceptJson()
    ->get('https://manage.corefinity.com/api/corestack/billing/invoices/1/credit-notes/string/pdf');

$data = $response->json();
```

### Node

```javascript
const res = await fetch('https://manage.corefinity.com/api/corestack/billing/invoices/1/credit-notes/string/pdf', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.COREFINITY_TOKEN}`,
    Accept: 'application/json',
  },
});

// An answer with no body (204) has nothing to parse.
const text = await res.text();
const data = text && JSON.parse(text);
```

### Python

```python
import os
import requests

res = requests.get(
    "https://manage.corefinity.com/api/corestack/billing/invoices/1/credit-notes/string/pdf",
    headers={
        "Authorization": f"Bearer {os.environ['COREFINITY_TOKEN']}",
        "Accept": "application/json",
    },
)

data = res.json() if res.content else None
```

## Responses

### 200 The credit note, as a PDF file named for its number.

```json
"string"
```

### 401 No token, or a token that is not valid.

```json
{
  "message": "Unauthenticated."
}
```

### 403 The token lacks the scope (`scope_required`, with the `scope` to use), your company requires two-factor authentication and you have not set it up (`two_factor_required`), or you may not read your company's billing (`billing_forbidden`): billing is for the company's owner, its billing contacts and its primary user.

```json
{
  "code": "billing_forbidden",
  "message": "Billing is available to your company's owner and billing contacts.",
  "reason": "billing_forbidden"
}
```

### 404 Billing is not on for your company (`feature_off`); the invoice does not exist, is not your company's or has no credit note with that number; or the credit note's PDF is not ready yet (`credit_note_not_ready`).

```json
{
  "code": "credit_note_not_ready",
  "message": "This credit note is not ready yet. Try again shortly",
  "reason": "credit_note_not_ready"
}
```

### 422 `account` and `account_id` name different billing accounts (`invalid`, on `account_id`).

```json
{
  "code": "invalid",
  "errors": {
    "account_id": [
      "Send account or account_id, not both: they name different billing accounts."
    ]
  },
  "field": "account_id",
  "message": "Send account or account_id, not both: they name different billing accounts.",
  "reason": "invalid"
}
```

### 429 Too many requests (`rate_limited`). Wait for the number of seconds in `Retry-After`, which `retry_after_seconds` repeats.

```json
{
  "code": "rate_limited",
  "message": "Too many requests. Try again in 60 seconds.",
  "reason": "rate_limited",
  "retry_after_seconds": 60
}
```

### 503 The credit note's PDF could not be fetched at the moment (`provider_unavailable`). Try again shortly.

```json
{
  "code": "provider_unavailable",
  "message": "This credit note could not be fetched just now. Try again in a moment",
  "reason": "provider_unavailable"
}
```

## If it is refused

| Status | Reason | What to do |
|---|---|---|
| 401 |  | Send a valid token as `Authorization: Bearer <token>`. |
| 403 | `billing_forbidden` | Billing is for the organisation's owner and billing contacts. Ask one of them to do this. |
| 403 | `company_unavailable` | Your company is unavailable. |
| 403 | `scope_required` | Use a token with the scope named in `scope`. |
| 403 | `two_factor_required` | Turn on two-factor on your account, then send again. |
| 404 | `credit_note_not_ready` | The credit note is not ready yet. Try again shortly. |
| 404 | `feature_off` | This feature is not on for your organisation yet. |
| 422 | `invalid` | Fix the field named in `field`; `errors` says why. |
| 429 | `rate_limited` | Wait for the seconds in `Retry-After`. |
| 503 | `provider_unavailable` | The payment provider, or the old host, did not answer. Try again later. |

## The same task elsewhere

- Guide: [Billing](https://docs.corefinity.com/guides/billing/billing-overview.md)
- MCP tool: [`corestack_billing_credit_note_pdf_get`](https://docs.corefinity.com/mcp/tools/corestack_billing_credit_note_pdf_get.md)
