# Delete Plan

Use this API to delete a plan.

## Environment

Use our UAT environment endpoint for testing and for integration utilize our production endpoint.

| Environment                    | Endpoints                                                         |
| :----------------------------- | :---------------------------------------------------------------- |
| User Acceptance Testing \[UAT] | `https://pluraluat.v2.pinepg.in/ps/api/v1/public/plans/{plan_id}` |
| Production \[PROD]             | `https://api.pluralpay.in/api/ps/v1/public/plans/{plan_id}`       |

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "subscription",
    "version": "3.0"
  },
  "servers": [
    {
      "url": "https://pluraluat.v2.pinepg.in/ps/api/v1/public"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "name": "Authorization",
        "in": "header",
        "x-bearer-format": "bearer"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/plans/{plan_id}": {
      "delete": {
        "summary": "Delete Plan",
        "description": "Use this API to delete a plan.",
        "operationId": "delete-plan",
        "parameters": [
          {
            "name": "plan_id",
            "in": "path",
            "description": "Unique identifier for the subscription plan in the Plural database.<br><br>Example: `v1-plan-4405071524-aa-qlAtAf`",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "The type of content included in the HTTP message body.<br><br>Possible value: `application/json`.",
            "schema": {
              "type": "string",
              "default": "application/json"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "The HTTP header where you can include your secret token for authentication.<br><br>Example: `Bearer <access_token>`<br><br>**Note**: Use the access token generated using our <a href=\"https://developer.pluralonline.com/v3.0/reference/generate-token\" target=\"_blank\">Generate Token API</a>.",
            "required": true,
            "schema": {
              "type": "string",
              "default": "Bearer"
            }
          },
          {
            "name": "Request-Timestamp",
            "in": "header",
            "description": "Use ISO 8601 UTC Timestamp, to create a timestamp when the generate token is requested.<br><br>Example: `2024-07-09T07:57:08.022Z`",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Request-ID",
            "in": "header",
            "description": "Use a global unique identifier [GUID] for the request.<ul><li>Minimum: 1 characters.</li><li>Maximum: 50 characters</ul></li>Example: `c17ce30f-f88e-4f81-ada1-c3b4909ed235`",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"code\": \"PLAN_NOT_FOUND\",\n  \"message\": \"Plan not found\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "example": "PLAN_NOT_FOUND"
                    },
                    "message": {
                      "type": "string",
                      "example": "Plan not found"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "500",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"code\": \"INTERNAL_ERROR\",\n  \"message\": \"Internal Server Error\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "example": "INTERNAL_ERROR"
                    },
                    "message": {
                      "type": "string",
                      "example": "Internal Server Error"
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```