Adds support for last aggregation formula on meters
What’s new
We’ve added a last aggregation formula to Billing Meters. This formula uses the value from the last event in a time range as the total aggregate value for that period.
Impact
The new last formula lets you bill based on the final meter event received in a billing period for a customer. This complements the existing sum and count formulas, giving you more billing flexibility.
Your existing Billing Meters continue to use their currently configured aggregation formulas. To use this new feature, create a new Billing Meter with the last aggregation formula.
Changes
| Value | Change | Enums |
|---|---|---|
| last | Added | Billing.Meter#create.default_aggregation.formula Billing.Meter.default_aggregation.formula |
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: 2025-03-31. basil
- 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.
