---
title: "Update Discount"
method: PATCH
path: "/v1/discounts/{id}"
tags: ["discounts", "public"]
---

# Update Discount

`PATCH /v1/discounts/{id}`

Update a discount.

**Scopes**: `discounts:write`

## Path parameters

- `id` string, uuid4, required — The discount ID.

## Request body

- DiscountUpdate — Schema to update a discount.
  - `metadata` object — Key-value object allowing you to store additional information. The key must be a string with a maximum length of **40 characters**. The value must be either: * A string with a maximum length of **500 characters** * An integer * A floating-point number * A boolean You can store up to **50 key-value pairs**.
  - `name` string, nullable — Name of the discount. Will be displayed to the customer when the discount is applied.
  - `code` string, nullable — Code customers can use to apply the discount during checkout. Must be between 3 and 256 characters long and contain only alphanumeric characters.If not provided, the discount can only be applied via the API.
  - `starts_at` string, date-time, nullable — Optional timestamp after which the discount is redeemable.
  - `ends_at` string, date-time, nullable — Optional timestamp after which the discount is no longer redeemable.
  - `max_redemptions` integer, nullable — Optional maximum number of times the discount can be redeemed.
  - `max_redemptions_per_customer` integer, nullable — Optional maximum number of times the discount can be redeemed by a single customer.
  - `duration` 'once' | 'forever' | 'repeating'
  - `duration_in_months` integer, nullable — Number of months the discount should be applied. For this to work on yearly pricing, you should multiply this by 12. For example, to apply the discount for 2 years, set this to 24.
  - `type` 'fixed' | 'percentage'
  - `amount` integer, nullable — Fixed amount to discount from the invoice total.
  - `currency` 'aed' | 'all' | 'amd' | 'aoa' | 'ars' | 'aud' | 'awg' | 'azn' | 'bam' | 'bbd' | 'bdt' | 'bif' | 'bmd' | 'bnd' | 'bob' | 'brl' | 'bsd' | 'bwp' | 'bzd' | 'cad' | 'cdf' | 'chf' | 'clp' | 'cny' | 'cop' | 'crc' | 'cve' | 'czk' | 'djf' | 'dkk' | 'dop' | 'dzd' | 'egp' | 'etb' | 'eur' | 'fjd' | 'fkp' | 'gbp' | 'gel' | 'gip' | 'gmd' | 'gnf' | 'gtq' | 'gyd' | 'hkd' | 'hnl' | 'htg' | 'huf' | 'idr' | 'ils' | 'inr' | 'isk' | 'jmd' | 'jpy' | 'kes' | 'kgs' | 'khr' | 'kmf' | 'krw' | 'kyd' | 'kzt' | 'lak' | 'lkr' | 'lrd' | 'lsl' | 'mad' | 'mdl' | 'mga' | 'mkd' | 'mnt' | 'mop' | 'mur' | 'mvr' | 'mwk' | 'mxn' | 'myr' | 'mzn' | 'nad' | 'ngn' | 'nio' | 'nok' | 'npr' | 'nzd' | 'pab' | 'pen' | 'pgk' | 'php' | 'pkr' | 'pln' | 'pyg' | 'qar' | 'ron' | 'rsd' | 'rwf' | 'sar' | 'sbd' | 'scr' | 'sek' | 'sgd' | 'shp' | 'sos' | 'srd' | 'szl' | 'thb' | 'tjs' | 'top' | 'try' | 'ttd' | 'twd' | 'tzs' | 'uah' | 'ugx' | 'usd' | 'uyu' | 'uzs' | 'vnd' | 'vuv' | 'wst' | 'xaf' | 'xcd' | 'xcg' | 'xof' | 'xpf' | 'yer' | 'zar' | 'zmw'
  - `amounts` object, nullable — Map of currency to fixed amount to discount from the total. This allows specifying different discount amounts for different currencies.
  - `basis_points` integer, nullable — Discount percentage in basis points. A basis point is 1/100th of a percent. For example, to create a 25.5% discount, set this to 2550.
  - `products` string[], nullable — List of product IDs the discount can be applied to.

## Response `200`

Discount updated.

