> ## Documentation Index
> Fetch the complete documentation index at: https://docs.goyappr.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List Invoices

> Every invoice this workspace has been sent, newest first: credit top-ups, automatic
top-ups and phone-number charges (the first month and every renewal). Each one is
emailed to the billing email when it is paid. Required scope `billing:read`.

Paid, open and uncollectible invoices are listed; a draft is not an invoice yet and a
void one was never owed. `view_url` is the invoice's own page and `pdf_url` downloads
it. Amounts are in cents: `total_cents` is what was charged, `vat_cents` the VAT in it,
`net_cents` the rest, and `refunded_cents` whatever was paid back.

Follow `next_cursor` until it is `null`. A page can hold fewer than `limit` invoices
while `next_cursor` is still set; keep following it. Invoices are issued in English.


Every invoice the workspace has, newest first, with links to view it online and
download the PDF. Requires `billing:read`, so a key made for bookkeeping can
read invoices without being able to top up or change anything.

Every payment comes with one invoice, emailed to the workspace's billing email
when it is paid: a credit top-up, an automatic top-up, and a phone number's
first and every monthly charge. What the invoices print about you is set with
[`PATCH /billing/details`](https://docs.goyappr.com/api-reference/billing/update-details).

```bash theme={null}
curl "https://api.goyappr.com/billing/invoices?limit=20" \
  -H "Authorization: Bearer $YAPPR_API_KEY"
```

```json theme={null}
{
  "invoices": [
    {
      "number": "4F2A9C1B-0007",
      "kind": "credits_top_up",
      "description": "Credits top-up",
      "phone_number": null,
      "status": "paid",
      "issued_at": "2026-10-21T08:03:44.000Z",
      "paid_at": "2026-10-21T08:03:44.000Z",
      "currency": "usd",
      "net_cents": 5000,
      "vat_cents": 900,
      "total_cents": 5900,
      "refunded_cents": 0,
      "lines": [
        { "description": "Credits top-up", "quantity": 1, "unit_amount_cents": 5000, "amount_cents": 5000 },
        { "description": "VAT (18%)", "quantity": 1, "unit_amount_cents": 900, "amount_cents": 900 }
      ],
      "view_url": "https://invoice.stripe.com/i/EXAMPLE",
      "pdf_url": "https://pay.stripe.com/invoice/EXAMPLE/pdf"
    }
  ],
  "next_cursor": "aW5fZXhhbXBsZQ"
}
```

## Query

| Parameter | Default | What it does |
| - | - | - |
| `limit` | `20` | How many invoices, 1 to 100. Anything else is `400 INVOICE_LIMIT_INVALID`. |
| `cursor` | — | The `next_cursor` of the previous page, to read the page after it. A cursor this endpoint did not give is `400 INVOICE_CURSOR_INVALID`. |

`next_cursor` is `null` on the last page. A page can hold fewer than `limit`
invoices and still have a `next_cursor`: keep reading until it is `null`.

## The fields

| Field | What it is |
| - | - |
| `number` | The invoice number printed on it, for your books. |
| `kind` | What it was for: `credits_top_up`, `auto_top_up`, `phone_number` or `other`. |
| `description` | The first line's description, as the invoice prints it (in English). |
| `phone_number` | The number a `phone_number` invoice was for, in E.164; `null` for every other kind. |
| `status` | `paid`, `open` (issued and not paid yet) or `uncollectible` (could not be collected). |
| `issued_at`, `paid_at` | When it was issued, and when it was paid (`null` until it is). |
| `currency` | Lower-case currency code, such as `usd`. |
| `net_cents`, `vat_cents`, `total_cents` | The amount before VAT, the VAT, and the total, in the currency's cents. `net_cents + vat_cents = total_cents`. |
| `refunded_cents` | How much of the payment was refunded; `0` when none was. |
| `lines` | Each line as printed: description, quantity, unit amount and amount. |
| `view_url`, `pdf_url` | The invoice online, and its PDF. Hand them to whoever keeps your books. |

An invoice still being prepared, and one cancelled before it was paid, is never
listed. Invoices are issued in English.

## Errors

| HTTP | `code` | When |
| - | - | - |
| `400` | `INVOICE_LIMIT_INVALID` | `limit` is not a whole number from 1 to 100. |
| `400` | `INVOICE_CURSOR_INVALID` | `cursor` is not one this endpoint gave. |
| `403` | `INSUFFICIENT_SCOPE` | The key does not hold `billing:read`. |
| `502` | `BILLING_UNAVAILABLE` | The invoices could not be reached. Try again in a minute. |


## OpenAPI

````yaml GET /billing/invoices
openapi: 3.1.0
info:
  title: Yappr API
  description: >
    Create and manage AI voice agents, purchase phone numbers, configure tools,
    and initiate calls — all via REST.
  version: 1.0.0
  contact:
    url: https://goyappr.com
servers:
  - url: https://api.goyappr.com
    description: Production
security:
  - apiKey: []
paths:
  /billing/invoices:
    get:
      tags:
        - Billing
      summary: List invoices
      description: >
        Every invoice this workspace has been sent, newest first: credit
        top-ups, automatic

        top-ups and phone-number charges (the first month and every renewal).
        Each one is

        emailed to the billing email when it is paid. Required scope
        `billing:read`.


        Paid, open and uncollectible invoices are listed; a draft is not an
        invoice yet and a

        void one was never owed. `view_url` is the invoice's own page and
        `pdf_url` downloads

        it. Amounts are in cents: `total_cents` is what was charged, `vat_cents`
        the VAT in it,

        `net_cents` the rest, and `refunded_cents` whatever was paid back.


        Follow `next_cursor` until it is `null`. A page can hold fewer than
        `limit` invoices

        while `next_cursor` is still set; keep following it. Invoices are issued
        in English.
      operationId: listInvoices
      parameters:
        - in: query
          name: limit
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 20
          description: How many invoices to return, 1 to 100. Default 20.
        - in: query
          name: cursor
          schema:
            type: string
          description: >-
            The `next_cursor` of the previous page. Leave it out to start from
            the newest invoice.
      responses:
        '200':
          description: One page of invoices
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvoiceList'
              example:
                invoices:
                  - number: 4F2A9C1B-0007
                    kind: credits_top_up
                    description: Credits top-up
                    phone_number: null
                    status: paid
                    issued_at: '2026-10-21T09:14:02.000Z'
                    paid_at: '2026-10-21T09:14:02.000Z'
                    currency: usd
                    net_cents: 5000
                    vat_cents: 900
                    total_cents: 5900
                    refunded_cents: 0
                    lines:
                      - description: Credits top-up
                        quantity: 1
                        unit_amount_cents: 5000
                        amount_cents: 5000
                      - description: VAT (18%)
                        quantity: 1
                        unit_amount_cents: 900
                        amount_cents: 900
                    view_url: https://invoice.stripe.com/i/example
                    pdf_url: https://pay.stripe.com/invoice/example/pdf
                next_cursor: null
        '400':
          description: >
            One of:

            INVOICE_LIMIT_INVALID — `limit` is not a whole number from 1 to 100.

            INVOICE_CURSOR_INVALID — `cursor` is not a `next_cursor` this list
            returned.

            BILLING_QUERY_INVALID — a query parameter other than `limit` and
            `cursor`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >
            INSUFFICIENT_SCOPE — the key lacks `billing:read`.
            API_KEY_AGENT_SCOPED — the key is limited to agents, and billing
            belongs to the whole workspace.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '502':
          description: >-
            BILLING_UNAVAILABLE: the invoices could not be read right now. Try
            again in a minute.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    InvoiceList:
      type: object
      required:
        - invoices
        - next_cursor
      properties:
        invoices:
          type: array
          items:
            $ref: '#/components/schemas/Invoice'
        next_cursor:
          type: string
          nullable: true
          description: Send as cursor for the next page; null when there is none.
    Error:
      type: object
      required:
        - error
        - code
      description: >
        Every error response - the secret-key API and the browser data plane
        alike - carries a

        human-readable `error` and a stable machine `code`, and a refusal that
        names what is

        wrong with the request carries `issues[]` too. Branch on `code`, never
        on the `error`

        text. A refusal that names nothing more specific carries the code its
        status means:

        `BAD_REQUEST` (400), `UNAUTHORIZED` (401, the browser data plane; the
        secret-key API

        answers `MISSING_KEY`, `INVALID_KEY` or `EXPIRED_KEY`), `BILLING_ERROR`
        (402),

        `FORBIDDEN` (403), `NOT_FOUND` (404), `METHOD_NOT_ALLOWED` (405),
        `CONFLICT` (409),

        `GONE` (410), `PAYLOAD_TOO_LARGE` (413), `UNSUPPORTED_MEDIA_TYPE` (415),

        `UNPROCESSABLE_REQUEST` (422), `RATE_LIMIT` (429), `INTERNAL_ERROR`
        (500),

        `UPSTREAM_ERROR` (502), `SERVICE_UNAVAILABLE` (503), `UPSTREAM_TIMEOUT`
        (504). Some

        refusals add members of their own beside these (a call request's
        `status`, a workflow's

        `current_version`); the operation says which.
      properties:
        error:
          type: string
          description: The refusal, in one sentence for a person. Its wording may change.
        code:
          type: string
          description: The stable code to branch on.
        issues:
          type: array
          description: >
            Each thing at fault, on a 400 or 422 that names them: every query
            parameter or body field, not just the first. `path` is the
            parameter's name or the field's location.
          items:
            type: object
            required:
              - code
              - message
            properties:
              code:
                type: string
                description: >-
                  query_param_unknown, query_param_repeated, query_param_blank,
                  query_param_invalid, field_unknown, field_required,
                  field_invalid, or the route's own word.
              path:
                type: string
              message:
                type: string
    Invoice:
      type: object
      required:
        - number
        - kind
        - description
        - phone_number
        - status
        - issued_at
        - paid_at
        - currency
        - net_cents
        - vat_cents
        - total_cents
        - refunded_cents
        - lines
        - view_url
        - pdf_url
      properties:
        number:
          type: string
          nullable: true
          example: 4F2A9C1B-0007
        kind:
          type: string
          enum:
            - credits_top_up
            - auto_top_up
            - phone_number
            - other
          description: What the payment was for.
        description:
          type: string
          nullable: true
          description: The first line's description, in English.
          example: Credits top-up
        phone_number:
          type: string
          nullable: true
          description: The number, for kind phone_number only.
          example: '+972501234567'
        status:
          type: string
          enum:
            - paid
            - open
            - uncollectible
        issued_at:
          type: string
          format: date-time
        paid_at:
          type: string
          format: date-time
          nullable: true
        currency:
          type: string
          example: usd
        net_cents:
          type: integer
          example: 5000
        vat_cents:
          type: integer
          example: 900
        total_cents:
          type: integer
          example: 5900
        refunded_cents:
          type: integer
          example: 0
        lines:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceLine'
        view_url:
          type: string
          format: uri
          nullable: true
          description: The invoice's own page.
        pdf_url:
          type: string
          format: uri
          nullable: true
          description: Downloads the invoice as a PDF.
    InvoiceLine:
      type: object
      required:
        - description
        - quantity
        - unit_amount_cents
        - amount_cents
      properties:
        description:
          type: string
          nullable: true
          example: Credits top-up
        quantity:
          type: integer
          example: 1
        unit_amount_cents:
          type: integer
          example: 5000
        amount_cents:
          type: integer
          example: 5000
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        Your Yappr API key (e.g. `ypr_live_...`). Generate one in the dashboard
        under **Settings → API Keys**. No key is `401 MISSING_KEY`; a key that
        is not one of ours, or is revoked, is `401 INVALID_KEY`; an expired one
        is `401 EXPIRED_KEY`. A valid key without the scope an operation needs
        is `403 INSUFFICIENT_SCOPE` on every operation, and the message names
        the scope. Every response, a 401 included, carries X-RateLimit-Limit,
        X-RateLimit-Remaining and X-RateLimit-Reset: the budget is 60 requests a
        minute per API key. Every 429, whatever its code, carries Retry-After
        (whole seconds, never zero): the per-key budget's `RATE_LIMIT` asks for
        what is left of the minute, a route's daily cap (`RATE_LIMITED`) for the
        time until that cap resets. All four headers are listed in
        Access-Control-Expose-Headers, so a browser can read them. A path the
        API does not serve (an unknown sub-path, an id left empty) is `404
        ROUTE_NOT_FOUND`, and a method a served path does not take is `405
        METHOD_NOT_ALLOWED` with an `Allow` header; both are answered before any
        scope check, and nothing is read or changed. A trailing slash is ignored
        where it cannot be an id left empty (`POST /calls/` is `POST /calls`)
        and refused where it can (`GET /calls/`). A doubled slash inside a path
        is merged into one before the request reaches the API (`GET //calls` is
        `GET /calls`).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.