{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/stripe/main/json-schema/stripe-post-promotion-codes-request-schema.json", "title": "PostPromotionCodesRequest", "x-generated": "2026-10-12", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/stripe-promotion-codes-api-openapi.yml#/components/schemas/PostPromotionCodesRequest", "type": "object", "required": [ "coupon" ], "properties": { "active": { "description": "Whether the promotion code is currently active.", "type": "boolean" }, "code": { "description": "The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for a specific customer. If left blank, we will generate one automatically.", "maxLength": 500, "type": "string" }, "coupon": { "description": "The coupon for this promotion code.", "maxLength": 5000, "type": "string" }, "customer": { "description": "The customer that this promotion code can be used by. If not set, the promotion code can be used by all customers.", "maxLength": 5000, "type": "string" }, "expand": { "description": "Specifies which fields in the response should be expanded.", "items": { "maxLength": 5000, "type": "string" }, "type": "array" }, "expires_at": { "description": "The timestamp at which this promotion code will expire. If the coupon has specified a `redeems_by`, then this value cannot be after the coupon's `redeems_by`.", "format": "unix-time", "type": "integer" }, "max_redemptions": { "description": "A positive integer specifying the number of times the promotion code can be redeemed. If the coupon has specified a `max_redemptions`, then this value cannot be greater than the coupon's `max_redemptions`.", "type": "integer" }, "metadata": { "additionalProperties": { "type": "string" }, "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", "type": "object" }, "restrictions": { "description": "Settings that restrict the redemption of the promotion code.", "properties": { "currency_options": { "additionalProperties": { "properties": { "minimum_amount": { "type": "integer" } }, "title": "currency_option", "type": "object" }, "type": "object" }, "first_time_transaction": { "type": "boolean" }, "minimum_amount": { "type": "integer" }, "minimum_amount_currency": { "type": "string" } }, "title": "restrictions_params", "type": "object" } } }