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

    1. Render the price from StoreKit (product.displayPrice) or your purchases SDK (package.product.priceString).
    2. Compute per-month or per-week figures from the product's price and period, formatted with the product's locale.
    3. 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 app

    References

    Related checks (M8)