- union
  - DiscountFixedOnceForeverDuration — Schema for a fixed amount discount that is applied once or forever.
    - `duration` 'once' | 'forever' | 'repeating', required
    - `type` 'fixed' | 'percentage', required
    - `amount` integer, required
    - `currency` string, required
    - `amounts` object, required — Map of currency to fixed amount to discount from the total.
    - `created_at` string, date-time, required — Creation timestamp of the object.
    - `modified_at` string, date-time, nullable, required — Last modification timestamp of the object.
    - `id` string, uuid4, required — The ID of the object.
    - `metadata` MetadataOutputType, required
    - `name` string, required — Name of the discount. Will be displayed to the customer when the discount is applied.
    - `code` string, nullable, required — Code customers can use to apply the discount during checkout.
    - `starts_at` string, date-time, nullable, required — Timestamp after which the discount is redeemable.
    - `ends_at` string, date-time, nullable, required — Timestamp after which the discount is no longer redeemable.
    - `max_redemptions` integer, nullable, required — Maximum number of times the discount can be redeemed.
    - `max_redemptions_per_customer` integer, nullable, required — Maximum number of times the discount can be redeemed by a single customer.
    - `redemptions_count` integer, required — Number of times the discount has been redeemed.
    - `organization_id` string, uuid4, required — The organization ID.
    - `products` DiscountProduct[], required
      - `metadata` MetadataOutputType, required
      - `id` string, uuid4, required — The ID of the object.
      - `created_at` string, date-time, required — Creation timestamp of the object.
      - `modified_at` string, date-time, nullable, required — Last modification timestamp of the object.
      - `trial_interval` 'day' | 'week' | 'month' | 'year', required
      - `trial_interval_count` integer, nullable, required — The number of interval units for the trial period.
      - `name` string, required — The name of the product.
      - `description` string, nullable, required — The description of the product.
      - `visibility` 'draft' | 'private' | 'public', required
      - `recurring_interval` 'day' | 'week' | 'month' | 'year', required
      - `recurring_interval_count` integer, nullable, required — Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on. None for one-time products.
      - `meter_interval` 'day' | 'week' | 'month' | 'year', required
      - `meter_interval_count` integer, nullable, required — Number of meter interval units. None when no meter cycle is set.
      - `is_recurring` boolean, required — Whether the product is a subscription.
      - `is_archived` boolean, required — Whether the product is archived and no longer available.
      - `organization_id` string, uuid4, required — The ID of the organization owning the product.
  - DiscountFixedRepeatDuration — Schema for a fixed amount discount that is applied on every invoice for a certain number of months.
    - `duration` 'once' | 'forever' | 'repeating', required
    - `duration_in_months` integer, required
    - `type` 'fixed' | 'percentage', required
    - `amount` integer, required
    - `currency` string, required
    - `amounts` object, required — Map of currency to fixed amount to discount from the total.
    - `created_at` string, date-time, required — Creation timestamp of the object.
    - `modified_at` string, date-time, nullable, required — Last modification timestamp of the object.
    - `id` string, uuid4, required — The ID of the object.
    - `metadata` MetadataOutputType, required
    - `name` string, required — Name of the discount. Will be displayed to the customer when the discount is applied.
    - `code` string, nullable, required — Code customers can use to apply the discount during checkout.
    - `starts_at` string, date-time, nullable, required — Timestamp after which the discount is redeemable.
    - `ends_at` string, date-time, nullable, required — Timestamp after which the discount is no longer redeemable.
    - `max_redemptions` integer, nullable, required — Maximum number of times the discount can be redeemed.
    - `max_redemptions_per_customer` integer, nullable, required — Maximum number of times the discount can be redeemed by a single customer.
    - `redemptions_count` integer, required — Number of times the discount has been redeemed.
    - `organization_id` string, uuid4, required — The organization ID.
    - `products` DiscountProduct[], required
      - `metadata` MetadataOutputType, required
      - `id` string, uuid4, required — The ID of the object.
      - `created_at` string, date-time, required — Creation timestamp of the object.
      - `modified_at` string, date-time, nullable, required — Last modification timestamp of the object.
      - `trial_interval` 'day' | 'week' | 'month' | 'year', required
      - `trial_interval_count` integer, nullable, required — The number of interval units for the trial period.
      - `name` string, required — The name of the product.
      - `description` string, nullable, required — The description of the product.
      - `visibility` 'draft' | 'private' | 'public', required
      - `recurring_interval` 'day' | 'week' | 'month' | 'year', required
      - `recurring_interval_count` integer, nullable, required — Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on. None for one-time products.
      - `meter_interval` 'day' | 'week' | 'month' | 'year', required
      - `meter_interval_count` integer, nullable, required — Number of meter interval units. None when no meter cycle is set.
      - `is_recurring` boolean, required — Whether the product is a subscription.
      - `is_archived` boolean, required — Whether the product is archived and no longer available.
      - `organization_id` string, uuid4, required — The ID of the organization owning the product.
  - DiscountPercentageOnceForeverDuration — Schema for a percentage discount that is applied once or forever.
    - `duration` 'once' | 'forever' | 'repeating', required
    - `type` 'fixed' | 'percentage', required
    - `basis_points` integer, required — Discount percentage in basis points. A basis point is 1/100th of a percent. For example, 1000 basis points equals a 10% discount.
    - `created_at` string, date-time, required — Creation timestamp of the object.
    - `modified_at` string, date-time, nullable, required — Last modification timestamp of the object.
    - `id` string, uuid4, required — The ID of the object.
    - `metadata` MetadataOutputType, required
    - `name` string, required — Name of the discount. Will be displayed to the customer when the discount is applied.
    - `code` string, nullable, required — Code customers can use to apply the discount during checkout.
    - `starts_at` string, date-time, nullable, required — Timestamp after which the discount is redeemable.
    - `ends_at` string, date-time, nullable, required — Timestamp after which the discount is no longer redeemable.
    - `max_redemptions` integer, nullable, required — Maximum number of times the discount can be redeemed.
    - `max_redemptions_per_customer` integer, nullable, required — Maximum number of times the discount can be redeemed by a single customer.
    - `redemptions_count` integer, required — Number of times the discount has been redeemed.
    - `organization_id` string, uuid4, required — The organization ID.
    - `products` DiscountProduct[], required
      - `metadata` MetadataOutputType, required
      - `id` string, uuid4, required — The ID of the object.
      - `created_at` string, date-time, required — Creation timestamp of the object.
      - `modified_at` string, date-time, nullable, required — Last modification timestamp of the object.
      - `trial_interval` 'day' | 'week' | 'month' | 'year', required
      - `trial_interval_count` integer, nullable, required — The number of interval units for the trial period.
      - `name` string, required — The name of the product.
      - `description` string, nullable, required — The description of the product.
      - `visibility` 'draft' | 'private' | 'public', required
      - `recurring_interval` 'day' | 'week' | 'month' | 'year', required
      - `recurring_interval_count` integer, nullable, required — Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on. None for one-time products.
      - `meter_interval` 'day' | 'week' | 'month' | 'year', required
      - `meter_interval_count` integer, nullable, required — Number of meter interval units. None when no meter cycle is set.
      - `is_recurring` boolean, required — Whether the product is a subscription.
      - `is_archived` boolean, required — Whether the product is archived and no longer available.
      - `organization_id` string, uuid4, required — The ID of the organization owning the product.
  - DiscountPercentageRepeatDuration — Schema for a percentage discount that is applied on every invoice for a certain number of months.
    - `duration` 'once' | 'forever' | 'repeating', required
    - `duration_in_months` integer, required
    - `type` 'fixed' | 'percentage', required
    - `basis_points` integer, required — Discount percentage in basis points. A basis point is 1/100th of a percent. For example, 1000 basis points equals a 10% discount.
    - `created_at` string, date-time, required — Creation timestamp of the object.
    - `modified_at` string, date-time, nullable, required — Last modification timestamp of the object.
    - `id` string, uuid4, required — The ID of the object.
    - `metadata` MetadataOutputType, required
    - `name` string, required — Name of the discount. Will be displayed to the customer when the discount is applied.
    - `code` string, nullable, required — Code customers can use to apply the discount during checkout.
    - `starts_at` string, date-time, nullable, required — Timestamp after which the discount is redeemable.
    - `ends_at` string, date-time, nullable, required — Timestamp after which the discount is no longer redeemable.
    - `max_redemptions` integer, nullable, required — Maximum number of times the discount can be redeemed.
    - `max_redemptions_per_customer` integer, nullable, required — Maximum number of times the discount can be redeemed by a single customer.
    - `redemptions_count` integer, required — Number of times the discount has been redeemed.
    - `organization_id` string, uuid4, required — The organization ID.
    - `products` DiscountProduct[], required
      - `metadata` MetadataOutputType, required
      - `id` string, uuid4, required — The ID of the object.
      - `created_at` string, date-time, required — Creation timestamp of the object.
      - `modified_at` string, date-time, nullable, required — Last modification timestamp of the object.
      - `trial_interval` 'day' | 'week' | 'month' | 'year', required
      - `trial_interval_count` integer, nullable, required — The number of interval units for the trial period.
      - `name` string, required — The name of the product.
      - `description` string, nullable, required — The description of the product.
      - `visibility` 'draft' | 'private' | 'public', required
      - `recurring_interval` 'day' | 'week' | 'month' | 'year', required
      - `recurring_interval_count` integer, nullable, required — Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on. None for one-time products.
      - `meter_interval` 'day' | 'week' | 'month' | 'year', required
      - `meter_interval_count` integer, nullable, required — Number of meter interval units. None when no meter cycle is set.
      - `is_recurring` boolean, required — Whether the product is a subscription.
      - `is_archived` boolean, required — Whether the product is archived and no longer available.
      - `organization_id` string, uuid4, required — The ID of the organization owning the product.

## Other responses

- `404` — Discount not found.
- `422` — Validation Error

---

[API](https://skmtc.net/polar/apis/polar-api.md) · [All operations](https://skmtc.net/polar/apis/polar-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/polar/polar-api/versions/964f974aceff/schema)
