# In-App Purchasing

> Implement a unified in-app purchasing system to sell consumable items, non-consumable entitlements, and subscriptions across multiple digital storefronts.

# 开始使用

- [概览](https://docs.unity.com/zh-cn/iap.md): Implement a unified in-app purchasing system to sell consumable items, non-consumable entitlements, and subscriptions across multiple digital storefronts.
- [IAP 简介](https://docs.unity.com/zh-cn/iap/introduction.md): Understand your options for implementing Unity In-App Purchases in your game.
- [IAP v5 中的新功能](https://docs.unity.com/zh-cn/iap/whats-new.md): Unity IAP v5 introduces Direct-to-Consumer payments and a hosted webshop storefront, along with improvements to catalog management and reporting.
- [从 IAP v4 升级到 v5](https://docs.unity.com/zh-cn/iap/upgrade-to-iap-v5.md): Follow this guide to migrate from Unity In-App Purchasing version 4 to version 5.

# Direct to Consumer (D2C) 付款


## 直接面向消费者(D2C)支付提供商

- [直接面向消费者(D2C)支付提供商](https://docs.unity.com/zh-cn/iap/payment-providers.md): Integrate D2C payment providers with Unity In-App Purchasing to sell and fulfill products through off-platform transactions.

### 集成 D2C 支付提供商工作流程

- [集成 D2C 支付提供商工作流程](https://docs.unity.com/zh-cn/iap/payment-providers/workflow.md): Follow this workflow to integrate a D2C payment provider with In-App Purchases (IAP) so that you can control how and where you provide and sell IAP products to your users.
- [Create Remote Catalog](https://docs.unity.com/zh-cn/iap/payment-providers/configure-remote-catalog.md): Define your product catalog and upload it to the Remote Catalog service.
- [Initialize services to handle the start up sequence](https://docs.unity.com/zh-cn/iap/payment-providers/initialize-services.md): Initialize Unity Gaming Services, Authentication and In-App Purchasing (IAP) so you can integrate with a Direct-to-Consumer (D2C) payment provider.
- [Fetch Remote Catalog](https://docs.unity.com/zh-cn/iap/payment-providers/fetch-remote-catalog.md): Fetch your Remote Catalog for a payment provider store.
- [Configure a webhook or Cloud Code module for purchase fulfillment](https://docs.unity.com/zh-cn/iap/payment-providers/configure-fulfilment.md): Configure your entitlement delivery options in the Unity Dashboard to define how you grant purchases to your players.

#### Configure your payment provider

- [Configure your payment provider](https://docs.unity.com/zh-cn/iap/payment-providers/configure-payment-provider.md): Configure your payment provider in the Unity Dashboard to handle payments for in-app purchases.
- [Configure Stripe in the Unity Dashboard](https://docs.unity.com/zh-cn/iap/payment-providers/configure-stripe.md): Configure Stripe to use the payment provider to handle payments for in-app purchases.
- [Configure Coda in the Unity Dashboard](https://docs.unity.com/zh-cn/iap/payment-providers/configure-coda.md): Configure Coda as a payment provider for in-app purchases.
- [Add a routing rule](https://docs.unity.com/zh-cn/iap/payment-providers/routing.md): Define provider routing rules to control which payment providers you serve your players and in what order.

#### Fulfill purchases

- [Fulfill purchases through the SDK](https://docs.unity.com/zh-cn/iap/payment-providers/purchases-sdk.md): Retrieve purchase information and determine purchase status for products bought by players.
- [Fulfill purchases through the backend API](https://docs.unity.com/zh-cn/iap/payment-providers/implement-backend.md): Implement your own backend that listens to purchase events and tracks your player's entitlements.
- [Use a Cloud Code module to fulfill purchases](https://docs.unity.com/zh-cn/iap/payment-providers/cloud-code-fulfillment.md): Implement a Cloud Code module as your backend solution to fulfill purchases.

#### Test your integration

- [Test your integration](https://docs.unity.com/zh-cn/iap/payment-providers/test-integration.md): Test your payment provider integration to ensure purchases work end-to-end.
- [Test your Stripe integration](https://docs.unity.com/zh-cn/iap/payment-providers/test-stripe.md): Use Stripe test cards to test your integration end-to-end with different scenarios.
- [Test your Coda integration](https://docs.unity.com/zh-cn/iap/payment-providers/test-coda.md): Understand how to verify your Coda payment provider integration with logs, test cards, and sandbox tools.
- [发起购买](https://docs.unity.com/zh-cn/iap/payment-providers/initiate-purchase.md): Start a purchase from your application and let players choose how to pay with the Purchase Options UI.
- [符合 Apple 和 Google 的外部购买要求](https://docs.unity.com/zh-cn/iap/payment-providers/external-purchase-compliance.md): Understand your compliance responsibilities for external purchases on Apple and Google, and the SDK and webhook tools Unity provides to help you meet them.
- [深层链接成功 URL 示例](https://docs.unity.com/zh-cn/iap/payment-providers/success-deep-link.md): Refer to an example of how you can use a small proxy page to deep link to the correct platform for your game.

# 网上商店

- [概览](https://docs.unity.com/zh-cn/iap/webshop.md): Launch a branded web storefront for your In-App Purchasing catalog from the Unity Dashboard, with theming, hosting, and payments handled for you.

## 开始使用

- [网上商店简介](https://docs.unity.com/zh-cn/iap/webshop/introduction-to-webshops.md): Understand studios, projects, slugs, environments, and the draft-to-live publish model that a webshop uses.
- [创建并发布您的第一个网上商店](https://docs.unity.com/zh-cn/iap/webshop/create-and-publish-your-first-webshop.md): Create, theme, and publish your first webshop from the Unity Dashboard.

## 构建和发布

- [创建网上商店](https://docs.unity.com/zh-cn/iap/webshop/create-a-webshop.md): Reserve a studio name and slug, then create a webshop connected to your Unity Cloud project's IAP catalog and payment provider.
- [使用 AI 生成网上商店主题](https://docs.unity.com/zh-cn/iap/webshop/generate-a-webshop-theme-with-ai.md): Generate a webshop theme from your game's Apple App Store or Google Play Store listing or your own images in the Unity Dashboard.
- [发布网上商店](https://docs.unity.com/zh-cn/iap/webshop/publish-a-webshop.md): Snapshot a webshop's production draft into the live configuration and make the shop reachable at its public URL.
- [Webshop 列表操作参考](https://docs.unity.com/zh-cn/iap/webshop/webshop-list-actions-reference.md): Manage the actions available for each existing webshop from the Webshop list.

## --configure

- [网上商店中的目录和付款](https://docs.unity.com/zh-cn/iap/webshop/catalog-and-payments.md): Learn how webshops reuse your project's In-App Purchasing catalog and forward purchases to your existing payment providers.
- [Webshop 目录架构参考](https://docs.unity.com/zh-cn/iap/webshop/catalog-schema.md): Find the catalog fields you can use to control how your products appear in a webshop.
- [网上商店中的付款提供商路由](https://docs.unity.com/zh-cn/iap/webshop/payment-provider-routing.md): Understand how a webshop chooses which payment providers to offer each player, including routing by player tag and the fallback provider.
- [设置回退付款提供商](https://docs.unity.com/zh-cn/iap/webshop/set-a-fallback-payment-provider.md): Choose which payment provider a webshop offers to players who don't match any routing rule.
- [玩家登录网上商店](https://docs.unity.com/zh-cn/iap/webshop/player-sign-in.md): Understand how players are authenticated for a webshop and how sign-in links a persistent Unity Player Account to the player identity your game already uses.
- [网上商店的主题和品牌](https://docs.unity.com/zh-cn/iap/webshop/theming-and-branding.md): Discover how to style a webshop with theme tokens, branding media, and AI-generated themes.

## 连接到游戏

- [从游戏中打开一个网上商店](https://docs.unity.com/zh-cn/iap/webshop/deep-links.md): Understand how a game opens a webshop with an authenticated player session and how players are authenticated.
- [将网上商店集成到 Unity 游戏中](https://docs.unity.com/zh-cn/iap/webshop/integrate-into-game.md): Open a webshop from a Unity game with an authenticated player session.

## 管理员

- [Webshop 管理 API 参考](https://docs.unity.com/zh-cn/iap/webshop/admin-api.md): Explore the Webshop Admin API endpoints you can use to configure webshops, environments, themes, and branding programmatically.
- [Webshop 权限参考](https://docs.unity.com/zh-cn/iap/webshop/permissions.md): Find the Unity roles required to administer webshops in the Unity Dashboard or through the Admin API.
- [Webshop 限制参考](https://docs.unity.com/zh-cn/iap/webshop/limits.md): Find the structural, naming, media and runtime limits that apply to webshops.
- [对网上商店进行故障排除](https://docs.unity.com/zh-cn/iap/webshop/troubleshooting.md): Solve common issues with creating, theming, publishing, and integrating webshops.

# 平台原生商店


## 为平台原生商店设置 IAP

- [为平台原生商店设置 IAP](https://docs.unity.com/zh-cn/iap/set-up.md): Install the Unity In-App Purchasing (IAP) package and configure Unity IAP for your project.
- [安装 Unity IAP](https://docs.unity.com/zh-cn/iap/get-started.md): Follow this workflow to install the In-App Purchasing package and configure Unity IAP for your project.
- [初始化 Unity IAP](https://docs.unity.com/zh-cn/iap/set-up-in-app-purchasing.md): Learn how to initialize the Unity IAP package, configure essential settings, and verify setup to start processing in‑app purchases across supported platforms.

## 无码 IAP

- [无码 IAP](https://docs.unity.com/zh-cn/iap/codeless.md): Use Codeless IAP to configure and test in-app purchases with minimal scripting, streamlining setup across supported stores.
- [设置 Codeless IAP](https://docs.unity.com/zh-cn/iap/codeless-iap.md): Use Codeless IAP to configure and test in-app purchases with minimal scripting, streamlining setup across supported stores.
- [Codeless IAP 按钮配置](https://docs.unity.com/zh-cn/iap/codeless-iap-button-configuration.md): Set up and use Codeless IAP buttons and IAP listeners to enable in-app purchases and restore purchases without writing complex code.

# 目录和商店管理


## 创建商品目录

- [创建商品目录](https://docs.unity.com/zh-cn/iap/catalogs.md): Understand catalogs and the best way to create your catalog listings.
- [目录和目录列表](https://docs.unity.com/zh-cn/iap/catalogs-and-catalog-listings.md): Understand how to use catalogs and catalog listings in Unity IAP, and choose the best method to define your listings.
- [目录架构](https://docs.unity.com/zh-cn/iap/catalog-schema.md): Find the fields you can use to define listings in your catalog, including localized content, pricing, and webshop display metadata.
- [在 Editor 中创建目录](https://docs.unity.com/zh-cn/iap/create-catalog-in-editor.md): Create and configure Unity IAP catalog listings using the IAP Catalog window.
- [IAP Catalog 窗口参考](https://docs.unity.com/zh-cn/iap/iap-catalog-window-reference.md): Reference the In-App Purchasing Catalog to configure and manage product properties and store overrides.
- [以编程方式创建目录](https://docs.unity.com/zh-cn/iap/code-catalog.md): Use the CatalogProvider class to define your catalog in code for flexible or runtime-driven configurations.
- [创建远程目录](https://docs.unity.com/zh-cn/iap/payment-providers/configure-remote-catalog.md): Define your product catalog and upload it to the Remote Catalog service.

### 在 Dashboard（后台）中管理目录

- [在 Dashboard（后台）中管理目录](https://docs.unity.com/zh-cn/iap/dashboard-catalog.md): Import, edit, and manage your IAP catalog from the Unity Dashboard.
- [Import a catalog](https://docs.unity.com/zh-cn/iap/dashboard-catalog/import-catalog.md): Import an existing catalog into the Unity Dashboard to create or replace your catalog.
- [Add a catalog listing](https://docs.unity.com/zh-cn/iap/dashboard-catalog/add-catalog-item.md): Create a new listing in your catalog directly from the Unity Dashboard.
- [Manage catalog listings](https://docs.unity.com/zh-cn/iap/dashboard-catalog/manage-catalog-items.md): Edit listing details, assign categories, and delete listings from your catalog.

### 无码 IAP

- [无码 IAP](https://docs.unity.com/zh-cn/iap/codeless-iap.md): Use Codeless IAP to configure and test in-app purchases with minimal scripting, streamlining setup across supported stores.
- [Codeless IAP button configuration](https://docs.unity.com/zh-cn/iap/codeless-iap-button-configuration.md): Set up and use Codeless IAP buttons and IAP listeners to enable in-app purchases and restore purchases without writing complex code.
- [商店](https://docs.unity.com/zh-cn/iap/stores.md): Understand digital distribution platforms and how to access store-specific features through store extensions.
- [购买](https://docs.unity.com/zh-cn/iap/purchases.md): Retrieve purchase information and determine purchase status for products bought by players.
- [收据验证](https://docs.unity.com/zh-cn/iap/receipt-validation.md): Verify the authenticity of purchase receipts to prevent fraud and ensure secure transactions.
- [恢复购买](https://docs.unity.com/zh-cn/iap/restore-purchases.md): Enable players to regain access to previously owned products and subscriptions when they reinstall your app or switch devices.

## 支持的商店

- [支持的商店](https://docs.unity.com/zh-cn/iap/stores-supported.md): Review the list of app stores supported by Unity In-App Purchasing with version information and platform details.

### Google Play 应用商店

- [Google Play 应用商店](https://docs.unity.com/zh-cn/iap/google-store.md): Configure and integrate Unity In-App Purchasing with the Google Play Store for Android apps.
- [Add a Google license key to your project](https://docs.unity.com/zh-cn/iap/add-a-google-license-key-to-your-project.md): Add your Google Play license key in the Unity Dashboard to enable license verification for Android IAP, ensuring purchase receipts are validated against Google Play to prevent fraud in both testing and production.
- [Use Google Play billing extensions](https://docs.unity.com/zh-cn/iap/use-google-play-billing-extensions.md): Learn how to integrate Google Play-specific extensions with Unity IAP to enhance purchase handling and subscription management.

### Apple App Store

- [Apple App Store](https://docs.unity.com/zh-cn/iap/apple-store.md): Configure and integrate Unity In-App Purchasing with the Apple App Store for iOS, macOS, and tvOS apps.
- [Apple Family Sharing](https://docs.unity.com/zh-cn/iap/apple-family-sharing.md): Learn how to check whether a product is eligible for Apple Family Sharing and how to register a handler that triggers when entitlements are revoked, such as when a family member later loses access to that shared purchase.
- [条纹](https://docs.unity.com/zh-cn/iap/stripe.md): Integrate and configure Stripe as a Direct-to-Consumer (D2C) payment provider with Unity In-App Purchasing.
- [科达](https://docs.unity.com/zh-cn/iap/coda.md): Integrate and configure Coda as a Direct-to-Consumer (D2C) payment provider with Unity In-App Purchasing.

### 自定义商店

- [自定义商店](https://docs.unity.com/zh-cn/iap/custom-stores.md): Implement and extend custom store integrations with Unity In-App Purchasing.
- [Modules](https://docs.unity.com/zh-cn/iap/custom-store-modules.md): Extend the purchasing functionality of your custom store through custom store modules.
- [Android 应用内购商店的跨店安装问题](https://docs.unity.com/zh-cn/iap/android-cross-store-installation-issues.md): Understand and resolve purchase history loss and synchronization problems when deploying to multiple Android app stores.

## 参考

- [SubscriptionInfo 类引用](https://docs.unity.com/zh-cn/iap/subscriptioninfo-class-reference.md): Reference the `SubscriptionInfo` class methods to retrieve subscription product information and status.
- [Android 应用内购商店的跨店安装问题](https://docs.unity.com/zh-cn/iap/android-cross-store-installation-issues.md): Understand and resolve purchase history loss and synchronization problems when deploying to multiple Android app stores.

# 购买


## 购买管理和履行

- [购买管理和履行](https://docs.unity.com/zh-cn/iap/manage-purchases.md): Manage purchases, validate receipts, restore entitlements, and handle subscriptions in Unity In-App Purchasing.
- [购买](https://docs.unity.com/zh-cn/iap/purchases.md): Retrieve purchase information and determine purchase status for products bought by players.
- [收据验证](https://docs.unity.com/zh-cn/iap/receipt-validation.md): Verify the authenticity of purchase receipts to prevent fraud and ensure secure transactions.
- [恢复购买](https://docs.unity.com/zh-cn/iap/restore-purchases.md): Enable players to regain access to previously owned products and subscriptions when they reinstall your app or switch devices.
- [SubscriptionInfo 类引用](https://docs.unity.com/zh-cn/iap/subscriptioninfo-class-reference.md): Reference the `SubscriptionInfo` class methods to retrieve subscription product information and status.

# 监控 IAP 性能

- [概览](https://docs.unity.com/zh-cn/iap/reporting.md): Monitor and analyze in-app purchase performance for your apps.

## IAP 收入表现

- [IAP 收入表现](https://docs.unity.com/zh-cn/iap/reporting/revenue-performance.md): Monitor and analyze in-app purchase revenue performance for your apps.
- [设置 IAP 收入绩效报告](https://docs.unity.com/zh-cn/iap/reporting/set-up-performance-reporting.md): Set up your project to display IAP performance data.
- [查看 IAP 收入绩效数据](https://docs.unity.com/zh-cn/iap/reporting/view-iap-performance-data.md): Access IAP revenue performance data in the Unity Dashboard.
- [Revenue Performance 参考](https://docs.unity.com/zh-cn/iap/reporting/revenue-performance-reference.md): Explore the metrics, dimensions, and configuration options you can use to analyze performance data for IAP.
- [IAP 收入绩效报告的故障排除](https://docs.unity.com/zh-cn/iap/reporting/troubleshooting.md): Solve common issues with missing or incomplete data in the Revenue Performance reports.

## D2C 性能

- [D2C 性能](https://docs.unity.com/zh-cn/iap/reporting/d2c-performance.md): Monitor the health of your IAP transactions for D2C payment providers.
- [查看 D2C 性能数据](https://docs.unity.com/zh-cn/iap/reporting/view-d2c-performance-data.md): Access D2C performance data in the Unity Dashboard.
- [D2C 性能参考](https://docs.unity.com/zh-cn/iap/reporting/d2c-performance-reference.md): Explore the metrics and charts available on the D2C Performance page to monitor Direct-to-Consumer (D2C) checkout activity.

# 隐私


## 隐私与同意

- [隐私与同意](https://docs.unity.com/zh-cn/iap/privacy-and-consent.md): Understand privacy requirements and data handling practices for Unity In-App Purchasing on Apple and Google platforms.

### IAP 5.4 及更高版本

- [Privacy overview](https://docs.unity.com/zh-cn/iap/privacy-and-consent/overview.md): Learn about privacy and data handling considerations when you implement Unity In-App Purchasing with D2C capabilities (version 5.4+) in your game.
- [Apple privacy manifest](https://docs.unity.com/zh-cn/iap/privacy-and-consent/apple-privacy-manifest.md): Include a privacy manifest in your iOS app to declare what data Unity In-App Purchasing collects per Apple's policy.
- [Google Play data safety](https://docs.unity.com/zh-cn/iap/privacy-and-consent/google-play-data-safety.md): Declare what personal data Unity In-App Purchasing collects in your Google Play data safety form for app store submission.

### 5.4 之前的 IAP 版本

- [Privacy overview](https://docs.unity.com/zh-cn/iap/privacy-and-consent/legacy-overview.md): Learn about privacy and data handling considerations when implementing Unity In-App Purchasing in your game.
- [Apple privacy manifest](https://docs.unity.com/zh-cn/iap/privacy-and-consent/legacy-apple-privacy-manifest.md): Include a privacy manifest in your iOS app to declare what data Unity In-App Purchasing collects per Apple's policy.
- [Google Play data safety](https://docs.unity.com/zh-cn/iap/privacy-and-consent/legacy-google-play-data-safety.md): Declare what personal data Unity In-App Purchasing collects in your Google Play data safety form for app store submission.
