Subscriptions
Apply discount to subscription
https://rcur.app/api/v2/subscriptions/{subscriptionId}/discount
With a discount code, or a discount without a code. A subscription has at most one discount at a time.
Requires your API key as Authorization: Bearer <key>. See authentication.
Path parameters
-
subscriptionIdstring required
Request body
application/jsonEither discount_id, or type, value and duration for a discount without a code. It applies from the next payment.
-
discount_idstringId of a discount code; counts towards its maximum
-
typestringOne of
percentagefixed -
valuenumberA percentage, or an amount in the currency of the subscription
-
durationstringOne of
oncerepeatingforever -
periodsintegerRequired for repeating
Responses
201 Discount applied to the subscription SubscriptionDiscount object
-
discount_idstring nullableThe discount code it came from; null for a discount without a code
-
codestring nullable -
typestring requiredOne of
percentagefixed -
valuestring required -
currencystring nullable -
durationstring requiredOne of
oncerepeatingforever -
periods_totalinteger nullable -
periods_usedinteger required -
total_discountedstring required -
created_atstring
404 Resource not found Error object
-
statusinteger required -
errorstring required
422 Validation error ValidationError object
-
statusinteger required -
errorstring required -
fieldsobject