# Get one of your invoices

> The portal.invoices.get operation: GET /api/v1/portal/me/invoices/{invoiceId} in the REST API and the portal_invoices_get tool in the MCP server.

Returns one of the signed-in customer's issued invoices: its lines, amounts, due date, the PDF link, the bank
transfer details of a `send_invoice` invoice (the invoice number is the payment reference) and whether it can be
paid by card now (`card`). Another customer's invoice reads as missing.

Customer portal only (`portal:read`).

## At a glance

- **REST:** `GET /api/v1/portal/me/invoices/{invoiceId}`
- **MCP tool:** `portal_invoices_get`
- **Operation ID:** `portal.invoices.get`
- **Scope:** Brand
- **Permission:** `portal:read`
- **Risk tier:** `read`
- **Dry run:** Not supported
- **Idempotency:** Not needed (read only)
- **Modes:** Test and live
- **Authentication:** A customer signed in to the customer portal (API keys can't call it)
- **Since:** M9

## Request

### Path parameters

| Field       | Type       | Description                     |
| ----------- | ---------- | ------------------------------- |
| `invoiceId` | `inv_…` ID | One of your invoices (`inv_…`). |

### Query parameters

This operation takes no query parameters.

## Response

`200 OK` with a JSON object:

| Field                    | Type                                                        | Description                                                                         |
| ------------------------ | ----------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| `id`                     | `inv_…` ID                                                  |                                                                                     |
| `object`                 | `"portal_invoice"`                                          |                                                                                     |
| `number`                 | string                                                      |                                                                                     |
| `kind`                   | string                                                      | `invoice` or `receipt`.                                                             |
| `status`                 | string                                                      | `open`, `paid`, `void`, `uncollectible` or `pending_registration`.                  |
| `issueDate`              | string                                                      |                                                                                     |
| `dueDate`                | string or null                                              |                                                                                     |
| `currency`               | string                                                      |                                                                                     |
| `total`                  | money                                                       |                                                                                     |
| `creditApplied`          | money or null                                               |                                                                                     |
| `amountDue`              | money                                                       |                                                                                     |
| `paidAt`                 | date-time or null                                           |                                                                                     |
| `payable`                | boolean                                                     | Open with something due: it can be paid by card in the portal.                      |
| `pdfPath`                | string or null                                              | The PDF's download link, relative to the app URL (null while it is being prepared). |
| `sellerName`             | string                                                      |                                                                                     |
| `lines`                  | array of object                                             |                                                                                     |
| `lines[].description`    | string                                                      |                                                                                     |
| `lines[].quantity`       | integer                                                     |                                                                                     |
| `lines[].amount`         | money                                                       |                                                                                     |
| `bankTransfer`           | object or null                                              |                                                                                     |
| `card`                   | object                                                      |                                                                                     |
| `card.available`         | boolean                                                     |                                                                                     |
| `card.unavailableReason` | one of `not_open`, `nothing_due`, `no_processor` or null    |                                                                                     |
| `card.component`         | one of `fake`, `stripe_payment_element`, `redirect` or null |                                                                                     |
| `card.publishableKey`    | string or null                                              |                                                                                     |

## Examples

### An open invoice

```http
GET /api/v1/portal/me/invoices/inv_01m4tx5nj8emwbyf7y9vcf48b3
Authorization: Bearer or_test_…
```

Response (`200`):

```json
{
  "id": "inv_01m4tx5nj8emwbyf7y9vcf48b3",
  "object": "portal_invoice",
  "number": "GEN-2026-000042",
  "kind": "invoice",
  "status": "open",
  "issueDate": "2026-10-20",
  "dueDate": "2026-11-03",
  "currency": "EUR",
  "total": {
    "amount": "120000000",
    "currency": "EUR"
  },
  "creditApplied": null,
  "amountDue": {
    "amount": "120000000",
    "currency": "EUR"
  },
  "paidAt": null,
  "payable": true,
  "pdfPath": "/api/v1/invoices/inv_01m4tx5nj8emwbyf7y9vcf48b3/pdf?token=eyJ…",
  "sellerName": "Etna Labs AG",
  "lines": [
    {
      "description": "Genno Pro (monthly)",
      "quantity": 1,
      "amount": {
        "amount": "120000000",
        "currency": "EUR"
      }
    }
  ],
  "bankTransfer": {
    "accountHolder": "Etna Labs AG",
    "iban": "CH9300762011623852957",
    "bic": "EXMPCHZZXXX",
    "bankName": "Example Bank",
    "reference": "GEN-2026-000042"
  },
  "card": {
    "available": true,
    "unavailableReason": null,
    "component": "fake",
    "publishableKey": null
  }
}
```

## Errors

| Code                                                                                         | HTTP status | When                                                                                                               | What to do                                                                                                                  |
| -------------------------------------------------------------------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------- |
| [`validation_failed`](https://ownrecord.io/docs/reference/errors.md#validation_failed)       | 400         | The invoice's ID or another field is malformed.                                                                    | Fix the fields listed in `details.issues` and send the request again.                                                       |
| [`resource_not_found`](https://ownrecord.io/docs/reference/errors.md#resource_not_found)     | 404         | You have no such invoice (another customer's reads the same).                                                      | Check the ID and that your credentials are scoped to the right organization, entity, brand and mode.                        |
| [`livemode_not_allowed`](https://ownrecord.io/docs/reference/errors.md#livemode_not_allowed) | 403         | The portal session is in the other mode than the request.                                                          | Use test mode, or credentials for the target's mode. Developers need live access granted by an organization owner or admin. |
| [`permission_denied`](https://ownrecord.io/docs/reference/errors.md#permission_denied)       | 403         | The caller isn't a customer signed in to this brand's portal (operators and API keys use the customer operations). | Ask an organization owner or admin for a role or scope that allows this action.                                             |

It can also return these [common errors](https://ownrecord.io/docs/reference.md#common-errors): [`api_version_unsupported`](https://ownrecord.io/docs/reference/errors.md#api_version_unsupported), [`authentication_required`](https://ownrecord.io/docs/reference/errors.md#authentication_required), [`api_key_invalid`](https://ownrecord.io/docs/reference/errors.md#api_key_invalid), [`scope_required`](https://ownrecord.io/docs/reference/errors.md#scope_required), [`dry_run_not_supported`](https://ownrecord.io/docs/reference/errors.md#dry_run_not_supported), [`rate_limited`](https://ownrecord.io/docs/reference/errors.md#rate_limited), [`internal_error`](https://ownrecord.io/docs/reference/errors.md#internal_error).
