Add a discount
POST
https://api.tamio.com/v2/subscriptions/discount/create/{uuid}
Applies a promotional discount to a subscription. The discount can be a fixed amount or a percentage, and can last for one cycle, forever, or a specified number of billing cycles.
Path Parameters
uuid
string*
UUID of the subscription.
Body Parameters
duration
string*
once — single billing cycle; forever — permanent;
repeating — limited number of cycles (requires
number_of_months).
onceforeverrepeating
amount
integer*
Fixed discount in smallest currency unit. At least one of amount or percent must be > 0.
percent
number*
Percentage discount (0–100). At least one of amount or percent must be > 0.
number_of_months
integer
Number of billing cycles (required when duration is repeating).
Responses
200
Discount applied
Discount applied
status
integer
subscription
Subscription
upcoming_invoice
object
Preview of the next invoice after the change.
400
Validation or business-logic error
Validation or business-logic error
status
integer
error
string
error_code
integer
401
Missing or invalid API key
Missing or invalid API key
status
integer
error
string
error_code
integer