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

# Read partner revenue ledger with deterministic pagination

> Returns partner-scoped revenue rows for reconciliation and reporting. Use `from`/`to` windows and cursor pagination for deterministic backfills. Optionally request summary totals with `include_summary=true`.



## OpenAPI

````yaml /openapi/openapi.json get /partner/revenue
openapi: 3.1.0
info:
  title: CashWeb Partner API
  description: >-
    CashWeb Partner API enables crypto-to-fiat offramp transactions. Create
    quotes, manage transactions, receive lifecycle webhooks, and reconcile
    revenue.
  contact:
    name: Michael Anyi
    email: michael@cashweb.cash
  license:
    name: Proprietary
  version: 1.0.0
servers:
  - url: https://api-staging.cashweb.cash/api/v1
    description: Staging environment
  - url: https://api.cashweb.cash/api/v1
    description: Production environment
security: []
paths:
  /partner/revenue:
    get:
      tags:
        - Partner API
      summary: Read partner revenue ledger with deterministic pagination
      description: >-
        Returns partner-scoped revenue rows for reconciliation and reporting.
        Use `from`/`to` windows and cursor pagination for deterministic
        backfills. Optionally request summary totals with
        `include_summary=true`.
      operationId: get_revenue
      parameters:
        - name: from
          in: query
          description: Inclusive start time in RFC3339.
          required: false
          schema:
            type: string
          example: '2026-02-01T00:00:00Z'
        - name: to
          in: query
          description: Inclusive end time in RFC3339.
          required: false
          schema:
            type: string
          example: '2026-02-12T23:59:59Z'
        - name: token
          in: query
          description: Optional token filter.
          required: false
          schema:
            type: string
          example: usdt
        - name: network
          in: query
          description: Optional network filter.
          required: false
          schema:
            type: string
          example: bep20
        - name: include_summary
          in: query
          description: Include aggregate totals for the selected window.
          required: false
          schema:
            type: boolean
          example: true
        - name: cursor
          in: query
          description: Opaque cursor returned by the previous response.
          required: false
          schema:
            type: string
          example: eyJ0cyI6IjIwMjYtMDItMTJUMTI6MzA6MDBaIiwiaWQiOiIwMTkxN2YwMCJ9
        - name: limit
          in: query
          description: Requested page size.
          required: false
          schema:
            type: integer
            format: int32
            maximum: 100
            minimum: 1
          example: 20
      responses:
        '200':
          description: Revenue ledger retrieved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse_PartnerRevenueResponse'
              example:
                data:
                  data:
                    - amount: '161500.00'
                      crypto_amount: '100.00'
                      crypto_currency: usdt
                      merchant_id: mrc_001
                      merchant_reference: order-4551
                      network: trc20
                      platform_fee: '100.00'
                      share: '50.00'
                      terminal_id: term_01
                      transaction_id: 01917f00-7b4c-7f56-8a2b-15998d58c9f3
                      ts: '2026-02-12T12:05:00Z'
                  has_more: false
                  limit: 20
                  next_cursor: null
                  summary:
                    from: '2026-02-01T00:00:00Z'
                    to: '2026-02-12T23:59:59Z'
                    total_partner_share: '50.00'
                    transaction_count: 1
                success: true
        '400':
          description: Invalid revenue query parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: BAD_REQUEST
                  message: time window cannot exceed 90 days
                  timestamp: '2026-02-12T12:00:00Z'
        '401':
          description: Missing or invalid partner API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '502':
          description: Revenue analytics backend temporarily unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - PartnerApiKey: []
components:
  schemas:
    ApiResponse_PartnerRevenueResponse:
      type: object
      description: Standard API response wrapper for all successful responses
      required:
        - success
        - data
      properties:
        data:
          type: object
          description: >-
            Cursor-based partner revenue response scoped to the authenticated
            partner.
          required:
            - data
            - has_more
            - limit
          properties:
            data:
              type: array
              items:
                $ref: '#/components/schemas/PartnerRevenueLedgerItem'
              description: Current page of revenue rows.
            has_more:
              type: boolean
              example: false
            limit:
              type: integer
              format: int32
              description: Applied page size after server-side clamping.
              example: 20
            next_cursor:
              type:
                - string
                - 'null'
              description: Opaque cursor for next page retrieval.
              example: eyJ0cyI6IjIwMjYtMDItMTJUMTI6MDU6MDBaIiwiaWQiOiIwMTkxN2YwMCJ9
            summary:
              oneOf:
                - type: 'null'
                - $ref: '#/components/schemas/PartnerRevenueSummary'
                  description: Optional aggregated summary when include_summary=true.
        message:
          type:
            - string
            - 'null'
          description: Optional message for additional information
        success:
          type: boolean
          description: Indicates if the request was successful
          example: 'true'
    ErrorResponse:
      type: object
      description: Error response structure for OpenAPI documentation
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/ErrorDetails'
          description: Error details
    PartnerRevenueLedgerItem:
      type: object
      description: Single partner revenue ledger row for reconciliation.
      required:
        - ts
        - transaction_id
        - share
        - platform_fee
        - crypto_currency
        - crypto_amount
        - amount
      properties:
        amount:
          type: string
          example: '161500.00'
        crypto_amount:
          type: string
          example: '100.00'
        crypto_currency:
          type: string
          example: usdt
        merchant_id:
          type:
            - string
            - 'null'
          example: mrc_001
        merchant_reference:
          type:
            - string
            - 'null'
          example: order-4551
        network:
          type:
            - string
            - 'null'
          example: bep20
        platform_fee:
          type: string
          description: Platform fee amount used in the revenue split.
          example: '100.00'
        share:
          type: string
          description: Partner share amount in NGN for this transaction.
          example: '50.00'
        terminal_id:
          type:
            - string
            - 'null'
          example: term_01
        transaction_id:
          type: string
          format: uuid
          example: 01917f00-7b4c-7f56-8a2b-15998d58c9f3
        ts:
          type: string
          format: date-time
          description: Analytics event timestamp in UTC RFC3339.
          example: '2026-02-12T12:05:00Z'
    PartnerRevenueSummary:
      type: object
      description: Optional summary totals for the selected revenue window.
      required:
        - total_partner_share
        - transaction_count
        - from
        - to
      properties:
        from:
          type: string
          format: date-time
          example: '2026-02-01T00:00:00Z'
        to:
          type: string
          format: date-time
          example: '2026-02-12T23:59:59Z'
        total_partner_share:
          type: string
          description: Total partner share across filtered rows.
          example: '1750.00'
        transaction_count:
          type: integer
          format: int64
          description: Count of filtered transactions.
          example: 35
    ErrorDetails:
      type: object
      description: Error details structure
      required:
        - message
        - code
        - timestamp
      properties:
        code:
          type: string
          description: Machine-readable error code
        message:
          type: string
          description: Human-readable error message
        timestamp:
          type: string
          format: date-time
          description: Timestamp when the error occurred
  securitySchemes:
    PartnerApiKey:
      type: apiKey
      in: header
      name: X-API-KEY

````