Skip to main content
Skip to navigation

Developer API (2.0.0)

Download OpenAPI specification:Download

Discount

Part of the REST API v2 Reference.

Operations about RevenueCat Billing discounts.

Endpoints

Get a list of discounts

Lists RevenueCat Billing discounts for the project. This endpoint requires the following permission(s): project_configuration:discounts:read. This endpoint belongs to the Project Configuration domain, which has a default rate limit of 60 requests per minute.

Authorizations:
BearerAuth
path Parameters
project_id
required
string <= 255 characters
Example: proj1ab2c3d4

ID of the project

query Parameters
starting_after
string
Example: starting_after=ent12354

Pagination cursor. Pass the id of the last item from the previous page to fetch the next page; omit for the first page.

limit
integer
Default: 20
Example: limit=10

Maximum number of items to return per page. Values below 1 or above 100 are clamped to that range rather than rejected.

Responses

Response samples

Content type
application/json
{
  • "object": "list",
  • "items": [
    ],
  • "next_page": "/v2/projects/proj1ab2c3d4/discounts?starting_after=discntab21dac",
  • "url": "/v2/projects/proj1ab2c3d4/discounts"
}

Create a discount

Creates a RevenueCat Billing discount. This endpoint requires the following permission(s): project_configuration:discounts:read_write. This endpoint belongs to the Project Configuration domain, which has a default rate limit of 60 requests per minute.

Authorizations:
BearerAuth
path Parameters
project_id
required
string <= 255 characters
Example: proj1ab2c3d4

ID of the project

Request Body schema: application/json
required
identifier
required
string [ 1 .. 100 ] characters

The customizable discount identifier (developer-defined).

customer_facing_name
required
string [ 3 .. 1024 ] characters

Name displayed to customers for this discount.

type
required
string
Enum: "percentage" "fixed_amount"

The type of discount to apply.

percentage
integer [ 1 .. 100 ]

Percentage value for percentage discounts.

object

Fixed amount values by currency for fixed amount discounts.

additional property
object
currency
required
string = 3 characters
amount
required
number <double>
duration_mode
required
string
Enum: "one_time" "time_window" "forever"

The discount duration mode.

eligibility
required
string
Enum: "everyone" "never_purchased" "never_subscribed" "never_subscribed_to_the_same_product"

Eligibility criteria for this discount.

