create_coupon
Generate coupon codes linked to affiliates for referral programs, with optional integration to Stripe or LemonSqueezy for automatic attribution.
Instructions
Create a new coupon code linked to an affiliate. Optionally tie it to a Stripe coupon ID or LemonSqueezy discount code for automatic attribution.
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": {
"affiliate_id": "<affiliate_id>",
"coupon_code": "<coupon_code>"
},
"name": "create_coupon"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| affiliate_id | Yes | ID of the affiliate to link this coupon to | |
| coupon_code | Yes | Coupon code (min 3 chars, alphanumeric with hyphens/underscores) | |
| stripe_coupon_id | No | Stripe coupon ID for automatic attribution | |
| lemonsqueezy_discount_code | No | LemonSqueezy discount code | |
| status | No | Coupon status (default: active) |