Install and use the IAP AI skill
Install the In-App Purchasing AI skill into your AI assistant and prompt it to migrate to or integrate IAP v5.
Read time 3 minutesLast updated a day ago
Install the In-App Purchasing (IAP) AI skill from the Unity Editor into your preferred AI assistant, then prompt the assistant to perform a migration or integration for you. If you subscribe to Unity AI Assistant or Unity AI Desktop, the skill is already built in, so you can prompt the assistant without any installation. To understand what the skill does before you install it, refer to Introduction to the IAP AI skill.
Prerequisites
Before you start, make sure you meet the following prerequisites:
- Install In-App Purchasing version 5.3.0 or later. For more information, refer to Install Unity IAP.
- Set up a compatible AI assistant, such as Claude Code.
Install the skill
If you subscribe to Unity AI Assistant or Unity AI Desktop, the skill is built in and you don't need to install it. Continue to Write an effective prompt.
To install the skill in any other AI assistant, complete the following steps:
- In the Unity Editor, select Project Settings > Services > In-App Purchasing.
- At the bottom of the page, choose one of the following options:
- Open Skills Folder: Opens the folder that contains the skill files. Use this option to copy or install the skill in your preferred AI assistant.
- Install to Claude Code: Adds the skill directly to Claude Code as a skill named .
in-app-purchases
After you install the skill, it's available to run from your AI assistant.
Run the skill
To run the skill, complete the following steps:
- Make the skill available in your assistant:
- In Unity AI Assistant or Unity AI Desktop, prompt the assistant as usual. Keywords such as or
in-app purchaseactivate the built-in skill automatically.migrate native billing - In Claude Code, prompt the assistant as usual. Claude Code activates the skill automatically when your request matches it.
in-app-purchases - In another assistant, reference the file at the start of your prompt so the assistant loads the skill, for example:
SKILL.mdRead the in-app-purchases SKILL.md and follow it.
- In Unity AI Assistant or Unity AI Desktop, prompt the assistant as usual. Keywords such as
- Prompt the assistant to perform the migration or integration you want. For a conversion, ask for a report before any code changes, for example:
Migrate my IAP code from v4 to v5. Show a report of the changes before you edit anything. - Review the report the skill generates, then approve it to let the skill apply the changes.
- Confirm that your project compiles, and complete any manual steps the report lists.
After the skill applies its changes, review the diff and test purchases on a real device with a sandbox or test account before you release your game. The Editor doesn't reproduce pending, deferred, or restore purchase behavior.
Write an effective prompt
Prompt the assistant in plain language. To get accurate results, include the following details in your prompt:
- The backend you use: For example, write or
My project uses Cloud Save from Unity Gaming Services. This detail helps the skill confirm the correct task path when it scans your project.I call BillingClient through AndroidJavaObject - Your products and their types: For example, write . The skill needs product IDs and types to generate correct grant logic.
a 100-coin pack (Consumable) and a Remove Ads unlock (NonConsumable) - What each purchase grants: For example, write . Otherwise, the assistant guesses how your economy works.
after the coin pack, add 100 to PlayerData.coins and save - A request for a report before any code changes: For example, write . This is the safest way to start a conversion.
Provide a migration report and don't change any code yet - Your platforms and constraints: For example, write . Blockers then surface earlier.
Android and iOS, subscriptions involved, backend validates receipts
For an example prompt for each task, refer to IAP AI skill capabilities reference.