[Billing Plans]: Update POST receipt values for transactions with billing plans#6799
Merged
Merged
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ 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 768fbba. Configure here.
|
|
||
| let price: Decimal | ||
| if #available(iOS 26.4, tvOS 26.4, watchOS 26.4, macOS 26.4, visionOS 26.4, *), | ||
| let installmentsInfo = product.installmentsInfo { |
Member
There was a problem hiding this comment.
indenting looks slightly off here?
Contributor
Author
MarkVillacampa
approved these changes
May 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Description
This PR updates the values sent through POST /receipt when purchasing a product with a billing plan. Specifically, it:
StoreProduct.idforproduct_identifier. This will be something likecom.rc.productfor purchases without a billing plan, and will becom.rc.product:monthlyfor a product with a monthly billing plan.priceto be the price of the installment when the billing plan type is monthly, instead of the price of the product, which would be the annual priceNote
Medium Risk
Changes the
POST /receiptpayload fields used for purchase validation/attribution (product identifier and price), which could affect backend processing and analytics for billing-plan purchases if mismatched.Overview
Updates
ProductRequestDatainitialization to send billing-plan-aware values when posting receipts: it now usesStoreProduct.id(e.g.product:monthly) asproductIdentifierand, on iOS/tvOS/watchOS/macOS/visionOS 26.4+, usesinstallmentsInfo.installmentBillingPricefor.monthlybilling plans instead of the full product price.Expands unit coverage to validate the new identifier/price behavior and adjusts
syncPurchasesmetadata tests to accept both base and:monthlyproduct identifiers.Reviewed by Cursor Bugbot for commit e196597. Bugbot is set up for automated code reviews on this repo. Configure here.