Skip to main content
PUT
Update coupon

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Body

application/json
name
string
required

Coupon name.

Example:

"Partner discount"

type
enum<string>
required
Available options:
amount
discount_amount
number
required

Amount to apply as a discount on the total amount (excluding taxes) of a subscription. Expressed in the currency's smallest unit.

Example:

2000

currency
enum<string>
required

Currency code. See ISO 4217.

Available options:
EUR,
AED,
AFN,
XCD,
ALL,
AMD,
AOA,
ARS,
USD,
AUD,
AWG,
AZN,
BAM,
BBD,
BDT,
BGN,
BHD,
BIF,
XOF,
BMD,
BND,
BOB,
BRL,
BSD,
BTN,
NOK,
BWP,
BYR,
BZD,
CAD,
CDF,
XAF,
CHF,
NZD,
CLP,
CNY,
COP,
CRC,
CUP,
CVE,
ANG,
CZK,
DJF,
DKK,
DOP,
DZD,
EGP,
MAD,
ERN,
ETB,
FJD,
FKP,
GBP,
GEL,
GHS,
GIP,
GMD,
GNF,
GTQ,
GYD,
HKD,
HNL,
HRK,
HTG,
HUF,
IDR,
ILS,
INR,
IQD,
IRR,
ISK,
JMD,
JOD,
JPY,
KES,
KGS,
KHR,
KMF,
KPW,
KRW,
KWD,
KYD,
KZT,
LAK,
LBP,
LKR,
LRD,
LSL,
LYD,
MDL,
MGA,
MKD,
MMK,
MNT,
MOP,
MRO,
MUR,
MVR,
MWK,
MXN,
MYR,
MZN,
NAD,
XPF,
NGN,
NIO,
NPR,
OMR,
PAB,
PEN,
PGK,
PHP,
PKR,
PLN,
PYG,
QAR,
RON,
RSD,
RUB,
RWF,
SAR,
SBD,
SCR,
SDG,
SEK,
SGD,
SHP,
SLL,
SOS,
SRD,
SSP,
STD,
SYP,
SZL,
THB,
TJS,
TMT,
TND,
TOP,
TRY,
TTD,
TWD,
TZS,
UAH,
UGX,
UYU,
UZS,
VEF,
VND,
VUV,
WST,
YER,
ZAR,
ZMW,
ZWL
Example:

"EUR"

description
string | null

Coupon description.

Example:

null

expiration_date
string<date-time> | null

Date corresponding to the expiration of the coupon.

Example:

null

redemption_limit
number | null

Maximum number of subscriptions to which a single coupon can be applied.

Example:

null

product_ids
string[] | null

List of product IDs the coupon can be applied to. If empty, the coupon can be applied to any product.

Example:

null

repeat
enum<string> | null

Default repeat behaviour applied when the coupon is attached to a subscription. Valid values: once, forever, duration. Can be overridden at attach time.

Available options:
once,
forever,
duration
Example:

"duration"

duration
object | null

Default duration applied when repeat is duration. Required when repeat is duration, must be null otherwise.

Example:

Response

id
string
required

Coupon ID.

Example:

"cou_DKL4Xcb5VSa8CQ"

name
string
required

Coupon name.

Example:

"Partner discount"

description
string | null
required

Coupon description.

Example:

null

expiration_date
string<date-time> | null
required

Date corresponding to the expiration of the coupon.

Example:

null

redemption_limit
number | null
required

Maximum number of subscriptions to which a single coupon can be applied.

Example:

null

product_ids
string[]
required

List of product IDs the coupon can be applied to. If empty, the coupon can be applied to any product.

Example:
repeat
enum<string> | null
required

Default repeat behaviour applied when the coupon is attached to a subscription. Valid values: once, forever, duration. Can be overridden at attach time.

Available options:
once,
forever,
custom,
duration
Example:

"duration"

duration
object | null
required

Default duration applied when repeat is duration. Required when repeat is duration, must be null otherwise.

Example:
created_at
string<date-time>
required

UTC date time string in the ISO 8601 format.

Example:

"2024-12-20T16:04:11Z"

integrations
object[]
required

References to this coupon in external providers (billing, etc).

type
enum<string>
required
Available options:
amount
discount_amount
number
required

Amount to apply as a discount on the total amount (excluding taxes) of a subscription. Expressed in the currency's smallest unit.

Example:

2000

currency
enum<string> | null
required

Currency code. See ISO 4217.

Available options:
EUR,
AED,
AFN,
XCD,
ALL,
AMD,
AOA,
ARS,
USD,
AUD,
AWG,
AZN,
BAM,
BBD,
BDT,
BGN,
BHD,
BIF,
XOF,
BMD,
BND,
BOB,
BRL,
BSD,
BTN,
NOK,
BWP,
BYR,
BZD,
CAD,
CDF,
XAF,
CHF,
NZD,
CLP,
CNY,
COP,
CRC,
CUP,
CVE,
ANG,
CZK,
DJF,
DKK,
DOP,
DZD,
EGP,
MAD,
ERN,
ETB,
FJD,
FKP,
GBP,
GEL,
GHS,
GIP,
GMD,
GNF,
GTQ,
GYD,
HKD,
HNL,
HRK,
HTG,
HUF,
IDR,
ILS,
INR,
IQD,
IRR,
ISK,
JMD,
JOD,
JPY,
KES,
KGS,
KHR,
KMF,
KPW,
KRW,
KWD,
KYD,
KZT,
LAK,
LBP,
LKR,
LRD,
LSL,
LYD,
MDL,
MGA,
MKD,
MMK,
MNT,
MOP,
MRO,
MUR,
MVR,
MWK,
MXN,
MYR,
MZN,
NAD,
XPF,
NGN,
NIO,
NPR,
OMR,
PAB,
PEN,
PGK,
PHP,
PKR,
PLN,
PYG,
QAR,
RON,
RSD,
RUB,
RWF,
SAR,
SBD,
SCR,
SDG,
SEK,
SGD,
SHP,
SLL,
SOS,
SRD,
SSP,
STD,
SYP,
SZL,
THB,
TJS,
TMT,
TND,
TOP,
TRY,
TTD,
TWD,
TZS,
UAH,
UGX,
UYU,
UZS,
VEF,
VND,
VUV,
WST,
YER,
ZAR,
ZMW,
ZWL
Example:

"EUR"