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

> ## Agent Instructions
> Rail402 is an x402 payment facilitator, Stellar-native Bazaar discovery layer, and agent tooling for the Stellar network. It currently targets stellar:testnet.
> The live testnet facilitator is https://facilitator.rail402.dev with endpoints /verify, /settle, /supported, /health, and /discovery/*.
> Payment amounts use 7-decimal SEP-41 integer (stroop) arithmetic. Never use floating-point math for amounts.
> Every rejection returns a machine-readable error code and a non-null human-readable reason. When explaining a failure, surface both.

# The seller / API directory (on-chain sellers ∪ Bazaar-registered)

> A directory of sellers, ranked by on-chain activity. It is the UNION of two sources, so it
is complete in both directions:
  - every address that has been PAID on-chain (any facilitator, registered or not), with
    payment count, unique buyers and settled volume; and
  - every seller REGISTERED in the Bazaar catalog, which appears automatically even before
    its first settled payment (with zero on-chain stats until then).
A seller that is both carries stats AND its Bazaar name/description. Use it to build an
ecosystem / leaderboard page.




## OpenAPI

````yaml /api-reference/explorer.openapi.yaml get /sellers
openapi: 3.1.0
info:
  title: Rail402 Explorer API
  version: 0.1.0
  summary: x402 payments explorer for Stellar
  description: >
    Read-only public API over x402 payment activity observed on Stellar. The
    explorer watches the

    ledger directly (Soroban RPC + Horizon), classifies x402 settlements
    structurally — no

    facilitator registration is required for a payment to appear — attributes
    each payment to the

    facilitator that submitted it, and enriches sellers via the x402 Bazaar.


    **Amounts** are stroop-scale integer strings (7 decimals). Every amount
    field has a

    `…Decimal` companion for display; never do arithmetic on the decimal form.


    **Confidence tiers** (every payment carries one; inference is never
    presented as fact):

    - `rail402` — submitted by the Rail402 deployment's published signer.

    - `verified-facilitator` — submitter matches a registered facilitator's live
    `/supported` signers.

    - `x402-shaped` — structurally an x402 settlement, submitter unknown.


    **History**: the full Soroban RPC retention window (~7 days) is backfilled
    for all

    facilitators including unknown ones, and every registry-verified
    facilitator's complete

    chain-epoch history (back to the 2025-12-17 testnet reset) is recovered from
    Horizon.

    Horizon-recovered rows have no `asset`/`assetCode` (that string only exists
    in event data);

    `assetContract` is always present.


    **Errors** are always `{ code, reason, retryable, details? }` — branch on
    `code`, never parse

    `reason`. CORS is open (`*`): browsers may call this API directly.
servers:
  - url: https://explorer-explorer.up.railway.app
    description: stellar:testnet
security: []
tags:
  - name: payments
    description: The payment stream and per-transaction detail
  - name: entities
    description: Sellers and facilitators
  - name: registry
    description: Facilitator self-registration
  - name: ops
    description: Health and metrics
paths:
  /sellers:
    get:
      tags:
        - entities
      summary: The seller / API directory (on-chain sellers ∪ Bazaar-registered)
      description: >
        A directory of sellers, ranked by on-chain activity. It is the UNION of
        two sources, so it

        is complete in both directions:
          - every address that has been PAID on-chain (any facilitator, registered or not), with
            payment count, unique buyers and settled volume; and
          - every seller REGISTERED in the Bazaar catalog, which appears automatically even before
            its first settled payment (with zero on-chain stats until then).
        A seller that is both carries stats AND its Bazaar name/description. Use
        it to build an

        ecosystem / leaderboard page.
      operationId: listSellers
      parameters:
        - name: network
          in: query
          schema:
            type: string
        - name: window
          in: query
          schema:
            type: string
            enum:
              - 24h
              - 7d
              - 30d
          description: >
            Scope every activity stat (payments, uniqueBuyers, volume,
            first/last seen) to the

            trailing window and rank by windowed activity. Omit for all-time.
            Registered sellers

            with no window activity stay listed with zero stats.
        - name: registered
          in: query
          schema:
            type: boolean
          description: >-
            Filter to only Bazaar-registered (`true`) or only unregistered
            (`false`) sellers
        - name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
        - name: offset
          in: query
          schema:
            type: integer
            minimum: 0
            default: 0
      responses:
        '200':
          description: One page of the directory
          content:
            application/json:
              schema:
                type: object
                required:
                  - items
                  - pagination
                properties:
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/DirectorySeller'
                  pagination:
                    type: object
                    properties:
                      total:
                        type: integer
                      limit:
                        type: integer
                      offset:
                        type: integer
        '400':
          $ref: '#/components/responses/InvalidQuery'
components:
  schemas:
    DirectorySeller:
      type: object
      required:
        - payTo
        - network
        - registered
        - payments
        - uniqueBuyers
        - volume
      properties:
        payTo:
          type: string
        network:
          type: string
        registered:
          type: boolean
          description: Listed in the Bazaar catalog (vs. only observed on-chain)
        payments:
          type: integer
          description: >-
            On-chain payments observed to this seller (0 for
            registered-but-unpaid)
        uniqueBuyers:
          type: integer
        firstSeenAt:
          type: string
          format: date-time
        lastSeenAt:
          type: string
          format: date-time
        volume:
          type: array
          description: Settled volume per asset, largest first
          items:
            type: object
            properties:
              assetContract:
                type: string
              asset:
                type: string
              assetCode:
                type: string
              total:
                type: string
                description: Integer string, smallest units
              totalDecimal:
                type: string
                description: Human amount
        serviceName:
          type: string
          description: Bazaar service name, when registered/known
        resource:
          type: string
        description:
          type: string
    Error:
      type: object
      required:
        - code
        - reason
        - retryable
      properties:
        code:
          type: string
          description: >-
            Stable machine-readable identifier — branch on this, never on
            `reason`
        reason:
          type: string
          description: Non-null human-legible explanation
        retryable:
          type: boolean
          description: Whether an identical retry could plausibly succeed
        details:
          type: object
          additionalProperties: true
  responses:
    InvalidQuery:
      description: A parameter failed validation; details name it
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: explorer_invalid_query
            reason: Query parameter "scheme" must be one of exact, upto.
            retryable: false
            details:
              parameter: scheme
              value: bogus

````