create_promo_code
Create discount promo codes by specifying code, discount type and amount, with options for usage limits, expiry, and product/plan restrictions.
Instructions
Create a new promo code with discount configuration.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | The promo code string customers will enter at checkout (e.g. SAVE20). | |
| discount_type | Yes | Type of discount: percentage (%) or dollar ($). | |
| discount_amount | Yes | Discount value. For percentage, use 0-100. For dollar, use amount in cents. | |
| currency | No | Currency code for dollar discounts (e.g. USD). Required for dollar type. | |
| quantity | No | Max number of times this code can be used. Omit for unlimited. | |
| expiry_date | No | Expiry date as ISO 8601 string (e.g. 2025-12-31). Omit for no expiry. | |
| product_ids | No | Restrict code to specific product IDs. Omit for all products. | |
| plan_ids | No | Restrict code to specific plan IDs. Omit for all plans. |