Skip to content

fix(billing): show one unambiguous USD price from paywall to checkout (Play currency policy) - #23852

Merged
Git-on-my-level merged 8 commits into
mainfrom
lane/playcur
Oct 28, 2026
Merged

Git-on-my-level merged 8 commits into
mainfrom
lane/playcur

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

The Android subscription flow could show a bare dollar symbol, omit the post-trial charge, or use a different formatter from Checkout. This change formats the original catalog amount as US$29.99 (fixture example) in every locale and keeps the exact selected price ID through checkout. Annual offers prominently show the full annual charge. No local prices, currency_options, Stripe catalog changes, account changes, entitlement changes, merge or deployment are included.

The previous backend-only fix #23604 disabled Adaptive Pricing. It did not change native/web symbols, backend price_string consumption, trial disclosure, retention copy, or explicitly pin multi-currency Price selection. Adaptive Pricing remains disabled; the session now also sets the selected Price’s original currency and an explicit USD submit notice.

Purchase-surface audit

Line references are in this PR. Catalog unit_amount/amount_minor and currency are price authority; localized copy contains placeholders, never embedded currency symbols.

Surface / strings File:line Source and resulting behavior
7-day offer timeline, today/free-days/end dates app/lib/pages/paywall/trial_paywall_page.dart:190 ARB trial keys + trialDays=7 + date formatter; end step now includes exact selected post-trial total/interval
All five trial slides (summaries, transcription, speakers, questions, apps) app/lib/pages/paywall/trial_paywall_page.dart:323 ARB feature-only captions; no independent price or trial amount; sticky selected-price terms remain visible on every slide
Trial monthly/yearly cards, crossed-out annual comparator, annual savings app/lib/pages/paywall/trial_paywall_page.dart:252 Catalog amount/currency; shared formatBillingPrice for full total and arithmetic comparator/saving
Trial CTA and terms: Try for US$0.00; 7 days free, then US$…/month or /year app/lib/pages/paywall/trial_paywall_page.dart:291 ARB placeholders + selected catalog currency/amount; switching interval updates terms and exact checkout ID
Outline full annual/monthly total, secondary monthly equivalent, saving badge app/lib/pages/paywall/outline_paywall_page.dart:237 PaywallPrice shared formatter; full annual charge is prominent; discount derives from catalog amounts
Hosted web paywall monthly/yearly totals and secondary equivalent app/lib/pages/paywall/web_paywall_page.dart:61; web/paywall/index.html:73 Flutter shared formatter supplies strings in the host bridge; static page consumes them. Old released hosts retain a fixed, ISO-safe fallback, including whole JPY
30-day upsell title/body/claim and new recurring-price terms app/lib/pages/paywall/trial_upsell_sheet.dart:89 ARB + trialDays=30 + selected catalog annual/monthly price; same checkout path
Plans sheet v1 monthly/yearly prices, annual summary, management confirmation app/lib/pages/settings/widgets/plans_sheet.dart:1292; :513 Catalog amount/currency + shared formatter; ignores poisoned backend price_string and billing_total
Plans sheet V2 paid headline and annual summary app/lib/pages/settings/widgets/plans/storefront_plans_content.dart:211 Raw StorefrontPrice amount_minor/currency + shared formatter; full annual charge is prominent
V2 current-plan line, annual saving offer, annual-change confirmation app/lib/models/plan_storefront.dart:283; :351; app/lib/pages/settings/widgets/plans_sheet.dart:401 Additive raw current amount/currency and localized templates; saving_minor and raw annual amount use the same Flutter formatter. Original rendered fields remain for installed clients
Cancel-flow retention: discounted recurring amount; percent/duration offer app/lib/pages/settings/widgets/cancel_subscription_sheet.dart:209; :287 Retention API discounted_amount/currency -> shared formatter; ARB percentage/duration slots; no discount policy change
Promo redemption entry, plan selection, cart discount app/lib/pages/settings/widgets/plans_sheet.dart:523; :1075 No separate promo-price string; exact selected catalog price ID + promotion code go to checkout/upgrade; Stripe displays the discount separately in the same pinned currency
Plan & Usage chat compute budget (capped and uncapped), accessibility copy app/lib/pages/settings/usage_page.dart:836; app/lib/l10n/app_en.arb:10472 USD-denominated budget values use formatBillingPrice; chatUsageCost/chatUsageCostNoLimit/chatUsedOfLimitCompute contain formatted placeholders, with no embedded dollar glyphs. Creator payout threshold copy is outside this purchase flow and unchanged
Stripe cart in PaymentWebViewPage app/lib/pages/paywall/paywall_checkout.dart:54; app/lib/pages/settings/payment_webview_page.dart:31; backend/utils/stripe.py:57 Hosted Stripe UI owns cart wording/glyphs. Original selected Price currency is pinned, Adaptive Pricing disabled, locale=auto for language, and USD is explicit in submit copy. No amount conversion by customer address
Adjacent creator-app Subscribe action app/lib/pages/apps/app_detail/app_detail.dart:900; app/lib/backend/schema/app.dart:562 Opens an existing creator PaymentLink; it displays no in-app numeric price. The legacy getFormattedPrice dollar helper has no callers. This is separate from the Omi personal subscription catalog; existing links are unchanged
Backend v1 price_string and subscription usage prices backend/routers/payment.py:562; backend/routers/users.py:1517 Shared backend format_money now uses US$; mobile purchase surfaces do not render price_string
Backend V2 storefront/current/offer copy; Free price backend/utils/storefront_copy.py:312; backend/config/storefront_copy_v1.json:90 USD becomes US$; Free remains zero with identical benefits; legacy amounts/IDs are unchanged

