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

# Krijg kredietinformatie

> Geeft het geauthenticeerde teamkredietsaldo, per-partij uitsplitsing, actieve abonnement en of gebruik is toegestaan terug.

Voor een begeleid overzicht, zie [Saldo & facturering](/balance-billing/balance-and-billing).


## OpenAPI

````yaml nl/openapi/billing.json GET /user/credits/info
openapi: 3.0.3
info:
  title: Balance & Billing API
  version: 1.0.0
  description: Lees het kredietsaldo en koop opwaarderingen voor het geauthenticeerde team.
servers:
  - url: https://api.olostep.com
security: []
tags:
  - name: Balance & Billing
    description: Eindpunten voor kredietsaldo en opwaarderingen.
paths:
  /user/credits/info:
    get:
      tags:
        - Balance & Billing
      summary: Krijg kredietinformatie
      description: >-
        Geeft het geauthenticeerde team zijn kredietsaldo, per-lot uitsplitsing,
        actieve abonnement en of gebruik is toegestaan. Handig voor
        factureringswidgets, gebruiksdashboards en pre-flight controles voor
        grote taken.
      responses:
        '200':
          description: Kredietsaldo en factureringscontext voor het geauthenticeerde team.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreditsInfoResponse'
              example:
                credits: 12500
                breakdown:
                  - purchase_kind: Subscription
                    allocated_units: 10000
                    remaining_units: 8500
                    expiry_date: 1735689600
                  - purchase_kind: Top-up
                    allocated_units: 5000
                    remaining_units: 4000
                    expiry_date: 1743465600
                active_subscription:
                  id: SUB_PRO
                  display_name: Pro
                  credits: 10000
                  created_at: 1704067200
                allow_usage: true
        '402':
          description: Ongeldige API-sleutel.
        '500':
          description: Interne serverfout.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: Internal Server Error
      security:
        - Authorization: []
components:
  schemas:
    CreditsInfoResponse:
      type: object
      properties:
        credits:
          type: integer
          description: Totaal resterende kredieten over alle niet-verlopen partijen.
        breakdown:
          type: array
          items:
            $ref: '#/components/schemas/CreditsBreakdownItem'
          description: Kredietdetail per partij.
        active_subscription:
          $ref: '#/components/schemas/ActiveSubscription'
        allow_usage:
          type: boolean
          description: Of het team nog steeds kredieten kan gebruiken.
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Machineleesbare foutcode.
        retry_after:
          type: integer
          description: >-
            Seconden totdat een nieuwe aankooppoging is toegestaan (alleen voor
            cooldown-antwoorden).
        cooldown_seconds:
          type: integer
          description: Cooldown venster in seconden (alleen cooldown reacties).
    CreditsBreakdownItem:
      type: object
      properties:
        purchase_kind:
          type: string
          enum:
            - Subscription
            - Top-up
            - Manual
            - Setup
            - Pending
          description: Hoe de kredietpartij werd uitgegeven.
        allocated_units:
          type: integer
          description: Kredieten oorspronkelijk toegewezen aan deze partij.
        remaining_units:
          type: integer
          description: Kredieten die nog beschikbaar zijn in deze partij.
        expiry_date:
          type: integer
          description: Unix-timestamp wanneer deze partij verloopt.
    ActiveSubscription:
      type: object
      properties:
        id:
          type: string
          description: >-
            Abonnementsproduct-id (bijvoorbeeld `SUB_PRO`). Valt terug op
            `SUB_BASE` wanneer er geen actief abonnement bestaat.
        display_name:
          type: string
          description: Menselijk leesbare naam van het plan.
        credits:
          type: integer
          description: Kredieten inbegrepen in het actieve plan.
        created_at:
          type: integer
          description: Unix-timestamp wanneer het abonnement werd aangemaakt.
  securitySchemes:
    Authorization:
      type: http
      scheme: bearer
      description: >-
        Bearer authenticatie header in de vorm Bearer <token>, waar <token> jouw
        auth token is.

````