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

# Cancel Subscription Update

> Cancel a pending subscription plan update that has not taken effect yet.



## OpenAPI

````yaml POST /subscription/{id}/update/cancel
openapi: 3.1.0
info:
  title: Clink API
  description: >-
    Official API documentation for Clink's payment processing platform. This API
    enables merchants to create and manage payment sessions, handle
    subscriptions, and process transactions.
  version: 1.0.0
servers:
  - url: https://uat-api.clinkbill.com/api/
security:
  - ApiKeyAuth: []
paths:
  /subscription/{id}/update/cancel:
    post:
      tags:
        - Subscription API
      summary: Cancel Subscription Update
      description: Cancel a pending subscription plan update that has not taken effect yet.
      operationId: cancelSubscriptionUpdate
      parameters:
        - $ref: '#/components/parameters/TimestampHeader'
        - name: id
          in: path
          description: Unique identifier of the subscription
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Pending subscription update canceled successfully
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SubscriptionApiResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionApiResponse'
              examples:
                canceledUpdate:
                  summary: Canceled pending update
                  value:
                    code: 200
                    msg: success
                    data:
                      subscriptionId: sub_xxxxx
                      customerId: cus_xxxxx
                      productId: prod_xxxx
                      priceId: price_xxxx
                      priceSnapshotId: priceSnapshotId_xxxx
                      quantity: 1
                      paymentMethodType: CARD
                      paymentInstrumentId: pi_xxxxx
                      status: active
                      billing: charge_automatically
                      currency: USD
                      currentPeriodStart: 1752654041000
                      currentPeriodEnd: 1755332441000
        '401':
          description: Unauthorized
          content:
            '*/*':
              schema:
                type: string
components:
  parameters:
    TimestampHeader:
      name: X-Timestamp
      in: header
      required: true
      description: >-
        Current timestamp in milliseconds since Unix epoch (required for request
        signing)
      schema:
        type: string
        example: '1783513683000'
  schemas:
    SubscriptionApiResponse:
      type: object
      properties:
        code:
          type: integer
          format: int32
        msg:
          type: string
        data:
          $ref: '#/components/schemas/SubscriptionApiData'
    SubscriptionApiData:
      required:
        - billing
        - createTime
        - customerId
        - paymentInstrumentId
        - paymentMethodType
        - priceId
        - priceSnapshotId
        - productId
        - quantity
        - recurringInvoiceItem
        - status
        - subscriptionId
      type: object
      properties:
        merchantReference:
          type: string
        subscriptionId:
          type: string
        sessionId:
          type: string
        customerId:
          type: string
        productId:
          type: string
        priceId:
          type: string
        priceSnapshotId:
          type: string
        createTime:
          type: integer
          format: int64
        quantity:
          type: integer
          format: int32
        paymentMethodType:
          type: string
        paymentInstrumentId:
          type: string
        trialStart:
          type: integer
          format: int64
        trialEnd:
          type: integer
          format: int64
        currentPeriodStart:
          type: integer
          format: int64
        currentPeriodEnd:
          type: integer
          format: int64
        cancelAt:
          type: integer
          format: int64
        cancelAtPeriodEnd:
          type: boolean
        canceledAt:
          type: integer
          format: int64
        cancelReason:
          type: string
        status:
          type: string
        billing:
          type: string
        currency:
          type: string
          enum:
            - USD
            - EUR
            - JPY
            - GBP
            - AUD
            - CAD
            - CNY
            - HKD
            - SGD
            - KRW
            - AED
            - THB
            - IDR
            - PHP
            - MYR
            - BRL
            - INR
        recurringInvoiceItem:
          $ref: '#/components/schemas/InvoiceItemVo'
        upcomingInvoiceItem:
          $ref: '#/components/schemas/InvoiceItemVo'
        scheduledPhases:
          type: array
          description: >-
            Remaining scheduled subscription plan changes that have not taken
            effect yet.
          items:
            $ref: '#/components/schemas/ScheduledPhase'
        elapsedCycles:
          type: integer
          description: >-
            Number of billing period boundaries already crossed. Compare this
            with scheduledPhases.effectiveCycle to determine when a remaining
            phase takes effect.
          format: int32
        metadata:
          type: object
          additionalProperties:
            type: string
    InvoiceItemVo:
      type: object
      properties:
        invoiceItemId:
          type: string
        amount:
          type: number
        discountAmount:
          type: number
        paymentAmount:
          type: number
        couponTerms:
          type: string
        promotionCode:
          type: string
        currency:
          type: string
          enum:
            - USD
            - EUR
            - JPY
            - GBP
            - AUD
            - CAD
            - CNY
            - HKD
            - SGD
            - KRW
            - AED
            - THB
            - IDR
            - PHP
            - MYR
            - BRL
            - INR
        periodStart:
          type: integer
          format: int64
        periodEnd:
          type: integer
          format: int64
        proration:
          type: boolean
        price:
          $ref: '#/components/schemas/PriceVo'
    ScheduledPhase:
      required:
        - sequence
        - effectiveCycle
        - priceSnapshotId
        - quantity
      type: object
      description: >-
        A scheduled subscription plan change that takes effect at a future
        billing period boundary.
      properties:
        sequence:
          minimum: 1
          type: integer
          description: >-
            Position of this phase in the schedule. Values must be strictly
            increasing.
          format: int32
        effectiveCycle:
          minimum: 1
          type: integer
          description: >-
            The renewal boundary when this phase takes effect, counted from
            subscription creation. Values must be strictly increasing.
          format: int32
        priceSnapshotId:
          type: string
          description: >-
            Target subscription price snapshot ID. The snapshot must exist, have
            priceType=SUBSCRIBE with valid recurring details, and support the
            subscription payment currency.
        quantity:
          minimum: 1
          type: integer
          description: Target quantity for the scheduled phase.
          format: int32
        metadata:
          type: object
          description: >-
            Optional metadata for this scheduled phase. Maximum 20 keys. Key
            length must be 40 characters or fewer and string value length must
            be 500 characters or fewer.
          maxProperties: 20
          propertyNames:
            maxLength: 40
          additionalProperties:
            type: string
            maxLength: 500
    PriceVo:
      type: object
      properties:
        productId:
          type: string
        productName:
          type: string
        priceId:
          type: string
        priceSnapshotId:
          type: string
        unitAmount:
          type: number
        quantity:
          type: integer
          format: int32
        recurring:
          $ref: '#/components/schemas/Recurring'
    Recurring:
      required:
        - interval
        - pricingModel
        - tiersMode
      type: object
      properties:
        interval:
          type: string
          enum:
            - week
            - month
            - year
            - day
            - quarter
            - half_year
            - custom
          description: >-
            Frequency of recurring charges. `quarter` bills every 3 months,
            `half_year` bills every 6 months, and `custom` uses interval count
            to define the cycle.
        trialPeriodDays:
          type: integer
          description: Number of days in the trial period
          format: int32
        pricingModel:
          type: string
          enum:
            - flat_rate
            - per_seat
          description: >-
            Billing model (flat_rate, per_seat, with tiered and usage_based
            models coming soon)
        tiersMode:
          type: string
          enum:
            - volume
            - graduated
          description: >-
            Coming soon. Tiered pricing mode, can be volume (quantity-based) or
            graduated (incremental tiers)
        intervalCount:
          type: integer
          description: >-
            Number of interval units per billing cycle. For custom intervals,
            this value represents the number of days.
          format: int32
      description: Recurring billing configuration information
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
      description: >-
        Your secret API key obtained from the Clink dashboard (Developers
        section)

````