> ## 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/subscriptions
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/subscriptions:
    get:
      tags:
        - subscriptions
      summary: List subscriptions
      description: >-
        Returns paginated subscriptions for the org. Supports filtering by
        status and customer_id.
      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 status (ACTIVE, CANCELED, PAUSED, EXPIRED, ENDED)
          name: status
          in: query
          schema:
            type: string
        - description: Filter by customer ID
          name: customer_id
          in: query
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/response.ApiResponse-merchantapi_PaginatedResponse-merchantapi_SubscriptionResponse
        '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_SubscriptionResponse:
      type: object
      properties:
        data:
          $ref: >-
            #/components/schemas/merchantapi.PaginatedResponse-merchantapi_SubscriptionResponse
        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_SubscriptionResponse:
      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.SubscriptionResponse'
        size:
          type: integer
        total:
          type: integer
    response.ErrorDetail:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
    merchantapi.SubscriptionResponse:
      type: object
      properties:
        amountCents:
          type: integer
        billingInterval:
          type: string
          enum:
            - DAY
            - MONTH
            - YEAR
        cancelAtPeriodEnd:
          type: boolean
        canceledAt:
          type: string
        createdAt:
          type: string
        currency:
          type: string
        currentPeriodEnd:
          type: string
        customerEmail:
          type: string
        customerId:
          type: string
        endedAt:
          type: string
        id:
          description: 'Deprecated: use subscriptionId.'
          type: string
          deprecated: true
        initialOrderId:
          type: string
        latestOrderId:
          type: string
        productId:
          type: string
        productName:
          type: string
        status:
          type: string
        subscriptionId:
          type: string
        updatedAt:
          type: string
  securitySchemes:
    APIKeyAuth:
      description: 'Merchant API key (format: ak_BASE64)'
      type: apiKey
      name: X-API-Key
      in: header

````