> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Economy v2의 실제 통화 가격 추적

> PlayFab Economy v2 번들에 RealMoneyPriceDetails를 설정하고 marketplace_transaction_redeemed 이벤트를 통해 매출을 추적하여 분석 보고에 활용합니다.

<Info>
  Economy v2는 이제 정식 출시(GA)되었습니다. 지원 및 피드백은 [PlayFab 포럼](https://community.playfab.com)을 참조하세요.
</Info>

플레이어가 외부 마켓플레이스(Apple App Store, Google Play, Steam, Microsoft Store, Nintendo eShop, PlayStation Store)를 통해 아이템을 구매하면 트랜잭션에는 실제 통화가 관여합니다. 카탈로그 번들에 `RealMoneyPriceDetails`를 구성하면 PlayFab은 [marketplace\_transaction\_redeemed](/services/playfab/api-references/events/Inventory/marketplace-transaction-redeemed) 이벤트에 매출 금액을 기록하여 매출 분석 및 보고를 구축할 수 있게 합니다.

이 튜토리얼은 종단 간 흐름을 안내합니다: 번들에 실제 통화 가격 설정, 구매 상환, 이벤트에서 매출 데이터 보기.

## 필수 구성 요소

* [PlayFab 개발자 계정](https://developer.playfab.com/en-us/sign-up).
* [Game Manager](https://developer.playfab.com/)에서 만든 타이틀.
* 이미 구성된 마켓플레이스 통합(예: [Google](/services/playfab/economy-monetization/economy-v2/marketplace/marketplace-integrations/google), [Apple](/services/playfab/economy-monetization/economy-v2/marketplace/marketplace-integrations/apple), [Microsoft Store](/services/playfab/economy-monetization/economy-v2/marketplace/marketplace-integrations/microsoft)).
* 마켓플레이스 제품에 연결된 [마켓플레이스 매핑](/services/playfab/economy-monetization/economy-v2/catalog/bundles)을 가진 게시된 번들.

## 1단계: 번들에 실제 통화 가격 설정

마켓플레이스 제품에 연결된 번들에 `RealMoneyPriceDetails`를 추가합니다. 마켓플레이스별 **가장 작은 통화 단위**(예: USD의 경우 센트)로 가격을 지정합니다.

### API

기존 번들에 가격을 추가하기 위해 [UpdateDraftItem](https://learn.microsoft.com/en-us/rest/api/playfab/economy/catalog/update-draft-item)을 사용한 다음 게시합니다.

```json theme={null}
{
  "Item": {
    "Id": "{{StarterPackBundleID}}",
    "Type": "bundle",
    "Title": {
      "NEUTRAL": "Starter Pack"
    },
    "ItemReferences": [
      {
        "Id": "{{LaserSwordID}}",
        "Amount": 1
      },
      {
        "Id": "{{GoldCurrencyID}}",
        "Amount": 500
      }
    ],
    "RealMoneyPriceDetails": {
      "GooglePlayPrices": {
        "USD": 499
      },
      "AppleAppStorePrices": {
        "USD": 499
      },
      "MicrosoftStorePrices": {
        "USD": 499
      }
    },
    "AlternateIds": [
      {
        "Type": "GooglePlay",
        "Value": "com.mygame.starterpack"
      },
      {
        "Type": "AppleAppStore",
        "Value": "com.mygame.starterpack"
      },
      {
        "Type": "MicrosoftStore",
        "Value": "9NBLGGH42CFD"
      }
    ]
  },
  "Publish": true
}
```

### Game Manager

1. **Economy** > **Catalog (V2)** > **Bundles**로 이동합니다.
2. 편집할 번들을 선택합니다.
3. **Prices** 섹션에서 번들이 표시되는 각 마켓플레이스에 대해 실제 통화 가격을 설정합니다.
4. **Marketplace Mapping** 섹션에 각 마켓플레이스에 대한 올바른 AlternateIds가 있는지 확인합니다.
5. **Save and publish**를 선택합니다.

***

### 가격 형식 참조

가격은 가장 작은 통화 단위를 사용합니다. 현재 **USD**만 지원됩니다.

| 실제 가격   | 사전 값            |
| ------- | --------------- |
| \$0.99  | `{"USD": 99}`   |
| \$1.39  | `{"USD": 139}`  |
| \$4.99  | `{"USD": 499}`  |
| \$9.99  | `{"USD": 999}`  |
| \$19.99 | `{"USD": 1999}` |

타이틀이 사용하는 마켓플레이스에만 가격을 설정하세요. 지원되는 마켓플레이스 속성은 다음과 같습니다.

* `AppleAppStorePrices`
* `GooglePlayPrices`
* `MicrosoftStorePrices`
* `NintendoEShopPrices`
* `PlayStationStorePrices`
* `SteamPrices`

### 마켓플레이스별 다른 가격

스토어마다 게임 가격을 다르게 책정하는 경우 각 마켓플레이스 속성을 개별적으로 설정합니다.

```json theme={null}
"RealMoneyPriceDetails": {
  "GooglePlayPrices": {
    "USD": 499
  },
  "AppleAppStorePrices": {
    "USD": 529
  },
  "SteamPrices": {
    "USD": 449
  }
}
```

## 2단계: 플레이어가 구매하고 상환

플레이어가 외부 마켓플레이스에서 아이템을 구매한 후 게임은 적절한 상환 API를 호출합니다.

| 마켓플레이스            | 상환 API                                                                                                                                                 |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Google Play       | [RedeemGooglePlayInventoryItems](https://learn.microsoft.com/en-us/rest/api/playfab/economy/inventory/redeem-google-play-inventory-items)              |
| Apple App Store   | [RedeemAppleAppStoreInventoryItems](https://learn.microsoft.com/en-us/rest/api/playfab/economy/inventory/redeem-apple-app-store-inventory-items)       |
| Microsoft Store   | [RedeemMicrosoftStoreInventoryItems](https://learn.microsoft.com/en-us/rest/api/playfab/economy/inventory/redeem-microsoft-store-inventory-items)      |
| Steam             | [RedeemSteamInventoryItems](https://learn.microsoft.com/en-us/rest/api/playfab/economy/inventory/redeem-steam-inventory-items)                         |
| Nintendo eShop    | [RedeemNintendoEShopInventoryItems](https://learn.microsoft.com/en-us/rest/api/playfab/economy/inventory/redeem-nintendo-e-shop-inventory-items)       |
| PlayStation Store | [RedeemPlayStationStoreInventoryItems](https://learn.microsoft.com/en-us/rest/api/playfab/economy/inventory/redeem-play-station-store-inventory-items) |

PlayFab이 상환을 처리할 때:

1. 마켓플레이스 영수증을 번들의 `AlternateId`와 일치시킵니다.
2. 번들의 콘텐츠를 플레이어의 인벤토리에 부여합니다.
3. 일치하는 번들의 `RealMoneyPrices`를 포함하는 `marketplace_transaction_redeemed` 이벤트를 발행합니다.

## 3단계: 이벤트에서 매출 보기

상환에 성공하면 `marketplace_transaction_redeemed` 이벤트가 발행되고 실제 통화 가격 데이터가 포함됩니다. Game Manager에서 이 이벤트를 찾거나 데이터 파이프라인을 통해 쿼리할 수 있습니다.

### Game Manager에서 보기

1. **Analyze** 섹션 아래의 **Data** > **Event History**로 이동합니다.
2. `marketplace_transaction_redeemed` 이벤트 이름을 검색합니다.
3. 이벤트를 선택하여 `RealMoneyPrices` 필드를 포함한 세부 정보를 확인합니다.

### 예제 이벤트 페이로드

Starter Pack(\$4.99 USD)의 Google Play 상환은 다음과 같은 이벤트를 생성합니다.

```json theme={null}
{
  "EventName": "marketplace_transaction_redeemed",
  "Marketplace": "GooglePlay",
  "MarketplaceTransctionId": "GPA.1234-5678-9012-34567",
  "MarketplaceAlternateId": "com.mygame.starterpack",
  "Amount": 1,
  "ItemId": "{{StarterPackBundleID}}",
  "ItemType": "bundle",
  "RealMoneyPrices": {
    "USD": 499
  }
}
```

Apple App Store에서 상환된 동일한 번들(\$5.29 USD의 가격)은 다음을 생성합니다.

```json theme={null}
{
  "RealMoneyPrices": {
    "USD": 529
  }
}
```

PlayFab은 상환이 발생한 특정 마켓플레이스의 가격을 사용합니다.

### 매출 데이터 쿼리

사용자 지정 분석에 이벤트 데이터를 사용할 수 있습니다. 예를 들어, 기간 동안의 총 매출을 계산하려면 모든 `marketplace_transaction_redeemed` 이벤트를 쿼리하고 `RealMoneyPrices.USD` 값을 합산합니다.

```text theme={null}
Total revenue = Sum of (RealMoneyPrices.USD × Amount) across all events
```

<Note>
  `RealMoneyPrices`는 `RealMoneyPriceDetails`에 구성된 값을 반영하며, 마켓플레이스에서 실제로 청구된 금액이 아닙니다. 정확한 보고를 위해 마켓플레이스 목록과 가격을 동기화 상태로 유지하세요.
</Note>

## 모범 사례

* **항상 마켓플레이스 번들에 `RealMoneyPriceDetails`를 설정하세요.** 그렇지 않으면 상환 이벤트의 `RealMoneyPrices` 필드가 비어 있고 매출 가시성을 잃게 됩니다.
* **가장 작은 통화 단위를 사용하세요.** USD의 경우 센트로 가격을 제공합니다(예: \$4.99의 경우 `499`).
* **사용하는 마켓플레이스만 채우세요.** 모든 마켓플레이스에 가격을 설정할 필요는 없으며, 타이틀이 게시된 것만 설정합니다.
* **가격을 마켓플레이스 목록과 동기화하세요.** 외부 마켓플레이스에서 가격을 업데이트할 때 정확한 보고를 유지하기 위해 `RealMoneyPriceDetails`의 해당 속성을 업데이트합니다.
* **다른 경우 마켓플레이스별 가격을 설정하세요.** 게임이 스토어마다 다르게 가격이 책정되는 경우 각 플랫폼의 실제 가격을 반영하도록 마켓플레이스별 속성을 사용합니다.

## 참고 항목

* [실제 통화 가격 참조](/services/playfab/economy-monetization/economy-v2/catalog/real-money-prices)
* [Economy v2 번들](/services/playfab/economy-monetization/economy-v2/catalog/bundles)
* [사기 방지 빠른 시작](/services/playfab/economy-monetization/economy-v2/fraud-prevention/quickstart)
* [마켓플레이스 통합](/services/playfab/economy-monetization/economy-v2/marketplace/marketplace-integrations/overview)
* [marketplace\_transaction\_redeemed 이벤트](/services/playfab/api-references/events/Inventory/marketplace-transaction-redeemed)


## Related topics

- [Economy v2 실물 화폐 가격](/ko/services/playfab/economy-monetization/economy-v2/catalog/real-money-prices.md)
- [Economy v2의 고정 콘텐츠 컨테이너](/ko/services/playfab/economy-monetization/economy-v2/tutorials/containers-with-fixed-contents.md)
- [Economy(레거시)에서 플레이어의 VTD(Value-to-Date) 가져오기](/ko/services/playfab/economy-monetization/economy/tutorials/getting-a-players-vtd.md)
- [Economy v2 Catalog 콘텐츠 유형, 태그 및 속성](/ko/services/playfab/economy-monetization/economy-v2/catalog/content-types-tags-and-properties.md)
- [Economy 가격 미터](/ko/services/playfab/pricing/meters/catalog-meters.md)
