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

# Cancel a subscription

> This endpoint allows cancellation of an existing subscription by ID.



## OpenAPI

````yaml open-api-yaml/deposits-api/manage-subscriptions/cancel-a-subscription.json DELETE /v3/subscriptions/{subscription_id}
openapi: 3.0.0
info:
  title: Subscription API
  version: 3.0.0
servers:
  - url: https://api-stg.pandablue.com
    description: Staging Server
security: []
paths:
  /v3/subscriptions/{subscription_id}:
    delete:
      tags:
        - Subscriptions
      summary: Cancel a subscription
      description: This endpoint allows cancellation of an existing subscription by ID.
      operationId: cancelSubscription
      parameters:
        - name: subscription_id
          in: path
          description: >-
            Unique numeric identifier of the subscription to be cancelled. This
            is the subscription ID provided when the subscription was created.
          required: true
          schema:
            type: integer
            format: int64
        - name: Content-Type
          in: header
          description: Media type of the body sent to the API.
          required: true
          schema:
            type: string
            default: application/json
        - name: X-Date
          in: header
          description: ISO8601 Datetime with Timezone (yyyy-MM-dd'T'HH:mm:ssZ)
          required: true
          schema:
            type: string
            format: date-time
        - name: X-Login
          in: header
          description: Merchant X-Login API Key.
          required: true
          schema:
            type: string
        - name: Authorization
          in: header
          description: Authorization control hash.
          required: true
          schema:
            type: string
        - name: X-Idempotency-Key
          in: header
          description: >-
            Unique idempotency key for ensuring that the same request is not
            processed more than once.
          required: false
          schema:
            type: string
      requestBody:
        description: Empty request body
        content:
          application/json:
            schema:
              type: object
              properties: {}
        required: false
      responses:
        '200':
          description: Subscription successfully cancelled
          content:
            application/json:
              schema:
                type: object
                properties: {}
        '420':
          description: Subscription does not exist
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  description:
                    type: string
                  type:
                    type: string
        '421':
          description: Subscription was already cancelled
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  description:
                    type: string
                  type:
                    type: string
        '426':
          description: Subscription is terminated and cannot be cancelled
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  description:
                    type: string
                  type:
                    type: string
        '501':
          description: Generic Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  description:
                    type: string
                  type:
                    type: string

````

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