创建优惠券
Create a coupon and optionally create promotion codes for it.
授权
Your secret API key obtained from the Clink dashboard (Developers section)
Current timestamp in milliseconds since Unix epoch (required for request signing)
请求体
Parameters required to create a coupon
Coupon name
40Discount type
percentage, fixed_amount Coupon applicability type
none, product, price Discount duration type
once, repeating, forever Percentage discount. Used when discountType is percentage.
0 <= x <= 100Fixed discount amount by currency. Used when discountType is fixed_amount.
{ "USD": 5, "EUR": 4.5 }Product IDs this coupon applies to
Price IDs this coupon applies to, grouped by product ID
Number of billing periods for repeating coupons
Maximum total redemptions for this coupon
Coupon validity start time as a 13-digit Unix timestamp in milliseconds
1780660800000
Coupon validity end time as a 13-digit Unix timestamp in milliseconds
1780660800000
Promotion codes to create together with the coupon
20