Discount codes
Update discount code
https://rcur.app/api/v2/discounts/{id}
Customers who already use the code keep the discount they got.
Requires your API key as Authorization: Bearer <key>. See authentication.
Path parameters
-
idstring required
Request body
application/jsonDiscount code data to update; fields left out keep their value
-
codestringLetters, digits, - and _; stored in capitals
-
namestringInternal name
-
typestringOne of
percentagefixed -
valuenumberA percentage (at most 100) or an amount
-
currencystringRequired for a fixed amount
-
durationstringOne of
oncerepeatingforever -
duration_periodsintegerRequired for repeating
-
all_linksbooleanDefault true
-
linksarray of stringsPayment link ids, required when all_links is false
-
max_redemptionsinteger -
once_per_customerboolean -
starts_atstring -
expires_atstring -
is_activebooleanDefault true
Responses
200 Discount code details Discount object
-
idstring required -
codestring required -
namestring nullable -
typestring requiredOne of
percentagefixed -
valuestring requiredA percentage, or an amount in the currency of the code
-
currencystring nullableOnly for a fixed amount
-
durationstring requiredHow many payments of a subscription get the discount: the first, the first duration_periods, or every payment
One of
oncerepeatingforever -
duration_periodsinteger nullable -
all_linksboolean requiredValid for every payment link, or only for the links in links
-
linksarray of stringsIds of the payment links the code is limited to
-
max_redemptionsinteger nullableHow often the code can be used in total, by all customers together
-
times_redeemedinteger -
once_per_customerboolean -
starts_atstring nullable -
expires_atstring nullable -
is_activeboolean required -
statusstring requiredOne of
activeinactivescheduledexpiredused_up -
created_atstring required
404 Resource not found Error object
-
statusinteger required -
errorstring required
422 Validation error ValidationError object
-
statusinteger required -
errorstring required -
fieldsobject