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

# Get payout stats

> This endpoint returns statistics about payouts. 
 <Tip>**HTTP Request** <br/>`GET https://api.firstpromoter.com/api/v2/company/payouts/stats`</Tip>



## OpenAPI

````yaml openapi-v2-payouts get /payouts/stats
openapi: 3.0.3
info:
  title: FirstPromoter Admin Payouts API
  description: API documentation for admin payouts endpoints
  version: 1.0.0
servers:
  - url: https://api.firstpromoter.com/api/v2/company
    description: Production server
security:
  - BearerAuth: []
paths:
  /payouts/stats:
    get:
      summary: Get payout stats
      description: |-
        This endpoint returns statistics about payouts. 
         <Tip>**HTTP Request** <br/>`GET https://api.firstpromoter.com/api/v2/company/payouts/stats`</Tip>
      operationId: getAdminPayoutStats
      parameters:
        - $ref: '#/components/parameters/AccountId'
        - name: stats_by[paid_period]
          in: query
          description: Shows the stats by payout period only for paid payouts
          required: false
          schema:
            type: boolean
        - name: stats_by[status]
          in: query
          description: Shows the stats by status (pending, failed, processing, completed)
          required: false
          schema:
            type: boolean
        - name: stats_by[payout_method]
          in: query
          description: Shows the stats by payout method
          required: false
          schema:
            type: boolean
        - name: filters[status]
          in: query
          description: Filter by status
          required: false
          schema:
            type: string
            enum:
              - pending
              - completed
              - failed
              - processing
              - cancelled
        - name: filters[campaign_id]
          in: query
          description: Campaign ids. Can be Integer or Array of Integers
          required: false
          schema:
            oneOf:
              - type: integer
              - type: array
                items:
                  type: integer
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayoutStats'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  parameters:
    AccountId:
      name: Account-ID
      in: header
      required: true
      description: Account identifier that specifies which account is making the request
      schema:
        type: string
        example: acc_123456
  schemas:
    PayoutStats:
      type: object
      properties:
        meta:
          type: object
          properties:
            net_payout_days:
              type: integer
              description: Number of days for net payout
            payout_cycle:
              type: string
              description: Payout cycle (e.g., monthly)
            min_payment:
              type: integer
              description: Minimum payment amount
            min_paying_customers:
              type: integer
              description: Minimum number of paying customers
            terms_description:
              type: string
              description: Description of payment terms
            selected_payout_methods:
              type: array
              items:
                type: string
              description: List of selected payout methods
            payout_method_options:
              type: object
              description: Options for payout methods
            managed_payouts:
              type: boolean
              description: Whether payouts are managed by us (auto-payouts)
        data:
          type: object
          properties:
            by_paid_period:
              type: array
              items:
                type: object
                properties:
                  period_start:
                    type: string
                    format: date-time
                    description: Start date of the period
                  period_end:
                    type: string
                    format: date-time
                    description: End date of the period
                  promoters_count:
                    type: integer
                    description: Count of promoters
                  amounts:
                    type: object
                    additionalProperties:
                      type: number
                    description: Amounts by currency or unit
                  total_incl_tax:
                    type: number
                    description: Total amount including tax
            by_status:
              type: object
              additionalProperties:
                type: object
                properties:
                  amounts:
                    type: object
                    additionalProperties:
                      type: number
                  total_incl_tax:
                    type: number
                  promoters_count:
                    type: integer
            by_payout_method:
              type: object
              additionalProperties:
                type: object
                properties:
                  amounts:
                    type: object
                    additionalProperties:
                      type: number
                  total_incl_tax:
                    type: number
                  promoters_count:
                    type: integer
    Error:
      type: object
      properties:
        message:
          type: string
          description: Error message
        code:
          type: string
          description: Error code
      required:
        - message
        - code
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: Access token passed as a Bearer token in the Authorization header

````