Skip to content

[Billing Plans]: Use total commitment price for StoreProduct.price when representing a billing plan#6910

Merged
fire-at-will merged 1 commit into
mainfrom
use-billing-plan-commitment-price
Jun 4, 2026
Merged

[Billing Plans]: Use total commitment price for StoreProduct.price when representing a billing plan#6910
fire-at-will merged 1 commit into
mainfrom
use-billing-plan-commitment-price

Conversation

@fire-at-will

@fire-at-will fire-at-will commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Description

This PR modifies StoreProduct.price to return the billing plan's total commitment price when a product represents a billing plan. Previously, this returned the product's price (upFront price), which is often the same as a monthly commitment's total price, but can differ in some cases.


Note

Medium Risk
Changes the public price value for billing-plan products on iOS 26.4+, which can affect pricing display and derived per-period calculations that use price.

Overview
On iOS 26.4+, when a StoreProduct has installmentsInfo (billing-plan product), price now returns commitmentTotalPrice instead of the underlying StoreKit up-front price. Without installments info, or on older OS versions, behavior is unchanged and still uses product.price.

Unit tests cover the nil-installments case, pre-26.4 behavior even if installments data is present, and the 26.4+ commitment-total path. Test helpers accept an explicit price and optional commitmentTotalPrice for fixtures.

Reviewed by Cursor Bugbot for commit 2e2e697. Bugbot is set up for automated code reviews on this repo. Configure here.

@fire-at-will fire-at-will added the pr:fix A bug fix label Jun 4, 2026
@fire-at-will fire-at-will requested a review from a team as a code owner June 4, 2026 13:35

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 2e2e697. Configure here.

} else {
return self.product.price
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pricePerMonth inflates billing plans

Medium Severity

On iOS 26.4+, when installmentsInfo is set, StoreProduct.price now returns the full commitment total, but pricePerMonth (and the other pricePer* helpers) still divide that value by subscriptionPeriod, which is typically one billing cycle. Monthly installment products then show roughly the full commitment as the “per month” amount instead of the per-installment price, breaking paywall comparisons and product.price_per_month display.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 2e2e697. Configure here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't an issue because subscriptionPeriod on the store product is equal to the product's duration, which is still 1 year, even for products with 12 month commitments.

@fire-at-will fire-at-will changed the title [Billing Plans]: Use total commitment price as for StoreProduct.price when representing a billing plan [Billing Plans]: Use total commitment price for StoreProduct.price when representing a billing plan (#6910) Jun 4, 2026
@fire-at-will fire-at-will changed the title [Billing Plans]: Use total commitment price for StoreProduct.price when representing a billing plan (#6910) [Billing Plans]: Use total commitment price for StoreProduct.price when representing a billing plan Jun 4, 2026
@fire-at-will fire-at-will merged commit c437da3 into main Jun 4, 2026
43 of 45 checks passed
@fire-at-will fire-at-will deleted the use-billing-plan-commitment-price branch June 4, 2026 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:fix A bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants