Adds the ability to opt out of strict arithmetic validation for Payment Line Items
What’s new
You can now opt out of strict arithmetic validation for Payment Line Items on a per-request basis by using the amount_details.enforce_arithmetic_validation parameter.
Impact
By default, Stripe validates that your line item data passed as part of the Payment Line Items feature adds up correctly. When the sum of line items doesn’t match the total amount, Stripe returns a 400 error so you can correct discrepancies before processing the payment.
You can now opt out of this strict validation on a per-request basis by setting amount_details.enforce_arithmetic_validation to false. When you do this:
- The request proceeds even if line item amounts don’t match the total.
- Stripe returns validation error details in the amount_details.error field in the response.
- For card payments, Stripe doesn’t send line item data with arithmetic errors to card networks, preventing the transaction from qualifying for L2/L3 interchange savings.
Changes
| Parameters | Change | Resources or endpoints |
|---|---|---|
| enforce_arithmetic_validation | Added | PaymentIntent#capture. amount_details PaymentIntent#confirm. amount_details PaymentIntent#create. amount_details + 2 more PaymentIntent#increment_authorization. amount_details PaymentIntent#update. amount_details |
| error | Added | PaymentIntent. amount_details |
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: 2026-01-28. clover
- Upgrade the API version used for webhook endpoints .
- Test your integration against the new version.
- If you use Connect, test your Connect integration .
- In Workbench, perform the upgrade . You can roll back the version for 72 hours.
Learn more about Stripe API upgrades.
