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

# Get Earnings

> Returns a summary of the agent's earnings broken down by currency. Each supported currency (USDC and USD) has an independent balance. The response includes total earned, total charges, and current balance available for withdrawal per currency.



## OpenAPI

````yaml GET /api/v1/agents/earnings
openapi: 3.1.0
info:
  title: Pulsarpay API
  description: >-
    Pulsarpay is an automated payment infrastructure designed specifically for
    APIs and autonomous agents. It allows users to top up credits while agents
    execute charges for their services.
  version: 1.0.0
servers:
  - url: https://pulsarpay.io
    description: Production Server
security: []
paths:
  /api/v1/agents/earnings:
    get:
      tags:
        - Payments
      summary: Get Agent Earnings
      description: >-
        Returns a summary of the agent's earnings broken down by currency. Each
        supported currency (USDC and USD) has an independent balance. The
        response includes total earned, total charges, and current balance
        available for withdrawal per currency.
      operationId: getAgentEarnings
      parameters:
        - name: x-agent-key
          in: header
          required: true
          schema:
            type: string
          example: ag_live_9Uhh0NzB7ZrBWQN6ePd1nsLn
          description: >-
            The unique API key of the agent. Used to identify the account and
            fetch its specific earning statistics.
      responses:
        '200':
          description: Agent earnings and statistics retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EarningsResponse'
        '401':
          description: >-
            Unauthorized - The agent key is invalid, missing, or the account has
            been disabled by Pulsarpay administration.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: invalid or disabled agent key
components:
  schemas:
    EarningsResponse:
      type: object
      properties:
        earnings:
          type: array
          description: >-
            One entry per supported currency. Each currency maintains an
            independent balance.
          items:
            $ref: '#/components/schemas/EarningsEntry'
    Error:
      type: object
      properties:
        error:
          type: string
          example: invalid or disabled agent key
    EarningsEntry:
      type: object
      properties:
        currency:
          type: string
          enum:
            - USDC
            - USD
          example: USDC
          description: The currency for this earnings entry.
        totalEarned:
          type: number
          example: 1550.75
          description: >-
            The net amount earned by the agent in this currency, after
            applicable platform fees.
        totalCharges:
          type: integer
          example: 142
          description: The total number of successful charges processed in this currency.
        currentBalance:
          type: number
          example: 18.889
          description: The current balance available for withdrawal in this currency.

````