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

# Get Available Credit

> Get total available (non-expired, not fully used) credit for a patient.

This endpoint matches the logic used in BillingService.take_patient_credit_payment
to ensure consistency between what's displayed and what can actually be used.



## OpenAPI

````yaml get /user/patient/{patient_id}/credit/available
openapi: 3.1.0
info:
  title: Decoda API
  description: External API documentation for the Decoda Health platform.
  version: '1.0'
servers: []
security: []
paths:
  /user/patient/{patient_id}/credit/available:
    get:
      tags:
        - provider
        - user
      summary: Get Available Credit
      description: >-
        Get total available (non-expired, not fully used) credit for a patient.


        This endpoint matches the logic used in
        BillingService.take_patient_credit_payment

        to ensure consistency between what's displayed and what can actually be
        used.
      operationId: get_available_credit_user_patient__patient_id__credit_available_get
      parameters:
        - name: TENANT
          in: header
          required: true
          schema:
            type: string
            title: Tenant
          description: The tenant you are making this request on behalf of
        - name: API-KEY
          in: header
          required: true
          schema:
            type: string
            title: Api-Key
          description: Your api key
        - name: patient_id
          in: path
          required: true
          schema:
            type: string
            title: Patient Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AvailableCreditResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    AvailableCreditResponse:
      properties:
        totalAvailable:
          type: integer
          title: Totalavailable
        credits:
          items:
            $ref: '#/components/schemas/AvailableCredit'
          type: array
          title: Credits
        count:
          type: integer
          title: Count
      type: object
      required:
        - totalAvailable
        - credits
        - count
      title: AvailableCreditResponse
      description: Response for available credit endpoint
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AvailableCredit:
      properties:
        creditId:
          type: string
          title: Creditid
        remainingAmount:
          type: integer
          title: Remainingamount
        totalAmount:
          type: integer
          title: Totalamount
        comment:
          anyOf:
            - type: string
            - type: 'null'
          title: Comment
        expiryDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Expirydate
        createdDate:
          type: string
          format: date-time
          title: Createddate
      type: object
      required:
        - creditId
        - remainingAmount
        - totalAmount
        - createdDate
      title: AvailableCredit
      description: Individual available credit details
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````