Web: productChangeInfo on PurchaseParams.package is dropped before reaching purchases-js, so a plan change creates a second subscription
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- dart, javascript
Research direction
Read lib/web/purchases_flutter_web.dart _purchasePackage and purchases-common.ts purchasePackage / createNativePurchaseParams in purchases-hybrid-common to trace the parameter flow and agree on the web-specific type shape. Add coverage for forwarding productChangeInfo through both layers; done means a web purchase reaches purchases-js with the subscription ID and subscriber token, and the relevant tests pass.
Written by the indexing model from the issue text.
Description
Summary
On web, Purchases.purchase(PurchaseParams.package(pkg, productChangeInfo: …)) silently ignores productChangeInfo. The underlying @revenuecat/purchases-js SDK supports product changes (purchase({ rcPackage, productChangeInfo: { subscriptionId, subscriberToken } }), per https://www.revenuecat.com/docs/web/product-changes), but the parameter is dropped twice before it gets there:
purchases_flutterweb plugin —lib/web/purchases_flutter_web.dart,_purchasePackageforwards onlypackageIdentifier,presentedOfferingContextandcustomerEmail(10.19.0; unchanged in 11.0.0).purchases-hybrid-commonJS mappings —purchases-js-hybrid-mappings/src/purchases-common.ts,purchasePackage(purchaseParams)accepts onlypackageIdentifier,presentedOfferingContext,optionIdentifier,customerEmail,selectedLocale,defaultLocale, andcreateNativePurchaseParamsnever setsproductChangeInfoon thePurchaseParamsit passes topurchases.purchase(currentmain, after the 20.3.0 release).
So a Flutter web app whose customer holds an active Web Billing subscription and buys a different package gets a second subscription instead of the configured upgrade/downgrade path, even with change paths configured in the dashboard.
Expected
The same productChangeInfo parameter that is already accepted on the Dart side reaches purchases-js, so a product change on web behaves like it does when calling purchases-js directly: upgrades apply immediately with proration, downgrades at the end of the cycle.
The existing Dart type StoreProductChangeInfo is Play-shaped (oldProductIdentifier, prorationMode), so web needs a shape with subscriptionId / productIdentifier + subscriberToken. Either a web variant of the type, or a dedicated web-only field on PurchaseParams, would work.
Steps to reproduce
- Flutter web app on
purchases_flutter10.19.0 (or 11.0.0), configured with a Web Billing (Stripe Billing) API key. - Configure an upgrade path A → B in the RevenueCat dashboard Product Catalog.
- Customer holds an active subscription to A.
- Mint a subscriber token server-side (
POST /v2/projects/{p}/apps/{a}/authenticate) and callPurchases.purchase(PurchaseParams.package(packageB, productChangeInfo: …)). - Observe a new subscription to B is created alongside A; no product change occurs. The dropped parameter is visible in the two functions above.
Environment
purchases_flutter10.19.0 (also checked 11.0.0 source)purchases-hybrid-commonJS mappings at currentmain(20.3.0, 2026-11-02)- Flutter web (CanvasKit), Chrome; Stripe Billing engine
Related
- RevenueCat/purchases-js#182 and RevenueCat/purchases-js#938 track the SDK-level feature, which now exists. This issue is only about the hybrid layers not forwarding it.
Happy to open a PR for the Dart side if the hybrid-common side gets a productChangeInfo field.
- Dominant language
- Dart
- Stars
- 722
- Forks
- 220
- Avg merge
- 16h 36m
- Merged PRs (30d)
- 25
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from RevenueCat/purchases-flutter
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
RevenueCat/purchases-flutter#2048 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
RevenueCat/purchases-flutter#2014 ·
Maintainers usually reply within 1 day
-
Android: build.gradle uses Groovy space-assignment syntax (deprecated in Gradle 9, removed in Gradle 10)Possibly taken @fguillen-tejera claimed this 16 days ago. Open
Difficulty 1/5 Under an hour Newbie friendliness 88/100
RevenueCat/purchases-flutter#1973 ·
Maintainers usually reply within 1 day
-
`error: cannot find symbol` after latest `purchases_flutter` and `purchases_ui_flutter` updatesOpenbug
Difficulty 3/5 1-2 days Newbie friendliness 65/100
RevenueCat/purchases-flutter#1907 · 7 comments · 2 reactions ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 48/100
RevenueCat/purchases-flutter#1883 ·
Maintainers usually reply within 1 day
All issues in RevenueCat/purchases-flutter
Similar issues
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
VeryGoodOpenSource/vgv-ai-flutter-plugin#219 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Anxcye/anx-reader#1024 ·
-
[cloud_functions]: Apple platforms ignore custom domains passed as regionPossibly taken @ragavendranbala-TSL claimed this today. OpenNeeds Attention platform: ios platform: macos plugin: functions type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
firebase/flutterfire#19015 · 2 comments ·
Maintainers usually reply within 4 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Baseflow/flutter-geocoding#337 · 1 reaction ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
hajisensai/Fushi#4543 · 3 comments ·
Maintainers usually reply within 1 day