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

# 查询订阅计划详情

> 查询订阅计划详情

## 概述

本页说明 `GET /open/institution/v1/plan/detail` 接口。完整的请求参数、响应结构与示例由上方关联的 OpenAPI 定义渲染。

## 说明

* 认证方式使用 GatePay 标准签名请求头。
* 本页展示同一接口的机构路径版本。
* 除创建子账户、查询子账户详情、分页查询子账户外，机构侧请求需携带 `X-GatePay-On-Behalf-Of`。
* 通用签名规则请参见 [/api-reference/version/100/cn/common/securityAndSignature](/api-reference/version/100/cn/common/securityAndSignature)。


## OpenAPI

````yaml api-reference/version/100/cn/openapi/institution/subscription/planDetail-openapi.json GET /open/institution/v1/plan/detail
openapi: 3.1.0
info:
  title: GatePay 机构订阅 API
  description: GatePay 支付平台 API 接口文档
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://openplatform.gateapi.io/pay-subscription
security: []
paths:
  /open/institution/v1/plan/detail:
    get:
      summary: 查询订阅计划详情
      description: 查询订阅计划详情
      parameters:
        - $ref: '#/components/parameters/X-GatePay-Certificate-ClientId'
        - $ref: '#/components/parameters/X-GatePay-Signature'
        - $ref: '#/components/parameters/X-GatePay-Timestamp'
        - $ref: '#/components/parameters/X-GatePay-Nonce'
        - $ref: '#/components/parameters/X-GatePay-On-Behalf-Of'
        - $ref: '#/components/parameters/planDetail_planNo'
        - $ref: '#/components/parameters/planDetail_merchantPlanNo'
      responses:
        '200':
          description: 查询订阅计划详情成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateSubscriptionPlanResponse'
              examples:
                successResponse:
                  summary: 成功响应
                  value:
                    code: '0'
                    message: ''
                    data:
                      merchantPlanNo: plan031004
                      planNo: '63784604430893064'
                      planName: Plan 01
                      planDesc: Plan Description 01
                      merchantId: '10002'
                      productNo: '2'
                      productName: Tencent
                      priceNo: '3'
                      priceName: Weekly
                      cryptoCurrency: USDT
                      cryptoAmount: '5'
                      fiatCurrency: null
                      fiatAmount: '0'
                      period: WEEK
                      interval: 1
                      trialDays: 97
                      totalPayCount: 65
                      endTime: null
                      planStatus: 'on'
                      authorizedAmount: '331.95'
                      promoAmount: '0'
                      promoRate: '0.1'
                      createTime: 1773099791000
                      updateTime: 1773099791000
                    success: true
components:
  parameters:
    X-GatePay-Certificate-ClientId:
      name: X-GatePay-Certificate-ClientId
      in: header
      required: true
      description: 商户客户端ID，在 GatePay 平台申请获得
      schema:
        type: string
        example: 4186d0c6-6a35-55a9-8dc6-5312769dbff8
    X-GatePay-Signature:
      name: X-GatePay-Signature
      in: header
      required: true
      description: HMAC-SHA256签名，用于验证请求合法性
      schema:
        type: string
        example: >-
          672d5650dcc9bb22ebf25fa16c28d03c0e159d742a9176d4340a5da326d75dc8a2ec24c97fa6fc5d1533dd6e968863747e1d86a45e562cbe899f9ed7e9ca7f77
    X-GatePay-Timestamp:
      name: X-GatePay-Timestamp
      in: header
      required: true
      description: 时间戳（毫秒），与服务器时间差不能超过5分钟
      schema:
        type: string
        example: '1672905655498'
    X-GatePay-Nonce:
      name: X-GatePay-Nonce
      in: header
      required: true
      description: 随机数，用于防止重放攻击
      schema:
        type: string
        example: '9578'
    X-GatePay-On-Behalf-Of:
      name: X-GatePay-On-Behalf-Of
      in: header
      required: true
      schema:
        type: string
      description: >-
        必填代理归属请求头。请填写本次请求的发起方账户 ID；在机构代理商户 API 中通常填写目标子账户 ID，在机构代扣与划转接口中可填写机构账户
        ID 或子账户 ID。
    planDetail_planNo:
      name: planNo
      in: query
      required: false
      description: 平台订阅计划编号（与 merchantPlanNo 任选一个）
      schema:
        type: string
        example: '63784604430893064'
    planDetail_merchantPlanNo:
      name: merchantPlanNo
      in: query
      required: false
      description: 商户订阅计划编号（与planNo任选一个）
      schema:
        type: string
        example: PLAN_20240101_001
  schemas:
    CreateSubscriptionPlanResponse:
      type: object
      properties:
        code:
          type: string
          description: 响应码，0 表示成功
          example: '0'
        message:
          type: string
          description: 响应描述，成功时为空
          example: ''
        success:
          type: boolean
          description: 请求是否成功
          example: true
        data:
          type: object
          description: 响应数据
          properties:
            merchantPlanNo:
              type: string
              description: 商户订阅计划编号
              example: plan031004
            planNo:
              type: string
              description: 平台订阅计划编号
              example: '63784604430893064'
            planName:
              type: string
              description: 订阅计划名称
              example: 高级会员连续包月
            planDesc:
              type: string
              description: 订阅计划描述
              example: 尊享全站无广告及专属多项特权
            merchantId:
              type: string
              description: 创建订阅计划的商户编号
              example: M202308150001
            productNo:
              type: string
              description: 关联的产品编号
              example: PROD8899001
            productName:
              type: string
              description: 关联的产品名称
              example: VIP连续包月服务
            priceNo:
              type: string
              description: 关联的价格编号
              example: PRC445566
            priceName:
              type: string
              description: 关联的价格名称
              example: 基础月付价格
            cryptoCurrency:
              type: string
              description: 加密货币币种
              example: USDT
            cryptoAmount:
              type: string
              description: 加密货币金额
              example: '9.99'
            fiatCurrency:
              type: string
              description: 法币币种
              example: USD
            fiatAmount:
              type: string
              description: 法币金额
              example: '9.99'
            period:
              type: string
              description: 扣款周期
              example: MONTH
            interval:
              type: integer
              description: 扣款间隔
              example: 1
            trialDays:
              type: integer
              description: 试用天数
              example: 7
            totalPayCount:
              type: integer
              description: 扣款总次数
              example: 12
            endTime:
              type: integer
              description: 订阅结束时间(毫秒时间戳)
              example: 1735660799000
            planStatus:
              type: string
              description: 订阅计划状态：ACTIVE/INACTIVE
              example: ACTIVE
            authorizedAmount:
              type: string
              description: 授权额度，用户需授权的代币数量
              example: '100.00'
            promoAmount:
              type: string
              description: 首期特价金额
              example: '0.99'
            promoRate:
              type: string
              description: 首期特价百分比
              example: '10.00'
            updateTime:
              type: integer
              description: 最近更新时间(毫秒时间戳)
              example: 1704038400000

````