{
  "schemaVersion": "1.0",
  "item": {
    "slug": "in-app-purchases",
    "name": "In-App Purchases",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/ivangdavila/in-app-purchases",
    "canonicalUrl": "https://clawhub.ai/ivangdavila/in-app-purchases",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/in-app-purchases",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=in-app-purchases",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "analytics.md",
      "flutter.md",
      "google-play.md",
      "paywalls.md",
      "platforms.md"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/in-app-purchases"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/in-app-purchases",
    "agentPageUrl": "https://openagent3.xyz/skills/in-app-purchases/agent",
    "manifestUrl": "https://openagent3.xyz/skills/in-app-purchases/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/in-app-purchases/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "When to Use",
        "body": "User needs to implement in-app purchases, subscriptions, paywalls, or monetization flows. Agent handles native APIs (StoreKit 2, Google Play Billing), cross-platform SDKs (RevenueCat, Adapty, Qonversion), paywall design, server verification, and subscription analytics."
      },
      {
        "title": "Quick Reference",
        "body": "TopicFileiOS StoreKit 2storekit.mdAndroid Billinggoogle-play.mdFlutter packagesflutter.mdRevenueCat SDKrevenuecat.mdPlatform comparisonplatforms.mdServer verificationserver.mdPaywall designpaywalls.mdSubscription metricsanalytics.mdTesting & sandboxtesting.md"
      },
      {
        "title": "1. Choose Your Architecture",
        "body": "ApproachWhen to UseTradeoffNative onlySingle platform, full controlMore code, no cross-platform syncRevenueCat/AdaptyCross-platform, fast launch1-2% fee, dependencyHybridNative + own backendFull control, more work"
      },
      {
        "title": "2. Platform SDKs (Managed)",
        "body": "PlatformPricingBest ForRevenueCatFree <$2.5k MTR, then 1%Most apps, best docsAdaptyFree <$10k MTR, then 0.6%Cost-conscious, A/B paywallsQonversionFree <$10k MTR, then 3%Simple setupSuperwallPaywall-focusedPaywall A/B onlyGlassfyFree <$10k, then 0.5%Budget option"
      },
      {
        "title": "3. Product Types",
        "body": "TypeiOSAndroidUse CaseConsumable✅✅Credits, coins, livesNon-consumable✅✅Unlock feature foreverAuto-renewable✅✅SubscriptionsNon-renewing✅❌Season pass, time-limited"
      },
      {
        "title": "4. Server Verification is Non-Negotiable",
        "body": "Never trust client-side validation alone:\n\niOS: App Store Server API with JWS verification\nAndroid: Google Play Developer API\nRevenueCat: Webhooks + REST API"
      },
      {
        "title": "5. Handle All Transaction States",
        "body": "StateActionPurchasedVerify → grant → finishPendingWait, show pending UIFailedShow error, don't grantDeferredWait for parental approvalRefundedRevoke immediatelyGrace periodLimited access, prompt paymentBilling retryMaintain access during retry"
      },
      {
        "title": "6. Subscription Lifecycle Events",
        "body": "Must handle all of these (native or via webhooks):\n\nINITIAL_PURCHASE → grant access\nRENEWAL → extend access\nCANCELLATION → mark will-expire\nEXPIRATION → revoke access\nBILLING_ISSUE → prompt to update payment\nGRACE_PERIOD → limited access window\nPRICE_INCREASE → consent required (iOS)\nREFUND → revoke + flag user\nUPGRADE/DOWNGRADE → prorate"
      },
      {
        "title": "7. Restore Purchases Always",
        "body": "Required by App Store guidelines:\n\nProminent restore button\nWorks for logged-out users\nHandles family sharing (iOS)\nCross-device sync"
      },
      {
        "title": "8. Paywall Best Practices",
        "body": "See paywalls.md for detailed patterns:\n\nShow value before price\nAnchor pricing (3 options, highlight middle)\nFree trial prominent\nSocial proof if available\nA/B test everything"
      },
      {
        "title": "9. Testing Strategy",
        "body": "EnvironmentiOSAndroidDev/DebugStoreKit Config fileLicense testersSandboxSandbox accountsInternal testingProductionReal accountsProduction\n\nSandbox subscription times:\n\n1 week → 3 minutes\n1 month → 5 minutes\n1 year → 1 hour"
      },
      {
        "title": "10. App Store Guidelines",
        "body": "No external payment links (anti-steering)\nMust use IAP for digital goods\nPhysical goods/services can use Stripe\nReader apps have exceptions\n15-30% commission applies"
      },
      {
        "title": "Common Traps",
        "body": "Testing with real money → use sandbox/test accounts\nNot finishing transactions → auto-refund (Android 3 days)\nHardcoding prices → always fetch from store (regional pricing)\nMissing transaction observer → lose purchases made outside app\nNo server verification → trivially bypassable\nIgnoring grace period → users churn when they could recover\nPoor paywall UX → kills conversion regardless of price\nNot tracking metrics → can't optimize what you don't measure\nForgetting restore button → App Store rejection\nNot handling family sharing → confused users"
      }
    ],
    "body": "When to Use\n\nUser needs to implement in-app purchases, subscriptions, paywalls, or monetization flows. Agent handles native APIs (StoreKit 2, Google Play Billing), cross-platform SDKs (RevenueCat, Adapty, Qonversion), paywall design, server verification, and subscription analytics.\n\nQuick Reference\nTopic\tFile\niOS StoreKit 2\tstorekit.md\nAndroid Billing\tgoogle-play.md\nFlutter packages\tflutter.md\nRevenueCat SDK\trevenuecat.md\nPlatform comparison\tplatforms.md\nServer verification\tserver.md\nPaywall design\tpaywalls.md\nSubscription metrics\tanalytics.md\nTesting & sandbox\ttesting.md\nCore Rules\n1. Choose Your Architecture\nApproach\tWhen to Use\tTradeoff\nNative only\tSingle platform, full control\tMore code, no cross-platform sync\nRevenueCat/Adapty\tCross-platform, fast launch\t1-2% fee, dependency\nHybrid\tNative + own backend\tFull control, more work\n2. Platform SDKs (Managed)\nPlatform\tPricing\tBest For\nRevenueCat\tFree <$2.5k MTR, then 1%\tMost apps, best docs\nAdapty\tFree <$10k MTR, then 0.6%\tCost-conscious, A/B paywalls\nQonversion\tFree <$10k MTR, then 3%\tSimple setup\nSuperwall\tPaywall-focused\tPaywall A/B only\nGlassfy\tFree <$10k, then 0.5%\tBudget option\n3. Product Types\nType\tiOS\tAndroid\tUse Case\nConsumable\t✅\t✅\tCredits, coins, lives\nNon-consumable\t✅\t✅\tUnlock feature forever\nAuto-renewable\t✅\t✅\tSubscriptions\nNon-renewing\t✅\t❌\tSeason pass, time-limited\n4. Server Verification is Non-Negotiable\n\nNever trust client-side validation alone:\n\niOS: App Store Server API with JWS verification\nAndroid: Google Play Developer API\nRevenueCat: Webhooks + REST API\n5. Handle All Transaction States\nState\tAction\nPurchased\tVerify → grant → finish\nPending\tWait, show pending UI\nFailed\tShow error, don't grant\nDeferred\tWait for parental approval\nRefunded\tRevoke immediately\nGrace period\tLimited access, prompt payment\nBilling retry\tMaintain access during retry\n6. Subscription Lifecycle Events\n\nMust handle all of these (native or via webhooks):\n\nINITIAL_PURCHASE → grant access\nRENEWAL → extend access\nCANCELLATION → mark will-expire\nEXPIRATION → revoke access\nBILLING_ISSUE → prompt to update payment\nGRACE_PERIOD → limited access window\nPRICE_INCREASE → consent required (iOS)\nREFUND → revoke + flag user\nUPGRADE/DOWNGRADE → prorate\n7. Restore Purchases Always\n\nRequired by App Store guidelines:\n\nProminent restore button\nWorks for logged-out users\nHandles family sharing (iOS)\nCross-device sync\n8. Paywall Best Practices\n\nSee paywalls.md for detailed patterns:\n\nShow value before price\nAnchor pricing (3 options, highlight middle)\nFree trial prominent\nSocial proof if available\nA/B test everything\n9. Testing Strategy\nEnvironment\tiOS\tAndroid\nDev/Debug\tStoreKit Config file\tLicense testers\nSandbox\tSandbox accounts\tInternal testing\nProduction\tReal accounts\tProduction\n\nSandbox subscription times:\n\n1 week → 3 minutes\n1 month → 5 minutes\n1 year → 1 hour\n10. App Store Guidelines\nNo external payment links (anti-steering)\nMust use IAP for digital goods\nPhysical goods/services can use Stripe\nReader apps have exceptions\n15-30% commission applies\nCommon Traps\nTesting with real money → use sandbox/test accounts\nNot finishing transactions → auto-refund (Android 3 days)\nHardcoding prices → always fetch from store (regional pricing)\nMissing transaction observer → lose purchases made outside app\nNo server verification → trivially bypassable\nIgnoring grace period → users churn when they could recover\nPoor paywall UX → kills conversion regardless of price\nNot tracking metrics → can't optimize what you don't measure\nForgetting restore button → App Store rejection\nNot handling family sharing → confused users"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/ivangdavila/in-app-purchases",
    "publisherUrl": "https://clawhub.ai/ivangdavila/in-app-purchases",
    "owner": "ivangdavila",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/in-app-purchases",
    "downloadUrl": "https://openagent3.xyz/downloads/in-app-purchases",
    "agentUrl": "https://openagent3.xyz/skills/in-app-purchases/agent",
    "manifestUrl": "https://openagent3.xyz/skills/in-app-purchases/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/in-app-purchases/agent.md"
  }
}