Stripe | Financial Infrastructure to Grow Your Revenue

Stripe | Financial Infrastructure to Grow Your Revenue

4466 articles

Coupons now use floats rather than integers to specify percent_off


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

ParameterChangeResources or endpoints
percent_off_preciseRemovedCoupon
FieldsChangeFrom → to
Coupon#create. percent_off Coupon. percent_offChangedlongInteger → number

Upgrade

  1. View your current API version in Workbench.
  2. 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
  1. Upgrade the API version used for webhook endpoints .
  2. Test your integration against the new version.
  3. If you use Connect, test your Connect integration .
  4. In Workbench, perform the upgrade . You can roll back the version for 72 hours.

Learn more about Stripe API upgrades.

Last verified 2026-09-24

Is this helpful?