Discount codes
Create discount code
https://rcur.app/api/v2/discounts
Requires your API key as Authorization: Bearer <key>. See authentication.
Request body
application/jsonDiscount code data
-
codestring requiredLetters, digits, - and _; stored in capitals
-
namestringInternal name
-
typestring requiredOne of
percentagefixed -
valuenumber requiredA percentage (at most 100) or an amount
-
currencystringRequired for a fixed amount
-
durationstring requiredOne 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
201 Discount code created 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
422 Validation error ValidationError object
-
statusinteger required -
errorstring required -
fieldsobject