> ## 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.

# Find the listings settlements paid for

> For each settlement transaction that paid the owner of a listing published on `network`, the
listing it paid for, in the order asked. Unknown transactions, and those of a listing that is not
published there or whose usage is private, are absent. A network that publishes usage counts only
(`<NET>_BAZAAR_USAGE_DETAIL=counts`, pubnet's default) links none. A transaction is the hash of the
transaction that settled the payment on chain: the fee bump's hash for a sponsored settlement.




## OpenAPI

````yaml /api-reference/openapi.yaml get /discovery/settlements
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/settlements:
    get:
      tags:
        - Discovery
      summary: Find the listings settlements paid for
      description: >
        For each settlement transaction that paid the owner of a listing
        published on `network`, the

        listing it paid for, in the order asked. Unknown transactions, and those
        of a listing that is not

        published there or whose usage is private, are absent. A network that
        publishes usage counts only

        (`<NET>_BAZAAR_USAGE_DETAIL=counts`, pubnet's default) links none. A
        transaction is the hash of the

        transaction that settled the payment on chain: the fee bump's hash for a
        sponsored settlement.
      operationId: getSettlementListings
      parameters:
        - $ref: '#/components/parameters/UsageNetwork'
        - name: transactions
          in: query
          required: true
          description: >-
            1 to 100 comma-separated transaction hashes, each 64 lowercase hex
            characters.
          schema:
            type: string
            pattern: ^[0-9a-f]{64}(,[0-9a-f]{64}){0,99}$
      responses:
        '200':
          description: The settlements linked to a listing.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SettlementLinks'
        '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:
    SettlementLinks:
      type: object
      required:
        - items
        - asOf
      properties:
        items:
          type: array
          items:
            type: object
            required:
              - transaction
              - listing
              - observedAt
            properties:
              transaction:
                type: string
              listing:
                $ref: '#/components/schemas/ListingRef'
              observedAt:
                type: string
                format: date-time
                description: When the catalog recorded the settlement.
        asOf:
          type: string
          format: date-time
    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.