---
title: "Excluir plano"
url: "https://devcenter.stone.com.br/apis/v5-docs-legacy/versions/b9aaff36-6dcc-4353-8398-836d6c13dfa5/operations/excluir-plano-1"
---

> Full API specification: https://devcenter.stone.com.br/apis/v5-docs-legacy/versions/b9aaff36-6dcc-4353-8398-836d6c13dfa5.md

# Excluir plano

`DELETE` `/plans/{plan_id}`

Operation ID: `excluir-plano-1`

Com o verbo HTTP DELETE, através do identificador do plano (`plan_id`) é possível excluir um plano.

## Path parameters

- `plan_id` (string, required) - Código do plano

## Responses

- `200` - 200
- `404` - 404

## OpenAPI definition

```yaml
openapi: 3.1.0
info:
  title: Pagar.me v5 API (Legado)
  version: 5.0.0
servers:
  - url: https://api.stone.com.br/core/v5
paths:
  /plans/{plan_id}:
    delete:
      summary: Excluir plano
      description: Com o verbo HTTP DELETE, através do identificador do plano
        (`plan_id`) é possível excluir um plano.
      operationId: excluir-plano-1
      parameters:
        - name: plan_id
          in: path
          description: Código do plano
          schema:
            type: string
          required: true
      responses:
        "200":
          description: "200"
          content:
            application/json:
              examples:
                Result:
                  value: >-
                    {
                      "id": "plan_21r4CTG0ux77Qv13",
                      "name": "Plano Gold",
                      "description": "Esse plano oferece acesso aos programas de musculação e todos os equipamentos e atividades coletivas terrestres.",
                      "url": "/plan_21r4CTG0ux77Qv13/academia/plano-silver",
                      "minimum_price": 10000,
                      "currency": "BRL",
                      "interval": "month",
                      "interval_count": 3,
                      "billing_type": "prepaid",
                      "installments": 3,
                      "statement_descriptor": "SILVER",
                      "status": "deleted",
                      "created_at": "2016-07-12T18:25:40Z",
                      "updated_at": "2016-07-12T18:25:40Z",
                      "deleted_at": "2016-07-15T13:41:02Z",
                      "items": [
                        {
                          "id": "pi_3j1EG9ousipHjcUL",
                          "name": "Musculação",
                          "status": "active",
                          "created_at": "2016-07-12T18:25:40Z",
                          "updated_at": "2016-07-12T18:25:40Z",
                          "pricing_scheme": {
                            "price": 18990,
                          	"scheme_type": "unit"
                          }
                        },
                        {
                          "id": "pi_6ggvuaJNS2LVq1i6",
                          "name": "Matrícula",
                          "cycles": 1,
                          "status": "active",
                          "created_at": "2016-07-12T18:25:40Z",
                          "updated_at": "2016-07-12T18:25:40Z",
                          "pricing_scheme": {
                            "price": 5990,
                            "scheme_type": "unit"
                          }
                        }
                      ],
                      "metadata": {
                        "id": "my_plan_id"
                      }
                    }
              schema:
                type: object
                properties:
                  id:
                    type: string
                    example: plan_21r4CTG0ux77Qv13
                  name:
                    type: string
                    example: Plano Gold
                  description:
                    type: string
                    example: Esse plano oferece acesso aos programas de musculação e todos os
                      equipamentos e atividades coletivas terrestres.
                  url:
                    type: string
                    example: /plan_21r4CTG0ux77Qv13/academia/plano-silver
                  minimum_price:
                    type: integer
                    example: 10000
                    default: 0
                  currency:
                    type: string
                    example: BRL
                  interval:
                    type: string
                    example: month
                  interval_count:
                    type: integer
                    example: 3
                    default: 0
                  billing_type:
                    type: string
                    example: prepaid
                  installments:
                    type: integer
                    example: 3
                    default: 0
                  statement_descriptor:
                    type: string
                    example: SILVER
                  status:
                    type: string
                    example: deleted
                  created_at:
                    type: string
                    example: 2016-07-12T18:25:40Z
                  updated_at:
                    type: string
                    example: 2016-07-12T18:25:40Z
                  deleted_at:
                    type: string
                    example: 2016-07-15T13:41:02Z
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          example: pi_3j1EG9ousipHjcUL
                        name:
                          type: string
                          example: Musculação
                        status:
                          type: string
                          example: active
                        created_at:
                          type: string
                          example: 2016-07-12T18:25:40Z
                        updated_at:
                          type: string
                          example: 2016-07-12T18:25:40Z
                        pricing_scheme:
                          type: object
                          properties:
                            price:
                              type: integer
                              example: 18990
                              default: 0
                            scheme_type:
                              type: string
                              example: unit
                  metadata:
                    type: object
                    properties:
                      id:
                        type: string
                        example: my_plan_id
        "404":
          description: "404"
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                        "message": "Plan not found."
                    }
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Plan not found.
      deprecated: false
security:
  - sec0: []
components:
  securitySchemes:
    sec0:
      type: http
      scheme: basic
```
