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

# Delete a plan

> Delete a plan with the provided code.
    
    Note: This endpoint is restricted for internal use only.
    Cannot delete plans with active subscriptions.



## OpenAPI

````yaml specs/billing_api_docs.json delete /api/v1/plans/{code}
openapi: 3.0.1
info:
  title: Billing API
  description: Billing service for managing subscriptions, payments, and entitlements
  contact: {}
  version: '1.0'
servers:
  - url: https://dev-billing-api.iqraa.ai/api/v1
security: []
tags:
  - name: Customers
    description: Customers related endpoints
  - name: Subscriptions
    description: Subscription related endpoints
  - name: Plans
    description: Plans related endpoints
  - name: Entitlements
    description: Entitlements related endpoints
  - name: Payments
    description: Payments related endpoints
  - name: Emails
    description: Email related endpoints
paths:
  /api/v1/plans/{code}:
    delete:
      tags:
        - Plans
      summary: Delete a plan
      description: |-
        Delete a plan with the provided code.
            
            Note: This endpoint is restricted for internal use only.
            Cannot delete plans with active subscriptions.
      operationId: PlansController_delete
      parameters:
        - name: code
          required: true
          in: path
          description: The Code of the plan to delete
          example: iqraa_starter_monthly
          schema:
            type: string
        - name: x-admin-api-key
          in: header
          description: The API key to access the admin API
          required: true
          schema:
            type: string
      responses:
        '200':
          description: The plan has been successfully deleted
        '400':
          description: Bad Request - Cannot delete plan with active subscriptions
        '401':
          description: Unauthorized - Missing or invalid admin API key
        '404':
          description: Plan not found

````