code | string | Yes | The customer-facing code, for example "SUMMER25". Automatically uppercased. Must be unique in your Stripe account. |
name | string | No | Internal name shown in the Stripe Dashboard. Defaults to code. |
discountType | 'percent'|'amount' | Yes | Whether discountValue is a percentage or a fixed amount. |
discountValue | float | Yes | For 'percent', a number from 0 to 100. For 'amount', a major currency unit amount, for example 10.00 for €10, not minor units. |
currency | string | Only for 'amount' | 3-letter ISO code. Defaults to the currency configured on init. |
duration | 'once'|'repeating'|'forever' | No, defaults to 'once' | How many billing periods the discount applies for. |
durationInMonths | int | Only with 'repeating' | Number of months the discount repeats. |
maxRedemptions | int | No | Total number of times this code can ever be redeemed across all customers. |
expiresAt | string | No | Any date string parsable by PHP's strtotime(), for example "2026-12-31" or "+30 days". |