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

# Get available PIX limits

> Computes what is left of each limit for the account: availableAmount = totalLimit - usedAmount, floored at zero, in exact int64 centavos with no rounding. currentPeriod names the period that is active right now.

The windows are the part that surprises callers, and they are UTC calendar-day bands. DAILY is the half-open [init, end) hour range taken from the tenant's systemplane knobs transaction_limits.daily_period_init and transaction_limits.daily_period_end (6 and 20 when unset). NIGHTLY is the WHOLE complement of that band summed across the day - both [00:00, init) and [end, 24:00), not only the band the request falls in. MONTHLY is summed over a single UTC day, NOT a month, so a MONTHLY row's usedAmount reports today's usage only.

usedAmount is the sum of the account's live outbound rows of the same transaction type - CASH_OUT plus on-us INTRA_PSP - created inside the window, with NO status filter, so a pending or failed payment still counts against you; outbound refunds are included too, matching what the enforcement check counts. An account with no limit rows at all is 404 PIX-0063 (see GET /v1/limits for why that is a normal state rather than a fault), and an account_id the CRM cannot resolve is 404 PIX-2016.



## OpenAPI

````yaml /en/openapi/v3-current/pix.yaml get /v1/limits/available
openapi: 3.1.0
info:
  description: Brazilian PIX Direct (DICT + SPI) plugin API.
  title: plugin-br-pix-jd
  version: 1.0.0
servers: []
security:
  - BearerAuth: []
paths:
  /v1/limits/available:
    get:
      tags:
        - Limits
      summary: Get available PIX limits
      description: >-
        Computes what is left of each limit for the account: availableAmount =
        totalLimit - usedAmount, floored at zero, in exact int64 centavos with
        no rounding. currentPeriod names the period that is active right now.


        The windows are the part that surprises callers, and they are UTC
        calendar-day bands. DAILY is the half-open [init, end) hour range taken
        from the tenant's systemplane knobs transaction_limits.daily_period_init
        and transaction_limits.daily_period_end (6 and 20 when unset). NIGHTLY
        is the WHOLE complement of that band summed across the day - both
        [00:00, init) and [end, 24:00), not only the band the request falls in.
        MONTHLY is summed over a single UTC day, NOT a month, so a MONTHLY row's
        usedAmount reports today's usage only.


        usedAmount is the sum of the account's live outbound rows of the same
        transaction type - CASH_OUT plus on-us INTRA_PSP - created inside the
        window, with NO status filter, so a pending or failed payment still
        counts against you; outbound refunds are included too, matching what the
        enforcement check counts. An account with no limit rows at all is 404
        PIX-0063 (see GET /v1/limits for why that is a normal state rather than
        a fault), and an account_id the CRM cannot resolve is 404 PIX-2016.
      operationId: getAvailableLimits
      parameters:
        - description: The CRM account id whose limits to read.
          explode: false
          in: query
          name: account_id
          required: true
          schema:
            description: The CRM account id whose limits to read.
            examples:
              - acc-123
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AvailableLimitsResponse'
          description: OK
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Unprocessable Entity
        '500':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Internal Server Error
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Error
components:
  schemas:
    AvailableLimitsResponse:
      additionalProperties: false
      properties:
        currentPeriod:
          description: The active ePeriodType name.
          examples:
            - DAILY
          type: string
        limits:
          description: The per-limit available rows.
          items:
            $ref: '#/components/schemas/AvailableLimitItem'
          type:
            - array
            - 'null'
      required:
        - limits
        - currentPeriod
      type: object
    Detail:
      additionalProperties: false
      properties:
        code:
          description: >-
            Stable, machine-readable domain error code scoped to the emitting
            service (format: <SERVICE>-NNNN).
          examples:
            - ERR-0001
          type: string
        detail:
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
          examples:
            - Property foo is required but is missing.
          type: string
        errors:
          description: Optional list of individual error details
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type:
            - array
            - 'null'
        instance:
          description: >-
            A URI reference that identifies the specific occurrence of the
            problem.
          examples:
            - https://example.com/error-log/abc123
          format: uri
          type: string
        status:
          description: HTTP status code
          examples:
            - 400
          format: int64
          type: integer
        title:
          description: >-
            A short, human-readable summary of the problem type. This value
            should not change between occurrences of the error.
          examples:
            - Bad Request
          type: string
        type:
          default: about:blank
          description: A URI reference to human-readable documentation for the error.
          examples:
            - https://example.com/errors/example
          format: uri
          type: string
        upstream:
          $ref: '#/components/schemas/Upstream'
          description: >-
            RFC 9457 extension member: the error a proxied third-party provider
            reported. Absent unless the emitting service explicitly surfaced
            one.
      type: object
    AvailableLimitItem:
      additionalProperties: false
      properties:
        availableAmount:
          description: The remaining headroom in centavos.
          examples:
            - 2950000
          format: int64
          type: integer
        limitType:
          description: eTransactionLimitType name.
          examples:
            - PERIOD
          type: string
        periodType:
          description: ePeriodType name.
          examples:
            - DAILY
          type: string
        totalLimit:
          description: The configured cap in centavos.
          examples:
            - 3000000
          format: int64
          type: integer
        usedAmount:
          description: The period's used amount in centavos.
          examples:
            - 50000
          format: int64
          type: integer
      required:
        - limitType
        - periodType
        - totalLimit
        - usedAmount
        - availableAmount
      type: object
    ErrorDetail:
      additionalProperties: false
      properties:
        location:
          description: >-
            Where the error occurred, e.g. 'body.items[3].tags' or
            'path.thing-id'
          type: string
        message:
          description: Error message text
          type: string
        value:
          description: The value at the given location
      type: object
    Upstream:
      additionalProperties: false
      properties:
        code:
          description: The upstream provider's own error code, verbatim.
          examples:
            - E4001
          type: string
        message:
          description: >-
            The upstream provider's own error message, verbatim (bounded, never
            its raw response body).
          examples:
            - account not found at provider
          type: string
      type: object
  securitySchemes:
    BearerAuth:
      bearerFormat: JWT
      description: JWT bearer token issued by the identity provider.
      scheme: bearer
      type: http

````