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

# Subscription Cancel

> Cancel subscription

<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">Secret Key & Private Key (Generate Signature)</h4>
    </div>

    <div />
  </div>

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

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

## Related Topics

* [Subscription Payment API](/docs/en/api/version2/Subscription)
* [HaiPay API Reference Overview](/docs/en/api-reference/overview)
* [HaiPay Configuration and Signature Guide](/docs/en/guide/config_settings_and_signature_rules_guide)


## OpenAPI

````yaml docs/en/api-reference/subscription/subscription.openapi.json POST /subscription/cancel
openapi: 3.0.1
info:
  title: 默认模块
  description: ''
  version: 1.0.0
servers:
  - url: https://uat-interface.haipay.asia
    description: 测试-interface
security: []
tags: []
paths:
  /subscription/cancel:
    post:
      tags: []
      summary: Subscription Cancel
      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'
                    example: '1'
                  error:
                    type: string
                    description: Error code
                    example: '00000000'
                  msg:
                    type: string
                    description: Error description
                    example: ''
                  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
                      payType:
                        type: string
                        description: Subscription fixed as SUBSCRIPTION
                        example: SUBSCRIPTION
                      inBankCode:
                        type: string
                        description: Bank code
                      status:
                        type: string
                        description: >-
                          Subscription status (-1: Error, 1: Processing, 2:
                          Success, 3: Failed, 4: Canceled)
                        enum:
                          - '-1'
                          - '1'
                          - '2'
                          - '3'
                          - '4'
                      sign:
                        type: string
                        description: Signature
                    additionalProperties: false
                additionalProperties: false
              example:
                status: '1'
                error: '00000000'
                msg: ''
                data:
                  appId: 1724
                  subscriptionNo: '4025011311423010028'
                  status: '4'
                  payType: SUBSCRIPTION
                  inBankCode: CREDIT_CARD
                  sign: >-
                    lynHvI+9JhVbhwHiinJGlDEq7CVU67WkNUsNURs1wu4bI2/2ePVORGqbVdnaU+L9qV4JN35gM2hHadn4pye/Xk+iztLVSbDh5F9XpKAmLeLCcYj+II0pt4Eo4QPxnYJjmMzbDu6fdWgjgi/go2M75N7Fqv2QgV/tIu1O2pe4/LRPe3l/IODvW+ppvbf5FHk5hO2AaLUX/Fn7H0MIv6kcKAhu7ImBrNpF79VPj9YC1qXghJE11q4aHx7xfDDCn4GiqDJBXbzLtqGP6cS2CVXlyLxGziKDxM1+Bv02XNbjzYKwcaS1VDNfmzlglVH+GHZcgVpiEa3u4ffezu2NN2B4Yg==
          headers: {}
      deprecated: false
      security: []

````