Coupons Get An Off Switch
deactivate_coupon and reactivate_coupon are live. Ending a promo is now one sentence to your AI, same as starting one. Deactivating is not deleting: the code stops working at checkout immediately, every order that used it still names it, and list_coupons keeps returning it with active: false. Both tools need an admin or owner key.
Making a discount code in GoCushy has always been one sentence. "Create a 20% code called SAVE20." Your AI calls create_coupon and the code is live.
Ending one was not one sentence. You opened the dashboard, found the right screen, and switched it off by hand.
For most software that asymmetry is a shrug. For a money tool it is the wrong way round. Starting a promo is something you plan; stopping one is usually something you need to do now. A code leaks onto a deal site. A partner posts it publicly instead of to their list. A launch ended on Friday and it is Sunday morning. In every one of those, the urgent action is stop — and stop was the slow one, the one that needed a laptop and a login.
deactivate_coupon and reactivate_coupon close that gap. They went out with v34 of our MCP app. That is the whole change, and it is small, but it moves the fast direction from create-only to both.
Deactivate is not delete
This distinction matters more than it sounds, so I want to be exact about it.
deactivate_coupon changes one thing: whether the code works at checkout. It stops working immediately.
Three things it does not do:
- It does not remove the coupon.
list_couponsstill returns it, withactive: false. It is in your list, flagged off, where you can see it. - It does not touch orders. Every order that was placed with the code still references the code. Your history stays true.
- It is not permanent.
reactivate_couponturns it back on — same code, same rules.
I could have shipped a delete instead. Deletes are simpler to build and much worse to live with, because the record of what a buyer paid and why is exactly the thing you need eight months later when somebody disputes a charge, or an accountant asks why an invoice reads $39.20 against a $49 offer. A code that vanishes takes the explanation with it and leaves you with an unexplained number.
So it is a switch, not a shredder.
list_coupons the whole time, flagged active: false.It needs an admin key, and that is deliberate
Both tools require an admin or owner API key.
That is a real limit and I would rather state it than have you discover it. If you have handed an agent a lesser key, it will not be able to switch your promo off — and it should not be able to.
Here is the reasoning. Turning a discount on or off changes what every buyer pays from that moment forward. It is not a read, and it is not a small write. An agent that can tell you which coupons exist and how they are performing is doing something categorically different from an agent that can change what your checkout charges. The key is where that line is drawn, so "my AI can end a promo" and "anything holding any of my keys can end a promo" stay two different sentences.
What the checkout actually decides
A coupon is not simply on or off. When a code arrives at checkout, the server works through a short list, and every answer has to be yes before a cent comes off.
- Is it active? This is the switch the two new tools flip.
- Does it cover this offer? Scope is optional. If you scoped a code to one offer, it does nothing on any other one.
- Is it under its redemption cap? Also optional. "First 50 buyers" is a number the server counts, not a promise you have to police by hand.
- Is it before its expiry? Also optional. A date, after which the code stops applying on its own.
All four of those live on the server. None of them live in the browser. The buyer's browser sends a string; what that string is worth is worked out on our side.
The coupon rules worth knowing
Since I am writing about coupons anyway, here is the set of rules that decides whether the code you have in mind is possible.
A percentage or an amount, never both. A coupon takes a percentage off, or a fixed amount off. There is no code that does both at once.
Scope is optional. Leave it open and the code works across your offers; scope it to one offer and it works only there.
A redemption cap is optional. Set a number and the code stops once it has been used that many times.
An expiry is optional. Set a date and the code stops on its own.
It comes off before tax. The discount is applied server-side, and tax is worked out from what is left. Tax follows the amount actually paid, not the amount on the sticker.
It can never take a charge below $0.50. That floor is real, and it has a consequence worth thinking about before you write a big code: a coupon cannot make something free, because 100% off lands under the floor.
On a subscription, the discount applies to the first payment. Renewals go out at full price. That is a joining discount, not a permanent one, and you should price around it rather than be surprised by it. It also means deactivating a code cannot claw back an ongoing discount from an existing subscriber, because there was never an ongoing discount to claw back.
Where a coupon is the wrong tool
Four cases where I would reach for something else.
- A permanent discount. If the lower number is what you actually want people to pay from now on, that is not a promo. That is your price, and it belongs on the offer.
- Undoing a sale that already happened. Deactivating a code does nothing to orders. If you want to give money back on one of them, that is a refund — a separate decision, made per order.
- An ongoing subscription discount. First payment only. If you want a permanently cheaper plan, make it a plan.
- Giving something away. The $0.50 floor means 100% off is not a coupon you can write.
And one habit worth forming: if your promo has a known end date, set the expiry when you create it. Then the ending is already handled and nobody has to remember anything on a Sunday. The off switch is for the endings you did not plan — the leak, the screenshot, the partner who posted it publicly. Those are the ones that need to be one sentence.
The general shape of this
I keep coming back to the same rule when we build for agents. Anything an agent can start, it should be able to stop, on the same terms and in the same breath. A tool that only creates is not really automated — it just moves the work to the bit where you are least likely to have a laptop open.
Coupons were the clearest example of that gap in GoCushy. Now they are not.