Create offer code
gumroad_create_offer_codeCreate a new offer code (discount code) on a product. Gumroad REST: POST /v2/products/{product_id}/offer_codes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | The discount code text buyers enter (e.g. LAUNCH20). | |
| universal | No | Whether the offer code applies to all of the user's products (default false). | |
| amount_off | Yes | The amount off — in cents when offer_type is 'cents', or a percentage when 'percent'. | |
| offer_type | No | Whether amount_off is a fixed amount in 'cents' or a 'percent' discount (default 'cents'). | |
| product_id | Yes | The product id to create the offer code on. | |
| max_purchase_count | No | Optional cap on how many times the offer code can be used. |