GS2-Money2 マスターデータリファレンス
マスターデータのフォーマットと インポートする各種モデルのリファレンス
{
"version": "2024-06-20",
"storeContentModels": [
{
"name": "[string]ストアコンテンツモデル名",
"metadata": "[string?]メタデータ",
"appleAppStore": {
"productId": "[string?]プロダクトID"
},
"googlePlay": {
"productId": "[string?]プロダクトID"
}
}
],
"storeSubscriptionContentModels": [
{
"name": "[string]定期課金ストアコンテンツモデル名",
"metadata": "[string?]メタデータ",
"scheduleNamespaceId": "[string]サブスクリプション期間を連動させる GS2-Schedule のネームスペースGRN",
"triggerName": "[string]サブスクリプション期間を反映するトリガー名",
"triggerExtendMode": "[string]サブスクリプション期間をトリガーに反映する時のモード",
"rollupHour": "[int]期限が切れる日、契約期間を日またぎの時刻まで延長する場合日跨ぎの時刻(UTC)",
"reallocateSpanDays": "[int]サブスクリプションの契約情報を他のユーザーに割り当て可能となる期間(日)",
"appleAppStore": {
"subscriptionGroupIdentifier": "[string?]サブスクリプショングループID"
},
"googlePlay": {
"productId": "[string?]プロダクトID"
}
}
]
}
| 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 | |
|---|---|---|---|---|---|---|
| version | ✓ | 2024-06-20 | マスターデータのフォーマットバージョン | |||
| storeContentModels | List<StoreContentModel> | ~ 1000 items | ストアプラットフォームのコンテンツ | |||
| storeSubscriptionContentModels | List<StoreSubscriptionContentModel> | ~ 1000 items | ストアプラットフォームの定期課金コンテンツ |
StoreContentModel
ストアプラットフォームのコンテンツ
| 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 | |
|---|---|---|---|---|---|---|
| storeContentModelId | string | ✓ | ~ 1024文字 | コンテンツモデルGRN | ||
| name | string | ✓ | ~ 128文字 | ストアコンテンツモデル名 | ||
| metadata | string | ~ 1024文字 | メタデータ | |||
| appleAppStore | AppleAppStoreContent | Apple AppStore のコンテンツ | ||||
| googlePlay | GooglePlayContent | Google Play のコンテンツ |
StoreSubscriptionContentModel
ストアプラットフォームの定期課金コンテンツ
| 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| storeSubscriptionContentModelId | string | ✓ | ~ 1024文字 | 期間課金コンテンツモデルGRN | ||||||||
| name | string | ✓ | ~ 128文字 | 定期課金ストアコンテンツモデル名 | ||||||||
| metadata | string | ~ 1024文字 | メタデータ | |||||||||
| scheduleNamespaceId | string | ✓ | ~ 1024文字 | サブスクリプション期間を連動させる GS2-Schedule のネームスペースGRN | ||||||||
| triggerName | string | ✓ | ~ 128文字 | サブスクリプション期間を反映するトリガー名 | ||||||||
| triggerExtendMode | 文字列列挙型 enum { “just”, “rollupHour” } | ✓ | “just” | ~ 128文字 | サブスクリプション期間をトリガーに反映する時のモード
| |||||||
| rollupHour | int | {triggerExtendMode} == “rollupHour” | ✓ | 0 | 0 ~ 23 | 期限が切れる日、契約期間を日またぎの時刻まで延長する場合日跨ぎの時刻(UTC) | ||||||
| reallocateSpanDays | int | ✓ | 30 | 0 ~ 365 | サブスクリプションの契約情報を他のユーザーに割り当て可能となる期間(日) | |||||||
| appleAppStore | AppleAppStoreSubscriptionContent | Apple AppStore のコンテンツ | ||||||||||
| googlePlay | GooglePlaySubscriptionContent | Google Play のコンテンツ |
Receipt
ストアプラットフォームのレシート
| 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Store | 文字列列挙型 enum { “AppleAppStore”, “GooglePlay”, “fake” } | ✓ | ~ 128文字 | ストア
| ||||||||||
| TransactionID | string | ✓ | ~ 1024文字 | トランザクションID | ||||||||||
| Payload | string | ✓ | ~ 1048576文字 | ペイロード |
PlatformSetting
ストアプラットフォームの設定
| 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 | |
|---|---|---|---|---|---|---|
| appleAppStore | AppleAppStoreSetting | Apple AppStore の設定 | ||||
| googlePlay | GooglePlaySetting | Google Play の設定 | ||||
| fake | FakeSetting | Fake(Unity Editor) の設定 |
AppleAppStoreSetting
Apple AppStore の設定
| 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 | |
|---|---|---|---|---|---|---|
| bundleId | string | ~ 1024文字 | Apple AppStore のバンドルID | |||
| sharedSecretKey | string | ~ 1024文字 | AppStore Connect で発行したレシートの暗号化に使用する共有秘密鍵 | |||
| issuerId | string | ~ 1024文字 | AppStore Connect で登録したアプリ内課金の Issuer ID | |||
| keyId | string | ~ 1024文字 | Apple に登録済みのキーID | |||
| privateKeyPem | string | ~ 10240文字 | Apple から受け取った秘密鍵 |
GooglePlaySetting
Google Play の設定
| 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 | |
|---|---|---|---|---|---|---|
| packageName | string | ~ 5120文字 | Google Play で配信するパッケージ名 | |||
| publicKey | string | ~ 5120文字 | 署名検証に使用する暗号鍵 |
FakeSetting
デバッグ用の偽のプラットフォームの設定
| 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| acceptFakeReceipt | 文字列列挙型 enum { “Accept”, “Reject” } | ✓ | “Reject” | ~ 128文字 | UnityEditorが出力する偽のレシートで決済できるようにするか
|
WalletSummary
ウォレットの状態
| 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 | |
|---|---|---|---|---|---|---|
| paid | int | ✓ | 0 | 0 ~ 2147483646 | 有償課金通貨 | |
| free | int | ✓ | 0 | 0 ~ 2147483646 | 無償課金通貨 | |
| total | int | ✓ | 0 | 0 ~ 2147483646 | 総数 |
DepositTransaction
入金トランザクション
| 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 | |
|---|---|---|---|---|---|---|
| price | double | ✓ | 0.0 ~ 100000000.0 | 購入価格 | ||
| currency | string | {price} > 0 | ✓ | ~ 8文字 | 通貨コード | |
| count | int | ✓ | 0 ~ 2147483646 | 所持量 | ||
| depositedAt | long | 入金日時 (UNIX時間 単位:ミリ秒) |
VerifyReceiptEvent
レシート検証イベント
| 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| contentName | string | ✓ | ~ 128文字 | ストアコンテンツモデル名 | ||||||||||
| platform | 文字列列挙型 enum { “AppleAppStore”, “GooglePlay”, “fake” } | ✓ | ~ 128文字 | ストアプラットフォーム
| ||||||||||
| appleAppStoreVerifyReceiptEvent | AppleAppStoreVerifyReceiptEvent | Apple AppStore のレシート検証イベント | ||||||||||||
| googlePlayVerifyReceiptEvent | GooglePlayVerifyReceiptEvent | Google Play のレシート検証イベント |
DepositEvent
入金イベント
| 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 | |
|---|---|---|---|---|---|---|
| slot | int | ✓ | 0 ~ 100000000 | スロット番号 | ||
| depositTransactions | List<DepositTransaction> | [] | 0 ~ 1000 items | 入金トランザクションリスト | ||
| status | WalletSummary | ✓ | ウォレットの状態 |
WithdrawEvent
出金イベント
| 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 | |
|---|---|---|---|---|---|---|
| slot | int | ✓ | 0 ~ 100000000 | スロット番号 | ||
| withdrawDetails | List<DepositTransaction> | [] | 0 ~ 1000 items | 出金したウォレットの詳細リスト | ||
| status | WalletSummary | ✓ | ウォレットの状態 |
RefundEvent
返金イベント
| 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| contentName | string | ✓ | ~ 128文字 | ストアコンテンツモデル名 | ||||||||||
| platform | 文字列列挙型 enum { “AppleAppStore”, “GooglePlay”, “fake” } | ✓ | ~ 128文字 | ストアプラットフォーム
| ||||||||||
| appleAppStoreRefundEvent | AppleAppStoreVerifyReceiptEvent | Apple AppStore のレシート検証イベント | ||||||||||||
| googlePlayRefundEvent | GooglePlayVerifyReceiptEvent | Google Play のレシート検証イベント |
AppleAppStoreVerifyReceiptEvent
Apple AppStore のレシート
| 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| environment | 文字列列挙型 enum { “sandbox”, “production” } | ✓ | ~ 128文字 | 環境
|
GooglePlayVerifyReceiptEvent
Google Play のレシート検証イベント
| 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 | |
|---|---|---|---|---|---|---|
| purchaseToken | string | ~ 4096文字 | Purchase Token |
AppleAppStoreContent
Apple AppStore のコンテンツ
| 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 | |
|---|---|---|---|---|---|---|
| productId | string | ~ 1024文字 | プロダクトID |
GooglePlayContent
Google Play のコンテンツ
| 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 | |
|---|---|---|---|---|---|---|
| productId | string | ~ 1024文字 | プロダクトID |
AppleAppStoreSubscriptionContent
Apple AppStore の期間課金コンテンツ
| 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 | |
|---|---|---|---|---|---|---|
| subscriptionGroupIdentifier | string | ~ 64文字 | サブスクリプショングループID |
GooglePlaySubscriptionContent
Google Play の期間課金コンテンツ
| 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 | |
|---|---|---|---|---|---|---|
| productId | string | ~ 1024文字 | プロダクトID |
GooglePlayRealtimeNotificationMessage
RTDN メッセージ
| 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 | |
|---|---|---|---|---|---|---|
| data | string | ✓ | ~ 1048576文字 | データ | ||
| messageId | string | ✓ | ~ 1024文字 | メッセージID | ||
| publishTime | string | ✓ | ~ 1024文字 | 通知が送信された日時 |