Skip to main content
POST
Create contract recurring discount

Authorizations

X-API-KEY
string
header
required

API Key Authentication.

Path Parameters

id
string<uuid>
required

Unique identifier for the contract.

Body

application/json
method
enum<string>
required

Discount method: "fixed" (amount in cents) or "percentage" (basis points).

Available options:
fixed,
percentage
amount
number
required

Amount in cents when method is "fixed", or basis points (0-10000, where 10000 = 100%) when method is "percentage".

description
string
required
Minimum string length: 1
startDate
string<date>
required

First billing-cycle start date the discount applies to. Must match a valid cycle date of the contract.

targetScope
enum<string>
required

Where the discount applies: "invoice", "plan", or "contract_minimum_amount".

Available options:
invoice,
plan,
contract_minimum_amount
planId
string<uuid> | null

Optional plan to scope the discount to. Required when targetScope is "plan".

endDate
string<date> | null

Optional last cycle date the discount applies to. Null means the discount has no end.

distributionMode
enum<string>
default:proportional

For split invoices: "proportional" divides a fixed discount across invoices; "full" applies it in full to each.

Available options:
proportional,
full

Response

Default Response

id
string<uuid>
required
planId
string<uuid> | null
required
targetScope
enum<string>
required
Available options:
invoice,
plan,
metric,
contract_minimum_amount
method
enum<string>
required
Available options:
fixed,
percentage
amount
number
required
description
string
required
Minimum string length: 1
startDate
string<date>
required
endDate
string<date> | null
required
distributionMode
enum<string>
required
Available options:
proportional,
full
isActive
boolean
required