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

# Webhook事件列表 V1

> 查询通过接口指定 callback_url 创建的 webhook v1版本事件

查询通过接口指定 callback\_url 创建的 webhook v1版本事件


## OpenAPI

````yaml openapi/v1-zh.yaml GET /api/v1/webhook-event
openapi: 3.0.3
info:
  title: Subotiz API
  description: Subotiz OpenAPI
  version: 1.0.0
servers:
  - url: https://{api}.subotiz.com
    variables:
      api:
        default: api
security:
  - sec0: []
tags:
  - name: 折扣
    description: 折扣
  - name: 发票
    description: 发票
  - name: 退款
    description: 退款
  - name: 商品管理
    description: 商品管理
  - name: 订阅
    description: 订阅
  - name: 商品定价
    description: 商品定价方案
  - name: 交易单
    description: 交易单
  - name: 支付流水
    description: 支付流水
  - name: 结账会话
    description: 结账会话
  - name: 顾客
    description: 顾客
  - name: 顾客门户
    description: 顾客门户
  - name: Webhook
    description: Webhook
  - name: 争议
    description: 争议订单
paths:
  /api/v1/webhook-event:
    get:
      tags:
        - Webhook
      summary: Webhook事件列表 V1
      description: 查询通过接口指定 callback_url 创建的 webhook v1版本事件
      operationId: v1-webhook-list-webhook-event
      parameters:
        - name: business_ids
          in: query
          description: 业务实体ID数组，筛选事件的业务实体ID属于此数组的Webhook事件
          schema:
            type: array
            items:
              type: string
        - name: event_type
          in: query
          description: 事件类型数组，筛选事件类型属于此数组的Webhook事件
          schema:
            type: array
            items:
              type: string
        - name: event_status
          in: query
          description: 事件状态数组，筛选事件状态属于此数组的Webhook事件
          schema:
            type: array
            items:
              type: string
        - name: starting_after
          in: query
          description: >-
            用于分页的游标。`starting_after` 是定义您在列表中位置的对象
            ID。例如，如果想获取下一页，可以在第一次获取对象列表之后，使用最后一个对象的 id 作为参数值。不能和 `ending_before
            同时使用
          schema:
            type: string
        - name: ending_before
          in: query
          description: >-
            用于分页的游标 `ending_before` 是定义您在列表中位置的对象
            ID。例如，如果想获取上一页，可以在第一次获取对象列表之后，使用第一个对象的 id 作为参数值。不能和 `starting_after`
            同时使用
          schema:
            type: string
        - name: limit
          in: query
          description: 分页参数，每页数量，默认：10，接口默认按创建时间倒序排序。限制：[1, 100]
          schema:
            type: integer
            format: int32
        - $ref: '#/components/parameters/HeaderRequestID'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListWebhookEventResponse'
      deprecated: true
components:
  parameters:
    HeaderRequestID:
      name: Request-Id
      in: header
      description: 请求的唯一标识符
      required: true
      schema:
        type: string
        default: 008e3967-a1b5-48bb-be14-d5bff5092e61
  schemas:
    ListWebhookEventResponse:
      type: object
      properties:
        code:
          type: string
          description: error code
        message:
          type: string
          description: error message
        data:
          $ref: '#/components/schemas/ListWebhookEventResponse_Data'
    ListWebhookEventResponse_Data:
      type: object
      properties:
        has_more:
          type: boolean
          description: 是否还有更多数据
        list:
          type: array
          items:
            $ref: '#/components/schemas/WebhookEvent'
          description: Webhook事件列表
    WebhookEvent:
      type: object
      properties:
        id:
          type: string
          description: Webhook事件的唯一ID
        business_id:
          type: string
          description: 事件关联的业务实体ID
        event_type:
          type: string
          description: |-
            事件类型
            - invoice.payment_failed: 发票支付失败时触发
            - invoice.paid: 发票支付成功时触发
            - subscription.trial_period_expiring: 订阅试用期即将过期时触发
            - subscription.first: 订阅首次支付成功时触发
            - subscription.canceled: 订阅取消时触发
            - subscription.price_changed: 订阅价格改变时触发
            - trades.succeeded: 交易单支付成功时候触发
            - trades.payment_failed: 交易单支付失败时触发
            - refunds.succeeded: 退款成功时触发
            - refunds.failed: 退款失败时触发
        event_status:
          type: string
          description: |-
            事件送达状态
            - pending: 事件送达处理中
            - success: 事件成功送达
            - failed: 事件送达失败
        url:
          type: string
          description: Webhook回调URL
        content:
          type: string
          description: Webhook事件内容，JSON格式字符串
  securitySchemes:
    sec0:
      type: http
      description: 'Bearer API Key 鉴权。格式：Authorization: Bearer {your_api_key}'
      scheme: bearer

````