> ## 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.

# Get Billing Transaction

> One row of the statement, by the `id` a row of `GET /billing/transactions` carries — the
same shape as in the list, plus `timezone`, the clock its `date` is on. Required scope
`billing:read`.

A top-up carries `payment`: how it was paid, the invoice and receipt numbers, and what
the card was charged with VAT, when its payment record holds them. Usage rows fold a day
of charges and have no id, so one charge's id is not a row here, and neither is a call's
id (the 404 says which): a call's cost is on `GET /calls/{id}`.

A key limited to agents is refused with `403 API_KEY_AGENT_SCOPED`: the balance is the
whole workspace's.


One row of your [billing statement](https://docs.goyappr.com/api-reference/billing/transactions.md), by the `id` a row of the list carries. It is the same row the list returns, plus `timezone`, the clock its `date` is on (the workspace's, unless you send `timezone`).

```bash theme={null}
curl "https://api.goyappr.com/billing/transactions/4b1d7c3e-0c1a-4e5f-9a2b-6c7d8e9f0a1b" \
  -H "Authorization: Bearer $YAPPR_API_KEY"
```

```json theme={null}
{
  "id": "4b1d7c3e-0c1a-4e5f-9a2b-6c7d8e9f0a1b",
  "type": "top_up",
  "product": null,
  "date": "2026-09-21",
  "created_at": "2026-09-21T08:03:44.120+00:00",
  "description": "Credits top-up",
  "count": 1,
  "status": "completed",
  "amount_cents": 5000,
  "affects_balance": true,
  "payment": { "channel": "checkout", "invoice_number": null, "receipt_number": null, "total_charged_cents": 5900, "vat_cents": 900, "currency": "usd" },
  "timezone": "Asia/Jerusalem"
}
```

A top-up's `payment` is what you match it to a card statement or an invoice with: `total_charged_cents` is what the card was charged, VAT included, and `invoice_number` is the number on the invoice when there is one. A field the payment record does not hold is `null` — see [Matching a top-up](https://docs.goyappr.com/api-reference/billing/transactions.md#matching-a-top-up-to-your-card-statement-or-invoice). A gift reads `Credits from Yappr`.

## Errors

| Status | Code | When |
| - | - | - |
| 400 | `TRANSACTIONS_QUERY_INVALID` | A query parameter other than `timezone`, or a `timezone` that is not an IANA name. |
| 403 | `API_KEY_AGENT_SCOPED` | The key is [limited to some agents](https://docs.goyappr.com/api-reference/introduction.md#limiting-a-key-to-some-agents); the balance is the whole workspace's. |
| 404 | `NOT_FOUND` | No row with that id in this workspace — or the id is one charge, or a call's id (the answer says which). Usage and starting-balance rows have no id: usage folds a day of charges, and a call's cost is on [`GET /calls/{id}`](https://docs.goyappr.com/api-reference/calls/get). Transaction ids come from the rows of `GET /billing/transactions`. |
| 404 | `RESOURCE_ID_INVALID` | The id is not a UUID. |


## OpenAPI

````yaml GET /billing/transactions/{id}
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/transactions/{id}:
    get:
      tags:
        - Billing
      summary: Get a billing transaction
      description: >
        One row of the statement, by the `id` a row of `GET
        /billing/transactions` carries — the

        same shape as in the list, plus `timezone`, the clock its `date` is on.
        Required scope

        `billing:read`.


        A top-up carries `payment`: how it was paid, the invoice and receipt
        numbers, and what

        the card was charged with VAT, when its payment record holds them. Usage
        rows fold a day

        of charges and have no id, so one charge's id is not a row here, and
        neither is a call's

        id (the 404 says which): a call's cost is on `GET /calls/{id}`.


        A key limited to agents is refused with `403 API_KEY_AGENT_SCOPED`: the
        balance is the

        whole workspace's.
      operationId: getBillingTransaction
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
            format: uuid
          description: >-
            The row's `id` from `GET /billing/transactions`. Not a UUID is 404
            RESOURCE_ID_INVALID.
        - in: query
          name: timezone
          schema:
            type: string
            example: Asia/Jerusalem
          description: >
            The clock `date` is read on, as an IANA name. Defaults to the
            workspace's clock, as the list does. Not a timezone name is 400
            TRANSACTIONS_QUERY_INVALID.
      responses:
        '200':
          description: The row
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/BillingTransaction'
                  - type: object
                    required:
                      - timezone
                    properties:
                      timezone:
                        type: string
                        description: The clock `date` was read on.
                        example: Asia/Jerusalem
              example:
                id: 4b1d7c3e-0c1a-4e5f-9a2b-6c7d8e9f0a1b
                type: top_up
                product: null
                date: '2026-09-21'
                created_at: '2026-09-21T08:03:44.120+00:00'
                description: Credits top-up
                count: 1
                status: completed
                amount_cents: 5000
                affects_balance: true
                payment:
                  channel: checkout
                  invoice_number: null
                  receipt_number: null
                  total_charged_cents: 5900
                  vat_cents: 900
                  currency: usd
                timezone: Asia/Jerusalem
        '400':
          description: >
            TRANSACTIONS_QUERY_INVALID — a query parameter other than
            `timezone`, sent twice or with no value, or a `timezone` that is not
            an IANA timezone name.
          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 the balance
            belongs to the whole workspace.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: >
            NOT_FOUND — no row with that id in this workspace, the id is one
            charge that a day's usage row folds, or it is a call's id (the
            message says so). RESOURCE_ID_INVALID — the id is not a UUID.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    BillingTransaction:
      type: object
      description: >
        One row of `GET /billing/transactions`. A usage row folds one day (on
        the statement's clock) of one product's

        charges (`id` and `description` null, `count` the number of charges); a
        `starting_balance`

        row is the balance no ledger entry records (`id` and `description`
        null); every other row

        is one ledger entry (`count` 1).
      required:
        - id
        - type
        - product
        - date
        - created_at
        - description
        - count
        - status
        - amount_cents
        - affects_balance
        - payment
      properties:
        id:
          type: string
          format: uuid
          nullable: true
          description: >-
            The entry's id — the one `GET /billing/transactions/{id}` reads.
            Null on a usage row and a starting balance.
        type:
          type: string
          enum:
            - top_up
            - gift
            - usage
            - refund
            - adjustment
            - phone_number
            - starting_balance
            - other
          description: >
            `top_up` — credits you paid for. `gift` — credits Yappr added with
            no payment behind them. `usage` — calls and Agent Eval runs, one row
            per day per product. `refund` — a top-up that was refunded or
            disputed, taking its credits back out. `adjustment` — a manual
            correction by Yappr, in either direction. `phone_number` — a
            number's first charge or monthly renewal, paid by card.
            `starting_balance` — a balance Yappr set with no ledger entry behind
            it, dated when the credit account was opened (the ledger does not
            say when it was set); before it the balance is 0. `other` — anything
            newer than this list.
        product:
          type: string
          enum:
            - voice_call
            - eval_run
          nullable: true
          description: On a usage row, what was charged. Null on every other row.
        date:
          type: string
          format: date
          description: >-
            The day of the entry on the statement's clock (`range.timezone`), or
            of the charges a usage row folds.
          example: '2026-09-23'
        created_at:
          type: string
          format: date-time
          description: When the entry was recorded. On a usage row, the day's last charge.
        description:
          type: string
          nullable: true
          description: >-
            The entry's own description. Null on a usage row. A `gift` row
            always reads `Credits from Yappr`.
        count:
          type: integer
          description: >
            How many ledger entries the row stands for. 1 except on usage rows,
            where it is the number of charges: a call that cost nothing has no
            entry, so a day's `count` can be lower than the number of calls Call
            Logs shows for it.
        status:
          type: string
          enum:
            - completed
            - in_progress
            - pending
            - failed
            - refunded
          description: >
            Usage rows count completed charges only. The row for today (on the
            statement's clock) is `in_progress`: the day is still running and
            its amount can still grow. Every earlier usage row is `completed`.
        amount_cents:
          type: integer
          description: >-
            Signed for the account holder — positive put credits in, negative
            took them out (or, for a phone number, was charged to the card).
        affects_balance:
          type: boolean
          description: >-
            True when the row moved the credit balance. False for phone numbers
            (paid by card) and for a row that did not complete.
        payment:
          allOf:
            - $ref: '#/components/schemas/TransactionPayment'
          nullable: true
          description: >-
            On a `top_up` row, what the payment record holds to match it to a
            card statement or an invoice. Null on every other row.
    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
    TransactionPayment:
      type: object
      description: >
        What a top-up's payment record holds that you can match to your card
        statement or an

        invoice. A card line shows the day and the total charged, VAT included;
        an invoiced

        top-up also has the number printed on its invoice. The payment
        processor's own ids are

        never returned: they are on nothing you hold. A field the record does
        not hold is null —

        older top-ups may lack the VAT or the total, and a top-up paid at
        checkout has no

        invoice.
      required:
        - channel
        - invoice_number
        - receipt_number
        - total_charged_cents
        - vat_cents
        - currency
      properties:
        channel:
          type: string
          nullable: true
          enum:
            - checkout
            - auto_top_up
            - saved_card
          description: >-
            How the top-up was paid — `checkout` (paid on the payment page from
            Billing or `POST /billing/topup`), `auto_top_up` (charged
            automatically when the balance ran low), or `saved_card` (charged to
            the saved card on request, as top-ups were for a while). Null when
            the payment record does not say.
          example: auto_top_up
        receipt_number:
          type: string
          nullable: true
          description: >-
            The number printed on the card receipt for this top-up, when the
            payment record holds one; null otherwise. Never a payment processor
            id.
          example: null
        invoice_number:
          type: string
          nullable: true
          description: >-
            The number printed on the invoice for this top-up (automatic
            top-ups, and saved-card top-ups that were invoiced). Null when there
            is no invoice.
          example: A1B2C3D4-0007
        total_charged_cents:
          type: integer
          nullable: true
          description: >-
            What the card was charged, VAT included — the amount on the card
            statement. `amount_cents` on the row is the credits, before VAT.
          example: 5900
        vat_cents:
          type: integer
          nullable: true
          description: >-
            The VAT in `total_charged_cents`. Null when the VAT was not
            recorded, even if the total was; `0` only when it was recorded as 0
            (a top-up paid before VAT applied).
          example: 900
        currency:
          type: string
          description: The currency of the payment, lower case.
          example: usd
  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.