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

# Payment stream, newest first

> Keyset-paginated stream of classified x402 payments. Filters combine with AND. Follow
`nextCursor` for the next page; its absence means the last page. A cursor is bound to its
ordering only — changing filters with an old cursor is safe but pages may overlap.




## OpenAPI

````yaml /api-reference/explorer.openapi.yaml get /feed
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:
  /feed:
    get:
      tags:
        - payments
      summary: Payment stream, newest first
      description: >
        Keyset-paginated stream of classified x402 payments. Filters combine
        with AND. Follow

        `nextCursor` for the next page; its absence means the last page. A
        cursor is bound to its

        ordering only — changing filters with an old cursor is safe but pages
        may overlap.
      operationId: getFeed
      parameters:
        - name: network
          in: query
          schema:
            type: string
          description: CAIP-2 network id
          example: stellar:testnet
        - name: asset
          in: query
          schema:
            type: string
            pattern: ^C[A-Z2-7]{55}$
          description: >
            SAC contract address — filters to payments settled in that asset
            (the stable key;

            never a code string). Combinable with every other filter; supply it
            on every page

            alongside `cursor`, like seller=/buyer=.
        - name: scheme
          in: query
          schema:
            type: string
            enum:
              - exact
              - upto
        - name: seller
          in: query
          schema:
            type: string
          description: Seller (payTo) address
        - name: buyer
          in: query
          schema:
            type: string
          description: Buyer address (G… or C…)
        - name: facilitator
          in: query
          schema:
            type: string
          description: Facilitator registry id, e.g. `rail402`, `x402-org`
        - name: confidence
          in: query
          schema:
            type: string
            enum:
              - rail402
              - verified-facilitator
              - x402-shaped
        - name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
        - name: cursor
          in: query
          schema:
            type: string
          description: Opaque keyset cursor from a previous page's `nextCursor`
      responses:
        '200':
          description: One page of payments
          content:
            application/json:
              schema:
                type: object
                required:
                  - items
                properties:
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/Payment'
                  nextCursor:
                    type: string
                    description: Present unless this is the last page
        '400':
          $ref: '#/components/responses/InvalidQuery'
components:
  schemas:
    Payment:
      type: object
      required:
        - network
        - epoch
        - ledger
        - txHash
        - scheme
        - buyer
        - seller
        - amount
        - amountDecimal
        - assetContract
        - txSource
        - facilitator
        - confidence
        - closedAt
      properties:
        network:
          type: string
          description: CAIP-2 network id
          example: stellar:testnet
        epoch:
          type: string
          description: >
            Chain-epoch discriminator. Testnet resets restart ledger numbering;
            rows never join

            across epochs. Treat (network, epoch, txHash) as the unique key.
        ledger:
          type: integer
        txHash:
          type: string
          example: c827992c48bfe911a9b68abcef62e135b2b9555e5211f5c0ea0cdecb3aa8d558
        scheme:
          type: string
          enum:
            - exact
            - upto
        buyer:
          type: string
          description: The paying account (G… classic or C… smart contract account)
        seller:
          type: string
          description: The payTo address that received the payment
        amount:
          type: string
          description: >-
            Stroop-scale integer string of what actually moved. "0" is legal
            (upto nonce burn).
          example: '3500000'
        amountDecimal:
          type: string
          description: 7-decimal display form. Never do arithmetic on this.
          example: '0.35'
        ceiling:
          type: string
          description: upto only — the client-authorized maximum
          example: '10000000'
        ceilingDecimal:
          type: string
          example: '1'
        assetContract:
          type: string
          description: The SAC (token contract) the transfer happened on
          example: CBIELTK6YBZJU5UP2WWQEUCYKLPU6AUNZ2BQ4WWFEIE3USCIHMXQDAMA
        asset:
          type: string
          description: >-
            SEP-11 asset string ("native" or "CODE:ISSUER"). Absent on
            Horizon-backfilled rows.
          example: USDC:GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5
        assetCode:
          type: string
          description: >-
            Display code derived from `asset` (native → XLM). Absent when
            `asset` is.
          example: USDC
        txSource:
          type: string
          description: >-
            The account that submitted the transaction (facilitator
            signer/channel)
        feeSource:
          type: string
          description: Fee-bump fee source, when the envelope was fee-bumped
        feeChargedStroops:
          type: string
          description: Net fee the submitter actually paid (charge minus refund)
          example: '23086'
        facilitator:
          oneOf:
            - type: 'null'
            - type: object
              required:
                - id
              properties:
                id:
                  type: string
                  example: rail402
                displayName:
                  type: string
                  example: Rail402
          description: >-
            The attributed facilitator, or null when unknown (confidence
            x402-shaped)
        confidence:
          type: string
          enum:
            - rail402
            - verified-facilitator
            - x402-shaped
        sigExpirationLedger:
          type: integer
          description: The buyer authorization's signatureExpirationLedger
        memo:
          type: string
        muxedId:
          type: string
          description: Destination muxed id when the transfer used a muxed account
        closedAt:
          type: string
          format: date-time
          description: Ledger close time
        serviceName:
          type: string
          description: Bazaar enrichment — WHAT was bought, when the seller is cataloged
        resource:
          type: string
          description: Bazaar enrichment — the resource URL
    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

````