---
title: "Listar descontos"
url: "https://devcenter.stone.com.br/apis/v5-docs-legacy/versions/b9aaff36-6dcc-4353-8398-836d6c13dfa5/operations/listar-descontos-2"
---

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

# Listar descontos

`GET` `/subscriptions/{subscription_id}/discounts`

Operation ID: `listar-descontos-2`

Este recurso permite listar os descontos associados a uma assinatura.

## Path parameters

- `subscription_id` (string, required) - Código da assinatura.<br>Formato `sub_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:
    get:
      summary: Listar descontos
      description: Este recurso permite listar os descontos associados a uma assinatura.
      operationId: listar-descontos-2
      parameters:
        - name: subscription_id
          in: path
          description: Código da assinatura.<br>Formato `sub_XXXXXXXXXXXXXXXX`
          schema:
            type: string
          required: true
      responses:
        "200":
          description: "200"
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                        "data": [
                            {
                                "id": "dis_IYzpxgjsOs0fDIoP",
                                "value": 20,
                                "discount_type": "percentage",
                                "status": "active",
                                "created_at": "2018-03-15T19:49:29Z",
                                "subscription": {
                                    "id": "sub_Yo2VQVyeSWHKmN5k",
                                    "code": "Z8OXUJI3M5",
                                    "start_at": "2018-03-15T00:00:00Z",
                                    "interval": "month",
                                    "interval_count": 1,
                                    "billing_type": "prepaid",
                                    "next_billing_at": "2018-04-15T00:00:00Z",
                                    "payment_method": "credit_card",
                                    "currency": "BRL",
                                    "installments": 1,
                                    "status": "active",
                                    "created_at": "2018-03-15T19:49:05Z",
                                    "updated_at": "2018-03-15T19:49:05Z"
                                }
                            },
                            {
                                "id": "dis_kyzpJFssOs0fIoUx",
                                "value": 10,
                                "discount_type": "percentage",
                                "status": "active",
                                "created_at": "2018-03-15T19:49:25Z",
                                "subscription": {
                                    "id": "sub_Yo2VQVyeSWHKmN5k",
                                    "code": "Z8OXUJI3M5",
                                    "start_at": "2018-03-15T00:00:00Z",
                                    "interval": "month",
                                    "interval_count": 1,
                                    "billing_type": "prepaid",
                                    "next_billing_at": "2018-04-15T00:00:00Z",
                                    "payment_method": "credit_card",
                                    "currency": "BRL",
                                    "installments": 1,
                                    "status": "active",
                                    "created_at": "2018-03-15T19:49:05Z",
                                    "updated_at": "2018-03-15T19:49:05Z"
                                }
                            }
                        ],
                        "paging": {
                            "total": 2
                        }
                    }
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          example: dis_IYzpxgjsOs0fDIoP
                        value:
                          type: integer
                          example: 20
                          default: 0
                        discount_type:
                          type: string
                          example: percentage
                        status:
                          type: string
                          example: active
                        created_at:
                          type: string
                          example: 2018-03-15T19:49:29Z
                        subscription:
                          type: object
                          properties:
                            id:
                              type: string
                              example: sub_Yo2VQVyeSWHKmN5k
                            code:
                              type: string
                              example: Z8OXUJI3M5
                            start_at:
                              type: string
                              example: 2018-03-15T00:00:00Z
                            interval:
                              type: string
                              example: month
                            interval_count:
                              type: integer
                              example: 1
                              default: 0
                            billing_type:
                              type: string
                              example: prepaid
                            next_billing_at:
                              type: string
                              example: 2018-04-15T00:00:00Z
                            payment_method:
                              type: string
                              example: credit_card
                            currency:
                              type: string
                              example: BRL
                            installments:
                              type: integer
                              example: 1
                              default: 0
                            status:
                              type: string
                              example: active
                            created_at:
                              type: string
                              example: 2018-03-15T19:49:05Z
                            updated_at:
                              type: string
                              example: 2018-03-15T19:49:05Z
                  paging:
                    type: object
                    properties:
                      total:
                        type: integer
                        example: 2
                        default: 0
        "404":
          description: "404"
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                      "message": "Subscription not found."
                    }
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Subscription not found.
      deprecated: false
security:
  - sec0: []
components:
  securitySchemes:
    sec0:
      type: http
      scheme: basic
```
