# implement-in-app-purchases

Configures Unity In-App Purchasing v5, handles receipt validation, and guides migrations from native store billing or third-party SDKs.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 5800 installs · ★ 1149
- Author: Unity-Technologies
- License: LicenseRef-Unknown · policy=link-only · description only; the file stays with the author
- Source: https://github.com/Unity-Technologies/skills/tree/HEAD/skills/implement-in-app-purchases/SKILL.md
- Updated: 2026-10-23
- HTML: https://affpapa.org/en/nevibecode/skills/implement-in-app-purchases

## What it does

This skill directs the agent through `com.unity.purchasing` v5 setup. It prioritizes a preliminary project scan before changing code, which avoids conflicts with existing store implementations, RevenueCat, or UniPay. Store connection runs through `UnityIAPServices.StoreController` and `Connect()`. Calling `UnityServices.InitializeAsync` is not mandatory for IAP, but it runs fine alongside other gaming services.

Purchases follow a strict two-step flow: receive a `PendingOrder`, grant the item, and trigger `ConfirmPurchase`. Never skip confirmation. An unconfirmed purchase triggers redelivery on every subsequent application launch. Client-side verification on iOS with StoreKit 2 is a no-op, requiring server-side validation via `jwsRepresentation`. Integrating direct-to-customer checkouts via Stripe or Coda requires package version 5.4 or higher.

## Requirements
- Works with: Stripe, Unity

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add Unity-Technologies/skills --skill implement-in-app-purchases -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/implement-in-app-purchases/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/implement-in-app-purchases/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add Unity-Technologies/skills --skill implement-in-app-purchases -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/implement-in-app-purchases/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add Unity-Technologies/skills --skill implement-in-app-purchases -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/implement-in-app-purchases/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install Unity-Technologies/skills implement-in-app-purchases
```

2. **Manually: put the files in place**
- File: `.github/skills/implement-in-app-purchases/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add Unity-Technologies/skills --skill implement-in-app-purchases -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/Unity-Technologies/skills --path skills/implement-in-app-purchases
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/implement-in-app-purchases/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add Unity-Technologies/skills --skill implement-in-app-purchases -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/Unity-Technologies/skills/tree/HEAD/skills/implement-in-app-purchases/SKILL.md

## When to use it
- implement the two-step purchase flow in Unity IAP v5
- migrate billing from RevenueCat or native Google BillingClient
- handle iOS restore transactions for App Store compliance
- set up server-side receipt validation for StoreKit 2

## Example prompts
- Set up Unity IAP v5 initialization and event handling using StoreController.
- Migrate our in-app purchase logic from Adapty to com.unity.purchasing.
- Help me add an iOS purchase restoration flow with ConfirmPurchase.

## Similar
- [capacitor-in-app-purchases](https://affpapa.org/en/nevibecode/skills/capacitor-in-app-purchases.md) — skill · 728 installs
- [web-to-app-funnel](https://affpapa.org/en/nevibecode/skills/web-to-app-funnel.md) — skill · 1800 installs
- [unity-csharp-scripting](https://affpapa.org/en/nevibecode/skills/unity-csharp-scripting.md) — skill · 5900 installs
- [unity-animation](https://affpapa.org/en/nevibecode/skills/unity-animation.md) — skill · 5800 installs
- [unity-developer](https://affpapa.org/en/nevibecode/skills/unity-developer.md) — skill · 3000 installs
- [unity-vrc-udon-sharp](https://affpapa.org/en/nevibecode/skills/unity-vrc-udon-sharp.md) — skill · 1000 installs

From the same set: [unity-technologies/skills](https://affpapa.org/en/nevibecode/by/unity-technologies/skills.md) — 31 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
