Commerce
createCoupon
Create Coupon
Mint ONE discount code for a shop.
Ask Claude, ChatGPT, Cursor or any AI connected to The Cloud "make a SAVE5 code", and it calls createCoupon.
Example call
The MCP tools/call params, with the required arguments only.
{
"arguments": {
"appId": "<appId>",
"code": "<code>",
"type": "<type>",
"value": 1
},
"name": "createCoupon"
}Arguments
appIdstringrequiredThe Studio app ID whose shop is offering it.codestringrequiredThe code buyers type, e.g. SAVE5. Case-insensitive, unique per shop.typestringrequiredflat takes an amount off; percent takes a share off.valuenumberrequiredFor flat: minor units off, e.g. 500 = $5.00. For percent: whole percent, e.g. 10 = 10% (max 100).endsAtnumberoptionalEpoch ms the code stops working. Omit for no expiry.firstOrderOnlybooleanoptionalRedeemable only by someone with no paid order at this shop yet. Same identity caveat as perCustomerLimit.maxRedemptionsintegeroptionalTotal redemptions across all buyers, ever. This is the HARD bound: it holds even for an anonymous checkout with no email. Omit for unlimited.minSubtotalAfterFirstMinorintegeroptionalSmallest cart from the customer's second redemption onward, in minor units; the first redemption has no such floor. Counted per email, like perCustomerLimit.minSubtotalMinorintegeroptionalSmallest cart the code works on, in minor units (2000 = a $20 cart). Omit for no minimum.perCustomerLimitintegeroptionalRedemptions allowed per buyer. Counted per email, so it only bites where a buyer identity is known before payment; maxRedemptions is what always holds.startsAtnumberoptionalEpoch ms the code starts working. Omit to start immediately.
Returns
The registry does not declare a return shape.
Declared limits
value: greater than 0maxRedemptions: greater than 0maxRedemptions: maximum 9007199254740991minSubtotalAfterFirstMinor: minimum 0minSubtotalAfterFirstMinor: maximum 9007199254740991minSubtotalMinor: minimum 0minSubtotalMinor: maximum 9007199254740991perCustomerLimit: greater than 0perCustomerLimit: maximum 9007199254740991
Ask for it
The Cloud routes these requests to this verb.
- make a SAVE5 code
- create a 10% off coupon
- set up a first-order discount
- let them use it every time but the second time needs a $45 order
Pair it with
The verbs that finish the job.
Questions
What does createCoupon do?
Mint ONE discount code for a shop. It is one of the tools The Cloud MCP server gives every connected AI.
How do I use createCoupon from Claude or ChatGPT?
Connect your AI to The Cloud at https://mcp.thecloud.so/mcp and sign in once. Then ask Claude, ChatGPT, Cursor or any AI connected to The Cloud "make a SAVE5 code", and it calls createCoupon.
Is createCoupon safe to let an AI call?
createCoupon changes your workspace. What an AI creates is Private until you share it.
Connect
One endpoint gives your AI this tool and every other one: connect Claude, ChatGPT, Cursor or Gemini, read what The Cloud is, or see pricing.