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

# List Discounts

> Lista descontos.

Lista `discounts` da organização atuante, ordenados por `created_at`
decrescente.

## Parâmetros de query

<ParamField query="limit" type="integer" default="10">
  Quantidade de itens por página. Entre `1` e `100`.
</ParamField>

<ParamField query="starting_after" type="string">
  ID do desconto que delimita o início da próxima página.
</ParamField>

<ParamField query="ending_before" type="string">
  ID do desconto que delimita o fim da página anterior.
</ParamField>

<ParamField query="is_active" type="boolean | string">
  Quando omitido, retorna apenas `is_active=true`. Envie `false` para inativos
  ou `all` para incluir ambos.
</ParamField>

<ParamField query="type" type="string">
  Filtra por `percentage` ou `fixed`.
</ParamField>

<ParamField query="query" type="string">
  Busca por nome.
</ParamField>

<RequestExample>
  ```bash cURL theme={}
  curl -X GET "https://api.chargefy.io/v1/discounts?limit=20" \
    -H "Authorization: Bearer {{API_KEY}}"
  ```
</RequestExample>

## Resposta

<ResponseExample>
  ```json 200 theme={}
  {
    "object": "list",
    "data": [
      {
        "id": "disc_123",
        "object": "discount",
        "amount_off": null,
        "applies_to": {
          "products": []
        },
        "created_at": "2026-05-21T12:00:00Z",
        "currency": null,
        "duration": "once",
        "duration_in_months": null,
        "expires_at": null,
        "is_active": true,
        "livemode": true,
        "max_redemptions": null,
        "metadata": {},
        "name": "Black Friday 20%",
        "percent_off_basis_points": 2000,
        "redemptions_count": 0,
        "starts_at": null,
        "type": "percentage",
        "updated_at": null,
        "valid": true
      }
    ],
    "has_more": false,
    "url": "/v1/discounts"
  }
  ```
</ResponseExample>
