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

# 查询订阅

> 查询订阅订单

<div class="flex flex-col gap-4">
  <div class="api-section-heading flex flex-col gap-y-4 w-full">
    <div class="flex items-baseline border-b pb-2.5 border-gray-100 dark:border-gray-800 w-full">
      <h4 class="api-section-heading-title flex-1 mb-0">密钥私钥(生成签名)</h4>
    </div>

    <div />
  </div>

  <input id="secret-key" placeholder="密钥" class="px-3 py-2 border rounded-md" />

  <input id="private-key" placeholder="私钥" class="px-3 py-2 border rounded-md" />
</div>

## 相关主题

* [订阅支付接口](/docs/zh/V20260701/api/version2/Subscription)
* [HaiPay API 文档简介](/docs/zh/api-reference/overview)
* [HaiPay 配置与签名指南](/docs/zh/guide/config_settings_and_signature_rules_guide)


## OpenAPI

````yaml docs/zh/api-reference/subscription/subscription.openapi.json POST /subscription/query
openapi: 3.0.1
info:
  title: 默认模块
  description: ''
  version: 1.0.0
servers:
  - url: https://uat-interface.haipay.asia
    description: 测试-interface
security: []
tags: []
paths:
  /subscription/query:
    post:
      tags: []
      summary: 查询订阅
      description: 查询订阅订单
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                appId:
                  type: integer
                  description: 业务ID（后台获取，需要根据URL中的币种传递对应的业务ID）
                subscriptionNo:
                  type: string
                  description: 平台订阅号
                sign:
                  type: string
                  description: 签名
              required:
                - appId
                - subscriptionNo
                - sign
              additionalProperties: false
            example:
              appId: 1724
              sign: >-
                gETp00ngwiG0qPVcpldPGEsWRCShOJUbwxWizbL9xGbWCtlBsTPFshQtClLtBCRAdhoVNZAD7UQXjdiAsr74neYu1akj1a6d3sNapGaqoTdBgykXyr1hLVe14AIUhLRg0Mj2elOlMPiWMdccSC+i4G/lfPpJLpS/T08S8qttExTOjML5Rrny5jNsYedjf+Jo3jrPsLcfZFX3QrWA4txPG+x7ZrShXUonOiZMoH6hwU8PcETrC0vpGqTwySJ6siS2AwyPOZElR6nf3geIx7GAllFUuZSyjCvRDE+9JeZl5Y2Ohlm9xcRxqHgMi4YB3jSJcwo7GqGqnPapZnO2GvcbGw==
              subscriptionNo: '4025011311423010028'
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: 状态码
                  error:
                    type: string
                    description: 错误码
                  msg:
                    type: string
                    description: 返回信息
                  data:
                    type: object
                    properties:
                      subscriptionOrderId:
                        type: string
                        description: 商户订阅号(必须保证唯一性)
                      subscriptionNo:
                        type: string
                        description: 平台订阅号
                      appId:
                        type: string
                        description: 业务ID
                      subject:
                        type: string
                        description: 支付备注
                      currency:
                        type: string
                        description: 币种
                      payType:
                        type: string
                        description: 订阅固定为SUBSCRIPTION
                      inBankCode:
                        type: string
                        description: 银行编码
                      amount:
                        type: string
                        description: 金额
                      recurringInterval:
                        type: string
                        description: 循环周期 W,M,Y
                      recurringIntervalCount:
                        type: string
                        description: 循环周期间隔
                      status:
                        type: string
                        description: '订阅状态(-1: 订阅异常, 1: 处理中, 2: 订阅成功, 3: 订阅失败, 4: 订阅取消)'
                      deductList:
                        type: array
                        description: 扣款列表
                        items:
                          type: object
                          properties:
                            deductNo:
                              type: string
                              description: 订阅扣款号
                            amount:
                              type: string
                              description: 扣款金额
                            status:
                              type: integer
                              description: 扣款状态(0未开始,1扣款中,2扣款成功,3扣款失败)
                            orderNo:
                              type: string
                              description: 支付备注
                            startTime:
                              type: string
                              description: 订阅扣款周期-起始时间
                            endTime:
                              type: string
                              description: 订阅扣款周期-结束时间
                          required:
                            - deductNo
                            - amount
                            - status
                            - orderNo
                            - startTime
                            - endTime
                      sign:
                        type: string
                        description: 签名
              example:
                status: '1'
                error: '00000000'
                msg: ''
                data:
                  subscriptionOrderId: '1736739758574'
                  subscriptionNo: '4025011311423010028'
                  appId: 1724
                  subject: Test subscription
                  payType: SUBSCRIPTION
                  inBankCode: CREDIT_CARD
                  amount: 0.5
                  recurringInterval: D
                  recurringIntervalCount: 1
                  status: '2'
                  deductList:
                    - deductNo: '4125011311423010028'
                      amount: '0.99'
                      status: 2
                      orderNo: '2025011311423010028'
                      startTime: '2024-12-18 09:25:11'
                      endTime: '2024-12-25 09:25:11'
                  sign: >-
                    fscM1XiVPqDb/NxrZuVv33zvqFxsXsKri6+MzIsWqdMlcsa7E3ayGNHg6ChiVxFVdow3NAlmg4szGXp0AtvOLDdQ/BAfC8DWpbktjDXeiEQ7ma1/ZKsmVrrLHzF01B5UI33xYX+qMsjMQ/yJBHwY1LTOhPq3lIwShwhB92CCd6IfPPkSi1EPDL6QLKAll3NNRVUw3vktIx+ghePojrmkgOesD7ujCPlXPjvznJ4o99BFhwPr6i+a0w++ZvfoE/NuClTCP4mf1n4umnw70GqHDv3OfwVk9FeE27SC/TMJIgVJiVc9L3o+mJNUyaIT3o9EyKkfUl+lNsz1KnUyfjycUg==
      deprecated: false
      security: []

````