Key takeaways
- Digital goods and subscriptions used inside the app go through In-App Purchase and Play Billing; physical goods and real-world services do not.
- Rules for external purchase links depend on the storefront – check the current guidelines for each one before an agent adds a link.
- Let the agent build purchase flows, server verification and restore; keep products, agreements, tax and banking with the account holder.
- Entitlements belong on your server, verified through Apple's and Google's server APIs, not in a local flag.
- Test with a StoreKit configuration file, sandbox accounts and Play license testers before any submission that touches payments.
Why agents reach for Stripe
Ask an agent to "add a Pro plan" to an app that started as a web project and you will most likely get a Stripe checkout, a pricing page and a webhook handler. On the web that is the right answer. Inside an iOS or Android app it is usually the cause of a rejection: Apple's Guideline 3.1.1 requires In-App Purchase for digital content, features and subscriptions, and Google Play requires Play Billing for digital goods sold in the app. AI app builders that wrap a web app inherit the same problem; our post on WebView apps rejected under 3.1.1 shows what reviewers typically find.
The agent is not wrong about payments in general – it is missing the store context. Put that context into the task, or better into its memory file, before it writes a single line of payment code.
Decide the model first: what are users paying for?
| Users pay for | App Store | Google Play |
|---|---|---|
| Subscriptions, premium features, content used in the app | In-App Purchase | Google Play Billing |
| In-app currency, extra levels, ad removal | In-App Purchase | Google Play Billing |
| Physical goods, deliveries, tickets for real-world events | Your own payment provider, not In-App Purchase | Your own payment provider |
| Real-time one-to-one services such as tutoring | Exceptions in Guideline 3.1.3 may apply | Check Google's Payments policy |
| Plans bought on your website and used in the app | Depends on storefront and app type | Depends on region and programme |
The rules for linking to outside purchases differ between storefronts and change regularly. Check the current guidelines for your storefront and Google's Payments policy for each region before an agent adds any "buy on our website" button, link or sentence. When in doubt, offer the store's own purchase option in the app and keep everything else outside it.
Talk to an AI Code Engineer about in-app purchases and subscriptions.
In a free call we look at what you built, tell you honestly what stands between it and an approved release – and whether you need us at all.
What the agent builds well
- Store clients. StoreKit 2 on iOS and the Google Play Billing Library on Android – or a cross-platform subscription SDK such as RevenueCat if you prefer one integration for both stores.
- Paywall. Product names and prices loaded from the store, never hard-coded; billing period, renewal terms and links to the terms of use and privacy policy. Apple checks these disclosures under Guideline 3.1.2.
- Restore. A visible way to restore non-consumable purchases and subscriptions.
- Server verification. Your backend validates transactions with the App Store Server API and the Google Play Developer API, and listens to App Store Server Notifications and Play's real-time developer notifications for renewals, refunds and cancellations.
- Entitlements. One server-side answer to "is this user Pro?", used by every platform the user signs in on.
- Edge cases. Pending and deferred purchases such as Ask to Buy, billing grace periods, upgrades and downgrades within a subscription group, and acknowledging Play purchases within three days so Google does not refund them automatically.
Google also sets a minimum Play Billing Library version for new apps and updates – version 8 or later since August 31, 2026 – so ask the agent to compare the version it installs with Google's deprecation schedule rather than with what it remembers.
Mistakes to look for in agent-written purchase code
- features unlocked on the device the moment the purchase sheet closes, without verification,
- an
isProflag in local storage that a reinstall loses and a determined user can flip, - a shared secret or service account key inside the app bundle – see secrets and API keys in AI-built apps,
- prices typed into paywall copy that differ from the store price in other countries,
- a leftover Stripe button or "subscribe on our website" text from the web version,
- refunds and revocations ignored, so refunded users keep access,
- restore implemented on one platform and forgotten on the other.
Before reviewing the code, ask the agent to describe each purchase path as a numbered sequence – app, store, your server, notification – in plain text. Gaps such as a missing verification step or an unhandled refund become visible in that description long before they show up in the diff.
What stays with the account holder
- Accepting the Paid Apps Agreement and completing tax and banking details in App Store Connect; setting up the payments profile in Play Console.
- Creating products and subscription groups, prices and availability in both consoles.
- Product metadata and the review screenshot Apple asks for with each in-app purchase.
- Submitting the first in-app purchases together with a new app version, as Apple requires.
- Sandbox Apple accounts and Play license testers for everyone who tests purchases.
Also tell App Review where the paywall is and how to reach it. A reviewer who cannot find a purchase cannot approve it, and a feature that only appears after a purchase needs to be described in the review notes.
Testing purchases before the reviewers do
Test in three layers. First, a StoreKit configuration file in Xcode lets the agent run purchase flows in the simulator and in automated tests without App Store Connect. Second, sandbox accounts on real devices, through TestFlight builds, exercise the real store, accelerated subscription renewals and your server notifications. Third, on Android, license testers buy with test payment methods on the internal or closed track. Before each submission that touches payments, run the full set – buy, restore on a second device, cancel, refund, renew. Our TestFlight playbook describes how to get testers to report what they find.
Payments are where a small mistake costs real revenue or a rejection, so a second look is worth it. Our AI Code Engineers review purchase flows, set up products and handle the review conversation in your own accounts – book a free call and we go through your setup together.
In-app purchase checklist for AI-built apps
- You decided which items are digital goods (store billing) and which are physical goods or services (your own provider).
- No Stripe button, web checkout link or "buy on our website" text appears where the storefront rules do not allow it.
- Prices shown in the app are loaded from the store.
- Purchases are verified on your server and entitlements are stored there.
- Server notifications for renewals, refunds and cancellations are processed on both platforms.
- Restore works on iOS and Android.
- Play purchases are acknowledged, and the Play Billing Library version meets Google's current minimum.
- Agreements, tax, banking and payments profiles are complete in both consoles.
- Buy, restore, cancel, refund and renew were tested in sandbox and with license testers.
- Review notes explain where the paywall is and what the purchase unlocks.
Frequently asked questions
Can I keep using Stripe in my iOS or Android app?
For physical goods and real-world services, yes. For digital content, features and subscriptions used in the app, the stores generally require their own billing. Some storefronts allow links to outside purchases under specific conditions; check the current rules for each storefront before relying on that.
Should we use StoreKit and Play Billing directly or a subscription SDK?
Both work. Direct integration gives you full control and no extra vendor. A cross-platform subscription SDK saves server work for verification and notifications. Decide before the agent starts, and write the decision into its memory file so it does not mix approaches.
Can a coding agent create the in-app products in App Store Connect?
The product definitions and prices are business decisions, and creating them requires access to your accounts. Let the agent prepare a product list with identifiers and descriptions, and have the account holder create and submit the products.
Can you help us add in-app purchases?
Yes. Book a free call and an AI Code Engineer looks at your app and business model with you. We can review the agent's purchase code, set up products and handle the submission in your own accounts.
Free, 15 minutes, no obligation
Get your app from agent output to approved release.
Our AI Code Engineers take apps built with Claude Code, Codex, Cursor, Lovable, Base44 and co. through signing, CI/CD, store listings and review – in your own developer accounts.
AI tools, store policies and requirements change quickly – always check the current documentation of the tools and stores you use. This article is independent advice and not affiliated with or endorsed by Apple, Google, Anthropic, OpenAI or any other company or product mentioned; all trademarks belong to their owners.