> ## 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 Payment Requests

> **Get Payment Requests**

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

## Description

**Get Payment Requests**

**Description:**\
The `/payment-request/` endpoint retrieves a list of payment requests with filtering and pagination options.

**Method:**\
`GET`

**Query Parameters:**

| Parameter         | Type    | Description                              |
| ----------------- | ------- | ---------------------------------------- |
| q *(Optional)*    | string  | Search query to filter payment requests  |
| page *(Optional)* | integer | Page number for pagination. Default: 1   |
| size *(Optional)* | integer | Number of requests per page. Default: 10 |
| user *(Optional)* | string  | Filter by user ID                        |

## Code Examples

<CodeGroup>
  ```javascript Node.js theme={null}
  const response = await fetch('https://api.royalti.io/payment-request/', {
    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-request/',
    headers={
      'Authorization': f'Bearer {token}'
    },
  )

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

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

  ```
</CodeGroup>


## OpenAPI

````yaml get /payment-request/
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-request/:
    get:
      tags:
        - Payment Requests
      summary: Get Payment Requests
      description: >-
        **Get Payment Requests**


        **Description:**  

        The `/payment-request/` endpoint retrieves a list of payment requests
        with filtering and pagination options.


        **Method:**  

        `GET`


        **Query Parameters:**


        | Parameter | Type | Description |

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

        | q _(Optional)_ | string | Search query to filter payment requests |

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

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

        | user _(Optional)_ | string | Filter by user ID |
      parameters:
        - name: q
          in: query
          required: false
          description: Search query to filter payment requests
          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 requests per page
          schema:
            type: integer
            default: 10
        - name: user
          in: query
          required: false
          description: Filter by user ID
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  paymentRequests:
                    type: array
                    items:
                      type: object
                  total:
                    type: integer
                  page:
                    type: integer
                  size:
                    type: integer
              example:
                status: success
                message: Payment Requests retrieved successfully
                response:
                  totalItems: 11
                  PaymentRequests:
                    - TenantId: 2
                      id: 818e7125-9981-44c2-9cdf-b8b07c58b6ed
                      TenantUserId: df474f6c-4560-49f9-bf67-d2402258eb4c
                      PaymentSettingId: 9fe3d6d2-c309-4ffd-ba35-d889b91dfaba
                      currency: NGN
                      amount: 150000
                      amountUSD: 100
                      memo: trf
                      status: pending
                      createdAt: '2024-12-12T07:36:23.190Z'
                      updatedAt: '2024-12-12T07:36:23.190Z'
                      TenantUser:
                        id: df474f6c-4560-49f9-bf67-d2402258eb4c
                        firstName: Omah
                        lastName: Stanley
                        User:
                          email: itzdatcoolzee@gmail.com
                          profilePicture: null
                  totalPages: 2
                  currentPage: 1
                  filteredItems: 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}"

````