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

> What every invoice prints, and where it is emailed: the business name, the address
invoices are sent to, the postal address, the tax ID (VAT or company number), and the
invoice language. Required scope `billing:manage`: the full email, the address and the
tax ID are personal data, so a `billing:read` key that reads the balance and the
invoices does not read these.

A workspace that has never paid reads the details its first invoice would use: the
workspace name, the workspace owner's email, no address, no tax ID, English. Nothing is
created by reading.

Invoices are issued in English. A workspace that works in Hebrew (`language: he`) gets
English invoices with day-first dates.


What every invoice prints about your workspace: the business name, the email
invoices are sent to, the postal address, the tax ID and the invoice language.
Requires `billing:manage`. A key without that scope is `403 INSUFFICIENT_SCOPE`.

Every payment the workspace makes — a credit top-up, an automatic top-up, a
phone number's first and monthly charge — comes with one invoice, emailed to
`email` when it is paid. These details are what that invoice says about you.
Set them with [`PATCH /billing/details`](https://docs.goyappr.com/api-reference/billing/update-details);
read the invoices themselves with [`GET /billing/invoices`](https://docs.goyappr.com/api-reference/billing/invoices).

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

```json theme={null}
{
  "name": "Acme Ltd",
  "email": "billing@acme.example",
  "address": {
    "line1": "1 Example St",
    "line2": null,
    "city": "Tel Aviv",
    "state": null,
    "postal_code": "6100000",
    "country": "IL"
  },
  "tax_id": { "type": "il_vat", "value": "000012345" },
  "language": "he"
}
```

| Field | What it is |
| - | - |
| `name` | The business or legal name printed on invoices. |
| `email` | Where invoices are emailed. |
| `address` | The postal address printed on invoices, or `null` when none is set. `country` is a two-letter code such as `IL`. |
| `tax_id` | The VAT or company number printed on invoices, or `null`. `type` says what kind of number it is (see [the types](https://docs.goyappr.com/api-reference/billing/update-details.md#tax-id-types)). |
| `language` | `en` or `he`: the workspace's language for its invoices. |

## Before anything is set

A workspace that has never set its details reads the ones its invoices would
use: the workspace's name, the workspace owner's email, no address, no tax ID,
and `en`. Reading them changes nothing.

## Invoices are issued in English

Invoices, receipts and their emails are in English whatever `language` says.
`he` prints dates day first, the way they are read in Israel.

The full email address is personal data, which is why this read needs
`billing:manage`: [`GET /billing`](https://docs.goyappr.com/api-reference/billing/get-status) shows a
`billing:read` key only a masked `billing_email`.


## OpenAPI

````yaml GET /billing/details
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/details:
    get:
      tags:
        - Billing
      summary: Get billing details
      description: >
        What every invoice prints, and where it is emailed: the business name,
        the address

        invoices are sent to, the postal address, the tax ID (VAT or company
        number), and the

        invoice language. Required scope `billing:manage`: the full email, the
        address and the

        tax ID are personal data, so a `billing:read` key that reads the balance
        and the

        invoices does not read these.


        A workspace that has never paid reads the details its first invoice
        would use: the

        workspace name, the workspace owner's email, no address, no tax ID,
        English. Nothing is

        created by reading.


        Invoices are issued in English. A workspace that works in Hebrew
        (`language: he`) gets

        English invoices with day-first dates.
      operationId: getBillingDetails
      responses:
        '200':
          description: The billing details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillingDetails'
              example:
                name: Acme Ltd
                email: billing@acme.example
                address:
                  line1: 1 Example St
                  line2: null
                  city: Tel Aviv
                  state: null
                  postal_code: '6100000'
                  country: IL
                tax_id:
                  type: il_vat
                  value: '000012345'
                language: he
        '400':
          description: >-
            BILLING_QUERY_INVALID: a query parameter. This route reads none, and
            anything sent is refused by name rather than ignored.
          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:manage`.
            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 details could not be read right now. Try
            again in a minute.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    BillingDetails:
      type: object
      required:
        - name
        - email
        - address
        - tax_id
        - language
      properties:
        name:
          type: string
          description: The business or legal name printed on invoices.
          example: Acme Ltd
        email:
          type: string
          format: email
          nullable: true
          description: Where invoices are emailed. Defaults to the workspace owner's email.
          example: billing@acme.example
        address:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/BillingAddress'
        tax_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/BillingTaxId'
        language:
          type: string
          enum:
            - en
            - he
          description: >-
            The workspace language. Invoices are issued in English; he gives
            day-first dates.
    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
    BillingAddress:
      type: object
      required:
        - line1
        - country
      additionalProperties: false
      properties:
        line1:
          type: string
          minLength: 1
          maxLength: 200
          example: 1 Example St
        line2:
          type: string
          maxLength: 200
          nullable: true
        city:
          type: string
          maxLength: 200
          nullable: true
          example: Tel Aviv
        state:
          type: string
          maxLength: 200
          nullable: true
        postal_code:
          type: string
          maxLength: 200
          nullable: true
          example: '6100000'
        country:
          type: string
          pattern: ^[A-Z]{2}$
          description: Two-letter country code (ISO 3166-1 alpha-2).
          example: IL
    BillingTaxId:
      type: object
      required:
        - type
        - value
      additionalProperties: false
      properties:
        type:
          type: string
          enum:
            - il_vat
            - eu_vat
            - gb_vat
            - us_ein
            - ca_bn
            - au_abn
            - ch_vat
            - no_vat
            - ae_trn
            - za_vat
          description: il_vat for an Israeli VAT or company number.
        value:
          type: string
          minLength: 1
          maxLength: 64
          description: Spaces are removed.
          example: '000012345'
  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.