·5 min read

Sell Stuff In Your App: In-App Purchases on gapp.so

Charge for skins, levels, unlocks, or premium features — no payment code, no backend. Add IAP to any app with a few lines your AI assistant can write for you.

featuremonetizationiapcreators

The Problem: Great App, No Money

You vibe-coded a game. People play it. Some would happily pay $2 for a premium skin or an extra level. But to actually charge them you'd need:

  • A Stripe account, webhooks, product IDs
  • An Alipay merchant account if you want Chinese users
  • A database to track who bought what
  • A backend that verifies purchases before unlocking anything

For a weekend project, that's a weekend of its own. So most creators skip it, and the money that was there on the table stays there.


The Fix: In-App Purchases, Zero Backend

Your gapp.so app now has a built-in purchase system — window.gapp.iap. You define items in the Dashboard, the SDK handles everything else:

  • Card payments via Stripe (USD, global)
  • Alipay payments (CNY, auto-converted from USD)
  • Ownership checks so users only pay once per item
  • 80/20 revenue split — you keep 80%, we handle all payment infrastructure

No npm install, no script tag, no server code. The SDK is auto-injected into your app when it has at least one IAP item configured.


How to Add It

The fastest path: tell your AI coding assistant (Claude Code, Cursor, Gemini, etc.) this:

> "Add in-app purchases to my app using gapp.so's IAP SDK. Here are the docs: https://gapp.so/ai-sdk-prompt.md"

Then describe what you want to sell:

  • *"Add a 'Remove Ads' purchase for $1.99 that hides the ad banner"*
  • *"Add three cosmetic skins users can unlock: blue ($0.99), gold ($2.99), rainbow ($4.99)"*
  • *"Add a 'Pro Tier' unlock that reveals the advanced levels"*

Your AI assistant will wire up the ownership checks, purchase buttons, and unlock logic.


What You Get

Define Items in the Dashboard

Go to Dashboard → Edit App → In-App Purchases and click Add Item. Each item has:

  • Item Key — a stable ID like premium_skin (you use this in code)
  • Name and Description — what users see on the payment page
  • Price — in USD, between $0.49 and $99.99

You can add, edit, deactivate, and (soft-)delete items anytime. Purchase history survives — if you delete an item, users who bought it still own it.

Call It From Code

// Check ownership
if (await gapp.iap.isOwned('premium_skin')) {
  showSkin('premium_skin')
}

// Start a purchase (opens payment popup)
const result = await gapp.iap.purchase('premium_skin')
if (result.success) {
  showSkin('premium_skin')  // unlock immediately
}

// List all items (for a shop UI)
const items = await gapp.iap.getItems()

That's the whole API surface. Five methods. The SDK handles login popups, payment webhooks, completion polling, and error states for you.

Users See a Clean Checkout

When a user clicks "Buy" in your app, a popup opens with:

  • Pay with Card ($X.XX) — Stripe checkout
  • Pay with Alipay (¥YY.YY) — Alipay page-pay (CNY, auto-converted)

Whichever they pick, once payment clears, your app gets a gapp:iap:purchased event and the item shows up as owned.

You See Revenue in the Dashboard

Every purchase flows into Dashboard → Analytics, with per-item breakdown (sales, gross, creator earnings) split by currency. The Earnings section rolls it into your total creator income alongside tips and paid access.


Constraints (Keep These in Mind)

  • One-time purchases only. No subscriptions via IAP — use paid-access for that.
  • Prices: $0.49–$99.99 USD. Alipay charges the CNY-converted amount.
  • Creators can't buy their own items — the SDK will return self_purchase.
  • Items are owned forever. There's no re-charge; purchase() on an owned item returns already_owned.
  • Delete survives history. Soft-deleting an item hides it from new buyers but keeps existing owners intact.

When Should I Use IAP vs Paid Access vs Tips?

  • IAP — selling *things inside the app* (skins, levels, unlocks, consumables). Users open the app free, buy selectively.
  • Paid Access — gating the *entire app* behind a paywall. A $2 one-time charge to use your tool at all.
  • Tips — users who want to support you voluntarily after they enjoyed the app.

You can combine all three.


Try It

Open any of your apps in the Dashboard, go to the In-App Purchases tab, and add your first item. Your AI assistant can wire up the code in minutes.

Full SDK reference: gapp.so/docs/iap

Downloadable markdown for AI tools: gapp.so/api/iap-sdk-guide

Questions? Suggestions? We're listening at hi@gapp.so.

Ready to share your creation?

Publish your AI-built app and get a landing page in seconds.

Submit Your App