# The Discount object

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | yes |  |
| `code` | string | yes |  |
| `name` | string | no |  |
| `type` | string | yes | One of: `percentage`, `fixed`. |
| `value` | string | yes | A percentage, or an amount in the currency of the code |
| `currency` | string | no | Only for a fixed amount |
| `duration` | string | yes | How many payments of a subscription get the discount: the first, the first duration_periods, or every payment One of: `once`, `repeating`, `forever`. |
| `duration_periods` | integer | no |  |
| `all_links` | boolean | yes | Valid for every payment link, or only for the links in links |
| `links` | array of strings | no | Ids of the payment links the code is limited to |
| `max_redemptions` | integer | no | How often the code can be used in total, by all customers together |
| `times_redeemed` | integer | no |  |
| `once_per_customer` | boolean | no |  |
| `starts_at` | string | no |  |
| `expires_at` | string | no |  |
| `is_active` | boolean | yes |  |
| `status` | string | yes | One of: `active`, `inactive`, `scheduled`, `expired`, `used_up`. |
| `created_at` | string | yes |  |

```json
{
    "id": "aB3dE5fG7h",
    "code": "SUMMER25",
    "name": "Summer campaign",
    "type": "percentage",
    "value": "25.00",
    "currency": "EUR",
    "duration": "repeating",
    "duration_periods": 3,
    "all_links": false,
    "links": [
        "xY1zA2bC3d"
    ],
    "max_redemptions": 100,
    "times_redeemed": 12,
    "once_per_customer": true,
    "starts_at": "2026-06-01",
    "expires_at": "2026-08-31",
    "is_active": true,
    "status": "active",
    "created_at": "2026-05-20 10:00:00"
}
```