Hypotheses and policy limit

  1. Country-local currency: confirmed as a policy risk, not proven as the sole cause of this particular rejection. Play’s subscription policy explicitly identifies incompletely localized pricing/currency as a violation. This PR follows the USD-only ruling. If rejection repeats, local pricing is the fallback and needs a separate owner decision. Approval is not guaranteed.
  2. Ambiguous symbols: confirmed in the original native simpleCurrency helpers, retention formatter, web Intl formatter, and backend bare-dollar output. A probe against the pinned intl package rendered $29.99 in en_US/en_CA/en_IN and 29,99 $ in de_DE; the shared formatter renders US$29.99 in all four. All current purchase displays now identify USD explicitly.
  3. Other surfaces: confirmed v1 price_string consumption and missing post-trial amounts on both trial offers. At the fetched baseline, offer ARB values already used placeholders (including Try for {price}). The adjacent Plan & Usage chat-cost ARBs and widget did embed bare dollar signs; all three affected keys now consume formatted USD placeholders. The remaining dollar example in CTA metadata is removed. Legacy PricingOption.priceString stays wire-compatible and has no purchase-display reader.

Stripe manual currency selection can select presentment independently of Adaptive Pricing; explicitly setting session currency overrides that selection. locale=auto follows browser language. Stripe controls glyphs, so a real cart may use US$, a dollar glyph with USD, or localized USD wording; its amount/currency must match. Hosted-cart visual verification is a release acceptance step, not established by mocked session assertions.

Compatibility and rollout

  • Existing subscriptions, retained prices (including JPY), cancellation/reactivation, plan limits and Free benefits are unchanged. JPY manage paths display ¥ with whole-yen units; no new JPY checkout is enabled.
  • iOS uses the same Flutter prices and Stripe Checkout subscription flow. No StoreKit billing / in_app_purchase implementation exists. The in_app_review plugin does import StoreKit for review prompts only; that is unrelated to purchasing.
  • V2 raw-money/template fields are additive; installed clients retain their original rendered fields. Deploy the backend before the mobile build. The coordinator must separately publish web/paywall/index.html through its existing web-paywall release path.
  • This lane does not merge or deploy. Operator steps, including Codemagic build verification, Play Policy status / Inbox, review submission, note text, and the separate Play Payments-policy risk, are in the private run report play-resubmit-steps.md.

Validation

  • Focused backend tests run only via backend/test.sh with a file selector and BACKEND_PYTEST_WORKERS=4; new tests cover new-buyer USD catalog selection across en_US/en_CA/en_IN/de_DE, selected session currency, manual-currency decoys, trial/promo/returning-customer paths, and retained JPY management.
  • Flutter widget tests cover the actual trial card, post-trial copy and exact checkout handoff across en_US/en_CA/en_IN/de_DE, outline/web bridge, 30-day upsell, plans, promo redemption, retention, v1/v2 JPY, and server-string poisoning.
  • Rendered production-widget PNG evidence is attached under .agent-artifacts/ui-evidence/playcur (55 screenshots: 32 widget renders plus 23 native Android captures; all trial slides/cards, outline, upsell, v1/V2 plans/promo, retention, and v1/v2 JPY; en_US and en_CA). The native set was inspected with agent-flutter on Android API 36; the web PNGs use an emulator frame capture of offline static HTML. All use fixture data and are not hosted-cart acceptance. No production account access, GCP tier, live Stripe mutations, Cloud Logging reads or browser automation were used.
  • Repository localization check (python3 app/scripts/l10n.py check) reruns flutter gen-l10n and passes: 49 locales, 4298 keys. Strict ICU audit: all five message keys changed by this PR match English branches/placeholders exactly in every locale; zero newly introduced full-catalog mismatches. The full scan also identifies 184 pre-existing differences across six unrelated keys. Bare-dollar-before-placeholder scan: zero matches across all ARB values. Creator payout threshold copy is unchanged.
  • Luna independent review complete through d844a9a: no findings remain after resolving the V2 and Free-card formatter gaps; final test/evidence changes and the main merge were also reviewed.
  • make preflight: all 66 checks passed. PR metadata: all 5 checks passed. Latest Flutter render/storefront suite: 47 tests passed; corrected dark-palette captures visually inspected. Billing/usage follow-up: 58 tests passed, including capped/uncapped USD budgets in all four locales; four native Plan & Usage captures added. Initial CI found a stale checkout fixture missing the new Price-read mock; fixed with an HTTP-level currency assertion. Full Flutter CI on the earlier head had 7,871 passes and one stale annual-switch expectation; both related expectations are corrected. Final billing/handoff/usage regression: 76 passed. Exact-head CI at d844a9a is terminal green: 44 successful checks, 22 intentional skips, zero pending/failure/cancelled checks. Full Flutter suite: 7,890 passed, four skipped in 21:34. The first exact-head attempt hit the existing 30-minute job cap with no failed-test event; the same-head rerun passed without changing workflow limits or test selection.

