Create discount code
create_discount_codeMake a code buyers type on the payment page, in the owner's Stripe account; turns the site's code field on. One of percentOff or amountOffCents. A code takes its discount off the whole order, on every site that takes orders through the same Stripe account. Full reference: get_reference {topic:"shop"}.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"siteId": "<siteId>",
"code": "<code>"
},
"name": "create_discount_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | 3-20 letters/digits, e.g. "SUMMER10" | |
| endsAt | No | "2026-08-31" | |
| siteId | Yes | Site id (from list_sites) | |
| currency | No | ||
| percentOff | No | ||
| firstTimeOnly | No | ||
| amountOffCents | No | ||
| maxRedemptions | No | ||
| minimumOrderCents | No |