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

# Get fee analytics

> Returns fee totals, payment volume, fee ownership, trends, and payment-rail breakdowns for completed Karat payments in an inclusive UTC date range. The range can span at most 366 days. Resolved fee totals exclude payments whose authoritative fee is not yet available, while payment counts and volume include them.



## OpenAPI

````yaml /api-reference/openapi.json get /payments/fees/analytics
openapi: 3.1.0
info:
  title: Karat Payout API
  description: >-
    Your gateway to seamless, automated, and scalable payment solutions. The
    Karat Payout API lets you create recipients, send payouts, track payment
    status, manage tax documents, record external payments, and subscribe to
    webhook events.
  version: 1.0.0
servers:
  - url: https://payouts.api.trykarat.com
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Account
    description: Retrieve your available balance and payout totals.
  - name: Payments
    description: Create and manage outgoing payouts to recipients.
  - name: Recipients
    description: Manage the payees you send payouts to.
  - name: Tax
    description: Retrieve recipient tax forms (W-9) and download links.
  - name: External Payments
    description: Record and manage payments made outside of Karat.
  - name: Webhooks
    description: Subscribe to event notifications for payout activity.
paths:
  /payments/fees/analytics:
    get:
      tags:
        - Payments
      summary: Get fee analytics
      description: >-
        Returns fee totals, payment volume, fee ownership, trends, and
        payment-rail breakdowns for completed Karat payments in an inclusive UTC
        date range. The range can span at most 366 days. Resolved fee totals
        exclude payments whose authoritative fee is not yet available, while
        payment counts and volume include them.
      operationId: getPaymentFeeAnalytics
      parameters:
        - name: startDate
          in: query
          description: First UTC calendar day to include, in ISO 8601 format.
          required: true
          schema:
            type: string
            format: date
          example: '2026-08-01'
        - name: endDate
          in: query
          description: Last UTC calendar day to include, in ISO 8601 format.
          required: true
          schema:
            type: string
            format: date
          example: '2026-08-31'
      responses:
        '200':
          description: Fee analytics for the requested completion-date range.
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    $ref: '#/components/schemas/PaymentFeeAnalytics'
              example:
                data:
                  startDate: '2026-08-01T00:00:00.000Z'
                  endDate: '2026-08-31T23:59:59.999Z'
                  dateBasis: COMPLETED_AT
                  timezone: UTC
                  summary:
                    totalFeeCents: 350
                    paymentVolumeCents: 35000
                    paymentCount: 3
                    payerFeeCents: 100
                    recipientFeeCents: 250
                    resolvedPaymentCount: 2
                    unresolvedPaymentCount: 1
                    feePercentageOfVolume: 1
                    averageFeeCents: 116.6666666667
                  trend:
                    - bucketStart: '2026-08-04T00:00:00.000Z'
                      label: Aug 4
                      payerFeeCents: 100
                      recipientFeeCents: 250
                      totalFeeCents: 350
                  rails:
                    - rail: ACH
                      paymentCount: 3
                      paymentVolumeCents: 35000
                      payerFeeCents: 100
                      recipientFeeCents: 250
                      unresolvedPaymentCount: 1
                      totalFeeCents: 350
                      feePercentageOfVolume: 1
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
components:
  schemas:
    PaymentFeeAnalytics:
      type: object
      required:
        - startDate
        - endDate
        - dateBasis
        - timezone
        - summary
        - trend
        - rails
      properties:
        startDate:
          type: string
          format: date-time
          description: Normalized start of the first included UTC day.
        endDate:
          type: string
          format: date-time
          description: Normalized end of the last included UTC day.
        dateBasis:
          type: string
          enum:
            - COMPLETED_AT
          description: The payment timestamp used to include payments in the range.
        timezone:
          type: string
          enum:
            - UTC
        summary:
          $ref: '#/components/schemas/PaymentFeeAnalyticsSummary'
        trend:
          type: array
          items:
            $ref: '#/components/schemas/PaymentFeeAnalyticsTrendPoint'
        rails:
          type: array
          items:
            $ref: '#/components/schemas/PaymentFeeAnalyticsRail'
    PaymentFeeAnalyticsSummary:
      type: object
      required:
        - totalFeeCents
        - paymentVolumeCents
        - paymentCount
        - payerFeeCents
        - recipientFeeCents
        - resolvedPaymentCount
        - unresolvedPaymentCount
        - feePercentageOfVolume
        - averageFeeCents
      properties:
        totalFeeCents:
          type: number
          description: Sum of resolved fees in cents.
        paymentVolumeCents:
          type: number
          description: >-
            Gross completed payment volume in cents, including payments with
            unresolved fees.
        paymentCount:
          type: integer
          description: Number of completed payments in the selected range.
        payerFeeCents:
          type: number
          description: Resolved fees paid by your organization, in cents.
        recipientFeeCents:
          type: number
          description: Resolved fees deducted from recipient proceeds, in cents.
        resolvedPaymentCount:
          type: integer
          description: Completed payments with an authoritative fee and fee owner.
        unresolvedPaymentCount:
          type: integer
          description: Completed payments without an authoritative fee or fee owner.
        feePercentageOfVolume:
          type: number
          format: double
          description: >-
            Resolved fees divided by gross completed payment volume, multiplied
            by 100.
        averageFeeCents:
          type: number
          format: double
          description: >-
            Resolved fees divided by all completed payments in the selected
            range.
    PaymentFeeAnalyticsTrendPoint:
      type: object
      required:
        - bucketStart
        - label
        - payerFeeCents
        - recipientFeeCents
        - totalFeeCents
      properties:
        bucketStart:
          type: string
          format: date-time
        label:
          type: string
        payerFeeCents:
          type: number
        recipientFeeCents:
          type: number
        totalFeeCents:
          type: number
    PaymentFeeAnalyticsRail:
      type: object
      required:
        - rail
        - paymentCount
        - paymentVolumeCents
        - payerFeeCents
        - recipientFeeCents
        - unresolvedPaymentCount
        - totalFeeCents
        - feePercentageOfVolume
      properties:
        rail:
          $ref: '#/components/schemas/PaymentFeeRail'
        paymentCount:
          type: integer
        paymentVolumeCents:
          type: number
        payerFeeCents:
          type: number
        recipientFeeCents:
          type: number
        unresolvedPaymentCount:
          type: integer
        totalFeeCents:
          type: number
        feePercentageOfVolume:
          type: number
          format: double
          description: >-
            Resolved rail fees divided by gross completed volume on this rail,
            multiplied by 100.
    Error:
      type: object
      description: Standard error envelope returned for all non-2xx responses.
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            code:
              type: string
          required:
            - message
      required:
        - error
    PaymentFeeRail:
      type: string
      description: Normalized payment rail used for fee reporting.
      enum:
        - ACH
        - REAL_TIME_PAYMENT
        - INTERNAL
        - WIRE
        - INTERNATIONAL
        - CRYPTO
        - PAYPAL
        - OTHER
  responses:
    BadRequest:
      description: The request was invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              message: 'amount: amount must be positive'
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              message: Invalid api key
    Forbidden:
      description: The authenticated organization does not have access to this feature.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              message: Fee analytics are not enabled for this organization
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Pass your API key as a bearer token: `Authorization: Bearer <API_KEY>`.'

````