Update coupon
Update the details of an existing coupon.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
- Coupon amount
- Coupon percent
Coupon name.
"Partner discount"
amount Amount to apply as a discount on the total amount (excluding taxes) of a subscription. Expressed in the currency's smallest unit.
2000
Currency code. See ISO 4217.
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 "EUR"
Coupon description.
null
Date corresponding to the expiration of the coupon.
null
Maximum number of subscriptions to which a single coupon can be applied.
null
Products the coupon is scoped to, read together with product_scope: the only discounted products when include, the products never discounted when exclude, empty when all.
null
Which products the coupon discounts. all: every product (product_ids must be empty). include: only the products in product_ids. exclude: every product except those in product_ids (lines without a product stay discounted). include and exclude require a non-empty product_ids. When omitted on create/update, it is inferred: include if product_ids is non-empty, all otherwise. Integrations that read product_ids without product_scope will misread an exclude list as the products the coupon applies to.
all, include, exclude null
Default repeat behaviour applied when the coupon is attached to a subscription. Valid values: once, forever, duration. Can be overridden at attach time.
once, forever, duration "duration"
Default duration applied when repeat is duration. Required when repeat is duration, must be null otherwise.
Key/value pairs to store any metadata useful in your context.
Response
- Coupon amount
- Coupon percent
Coupon ID.
"cou_DKL4Xcb5VSa8CQ"
Coupon name.
"Partner discount"
Coupon description.
null
Date corresponding to the expiration of the coupon.
null
Maximum number of subscriptions to which a single coupon can be applied.
null
Products the coupon is scoped to, read together with product_scope: the only discounted products when include, the products never discounted when exclude, empty when all.
Which products the coupon discounts. all: every product (product_ids must be empty). include: only the products in product_ids. exclude: every product except those in product_ids (lines without a product stay discounted). include and exclude require a non-empty product_ids. When omitted on create/update, it is inferred: include if product_ids is non-empty, all otherwise. Integrations that read product_ids without product_scope will misread an exclude list as the products the coupon applies to.
all, include, exclude "include"
Default repeat behaviour applied when the coupon is attached to a subscription. Valid values: once, forever, duration. Can be overridden at attach time.
once, forever, custom, duration "duration"
Default duration applied when repeat is duration. Required when repeat is duration, must be null otherwise.
Date corresponding to the deletion of the coupon.
null
Key/value pairs to store any metadata useful in your context.
References to this coupon in external providers (billing, etc).
amount Amount to apply as a discount on the total amount (excluding taxes) of a subscription. Expressed in the currency's smallest unit.
2000
Currency code. See ISO 4217.
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 "EUR"

