Create discount

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

A discount is given a handle for own reference. Name will be reflected on the invoice.

Body Params
string
required
length ≥ 1

Name of discount. Will be used as order line text.

string

Optional description of discount

int32
≥ 0

Fixed amount discount deducted from order line amounts including VAT, either amount or percentage should be provided

string

Currency for the discount plan in ISO 4217 three letter alpha code

int32
1 to 100

Percentage discount applied to each applicable order line, either amount or percentage should be provided

string
required
length ≥ 1
^[a-zA-Z0-9_\.\-@]*$

Per account unique handle for the discount

metadata
object

Custom metadata.

apply_to
array of strings, unique
required
length between 1 and 2147483647

Which order lines the discount is applicable to: all, setup_fee, plan, additional_cost, add_on, ondemand and metered_billing_product

apply_to*
apply_to_handles
array of strings, unique
length between 0 and 1000

Restricts the discount to the plans, add-ons and usage-based products with these handles. Requires apply_to to name at least one of plan, add_on or metered_billing_product, and cannot be combined with all: all also covers setup_fee, additional_cost and ondemand, which no handle can name, so the kinds to narrow are named explicitly instead. When left out or empty the discount applies to every one of them, as before. Every handle must name an existing plan, add-on or usage-based product of one of those kinds in the account, or the request is rejected. A discount with this set cannot be granted by a coupon: a coupon's eligible plans decide which subscriptions may redeem it, not which lines are discounted, so the two cannot stand in for one another.

apply_to_handles
int32
≥ 1

Apply discount to a fixed number of invoices

string
enum

Time unit use for fixed valid period either days or months

Allowed:
int32
≥ 1

Fixed period length e.g. 12 months or 14 days

Responses

Language
Credentials
Basic
base64
:
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json