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

# Get Payments

> **Get Payments**

<Note>
  This endpoint requires authentication. Include your Bearer token in the Authorization header.
</Note>

## Description

**Get Payments**

**Description:**
The `/payment/` endpoint retrieves a list of payments with filtering and pagination options.

**Method:**
`GET`

**Query Parameters:**

| Parameter              | Type    | Description                                         |
| ---------------------- | ------- | --------------------------------------------------- |
| q *(Optional)*         | string  | Search query to filter payments                     |
| page *(Optional)*      | integer | Page number for pagination. Default: 1              |
| size *(Optional)*      | integer | Number of payments per page. Default: 10            |
| sort *(Optional)*      | string  | Field to sort by. Default: 'updatedAt'              |
| order *(Optional)*     | string  | Sort order ('asc' or 'desc'). Default: 'desc'       |
| user *(Optional)*      | string  | Filter by user ID                                   |
| status *(Optional)*    | string  | Filter by status                                    |
| startDate *(Optional)* | string  | Filter payments from this date                      |
| endDate *(Optional)*   | string  | Filter payments to this date                        |
| include *(Optional)*   | string  | Specify 'count' to include the total count of items |

## Code Examples

<CodeGroup>
  ```javascript Node.js theme={null}
  const response = await fetch('https://api.royalti.io/payment/', {
    method: 'GET',
    headers: {
      'Authorization': `Bearer ${token}`,
    },
  });

  const data = await response.json();
  console.log(data);
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
    'https://api.royalti.io/payment/',
    headers={
      'Authorization': f'Bearer {token}'
    },
  )

  data = response.json()
  print(data)
  ```

  ```bash cURL theme={null}
  curl -X GET https://api.royalti.io/payment/ \
    -H "Authorization: Bearer YOUR_TOKEN" \

  ```
</CodeGroup>


## OpenAPI

````yaml get /payment/
openapi: 3.0.0
info:
  title: Royalti.io API
  description: "# Royalti API\r\n\r\nThis is the Royalti music royalty management platform API server.\r\n\r\n## Overview\r\n\r\nThe Royalti API provides comprehensive music royalty management services including:\r\n- Music publishing and writer management\r\n- Royalty processing and analytics\r\n- DDEX integration for music industry standards\r\n- File processing and pattern recognition\r\n- Payment processing and distribution\r\n\r\n## Authentication\r\n\r\nThe API uses JWT-based authentication with multiple protection levels:\r\n- Public endpoints for basic operations\r\n- Protected endpoints requiring valid JWT tokens\r\n- Admin endpoints for administrative functions\r\n\r\n## Features\r\n\r\n- Multi-dimensional royalty analytics\r\n- CWR (Collective Works Registration) support\r\n- DDEX integration for music metadata\r\n- Advanced file processing with pattern recognition\r\n- Real-time data processing with queue system"
  version: 2.6.0
  contact:
    name: Royalti.io Support
    email: support@royalti.io
    url: https://royalti.io
  license:
    name: Proprietary
    url: https://royalti.io/terms
servers:
  - url: https://api.royalti.io
    description: Production server
  - url: https://api-dev.royalti.io
    description: Development server
  - url: http://localhost:8084
    description: Local development
security:
  - bearerAuth: []
tags:
  - name: Accounting
    description: Accounting and financial transaction operations
  - name: DDEX
    description: DDEX operations (ERN/MEAD, messages, delivery, providers)
  - name: Label
    description: Label management operations
  - name: Internal Webhooks
    description: Internal system webhooks for royalty processing and downloads
  - name: Payment Webhooks
    description: Payment processor webhook endpoints
  - name: Billing Webhooks
    description: Stripe billing and subscription webhooks
  - name: Infrastructure Webhooks
    description: Cloudflare domain and SSL webhooks
  - name: Distribution Webhooks
    description: Digital distribution platform webhooks (FUGA)
paths:
  /payment/:
    get:
      tags:
        - Payment
      summary: Get Payments
      description: >-
        **Get Payments**


        **Description:**

        The `/payment/` endpoint retrieves a list of payments with filtering and
        pagination options.


        **Method:**

        `GET`


        **Query Parameters:**


        | Parameter | Type | Description |

        | --- | --- | --- |

        | q _(Optional)_ | string | Search query to filter payments |

        | page _(Optional)_ | integer | Page number for pagination. Default: 1 |

        | size _(Optional)_ | integer | Number of payments per page. Default: 10
        |

        | sort _(Optional)_ | string | Field to sort by. Default: 'updatedAt' |

        | order _(Optional)_ | string | Sort order ('asc' or 'desc'). Default:
        'desc' |

        | user _(Optional)_ | string | Filter by user ID |

        | status _(Optional)_ | string | Filter by status |

        | startDate _(Optional)_ | string | Filter payments from this date |

        | endDate _(Optional)_ | string | Filter payments to this date |

        | include _(Optional)_ | string | Specify 'count' to include the total
        count of items |
      parameters:
        - name: q
          in: query
          required: false
          description: Search query to filter payments
          schema:
            type: string
        - name: page
          in: query
          required: false
          description: Page number for pagination
          schema:
            type: integer
            default: 1
        - name: size
          in: query
          required: false
          description: Number of payments per page
          schema:
            type: integer
            default: 10
        - name: sort
          in: query
          required: false
          description: Field to sort by
          schema:
            type: string
            default: updatedAt
        - name: order
          in: query
          required: false
          description: Sort order ('asc' or 'desc')
          schema:
            type: string
            enum:
              - asc
              - desc
            default: desc
        - name: user
          in: query
          required: false
          description: Filter by user ID
          schema:
            type: string
        - name: startDate
          in: query
          required: false
          description: Filter payments from this date
          schema:
            type: string
            format: date
        - name: endDate
          in: query
          required: false
          description: Filter payments to this date
          schema:
            type: string
            format: date
        - name: include
          in: query
          required: false
          description: Specify 'count' to include the total count of items
          schema:
            type: string
        - name: status
          in: query
          required: false
          description: Filter payments by status
          schema:
            type: string
            enum:
              - completed
              - processing
              - failed
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  payments:
                    type: array
                    items:
                      type: object
                  total:
                    type: integer
                  page:
                    type: integer
                  size:
                    type: integer
              example:
                totalItems: 18,
                Payments:
                  - id: 65f4b71d-ce3e-4458-ab6d-97d3c10d166c
                    PaymentRequestId: null,
                    TenantUserId: 09de2d9b-a9eb-4b98-a15a-3b7f59f6161f
                    title: Payment Receipt updated
                    transactionDate: '2023-04-21T00:00:00.000Z'
                    currency: USD
                    amount: 74000
                    amountUSD: 100
                    balanceCurrency: null
                    balance: null
                    conversionRate: 740
                    externalId: null
                    settings: null
                    status: completed
                    memo: Sale of album
                    files:
                      - file3.pdf
                      - file2.pdf
                    transactionId: null,
                    createdAt: '2024-11-18T15:40:45.843Z'
                    updatedAt: '2025-03-07T01:14:18.001Z'
                    TenantUser:
                      id: 09de2d9b-a9eb-4b98-a15a-3b7f59f6161f
                      firstName: odiri
                      lastName: ighogboja
                      role: user
                      User:
                        email: admin_user1@royalti.io
                        profilePicture: null
                totalPages: 2,
                currentPage: 1,
                ilteredItems: 10
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    Error:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            details:
              type: array
              items:
                type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT Authorization header using the Bearer scheme. Format: "Bearer
        {token}"

````