Breaking changes
Coupons now use floats rather than integers to specify percent_off Breaking changes
What’s new
We deprecated the percent_off_precise field and replaced it with the percent_off field for coupons. This changes the percentage representation from an integer to a float, with a precision of two decimal places.
Impact
Lets you more precisely discount percentages in coupons, which lets you create discounts with fractional percentages. For example, instead of only whole number percentages, you can set discounts like 10.50%.
Changes
| Parameter | Change | Resources or endpoints |
|---|---|---|
| percent_off_precise | Removed | Coupon |
| Fields | Change | From → to |
| Coupon#create. percent_off Coupon. percent_off | Changed | longInteger → number |
Upgrade
- View your current API version in Workbench.
- If you use an SDK, upgrade to the corresponding SDK version for this API version.
- If you don’t use an SDK, update your API requests to include Stripe-Version: 2018-07-27
- Upgrade the API version used for webhook endpoints .
- Test your integration against the new version.
- If you use Connect, test your Connect integration .
Learn more about Stripe API upgrades.