time_window
string^(-?)P(?=\d|T\d)(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+...

ISO-8601 duration when using time window duration mode.

product_identifiers
Array of strings

Product identifiers that this discount applies to.

Responses

Request samples

Content type
application/json
{
  • "identifier": "spring_2026",
  • "customer_facing_name": "Spring sale",
  • "type": "percentage",
  • "percentage": 20,
  • "fixed_amounts": {
    },
  • "duration_mode": "one_time",
  • "eligibility": "everyone",
  • "time_window": "P1M",
  • "product_identifiers": [
    ]
}

Response samples

Content type
application/json
Example
{
  • "object": "discount",
  • "id": "discnt1a2b3c4d5e",
  • "identifier": "spring_2026",
  • "customer_facing_name": "Spring sale",
  • "type": "percentage",
  • "duration_mode": "one_time",
  • "eligibility": "everyone",
  • "time_window": "P1M",
  • "disabled_at": 1762273200000,
  • "percentage": 20,
  • "created_at": 1762270200000,
  • "updated_at": 1762270200000
}

Get a discount

Returns a RevenueCat Billing discount. This endpoint requires the following permission(s): project_configuration:discounts:read. This endpoint belongs to the Project Configuration domain, which has a default rate limit of 60 requests per minute.

Authorizations:
BearerAuth
path Parameters
project_id
required
string <= 255 characters
Example: proj1ab2c3d4

ID of the project

discount_id
required
string [ 1 .. 255 ] characters
Example: discnt1a2b3c4d5e

The id of the RevenueCat Billing discount.

Responses

Response samples

Content type
application/json
Example
{
  • "object": "discount",
  • "id": "discnt1a2b3c4d5e",
  • "identifier": "spring_2026",
  • "customer_facing_name": "Spring sale",
  • "type": "percentage",
  • "duration_mode": "one_time",
  • "eligibility": "everyone",
  • "time_window": "P1M",
  • "disabled_at": 1762273200000,
  • "percentage": 20,
  • "created_at": 1762270200000,
  • "updated_at": 1762270200000
}

Delete a discount

Deletes a RevenueCat Billing discount. This endpoint requires the following permission(s): project_configuration:discounts:read_write. This endpoint belongs to the Project Configuration domain, which has a default rate limit of 60 requests per minute.

Authorizations:
BearerAuth
path Parameters
project_id
required
string <= 255 characters
Example: proj1ab2c3d4

ID of the project

discount_id
required
string [ 1 .. 255 ] characters
Example: discnt1a2b3c4d5e

The id of the RevenueCat Billing discount.

Responses

Response samples

Content type
application/json
{
  • "object": "app",
  • "id": "string",
  • "deleted_at": 1658399423658
}

Update a discount offer

Updates a RevenueCat Billing discount offer. This endpoint requires the following permission(s): project_configuration:discounts:read_write. This endpoint belongs to the Project Configuration domain, which has a default rate limit of 60 requests per minute.

Authorizations:
BearerAuth
path Parameters
project_id
required
string <= 255 characters
Example: proj1ab2c3d4

ID of the project

discount_id
required
string [ 1 .. 255 ] characters
Example: discnt1a2b3c4d5e

The id of the RevenueCat Billing discount.

Request Body schema: application/json
required
non-empty
customer_facing_name
string [ 3 .. 1024 ] characters

Name displayed to customers for this discount.

type
string
Enum: "percentage" "fixed_amount"

The type of discount to apply.

percentage
integer [ 1 .. 100 ]

Percentage value for percentage discounts.

object

Fixed amount values by currency for fixed amount discounts.

additional property
object
currency
required
string = 3 characters
amount
required
number <double>
duration_mode
string
Enum: "one_time" "time_window" "forever"

The discount duration mode.

eligibility
string
Enum: "everyone" "never_purchased" "never_subscribed" "never_subscribed_to_the_same_product"

Eligibility criteria for this discount.

time_window
string^(-?)P(?=\d|T\d)(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+...

ISO-8601 duration when using time window duration mode.

product_identifiers
Array of strings

Product identifiers that this discount applies to.

Responses

Request samples

Content type
application/json
{
  • "customer_facing_name": "Spring sale 2026",
  • "type": "percentage",
  • "percentage": 25,
  • "fixed_amounts": {
    },
  • "duration_mode": "one_time",
  • "eligibility": "everyone",
  • "time_window": "P1M",
  • "product_identifiers": [
    ]
}

Response samples

Content type
application/json
Example
{
  • "object": "discount",
  • "id": "discnt1a2b3c4d5e",
  • "identifier": "spring_2026",
  • "customer_facing_name": "Spring sale",
  • "type": "percentage",
  • "duration_mode": "one_time",
  • "eligibility": "everyone",
  • "time_window": "P1M",
  • "disabled_at": 1762273200000,
  • "percentage": 20,
  • "created_at": 1762270200000,
  • "updated_at": 1762270200000
}

Enable a discount

Enables a RevenueCat Billing discount. This endpoint requires the following permission(s): project_configuration:discounts:read_write. This endpoint belongs to the Project Configuration domain, which has a default rate limit of 60 requests per minute.

Authorizations:
BearerAuth
path Parameters
project_id
required
string <= 255 characters
Example: proj1ab2c3d4

ID of the project

discount_id
required
string [ 1 .. 255 ] characters
Example: discnt1a2b3c4d5e

The id of the RevenueCat Billing discount.

Responses

Response samples

Content type
application/json
Example
{
  • "object": "discount",
  • "id": "discnt1a2b3c4d5e",
  • "identifier": "spring_2026",
  • "customer_facing_name": "Spring sale",
  • "type": "percentage",
  • "duration_mode": "one_time",
  • "eligibility": "everyone",
  • "time_window": "P1M",
  • "disabled_at": 1762273200000,
  • "percentage": 20,
  • "created_at": 1762270200000,
  • "updated_at": 1762270200000
}

Disable a discount

Disables a RevenueCat Billing discount. This endpoint requires the following permission(s): project_configuration:discounts:read_write. This endpoint belongs to the Project Configuration domain, which has a default rate limit of 60 requests per minute.

Authorizations:
BearerAuth
path Parameters
project_id
required
string <= 255 characters
Example: proj1ab2c3d4

ID of the project

discount_id
required
string [ 1 .. 255 ] characters
Example: discnt1a2b3c4d5e

The id of the RevenueCat Billing discount.

Responses

Response samples

Content type
application/json
Example
{
  • "object": "discount",
  • "id": "discnt1a2b3c4d5e",
  • "identifier": "spring_2026",
  • "customer_facing_name": "Spring sale",
  • "type": "percentage",
  • "duration_mode": "one_time",
  • "eligibility": "everyone",
  • "time_window": "P1M",
  • "disabled_at": 1762273200000,
  • "percentage": 20,
  • "created_at": 1762270200000,
  • "updated_at": 1762270200000
}

List discount codes for a discount

Lists redemption codes for a RevenueCat Billing discount. This endpoint requires the following permission(s): project_configuration:discounts:read. This endpoint belongs to the Project Configuration domain, which has a default rate limit of 60 requests per minute.

Authorizations:
BearerAuth
path Parameters
project_id
required
string <= 255 characters
Example: proj1ab2c3d4

ID of the project

discount_id
required
string [ 1 .. 255 ] characters
Example: discnt1a2b3c4d5e

The id of the RevenueCat Billing discount.

query Parameters
starting_after
string
Example: starting_after=ent12354

Pagination cursor. Pass the id of the last item from the previous page to fetch the next page; omit for the first page.

limit
integer
Default: 20
Example: limit=10

Maximum number of items to return per page. Values below 1 or above 100 are clamped to that range rather than rejected.

Responses

Response samples

Content type
application/json
{
  • "object": "list",
  • "items": [
    ],
  • "next_page": "/v2/projects/proj1ab2c3d4/discounts/discnt1a2b3c4d5e/discount_codes?starting_after=SPRING_2026",
  • "url": "/v2/projects/proj1ab2c3d4/discounts/discnt1a2b3c4d5e/discount_codes"
}

Create discount codes for a discount

Creates redemption codes for a RevenueCat Billing discount. This endpoint requires the following permission(s): project_configuration:discounts:read_write. This endpoint belongs to the Project Configuration domain, which has a default rate limit of 60 requests per minute.

Authorizations:
BearerAuth
path Parameters
project_id
required
string <= 255 characters
Example: proj1ab2c3d4

ID of the project

discount_id
required
string [ 1 .. 255 ] characters
Example: discnt1a2b3c4d5e

The id of the RevenueCat Billing discount.

Request Body schema: application/json
required
codes
required
Array of strings [ 1 .. 10000 ] items [ items [ 1 .. 255 ] characters ^[A-Za-z0-9_]+$ ]

List of discount codes to create and attach to the discount.

Responses

Request samples

Content type
application/json
{
  • "codes": [
    ]
}

Response samples

Content type
application/json
[
  • {
    }
]

Delete a discount code from a discount

Deletes a redemption code from a RevenueCat Billing discount. This endpoint requires the following permission(s): project_configuration:discounts:read_write. This endpoint belongs to the Project Configuration domain, which has a default rate limit of 60 requests per minute.

Authorizations:
BearerAuth
path Parameters
project_id
required
string <= 255 characters
Example: proj1ab2c3d4

ID of the project

discount_id
required
string [ 1 .. 255 ] characters
Example: discnt1a2b3c4d5e

The id of the RevenueCat Billing discount.

discount_code
required
string [ 1 .. 255 ] characters ^[A-Za-z0-9_]+$
Example: SPRING_2026

The discount code to remove from the RevenueCat Billing discount.

Responses

Response samples

Content type
application/json
{
  • "object": "app",
  • "id": "string",
  • "deleted_at": 1658399423658
}

Endpoint Reference

All API v2 resources, one page each. General concepts (authentication, pagination, rate limits, error handling) live on the API v2 overview.