Create discount code
agenta_discounts_createCreate a discount code buyers enter at checkout for money off, or a tracking-only referral code that records who a referral brought in. Returns the code and its id for managing promotions.
Instructions
Create a discount code buyers type at checkout. Creates a code buyers type at checkout to get money off, or a tracking-only code that records who a referral brought in. Returns the code and its id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | The code buyers type at checkout | |
| name | No | Your label for it, shown on the buyer’s invoice | |
| plan | No | Limit it to one plan: the product id. Omit for all plans | |
| business | No | Act for this business you manage (its id). Omit to act as yourself. | |
| amountOff | No | Fixed amount off the first invoice, e.g. 5.00 | |
| expiresAt | No | Date the code stops working (YYYY-MM-DD) | |
| percentOff | No | Percentage off the first invoice, e.g. 20 | |
| maxRedemptions | No | Stop the code working after this many subscribers use it |