Stop a discount code
The code stops working immediately. Subscribers who already redeemed it keep the discount they were given. This route needs a signed-in owner or admin: an API key is refused with 403.
Authorizations
Your secret key, from app.agentaos.ai -> Settings -> Developers -> API Keys. The key's prefix is both its identity and its environment: sk_test_... (sandbox, free, no verification) or sk_live_... (real money, requires business verification). A missing or invalid key returns 401.
Path Parameters
Discount code UUID (the id field from create or list).
Response
The archived discount code.
Fully camelCase on the wire.
As you typed it. Buyers may type it in any case.
discount changes the price. tracking changes nothing and only records who used it.
discount, tracking Usable as far as this list can tell: not archived, and fully created. Whether the code has since been used up is answered by the single-code route.
The products this code works on, one-time or subscription. Empty means every product you own.
The names of those products, in the same order.