Skip to content

fix(mobile): accept global Apple creator discount tiers - #2995

Merged
Chadpiha merged 2 commits into
mainfrom
fix/apple-creator-global-prices
Oct 28, 2026
Merged

Chadpiha merged 2 commits into
mainfrom
fix/apple-creator-global-prices

Conversation

@greatcoat

@greatcoat greatcoat commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Global creator discounts fail when an Apple price tier gives more than exactly 20% off. For example, Denmark's DKK 89 monthly subscription can offer DKK 71, but the client rejects it because it expects DKK 71.20.

Accept positive, currency-valid offer prices at or below the rounded 20%-off threshold. Preserve the actual StoreKit product/price, storefront, account, consent, expiry and Apple redemption URL checks. Requires the matching API validator change and a mobile release before global creator offers can work on existing devices.

Validation: 50 offer/paywall tests pass, including tier regression cases; mobile typecheck and changed-file ESLint pass. No new UI or native dependency changes. Packaged live redemption remains a release verification step.

Companion API change: https://github.com/OpenWhispr/openwhispr-api/pull/342. Chad review requested. Mobile CI (static checks, tests, bundles and native Swift tests) passes.

Production launch preparation: 5,000 Apple codes are imported; a verified 174-storefront catalog is staged in Vercel with the offer disabled. Campaign creator-global-20pct-3months-20261028 expires 2027-04-27 07:00 UTC. China mainland is excluded from the backend catalog because the subscription is not currently sold there.

Release this validator with the API companion before activating global offers. TestFlight 1.2.6 (44) still rejects prices below its exact rounded 20%-off calculation. A real redemption on the compatible App Store build and payment/attribution verification remain outstanding. This PR does not activate production settings, create a release or run a migration.

@greatcoat
greatcoat requested a review from Chadpiha October 28, 2026 13:51
- Require 20% to 30% off: a deeper discount is a catalog typo (7.1 for 71),
  and the paywall would advertise it while Apple charges the real price.
- Compare against 80% of the regular price instead of the rounded amount,
  matching the API so a server-accepted price is never rejected on device.
- Send `priceTiers: true` so the API serves tier prices only to builds that
  accept them; older builds keep getting exact rows and never burn a code.

@Chadpiha Chadpiha left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approving with follow-up fixes pushed in f1a9f91, matching the API companion (OpenWhispr/openwhispr-api#342, a2b6248e):

  • Discount floor: offers must now be 20% to 30% off. Before, a catalog typo (DKK 7.1 for 71) would show on the paywall while Apple charged the real price.
  • Strict 20%: the limit is now 80% of the regular price, not the rounded amount, so any price the API accepts is also accepted on device.
  • priceTiers: true: the app sends this with the offer request, so the API serves tier prices only to builds that accept them. Older builds keep getting exact rows and never burn a code.

Verified on Node 24: 12 affiliate/paywall/Superwall/PaywallStep suites pass (218/218); tsc, ESLint and prettier clean.

Release notes:

  • Ship only after the API deploys. The current API returns 400 for the new field, which fails safe: no offer and no code allocated.
  • The branch is 5 commits behind main (#2875 touches mobile). Merge main if Mobile static's expo doctor fails.
  • Please refresh the PR description.

@Chadpiha
Chadpiha merged commit fc786f4 into main Oct 28, 2026
20 checks passed
@Chadpiha Chadpiha mentioned this pull request Oct 29, 2026
3 of 5 tasks
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.

2 participants