---
ref: tool:chargebee/create-coupon
name: Create a coupon
company: company:chargebee
workflows: []
access: [api]
tags: [capability:collect-payments, category:payments, has:api]
docs: https://apidocs.chargebee.com/docs/api/coupons/create-a-coupon-for-items
updated: 2026-09-27
---

# Create a coupon

Creates a percentage, fixed-amount or free-quantity coupon that applies to an invoice or to specific items, and returns the coupon.

`id`, `name` and `apply_on` are required: `invoice_amount` discounts the
invoice subtotal, and `each_specified_item` discounts the items set in
`item_constraints`. Set `discount_type` (`percentage`, `fixed_amount` or
`offer_quantity`) with its value, and `duration_type` (`one_time`, `forever` or
`limited_period`) for how long it stays on a subscription; `max_redemptions`
and `valid_till` cap its use.

## Set up

Use the first option your agent supports.

### API (official)

- Base URL: https://{site}.chargebee.com/api/v2
- Endpoint: `POST /coupons/create_for_items`
- Auth: send the header `Authorization: Basic $CHARGEBEE_API_KEY`
- Docs: https://apidocs.chargebee.com/docs/api

Before doing anything else, make one read-only call to confirm access.

## Rules

- Ask the user before anything that sends messages, costs money, or changes data.
- Never print API keys.
