> ## 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.

# Credit Card Subscription — Subscription Query

> Credit Card Subscription — Subscription Query endpoint (POST /subscription/query) with request parameters including subscriptionNo, signature verification, and response status.

> [!NOTE]
>
> All example requests on this page are based on the **sandbox (test) environment**. Please be careful to distinguish it from the production environment.

#### Secret Key & Private Key (Generate Signature)

## Related Topics

* [Subscription Payment API](https://doc.haipay.net/en/history/V20260701/payments/subscriptions/overview.md)
* [HaiPay API Reference Overview](https://doc.haipay.net/en/history/V20260701/api-reference/overview.md)
* [HaiPay Configuration and Signature Guide](https://doc.haipay.net/en/history/V20260701/guide/config_settings_and_signature_rules_guide.md)
* [Look Up API Response Structure and Error Codes](https://doc.haipay.net/en/history/V20260701/guide/error_response_appendix.md)


## OpenAPI

````yaml docs/en/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: Subscription Query
      description: 查询订阅订单
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                appId:
                  type: integer
                  description: >-
                    Business ID (obtained from the backend, must pass the
                    corresponding business ID according to the currency in the
                    URL)
                subscriptionNo:
                  type: string
                  description: Platform subscription ID
                sign:
                  type: string
                  description: Signature
              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: '1: Normal, 0: Exception'
                  error:
                    type: string
                    description: Error code
                  msg:
                    type: string
                    description: Error description
                  data:
                    type: object
                    description: ''
                    properties:
                      subscriptionOrderId:
                        type: string
                        description: Merchant subscription ID (must be unique)
                      subscriptionNo:
                        type: string
                        description: Platform subscription ID
                      appId:
                        type: string
                        description: Business ID
                      subject:
                        type: string
                        description: Payment note
                      currency:
                        type: string
                        description: Currency
                      payType:
                        type: string
                        description: Subscription fixed as SUBSCRIPTION
                      inBankCode:
                        type: string
                        description: Bank code
                      amount:
                        type: string
                        description: Deduction amount
                      recurringInterval:
                        type: string
                        description: Recurring cycle W, M, Y
                      recurringIntervalCount:
                        type: string
                        description: Recurring cycle interval
                      status:
                        type: string
                        description: '1: Normal, 0: Exception'
                      deductList:
                        type: array
                        description: Deduction list
                        items:
                          type: object
                          properties:
                            deductNo:
                              type: string
                              description: Subscription deduction ID
                            amount:
                              type: string
                              description: Deduction amount
                            status:
                              type: integer
                              description: '1: Normal, 0: Exception'
                            orderNo:
                              type: string
                              description: Platform order ID
                            startTime:
                              type: string
                              description: Subscription deduction cycle - start time
                            endTime:
                              type: string
                              description: Subscription deduction cycle - end time
                          required:
                            - deductNo
                            - amount
                            - status
                            - orderNo
                            - startTime
                            - endTime
                      sign:
                        type: string
                        description: Signature
                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==
              example:
                status: '1'
                error: '00000000'
                msg: success
                data:
                  subscriptionOrderId: '6022111516571001'
                  subscriptionNo: ''
                  appId: '1054'
                  subject: ''
                  currency: USD
                  payType: ''
                  inBankCode: ''
                  amount: '100.00'
                  recurringInterval: ''
                  recurringIntervalCount: ''
                  status: '1'
                  deductList:
                    - deductNo: ''
                      amount: '100.00'
                      status: 1
                      orderNo: '6023071013539074'
                      startTime: ''
                      endTime: ''
                  sign: >-
                    af0gAHkUOyYHu9owQp8NJ4mPEeUW4vuJcjdxqLIzrVw8AvpLSjD1DXupReSG/CyuSkFRyiIvCp5u703AuGGmfgD2gKDH3Ywau41bAbG2jnHJ8mtjiSJ5iWUzanyd4Kr7d1+rETbzUl7/BkW3t0X8UUFdqpxwG8DPUjAwUKfplWDHV7koG51Ozexd80DCsmW6eWdouAZ1uNXGLYmV3ftE3BmfNRtuv1C5bfTJWrTEIOxbF6g2uYOFZTlIgrQgd7/2PsAYwQQXNz8Q8CYl4OxqCv4pXJxaLWPbR5tqZu9og5kn32C9aHW/NlU1y39vzz+4ef81yPAqUV9oHlSMSPrMmw==
      deprecated: false
      security: []

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.