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

# Cancel Subscription

> Cancel an existing subscription, which stops recurring payments for the specified token. The token will remain active until the end of the billing period.

**API scope required**: `subscriptions.update`




## OpenAPI

````yaml patch /2022-06-09/subscriptions/{subscriptionLocator}/cancel
openapi: 3.0.1
info:
  description: N/A
  version: 1.0.0
  title: Subscription APIs
  contact:
    name: Crossmint Subscription APIs
    url: https://www.crossmint.com
    email: support@crossmint.com
servers:
  - url: https://staging.crossmint.com/api
    description: Staging environment (testnets)
  - url: https://www.crossmint.com/api
    description: Production environment (mainnets)
security:
  - apiKey: []
paths:
  /2022-06-09/subscriptions/{subscriptionLocator}/cancel:
    patch:
      tags:
        - Subscriptions
      summary: Cancel Subscription
      description: >
        Cancel an existing subscription, which stops recurring payments for the
        specified token. The token will remain active until the end of the
        billing period.


        **API scope required**: `subscriptions.update`
      operationId: cancel-subscription
      parameters:
        - name: subscriptionLocator
          in: path
          description: >
            The unique identifier for the subscription, formatted as
            `chain:contractAddress:tokenId`.

            This locator references the specific token associated with the
            subscription.
          required: true
          schema:
            type: string
            example: base:0x1234567890123456789012345678901234567890:1
      responses:
        '200':
          description: Subscription successfully cancelled.
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Invalid arguments or bad request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/400Response'
        '403':
          description: Forbidden error, please ensure the credentials are correct.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/403Response'
        '404':
          description: Subscription not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/404ResponseCancel'
        '503':
          description: Service temporarily unavailable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/503Response'
components:
  schemas:
    400Response:
      type: object
      properties:
        error:
          type: boolean
          example: true
        message:
          type: string
          example: Invalid subscription ID format or missing required parameters.
    403Response:
      type: object
      properties:
        error:
          type: boolean
          example: true
        message:
          type: string
          example: API key provided doesn't have the required scopes or is invalid.
    404ResponseCancel:
      type: object
      properties:
        error:
          type: boolean
          example: true
        message:
          type: string
          example: Subscription not found or has already been cancelled.
    503Response:
      type: object
      properties:
        error:
          type: boolean
          example: true
        message:
          type: string
          example: >-
            Service is temporarily unavailable. Please try again later or
            contact support if the issue persists.
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-KEY
      description: Obtained in the Crossmint developer console

````