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

# Get a seller's usage

> How a seller's listings published on `network` were paid for: totals over all of them, and up to
100 listings, most recently paid first. Only settlements that paid the seller count. Listings that
are pending, quarantined or keep their usage private are left out. A seller without listings has
an empty `listings`.




## OpenAPI

````yaml /api-reference/openapi.yaml get /discovery/sellers/{payTo}/usage
openapi: 3.1.0
info:
  title: Rail402
  version: 0.0.0
  summary: x402 facilitator and Bazaar discovery layer for Stellar.
  description: >
    The Rail402 HTTP service. `/supported`, `/verify` and `/settle` follow the
    x402 version 2 facilitator

    interface; `/discovery/*` serves the Bazaar catalog and search.


    Every endpoint except `/health`, `/ready` and `/metrics` is rate-limited per
    client address; a `/verify`

    or `/settle` with an API key is limited per key instead. A limited request
    gets HTTP 429 with a

    `Retry-After` header and the code `rate_limited`.
  license:
    name: Apache-2.0
    identifier: Apache-2.0
servers:
  - url: https://testnet.rail402.dev
    description: Hosted testnet facilitator (stellar:testnet only, no API key)
security: []
tags:
  - name: Facilitator
    description: x402 facilitator interface.
  - name: Discovery
    description: Bazaar catalog and natural-language search.
  - name: Operations
    description: Health, readiness, metrics and usage.
paths:
  /discovery/sellers/{payTo}/usage:
    get:
      tags:
        - Discovery
      summary: Get a seller's usage
      description: >
        How a seller's listings published on `network` were paid for: totals
        over all of them, and up to

        100 listings, most recently paid first. Only settlements that paid the
        seller count. Listings that

        are pending, quarantined or keep their usage private are left out. A
        seller without listings has

        an empty `listings`.
      operationId: getSellerUsage
      parameters:
        - name: payTo
          in: path
          required: true
          description: >-
            The seller's G… or C… address (the listing owner, never a muxed M…
            address).
          schema:
            type: string
            pattern: ^[GC][A-Z2-7]{55}$
        - $ref: '#/components/parameters/UsageNetwork'
      responses:
        '200':
          description: The seller's usage.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SellerUsage'
        '400':
          $ref: '#/components/responses/InvalidParameter'
        '429':
          $ref: '#/components/responses/RateLimited'
        '503':
          $ref: '#/components/responses/DiscoveryUnavailable'
components:
  parameters:
    UsageNetwork:
      name: network
      in: query
      required: true
      description: The network whose listings and settlements are read.
      schema:
        type: string
        enum:
          - stellar:testnet
          - stellar:pubnet
  schemas:
    SellerUsage:
      type: object
      required:
        - payTo
        - totals
        - listings
        - truncated
      properties:
        payTo:
          type: string
        totals:
          type: object
          required:
            - payments
            - payers
          description: >-
            Over every listing of the seller on the network, not only those
            shown.
          properties:
            payments:
              type: integer
            payers:
              type: integer
        listings:
          type: array
          maxItems: 100
          items:
            type: object
            required:
              - listing
              - payments
              - payers
              - lastObservedAt
            properties:
              listing:
                $ref: '#/components/schemas/ListingRef'
              payments:
                type: integer
              payers:
                type: integer
              lastObservedAt:
                type:
                  - string
                  - 'null'
                format: date-time
        truncated:
          type: boolean
          description: True when the seller has more than 100 such listings.
    ListingRef:
      type: object
      description: >-
        A published listing on one network. `scheme`, `asset`, `amount` and
        `payTo` are its payment option on that network (for a settlement, the
        option in the asset it was paid in).
      required:
        - id
        - type
        - resource
        - payTo
        - scheme
        - amount
        - asset
        - network
        - lastUpdated
      properties:
        id:
          type: string
          format: uuid
        type:
          type: string
          enum:
            - http
            - mcp
        resource:
          type: string
        method:
          type: string
          description: HTTP resources only.
        toolName:
          type: string
          description: MCP tools only.
        description:
          type: string
        serviceName:
          type: string
        payTo:
          type: string
        scheme:
          type: string
        amount:
          type: string
          description: The listed price in base units; for `upto`, the cap.
        asset:
          type: string
        network:
          type: string
        lastUpdated:
          type: string
          format: date-time
    ErrorBody:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - reason
            - retryable
          properties:
            code:
              type: string
            reason:
              type: string
            retryable:
              type: boolean
            details:
              type: object
              additionalProperties: true
  responses:
    InvalidParameter:
      description: >-
        A parameter is malformed or not supported
        (`discovery_invalid_parameter`).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorBody'
          example:
            error:
              code: discovery_invalid_parameter
              reason: 'Unsupported parameter: foo.'
              retryable: false
    RateLimited:
      description: Rate limited (`rate_limited`).
      headers:
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorBody'
    DiscoveryUnavailable:
      description: >-
        Discovery is at capacity or the catalog database is busy
        (`discovery_overloaded`), or the catalog database cannot be reached
        (`discovery_catalog_unavailable`). Retry after `Retry-After`.
      headers:
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorBody'
          example:
            error:
              code: discovery_overloaded
              reason: Discovery is at capacity; retry after the Retry-After interval.
              retryable: true
  headers:
    RetryAfter:
      description: Seconds until a retry can succeed.
      schema:
        type: integer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.