Skip to main content
POST
Switch a discount on or off

Authorizations

Authorization
string
header
default:easner_sk_test_…
required

A secret key, easner_sk_test_… or easner_sk_live_…, as Authorization: Bearer. Each key has one business, one mode and fixed scopes. Transfer routes also accept a transfer's easner_ta_… secret for the customer.

Path Parameters

id
string
required

The object id, as the API returned it.

Body

application/json
active
boolean
required

Response

The discount.

A discount for one email, applied at checkout. Not a code: a payer cannot type it.

object
any
required
id
string<uuid>
required
customer_email
string<email>
required
duration
enum<string>
required
Available options:
once,
repeating,
forever
active
boolean
required
livemode
boolean
required
created
string<date-time>
required
percent_off
number | null
amount_off
integer | null

Whole cents.

currency
string | null
duration_in_months
integer | null
description
string

For example "20% off for 3 months".