delete_coupon
Delete one coupon from an app. WRITE, human-gated: a real delete requires an elicitation-capable client; the human sees the exact coupon (code, percent, redemption count) and must click approve. The model cannot confirm on its own, and confirm_used is only consulted for dry_run previews. Clients without elicitation are refused UNLESS the deployment sets SPARK_PAY_MCP_ALLOW_UNELICITED_WRITES=1 and the call passes confirm_write:true, which is how Claude Code and cron reach these writes; dry_run still works anywhere. Removes the Stripe coupon object and then the coupons row, exactly like the dashboard's delete, so no orphaned Stripe object is left behind. Deleting is permanent and the code becomes reusable afterwards. Set dry_run:true to see exactly which coupon would go (and its redemption count) without touching anything. Use list_coupons first to confirm the code.
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": {
"app_id": "<app_id>",
"code": "<code>"
},
"name": "delete_coupon"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| app_id | Yes | ||
| dry_run | No | ||
| confirm_used | No | ||
| confirm_write | No |