TutorialMobile App

Add Payments and Push Notifications to Your AI-Built App

MeDo Team11 min read

You built an app with an AI tool. It works. People like it. Now you need to make money from it and keep users coming back — which means payments and push notifications. For most non-developers, this is where things used to get complicated: payment processor APIs, Apple's strict rules, Firebase configuration files, provisioning profiles. In 2026, the process is far more approachable, but you still need to understand the landscape to avoid rejected apps and lost revenue.

Add Payments and Push Notifications to Your AI-Built App

This guide walks you through adding Stripe, Apple/Google in-app purchases, and push notifications to an AI-generated native app — without writing code from scratch.

1. Understanding Payment Options for Mobile Apps

Before you add a "Buy" button, you need to decide how users will pay. Mobile apps have three main payment paths:

In-App Purchases (IAP) — Managed by Apple (StoreKit) or Google (Google Play Billing). Required for digital goods and services consumed within the app. Apple and Google take a 15% cut for developers earning under $1M/year, and 30% above that threshold.

External Payment Processors (Stripe, etc.) — You can use Stripe or similar services for physical goods, person-to-person services, or apps that qualify under recent regulatory changes. Processing fees are typically 2.9% + $0.30 per transaction.

Hybrid Approach — Some apps use IAP for premium features while routing physical goods or bookings through Stripe. This is common for marketplace apps.

The key rule: if a user is paying to unlock digital content they consume inside your app, Apple and Google require you to use their billing systems. Violating this gets your app rejected or removed.

2. When to Use Subscriptions vs One-Time Purchases

This decision affects your revenue model and how the app stores display your pricing.

Choose subscriptions when:

  • Your app delivers ongoing value (new content, cloud sync, AI processing credits)
  • You need predictable recurring revenue
  • Users expect continuous updates or access

Choose one-time purchases when:

  • You're selling a tool that works forever once unlocked
  • The feature is a permanent upgrade (remove ads, unlock pro mode)
  • Users would resent paying monthly for something static

Choose consumables when:

  • Users buy credits they spend (AI generations, messages, exports)
  • Demand is variable per user

A common mistake: defaulting to subscriptions because the revenue looks better on paper. If your app is a utility that doesn't change weekly, users will cancel fast. Match the model to the value delivery.

3. Setting Up Apple In-App Purchases

To add IAP to an iOS app, you need:

  1. An Apple Developer Account ($99/year) with agreements signed in App Store Connect
  2. Products configured in App Store Connect — Create subscription groups or individual products with pricing tiers
  3. StoreKit integration in your app — The app needs code to fetch products, handle purchases, and verify receipts

For the StoreKit integration, your app needs to:

  • Display available products fetched from the App Store
  • Trigger the purchase flow when users tap "Subscribe" or "Buy"
  • Listen for transaction updates (success, failure, pending)
  • Unlock content after verifying the transaction
  • Restore purchases for users who reinstall

If you built your app with MeDo, the payments plugin handles StoreKit integration through a configuration step — you specify your product IDs and the plugin generates the purchase flow, receipt validation, and restore logic in native Swift. No manual API calls needed.

4. Setting Up Google Play Billing

Google's system mirrors Apple's with different terminology:

  1. Google Play Console with a merchant account linked
  2. Products or subscriptions defined in the console with pricing
  3. Google Play Billing Library integrated in your Kotlin/Java app

Google's billing flow is similar: query available products, launch the purchase flow, acknowledge purchases, and grant entitlements. One difference — Google requires you to "acknowledge" purchases within 3 days or they get automatically refunded.

For testing, Google provides a license testing feature where designated Gmail accounts can make purchases without being charged.

5. Adding Stripe for Eligible Payments

If your app sells physical goods, bookings, or qualifies for external payment under Apple's external purchase entitlement, Stripe is the standard choice.

The setup involves:

  1. Creating a Stripe account and getting API keys
  2. Adding a backend endpoint that creates payment intents
  3. Using the Stripe mobile SDK in your app to collect card details
  4. Handling webhooks for payment confirmations

The critical piece: you need a server component. Stripe payments cannot be processed entirely on-device because your secret API key must stay off the client. This means either a simple backend (a few cloud functions) or a service like Stripe's no-code payment links for simpler flows.

If you're building with an AI app builder, check whether it supports backend logic or serverless functions. Some tools, including MeDo, offer cloud function templates that handle Stripe webhook processing without requiring you to set up infrastructure.

6. Push Notification Setup for iOS (APNs)

