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

# 列出订单

> 分页列出当前组织的订单，并使用筛选条件缩小范围。

请使用属于目标组织的 API 密钥进行认证。


## OpenAPI

````yaml api-reference/openapi.json GET /v1/orders
openapi: 3.0.3
info:
  description: >-
    Stable, organization-scoped read API for merchant backends. Generated from
    the Merchant API implementation.
  title: Anyway Merchant API
  contact: {}
  version: '1.0'
  x-source: anyway-backend-go
servers:
  - url: https://merchant-api-prod.anyway.sh
security: []
paths:
  /v1/orders:
    get:
      tags:
        - orders
      summary: List orders
      description: >-
        Returns paginated orders for the org, including opaque metadata and
        payment-channel subscription attribution. Supports filtering by status,
        product_id, customer_id, subscription_id, provider, from_address,
        merchant_reference, and date range.
      parameters:
        - description: Page number
          name: page
          in: query
          schema:
            type: integer
            default: 1
        - description: Page size (max 100)
          name: size
          in: query
          schema:
            type: integer
            default: 20
        - description: Filter by display status (e.g. Paid, Pending, Refunded)
          name: status
          in: query
          schema:
            type: string
        - description: Filter by product ID
          name: product_id
          in: query
          schema:
            type: string
        - description: Filter by customer ID
          name: customer_id
          in: query
          schema:
            type: string
        - description: Filter by payment-channel identifier
          name: provider
          in: query
          schema:
            type: string
        - description: Filter by Anyway subscription ID (SUB_...)
          name: subscription_id
          in: query
          schema:
            type: string
        - description: Filter by buyer wallet address (crypto orders)
          name: from_address
          in: query
          schema:
            type: string
        - description: Filter by your correlation id (contains-match)
          name: merchant_reference
          in: query
          schema:
            type: string
        - description: Filter orders created after this unix timestamp
          name: date_from
          in: query
          schema:
            type: integer
        - description: Filter orders created before this unix timestamp
          name: date_to
          in: query
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/response.ApiResponse-merchantapi_PaginatedResponse-merchantapi_OrderResponse
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/response.ApiResponse-any'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/response.ApiResponse-any'
      security:
        - APIKeyAuth: []
components:
  schemas:
    response.ApiResponse-merchantapi_PaginatedResponse-merchantapi_OrderResponse:
      type: object
      properties:
        data:
          $ref: >-
            #/components/schemas/merchantapi.PaginatedResponse-merchantapi_OrderResponse
        error:
          $ref: '#/components/schemas/response.ErrorDetail'
        message:
          type: string
        success:
          type: boolean
    response.ApiResponse-any:
      type: object
      properties:
        data: {}
        error:
          $ref: '#/components/schemas/response.ErrorDetail'
        message:
          type: string
        success:
          type: boolean
    merchantapi.PaginatedResponse-merchantapi_OrderResponse:
      type: object
      properties:
        current:
          description: 'Deprecated: use page.'
          type: integer
          deprecated: true
        page:
          type: integer
        pages:
          type: integer
        records:
          type: array
          items:
            $ref: '#/components/schemas/merchantapi.OrderResponse'
        size:
          type: integer
        total:
          type: integer
    response.ErrorDetail:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
    merchantapi.OrderResponse:
      type: object
      properties:
        amount:
          type: number
        amountCents:
          type: integer
        amountRefunded:
          type: integer
        chain:
          type: string
        createdAt:
          type: string
        currency:
          type: string
        customerEmail:
          type: string
        customerId:
          type: string
        displayStatus:
          type: string
        disputed:
          type: boolean
        fromAddress:
          type: string
        fundsSettled:
          description: >-
            Whether card funds have settled and are eligible for payout.
            Nil/omitted for

            payment methods without a settlement lifecycle.
          type: boolean
        id:
          description: 'Deprecated: use orderId.'
          type: string
          deprecated: true
        merchantMetadata:
          type: object
          additionalProperties:
            type: string
        merchantReference:
          type: string
        note:
          type: string
        orderId:
          type: string
        orgId:
          type: string
        originalOrderId:
          type: string
        paymentLinkId:
          type: string
        productId:
          type: string
        productName:
          type: string
        refunded:
          type: boolean
        settledAvailableOn:
          description: >-
            Estimated time when funds should become available. Use fundsSettled
            as the

            authoritative payout-eligibility signal.
          type: string
        status:
          type: string
        subscriptionId:
          type: string
        txHash:
          type: string
        updatedAt:
          type: string
  securitySchemes:
    APIKeyAuth:
      description: 'Merchant API key (format: ak_BASE64)'
      type: apiKey
      name: X-API-Key
      in: header

````