medium · M8 · MASVS-PLATFORM-3 · PTKD-AC-PAYWALL-HARDCODED-PRICE
Hardcoded price on a purchase screen
A purchase screen shows a price written in the code ($9.99). Prices must come from StoreKit, localized per storefront: a hardcoded figure is wrong in every other country and the day the price changes.
How it is exploited
Not an attack: the paywall shows 'Only $4.99/month' from a string in the code. A user in Japan is charged ¥800, a user in Germany 5,99 €, and when the price changes the screen is wrong everywhere.
Why it matters
Rejection under 2.3 / 3.1.2 for inaccurate pricing, and chargebacks from users who paid a different amount than shown.
How to fix it
- Render the price from StoreKit (product.displayPrice) or your purchases SDK (package.product.priceString).
- Compute per-month or per-week figures from the product's price and period, formatted with the product's locale.
- Keep hardcoded numbers only in debug fallbacks that never ship.
Swift
Text("\(product.displayName): \(product.displayPrice)")Does your app have this?
PTKD checks your build or your source project for PTKD-AC-PAYWALL-HARDCODED-PRICE and every other check in this knowledge base.
Scan your appReferences
Related checks (M8)
- JavaScript obfuscation in the build
- Export compliance (ITSAppUsesNonExemptEncryption) not declared
- HealthKit app that also ships an ads SDK
- Hardcoded unlock or promo code
- Purchases SDK configured with an empty or test key
- Purchase screen falls back to made-up prices or 'coming soon' text
- False-urgency copy on a purchase screen
- Free trial without the price it converts to