Skip to content

Stripe: Coupons schemas

4 Stripe schemas with complete fields and constraints.

← Coupons operations · All schemas

Create a coupon — response body

FieldTypePresenceDescription and constraints
$objectRootA coupon contains information about a percent-off or amount-off discount you
might want to apply to a customer. Coupons may be applied to [subscriptions](https://docs.stripe.com/api#subscriptions), [invoices](https://docs.stripe.com/api#invoices),
[checkout sessions](https://docs.stripe.com/api/checkout/sessions), [quotes](https://docs.stripe.com/api#quotes), and more. Coupons do not work with conventional one-off [charges](/api/charges/create) or [payment intents](https://docs.stripe.com/api/payment_intents).
amount_offJSONOptional
amount_off (anyOf 1)JSONAlternative
amount_off (anyOf 1) (anyOf 1)integerAlternativeAmount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer.
amount_off (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
amount_off (anyOf 2)nullAlternative
applies_toModelOptionalExpand Create a coupon — response body — applies to
createdJSONRequired within parent
created (anyOf 1)integerAlternativeTime at which the object was created. Measured in seconds since the Unix epoch.
Format: unix-time
created (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
currencyJSONOptional
currency (anyOf 1)stringAlternativeIf `amount_off` has been set, the three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the amount to take off.
Format: currency
currency (anyOf 2)nullAlternative
currency_optionsobjectOptionalCoupons defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
Additional keys: see wildcard field
currency_options.*ModelAdditional keysExpand Create a coupon — response body — currency options value
durationstringRequired within parentOne of `forever`, `once`, or `repeating`. Describes how long a customer who applies this coupon will get the discount.
Known values: forever, once, repeating
duration_in_monthsJSONOptional
duration_in_months (anyOf 1)JSONAlternative
duration_in_months (anyOf 1) (anyOf 1)integerAlternativeIf `duration` is `repeating`, the number of months the coupon applies. Null if coupon `duration` is `forever` or `once`.
duration_in_months (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
duration_in_months (anyOf 2)nullAlternative
idstringRequired within parentUnique identifier for the object.
Maximum length: 5000
livemodebooleanRequired within parentIf the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
max_redemptionsJSONOptional
max_redemptions (anyOf 1)JSONAlternative
max_redemptions (anyOf 1) (anyOf 1)integerAlternativeMaximum number of times this coupon can be redeemed, in total, across all customers, before it is no longer valid.
max_redemptions (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
max_redemptions (anyOf 2)nullAlternative
metadataJSONOptional
metadata (anyOf 1)objectAlternativeSet of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
Additional keys: see wildcard field
metadata (anyOf 1).*stringAdditional keysMaximum length: 500
metadata (anyOf 2)nullAlternative
nameJSONOptional
name (anyOf 1)stringAlternativeName of the coupon displayed to customers on for instance invoices or receipts.
Maximum length: 5000
name (anyOf 2)nullAlternative
objectstringRequired within parentString representing the object's type. Objects of the same type share the same value.
Known values: coupon
percent_offJSONOptional
percent_off (anyOf 1)JSONAlternative
percent_off (anyOf 1) (anyOf 1)numberAlternativePercent that will be taken off the subtotal of any invoices for this customer for the duration of the coupon. For example, a coupon with percent_off of 50 will make a $ (or local equivalent)100 invoice $ (or local equivalent)50 instead.
percent_off (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
percent_off (anyOf 2)nullAlternative
redeem_byJSONOptional
redeem_by (anyOf 1)JSONAlternative
redeem_by (anyOf 1) (anyOf 1)integerAlternativeDate after which the coupon can no longer be redeemed.
Format: unix-time
redeem_by (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
redeem_by (anyOf 2)nullAlternative
times_redeemedJSONRequired within parent
times_redeemed (anyOf 1)integerAlternativeNumber of times this coupon has been applied to a customer.
times_redeemed (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
validbooleanRequired within parentTaking account of the above properties, whether this coupon can still be applied to a customer.

Referenced models: Create a coupon — response body — applies to, Create a coupon — response body — currency options value

Create a coupon — response body — applies to

FieldTypePresenceDescription and constraints
$objectRoot
productsarrayRequired within parentA list of product IDs this coupon applies to
products[]stringEach itemMaximum length: 5000

Create a coupon — response body — currency options value

FieldTypePresenceDescription and constraints
$objectRoot
amount_offJSONRequired within parent
amount_off (anyOf 1)integerAlternativeAmount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer.
amount_off (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$

Delete a coupon — response body

FieldTypePresenceDescription and constraints
$objectRoot
deletedbooleanRequired within parentAlways true for a deleted object
Known values: True
idstringRequired within parentUnique identifier for the object.
Maximum length: 5000
objectstringRequired within parentString representing the object's type. Objects of the same type share the same value.
Known values: coupon

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.