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

# Recent receipts

> Free. The most recent settled payments this process has seen, newest first, each with its HashScan link and, when the seller publishes to HCS, the topic sequence number of the receipt message. This ring is in memory and bounded by uptime; the permanent record is the receipts topic named in the manifest, which ReceiptLedger.audit() cross-checks against the mirror node.



## OpenAPI

````yaml /openapi.yaml get /receipts
openapi: 3.1.0
info:
  title: Agora402 seller API
  version: 1.0.0
  description: >-
    HTTP API served by every Agora402 seller: free discovery documents, a free
    quote endpoint, and paid endpoints gated by x402 and settled on Hedera
    through the Blocky402 facilitator. Typical agent flow: getManifest (what is
    sold, at what price, paid to which account) -> requestQuote (lock a signed
    price, counter below list if you like) -> call the paid endpoint with the
    quoteId. The first call answers 402 with a PAYMENT-REQUIRED header; the
    retry carries PAYMENT-SIGNATURE; the response carries PAYMENT-RESPONSE with
    the Hedera transaction id. Then read listReceipts or the seller's HCS
    receipts topic to audit what was charged. All amounts are decimal strings in
    atomic units of the asset (tinybars for HBAR, 8 decimals); timestamps are
    ISO 8601 unless stated; quote expiry is unix seconds.
servers:
  - url: http://localhost:4402
    description: Local services seller (npm run dev)
  - url: http://localhost:4404
    description: Local auditor (npm run dev)
security: []
tags:
  - name: Discovery
    description: Free documents that describe the seller. Read these before paying anyone.
  - name: Negotiation
    description: Free, signed, time-limited price quotes.
  - name: Paid services
    description: x402-gated endpoints. Every call is a Hedera micropayment.
  - name: Trust
    description: Paid audits of other sellers, attested on the HCS audit topic.
  - name: Receipts
    description: What this seller has been paid for.
paths:
  /receipts:
    get:
      tags:
        - Receipts
      summary: Recent receipts
      description: >-
        Free. The most recent settled payments this process has seen, newest
        first, each with its HashScan link and, when the seller publishes to
        HCS, the topic sequence number of the receipt message. This ring is in
        memory and bounded by uptime; the permanent record is the receipts topic
        named in the manifest, which ReceiptLedger.audit() cross-checks against
        the mirror node.
      operationId: listReceipts
      parameters:
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 200
            default: 50
          description: Number of receipts to return, capped at 200
      responses:
        '200':
          description: Receipts
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReceiptsResponse'
              example:
                receipts:
                  - receipt:
                      v: 1
                      type: receipt
                      seller: >-
                        uaid:aid:2NEpo7TZRRrLZSi2U;uid=agora-demo-seller;registry=agora402;proto=a2a;nativeId=hedera:testnet:0.0.5001234;domain=localhost:4402
                      transactionId: 0.0.4009876@1789560131.552341000
                      network: hedera:testnet
                      payer: 0.0.4009876
                      payTo: 0.0.5001234
                      asset: 0.0.0
                      amount: '60000'
                      resource: /v1/infer
                      quoteId: q_5f1c2a9b7d3e4c6a8b0f1e2d
                      usage:
                        provider: groq
                        model: llama-3.3-70b-versatile
                        inputTokens: 21
                        outputTokens: 27
                      responseHash: >-
                        6a1f0c3e9b2d4a7c8e5f1b0d2c3a4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d
                      issuedAt: '2026-09-13T12:35:33.910Z'
                    hashscanTxUrl: >-
                      https://hashscan.io/testnet/transaction/0.0.4009876@1789560131.552341000
                    hcs:
                      transactionId: 0.0.5001234@1789560134.001200000
                      sequenceNumber: 118
                      topicUrl: https://hashscan.io/testnet/topic/0.0.6009999
components:
  schemas:
    ReceiptsResponse:
      type: object
      required:
        - receipts
      properties:
        receipts:
          type: array
          items:
            $ref: '#/components/schemas/StoredReceipt'
    StoredReceipt:
      type: object
      required:
        - receipt
        - hashscanTxUrl
      properties:
        receipt:
          $ref: '#/components/schemas/Receipt'
        hashscanTxUrl:
          type: string
          format: uri
        hcs:
          description: >-
            HCS publication result, filled in asynchronously; absent while
            pending or when receipts stay in memory
          oneOf:
            - type: object
              title: published
              required:
                - transactionId
                - sequenceNumber
                - topicUrl
              properties:
                transactionId:
                  type: string
                sequenceNumber:
                  type: integer
                topicUrl:
                  type: string
                  format: uri
            - type: object
              title: failed
              required:
                - error
              properties:
                error:
                  type: string
    Receipt:
      type: object
      description: Written to the receipts topic after every settled payment
      required:
        - v
        - type
        - seller
        - transactionId
        - network
        - payer
        - payTo
        - asset
        - amount
        - resource
        - usage
        - issuedAt
      properties:
        v:
          type: integer
          enum:
            - 1
        type:
          type: string
          enum:
            - receipt
        seller:
          $ref: '#/components/schemas/Uaid'
        transactionId:
          type: string
          description: Hedera transaction id of the settlement, 0.0.x@seconds.nanos
        network:
          $ref: '#/components/schemas/Network'
        payer:
          $ref: '#/components/schemas/HederaEntityId'
          description: Buyer account debited
        payTo:
          $ref: '#/components/schemas/HederaEntityId'
          description: Seller account credited
        asset:
          $ref: '#/components/schemas/HederaEntityId'
        amount:
          $ref: '#/components/schemas/Amount'
        resource:
          type: string
          description: Path that was paid for
        quoteId:
          type: string
        usage:
          type: object
          additionalProperties: true
          description: Metering evidence copied from the x-agora-usage response header
        responseHash:
          type: string
          description: sha256 hex of the response body delivered
        issuedAt:
          type: string
          format: date-time
    Uaid:
      type: string
      pattern: '^uaid:'
      description: HCS-14 universal agent id
      example: >-
        uaid:aid:2NEpo7TZRRrLZSi2U;uid=agora-demo-seller;registry=agora402;proto=a2a;nativeId=hedera:testnet:0.0.5001234;domain=localhost:4402
    Network:
      type: string
      enum:
        - hedera:testnet
        - hedera:mainnet
      description: CAIP-2 network id
    HederaEntityId:
      type: string
      pattern: ^\d+\.\d+\.\d+$
      description: Hedera entity id, shard.realm.num
      example: 0.0.5001234
    Amount:
      type: string
      pattern: ^\d+$
      description: >-
        Atomic units of the asset as a decimal string (tinybars for HBAR). Never
        a float.
      example: '60000'

````