Product invariants affected

none

Failure-Class: new

Trial monthly card and matching terms

@mintlify

mintlify Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
omi 🟢 Ready View Preview Oct 28, 2026, 4:50 AM

💡 Tip: Enable Automations to automatically generate PRs for you.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-28T05:53:08.916931Z d844a9a New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Git-on-my-level
Git-on-my-level merged commit 3d9d15d into main Oct 28, 2026
79 of 81 checks passed
@Git-on-my-level
Git-on-my-level deleted the lane/playcur branch October 28, 2026 06:58
Git-on-my-level added a commit that referenced this pull request Oct 28, 2026
… refuses auto-send after 1504) (#23874)

## What changed and why

Codemagic `android-internal-auto` builds on 2026-10-28 at 03:18Z,
05:55Z, and 06:24Z all uploaded their Android bundles successfully, then
failed at Publishing with: “Setting release for Google Play track
internal failed. Changes cannot be sent for review automatically. Please
set the query parameter changesNotSentForReview to true.”

The previous Play 1504 policy rejection was a currency mismatch fixed in
#23852. These new Publishing failures show Play again requires committed
changes to be held for an explicit Console review submission.

This change enables `CHANGES_NOT_SENT_FOR_REVIEW`, adds Codemagic’s
`changes_not_sent_for_review: true` option to both Android Play
publishing blocks, and updates the workflow contract fixture and tests.
Held changes require the Play Console review submission; while they are
held, the daily exposure ladder stays parked and the rollout brake
follows the shared flag.

## Product invariants affected

These contracts remain satisfied by the Android-only Play
review-submission change: INV-AUTH-1 (desktop Firebase session truth),
INV-BETA-1 (separate macOS Beta identity), and INV-DATA-1
(production-family Firebase/Firestore authority for Play Internal).

## How it was verified

- `scripts/run-release-process-guards.sh` — passed.
- `scripts/run-release-process-guard-tests.sh` — 98 passed.
- `make preflight` — passed all 48 checks.
- No Codemagic build or Play API call was triggered.

## Tests

- `app/scripts/mobile_store_promote_test.py` — 31 passed; verifies
default held mode and Play commit parameters.
- `app/scripts/mobile_daily_train_test.py` — 94 passed; verifies the
exposure ladder parks in held mode.
- `backend/test.sh` selecting `tests/unit/test_mobile_rollout_brake.py`
— 25 passed; verifies brake commits follow the shared flag.

## UI evidence

UI-Evidence: none -- this is a Play publishing configuration change with
no product UI edits.

## Human step

After the 13:15Z Codemagic build successfully commits its changes to
Play, David opens Play Console → Publishing overview and presses **Send
changes for review**. Use
`data/run-2026-10-12-subscription-overhaul/reports/play-resubmit-steps.md`
for the release and version-code checks. Its earlier instruction to omit
`changesNotSentForReview` is superseded by the 2026-10-28 Publishing
failures above.

## Rollback

If Play rejects the parameter again, set `CHANGES_NOT_SENT_FOR_REVIEW =
False`, remove `changes_not_sent_for_review` from both Codemagic Android
publishing blocks, and regenerate the Codemagic workflow contract
fixture digests.

## Failure class (fixes)

Failure-Class: FC-play-track-promotion-omits-review-hold


<!-- This is an auto-generated description by cubic. -->
<a
href="https://cubic.dev/pr/BasedHardware/omi/pull/23874?utm_source=github"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img
alt="View guided diff"
src="https://www.cubic.dev/buttons/review-in-cubic-light.svg"></picture></a>
<a
href="https://www.cubic.dev/action/auto-fix/pr/BasedHardware/omi/23874?returnTo=https%3A%2F%2Fgithub.com%2FBasedHardware%2Fomi%2Fpull%2F23874&source=description"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"><img
alt="Turn on auto-fix"
src="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant