> ## 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 Failed Payments

> Get failed payment attempts with pagination and filtering options.



## OpenAPI

````yaml get /dashboard/failed-attempts
openapi: 3.1.0
info:
  title: Decoda API
  description: External API documentation for the Decoda Health platform.
  version: '1.0'
servers: []
security: []
paths:
  /dashboard/failed-attempts:
    get:
      tags:
        - provider
        - dashboard
      summary: Get Failed Payments
      description: Get failed payment attempts with pagination and filtering options.
      operationId: get_failed_payments_dashboard_failed_attempts_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: page
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            default: 1
            title: Page
        - name: per_page
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            default: 10
            title: Per Page
        - name: sort_by
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Sort By
        - name: sort_direction
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                enum:
                  - asc
                  - desc
              - type: 'null'
            title: Sort Direction
        - name: location_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Location Id
        - name: start_date
          in: query
          required: true
          schema:
            type: string
            title: Start Date
        - name: end_date
          in: query
          required: true
          schema:
            type: string
            title: End Date
        - name: location_ids
          in: query
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                type: array
              - type: 'null'
            title: Location Ids
        - name: payment_mediums
          in: query
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                type: array
              - type: 'null'
            title: Payment Mediums
        - name: tz
          in: query
          required: true
          schema:
            type: string
            title: Tz
        - name: limit
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            default: 5
            title: Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FailedPayment'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    FailedPayment:
      properties:
        data:
          items:
            $ref: '#/components/schemas/FailedPaymentItem'
          type: array
          title: Data
        total:
          type: integer
          title: Total
        page:
          type: integer
          title: Page
        perPage:
          type: integer
          title: Perpage
      type: object
      required:
        - data
        - total
        - page
        - perPage
      title: FailedPayment
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    FailedPaymentItem:
      properties:
        id:
          type: string
          title: Id
        alertId:
          type: string
          title: Alertid
        actionRequired:
          type: boolean
          title: Actionrequired
        patientName:
          type: string
          title: Patientname
        patientId:
          type: string
          title: Patientid
        failedReason:
          type: string
          title: Failedreason
        paymentMethod:
          type: string
          title: Paymentmethod
        paymentMedium:
          type: string
          title: Paymentmedium
        amount:
          type: number
          title: Amount
        dateOfAttempt:
          type: string
          title: Dateofattempt
      type: object
      required:
        - id
        - alertId
        - actionRequired
        - patientName
        - patientId
        - failedReason
        - paymentMethod
        - paymentMedium
        - amount
        - dateOfAttempt
      title: FailedPaymentItem
    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

````