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

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

# Remover desconto

`DELETE` `/subscriptions/{subscription_id}/discounts/{discount_id}`

Operation ID: `remover-desconto-1`

Com o verbo _HTTP DELETE_, através dos identificadores do desconto (`discount_id`) e da assinatura associada (`subscription_id`) é possível remover um desconto do plano.

## Path parameters

- `subscription_id` (string, required) - Código da assinatura.<br>Formato `sub_XXXXXXXXXXXXXXXX`
- `discount_id` (string, required) - Código do desconto. <br>Formato: `dis_XXXXXXXXXXXXXXXX`

## 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:
  /subscriptions/{subscription_id}/discounts/{discount_id}:
    delete:
      summary: Remover desconto
      description: Com o verbo _HTTP DELETE_, através dos identificadores do desconto
        (`discount_id`) e da assinatura associada (`subscription_id`) é possível
        remover um desconto do plano.
      operationId: remover-desconto-1
      parameters:
        - name: subscription_id
          in: path
          description: Código da assinatura.<br>Formato `sub_XXXXXXXXXXXXXXXX`
          schema:
            type: string
          required: true
        - name: discount_id
          in: path
          description: "Código do desconto. <br>Formato: `dis_XXXXXXXXXXXXXXXX`"
          schema:
            type: string
          required: true
      responses:
        "200":
          description: "200"
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                      "id": "dis_kqGj1JMCaGSRm9Yz",
                      "value": 10,
                      "discount_type": "percentage",
                      "status": "deleted",
                      "created_at": "2017-04-04T18:40:15Z",
                      "deleted_at": "2017-04-04T18:40:48Z",
                      "subscription": {
                        "id": "sub_o0Jw4WYCMuPNqzGr",
                        "code": "09NFPLBZY0",
                        "start_at": "2017-04-04T00:00:00Z",
                        "interval": "month",
                        "interval_count": 1,
                        "billing_type": "postpaid",
                        "next_billing_at": "2017-05-04T00:00:00Z",
                        "payment_method": "credit_card",
                        "currency": "BRL",
                        "statement_descriptor": "Spotify",
                        "installments": 1,
                        "status": "active",
                        "created_at": "2017-04-04T18:21:17Z",
                        "updated_at": "2017-04-04T18:21:17Z"
                      }
                    }
              schema:
                type: object
                properties:
                  id:
                    type: string
                    example: dis_kqGj1JMCaGSRm9Yz
                  value:
                    type: integer
                    example: 10
                    default: 0
                  discount_type:
                    type: string
                    example: percentage
                  status:
                    type: string
                    example: deleted
                  created_at:
                    type: string
                    example: 2017-04-04T18:40:15Z
                  deleted_at:
                    type: string
                    example: 2017-04-04T18:40:48Z
                  subscription:
                    type: object
                    properties:
                      id:
                        type: string
                        example: sub_o0Jw4WYCMuPNqzGr
                      code:
                        type: string
                        example: 09NFPLBZY0
                      start_at:
                        type: string
                        example: 2017-04-04T00:00:00Z
                      interval:
                        type: string
                        example: month
                      interval_count:
                        type: integer
                        example: 1
                        default: 0
                      billing_type:
                        type: string
                        example: postpaid
                      next_billing_at:
                        type: string
                        example: 2017-05-04T00:00:00Z
                      payment_method:
                        type: string
                        example: credit_card
                      currency:
                        type: string
                        example: BRL
                      statement_descriptor:
                        type: string
                        example: Spotify
                      installments:
                        type: integer
                        example: 1
                        default: 0
                      status:
                        type: string
                        example: active
                      created_at:
                        type: string
                        example: 2017-04-04T18:21:17Z
                      updated_at:
                        type: string
                        example: 2017-04-04T18:21:17Z
        "404":
          description: "404"
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                      "message": "Discount not found."
                    }
              schema:
                oneOf:
                  - type: object
                    properties:
                      message:
                        type: string
                        example: Subscription not found.
                  - type: object
                    properties:
                      message:
                        type: string
                        example: Discount not found.
      deprecated: false
security:
  - sec0: []
components:
  securitySchemes:
    sec0:
      type: http
      scheme: basic
```
