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

# Payment History

> Get x402 payment history for a wallet address — paginated USDC transactions on Base with gate URLs, amounts, and timestamps per payment.

<RequestExample>
  ```bash theme={null}
  curl "https://xenarch.dev/v1/payments/history?wallet=0x1234...abcd&domain=example.com&limit=10"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  [
    {
      "url": "/premium-article",
      "domain": "example.com",
      "amount_usd": "0.003",
      "tx_hash": "0xdef456...abc789",
      "paid_at": "2026-04-10T14:35:00Z"
    }
  ]
  ```
</ResponseExample>

## Query parameters

| Parameter | Type    | Description                 |
| --------- | ------- | --------------------------- |
| `wallet`  | string  | Wallet address (required)   |
| `domain`  | string  | Filter by domain (optional) |
| `limit`   | integer | Max results (default 10)    |


## OpenAPI

````yaml GET /v1/payments/history
openapi: 3.1.0
info:
  title: Xenarch Platform
  version: 0.1.0
servers: []
security: []
paths:
  /v1/payments/history:
    get:
      tags:
        - payments
      summary: Get Payment History Endpoint
      description: Get payment history for an agent wallet. Public endpoint.
      operationId: get_payment_history_endpoint_v1_payments_history_get
      parameters:
        - name: wallet
          in: query
          required: true
          schema:
            type: string
            pattern: ^0x[0-9a-fA-F]{40}$
            title: Wallet
        - name: domain
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Domain
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            default: 10
            title: Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PaymentHistoryResponse'
                title: Response Get Payment History Endpoint V1 Payments History Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    PaymentHistoryResponse:
      properties:
        url:
          type: string
          title: Url
        domain:
          type: string
          title: Domain
        amount_usd:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Amount Usd
        tx_hash:
          type: string
          title: Tx Hash
        paid_at:
          type: string
          format: date-time
          title: Paid At
      type: object
      required:
        - url
        - domain
        - amount_usd
        - tx_hash
        - paid_at
      title: PaymentHistoryResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````