What must be true in App Store Connect and in the app before you ship in-app purchases or subscriptions for the first time?

28.7.7 · L3 · Interview

Mental model. Opening a shop: the licence and bank account (agreements), a price tag on every item (product setup), a working till (the code), and a dry run with staff before the first real customer.

Most “my products do not load” bugs are configuration, not code. In App Store Connect: the Paid Applications Agreement is accepted and the banking and tax forms are complete (without it products are not returned); each product exists with the exact id used in code, a reference name, a price, localisations (display name and description), a review screenshot and notes, and is in a state that can be sold (the first purchases must be submitted with an app version for review); subscriptions are in a group with levels set, and territories and availability are what you intend. Set the Server Notifications URL (production and sandbox) and, if you use the Server API, create the key. Add the privacy policy and terms links and any required subscription disclosures to the listing.

In the app: the In-App Purchase capability is on; the ids are in one place; the Transaction.updates listener starts at launch; verified results are the only ones you grant on; finish() is called after delivery; Restore Purchases is easy to find (and AppStore.sync() is wired to it); a Manage Subscription entry points to the system sheet; the paywall shows the real price, period, trial terms and auto-renewal wording; a failed catalogue load shows a retry; and the entitlement is recomputed on launch and foreground. Verify with a StoreKit configuration file, then sandbox purchases on a real device (including Ask to Buy and cancelling), then TestFlight; test restore on a second device, a refund, and a lapsed card. Plan the unhappy paths for support: how a user recovers a purchase, how you find a transaction by the original transaction id, and what happens to access if your server is down (the app should still trust the verified on-device entitlement). (This is documented process, not something that can be run from here.)

Common traps

  • Testing everything with a configuration file and never in the sandbox. The file does not exercise real signing, agreements or notifications.
  • Forgetting to attach the first in-app purchases to an app version. They cannot be reviewed or sold on their own the first time.

They might follow up with

  • Why does Product.products(for:) return nothing in the sandbox? Usually an unaccepted agreement, an id mismatch, or a product that is not yet ready; check the status in App Store Connect first.
  • What do I need for refunds and support? A way to look up the original transaction id for a user and the App Store Server API (Q1008).

Related questions

  • 28.7.1 How do you structure a StoreKit 2 integration: which object owns products, entitlements, the updates listener…
  • 28.7.6 How do you unit-test the purchase and entitlement logic when Product and Transaction cannot be created in a…
  • 28.5.2 How do you test purchases: StoreKit configuration files, sandbox accounts and TestFlight, and what can each…
  • 28.6.1 What do App Review rules require for digital goods and subscriptions, and how do external purchase links and…
  • 28.4.4 How do you authenticate to the App Store Server API, and what do you use it for?

← How do you unit-test the purchase and entitlement logic when Product…