Create a discount.
Endpoint
Request body
| Name | Type | Required | Description |
|---|---|---|---|
name | string | Required | Shown on receipts and invoices. |
discount | object | Required | type and its value, as on the coupon object. |
duration | enum | Required | once, repeating or forever. |
duration_months | integer | Optional | Required for repeating. |
products | array of strings | Optional | Only these products. Default: every product. |
max_redemptions | integer | Optional | Uses in all. |
redeem_by | timestamp | Optional | Its last moment. |