Skip to main content
agenta discounts manages discount codes: codes a buyer types at checkout. A code works on any product, one-time or subscription. A code takes a percentage or a fixed amount off the first invoice. A code with neither changes no price and records who it brought in, which is how a referral code works.

Commands

Every command takes --json for one JSON object, and --business <id> to act as a business you manage.

Create

string
required
The code buyers type at checkout. Letters, numbers, dashes and underscores, up to 64.
string
Your label for the code, for your records. Buyers never see it.
number
The percentage off the first invoice, e.g. 20.
number
A fixed amount off the first invoice, e.g. 5.00.
number
The code stops working after this many subscribers use it.
string
The date the code stops working, as YYYY-MM-DD.
Use --percent-off or --amount-off, not both. Leave both out for a tracking-only code.
Output
A tracking-only code prints “It changes no price; it tells you who it brought in.” on the second line.

List

number
default:"10"
Results per page, from 1 to 100.
Output
With no codes yet, it prints: “No discount codes yet. Create one with discounts create —code LAUNCH20 —percent-off 20.”

Show

Output
show is the only command that reports what a code takes off and how many people used it.

Archive

Output

Next steps

Discount codes

How codes work at checkout and in the dashboard.

Subscriptions

List, cancel and change subscriptions.