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

# Unified income/payout/refund feed

> When `type` is omitted, all three streams are merged in time order.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v2/ledger
openapi: 3.1.0
info:
  title: PawPayments API
  description: >-
    Public REST API for the PawPayments crypto payment gateway.


    All `/api/v2/*` endpoints require an `x-api-key` header issued in the
    merchant dashboard. Responses are wrapped in `{"ok": true, "result": ...}`
    on success and `{"ok": false, "error": {code, message, details?}}` on
    failure.
  version: 2.0.0
servers:
  - url: https://api.pawpayments.com
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Catalog
  - name: Merchant
  - name: Invoices
  - name: Payouts
  - name: Notifications
  - name: Permanent addresses
paths:
  /api/v2/ledger:
    get:
      tags:
        - Merchant
      summary: Unified income/payout/refund feed
      description: When `type` is omitted, all three streams are merged in time order.
      operationId: get__api_v2_ledger
      parameters:
        - name: date_from
          in: query
          schema:
            anyOf:
              - type: string
              - type: 'null'
            default: null
            description: ISO-8601 datetime or unix timestamp.
            title: Date From
          required: false
          description: ISO-8601 datetime or unix timestamp.
        - name: date_to
          in: query
          schema:
            anyOf:
              - type: string
              - type: 'null'
            default: null
            description: ISO-8601 datetime or unix timestamp.
            title: Date To
          required: false
          description: ISO-8601 datetime or unix timestamp.
        - name: page
          in: query
          schema:
            default: 1
            minimum: 1
            title: Page
            type: integer
          required: false
          description: ''
        - name: per_page
          in: query
          schema:
            default: 20
            maximum: 100
            minimum: 1
            title: Per Page
            type: integer
          required: false
          description: ''
        - name: type
          in: query
          schema:
            anyOf:
              - enum:
                  - income
                  - payout
                  - refund
                type: string
              - type: 'null'
            default: null
            description: >-
              Filter to a single entry type. If omitted, all types are merged in
              time order.
            title: Type
          required: false
          description: >-
            Filter to a single entry type. If omitted, all types are merged in
            time order.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LedgerEnvelope.d4a12ff'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope.d4a12ff'
        '422':
          description: Unprocessable Content
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope.d4a12ff'
components:
  schemas:
    LedgerEnvelope.d4a12ff:
      example:
        ok: true
        pagination:
          page: 1
          pages: 1
          per_page: 20
          total: 2
        result:
          - amount: 49.5
            asset: usdt_tron
            created_at: 1763398800
            currency: USD
            fee: 0.5
            reference_id: 65f1c3a4e8b1c2d3a4b5c6d7
            type: income
          - amount: 25
            asset: usdt_tron
            created_at: 1763398900
            reference_id: 65f1c3a4e8b1c2d3a4b5c6e0
            status: success
            type: payout
      properties:
        ok:
          const: true
          title: Ok
          type: boolean
        result:
          items:
            anyOf:
              - $ref: '#/components/schemas/LedgerEnvelope.d4a12ff.LedgerIncome'
              - $ref: '#/components/schemas/LedgerEnvelope.d4a12ff.LedgerPayout'
              - $ref: '#/components/schemas/LedgerEnvelope.d4a12ff.LedgerRefund'
          title: Result
          type: array
        pagination:
          $ref: '#/components/schemas/LedgerEnvelope.d4a12ff.Pagination'
      required:
        - ok
        - result
        - pagination
      title: LedgerEnvelope
      type: object
    ErrorEnvelope.d4a12ff:
      example:
        error:
          code: VALIDATION_ERROR
          details:
            - field: amount
              message: Field required
          message: Validation failed
        ok: false
      properties:
        ok:
          const: false
          title: Ok
          type: boolean
        error:
          $ref: '#/components/schemas/ErrorEnvelope.d4a12ff.ErrorBody'
      required:
        - ok
        - error
      title: ErrorEnvelope
      type: object
    LedgerEnvelope.d4a12ff.LedgerIncome:
      properties:
        type:
          const: income
          title: Type
          type: string
        reference_id:
          title: Reference Id
          type: string
        amount:
          title: Amount
          type: number
        currency:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Currency
        asset:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Asset
        fee:
          anyOf:
            - type: number
            - type: 'null'
          default: null
          title: Fee
        created_at:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          title: Created At
      required:
        - type
        - reference_id
        - amount
      title: LedgerIncome
      type: object
    LedgerEnvelope.d4a12ff.LedgerPayout:
      properties:
        type:
          const: payout
          title: Type
          type: string
        reference_id:
          title: Reference Id
          type: string
        amount:
          title: Amount
          type: number
        asset:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Asset
        status:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Status
        created_at:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          title: Created At
      required:
        - type
        - reference_id
        - amount
      title: LedgerPayout
      type: object
    LedgerEnvelope.d4a12ff.LedgerRefund:
      properties:
        type:
          const: refund
          title: Type
          type: string
        reference_id:
          title: Reference Id
          type: string
        invoice_id:
          title: Invoice Id
          type: string
        amount:
          title: Amount
          type: number
        asset:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Asset
        status:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Status
        created_at:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          title: Created At
      required:
        - type
        - reference_id
        - invoice_id
        - amount
      title: LedgerRefund
      type: object
    LedgerEnvelope.d4a12ff.Pagination:
      example:
        page: 1
        pages: 1
        per_page: 20
        total: 1
      properties:
        page:
          minimum: 1
          title: Page
          type: integer
        per_page:
          maximum: 100
          minimum: 1
          title: Per Page
          type: integer
        total:
          minimum: 0
          title: Total
          type: integer
        pages:
          minimum: 0
          title: Pages
          type: integer
      required:
        - page
        - per_page
        - total
        - pages
      title: Pagination
      type: object
    ErrorEnvelope.d4a12ff.ErrorBody:
      properties:
        code:
          description: Machine-readable error code (e.g. NOT_FOUND, VALIDATION_ERROR).
          title: Code
          type: string
        message:
          title: Message
          type: string
        details:
          anyOf:
            - {}
            - type: 'null'
          default: null
          description: >-
            Optional context. For VALIDATION_ERROR contains a list of {field,
            message}.
          title: Details
      required:
        - code
        - message
      title: ErrorBody
      type: object
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      name: x-api-key
      in: header

````