Push notifications on iOS go through Apple Push Notification service (APNs). Here's what you need:

  1. Enable Push Notifications in your app's capabilities (Xcode or your build config)
  2. Generate an APNs key in your Apple Developer account (Certificates, Identifiers & Profiles section) — download the .p8 file and save it securely
  3. Request user permission in the app — iOS requires explicit opt-in
  4. Register the device token — when a user allows notifications, your app receives a unique token
  5. Send notifications from a server — using the device token and your APNs key

The device token is per-device and can change, so your backend needs to store current tokens and handle updates.

For the server side, most developers use Firebase Cloud Messaging (FCM) even for iOS, because it provides a unified API for both platforms. Alternatively, you can use APNs directly or services like OneSignal.

7. Push Notification Setup for Android (FCM)

Android notifications go through Firebase Cloud Messaging:

  1. Create a Firebase project and add your Android app (package name must match)
  2. Download google-services.json and include it in your app's build
  3. Add the FCM SDK to your app
  4. Handle token generation — FCM provides a registration token per device
  5. Send messages via the Firebase console or your backend using the FCM API

Android doesn't require explicit permission for basic notifications (though Android 13+ does for the notification permission). Users can still disable notifications in system settings.

A practical tip: batch your notification sends. Sending individual notifications to thousands of users one-by-one will hit rate limits. Use FCM topics or batch APIs instead.

8. Combining Payments and Notifications Effectively

The real power comes from connecting these systems:

  • Payment confirmation notifications — "Your subscription is active! Here's what you unlocked."
  • Renewal reminders — "Your trial ends in 3 days" (reduces involuntary churn)
  • Re-engagement — "New premium content available" for subscribers
  • Failed payment alerts — "Update your payment method to keep access"

To connect them, your backend listens for payment events (webhooks from Stripe or server-to-server notifications from Apple/Google) and triggers push notifications in response.

If you used MeDo to build your app, the notification and payment plugins can be connected through trigger rules — for example, "send push notification when subscription status changes." This wiring happens in the configuration step rather than custom backend code. For more on getting your app live after adding these features, see our guide on publishing AI apps to the App Store.

9. Testing Before You Go Live

Never test payments with real money first.

  • Apple Sandbox — Create sandbox tester accounts in App Store Connect. Purchases are free and subscriptions renew on accelerated timelines (monthly subs renew every 5 minutes)
  • Google License Testing — Add Gmail addresses as license testers. Purchases go through but aren't charged
  • Stripe Test Mode — Use test API keys and card numbers (4242 4242 4242 4242) to simulate transactions

For push notifications:

  • Test on physical devices (simulators have limited push support)
  • Verify notifications arrive when the app is in foreground, background, and terminated states
  • Test with notification permissions denied to ensure graceful handling

10. Common Pitfalls to Avoid

App Store rejection for wrong payment type — Using Stripe for digital content that should use IAP will get you rejected. When in doubt, use IAP for anything consumed in-app.

Not handling subscription cancellation — Users cancel subscriptions but retain access until the period ends. Your app needs to check entitlement status, not just "did they ever subscribe."

Notification spam — Sending too many notifications tanks your opt-in rate. Start with transactional notifications (payment confirmations, account alerts) before adding marketing messages.

Not testing restore purchases — Apple requires a "Restore Purchases" button. If it doesn't work, your app will be rejected.

Ignoring regional pricing — Apple and Google let you set different prices per country. Users in lower-income markets convert better at lower price points.

For a broader look at how native apps handle these features compared to web wrappers, see our comparison of native apps vs PWAs.

Conclusion

Adding payments and push notifications to an AI-built app follows the same rules as any native app — Apple and Google don't care how the code was generated, only that it meets their guidelines. The process involves configuration (setting up products, certificates, and server endpoints) more than coding, which is why AI-generated apps with plugin systems handle it well.

Start with one payment type, test thoroughly in sandbox mode, and add push notifications for transactional messages first. You can expand to marketing notifications and complex subscription tiers once you have paying users.

Ready to build a native app that supports real payments and notifications? Try MeDo's AI app builder to generate production-ready Swift and Kotlin with built-in plugin support.

Frequently asked questions

Try building your app with MeDo

Describe your idea in one sentence. MeDo generates real native iOS and Android code, runs it on your phone via QR code, and ships to TestFlight and Play Store when you're ready.

Related articles

Ready to build?

Turn your idea into a live app with MeDo

Describe what you want in plain language. MeDo generates the UI, backend, and deployment — no coding required.