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 | ~ 23 | 期限が切れる日、契約期間を日またぎの時刻まで延長する場合日跨ぎの時刻(UTC) |
reallocateSpanDays | int | ✓ | 30 | ~ 365 | サブスクリプションの契約情報を他のユーザーに割り当て可能となる期間(日) | |
appleAppStore | AppleAppStoreSubscriptionContent | Apple AppStore のコンテンツ | ||||
googlePlay | GooglePlaySubscriptionContent | Google Play のコンテンツ |
triggerExtendMode に指定する列挙型の定義
定義 | 説明 |
---|---|
just | そのままサブスクリプション期間を反映 |
rollupHour | 次の日跨ぎ時刻まで延長してサブスクリプション期間を反映 |
Receipt
ストアプラットフォームのレシート
型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 | |
---|---|---|---|---|---|---|
Store | enum { “AppleAppStore”, “GooglePlay”, “fake” } | ✓ | ~ 128文字 | ストア | ||
TransactionID | string | ✓ | ~ 1024文字 | トランザクションID | ||
Payload | string | ✓ | ~ 1048576文字 | ペイロード |
Store に指定する列挙型の定義
定義 | 説明 |
---|---|
AppleAppStore | Apple App Store |
GooglePlay | Google Play |
fake | Fake |
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が出力する偽のレシートで決済できるようにするか |
acceptFakeReceipt に指定する列挙型の定義
定義 | 説明 |
---|---|
Accept | 受け入れる |
Reject | 拒否する |
WalletSummary
ウォレットの状態
型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 | |
---|---|---|---|---|---|---|
paid | int | ✓ | 0 | ~ 2147483646 | 有償課金通貨 | |
free | int | ✓ | 0 | ~ 2147483646 | 無償課金通貨 | |
total | int | ✓ | 0 | ~ 2147483646 | 総数 |
DepositTransaction
入金トランザクション
型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 | |
---|---|---|---|---|---|---|
price | float | ✓ | ~ 1000000.0 | 購入価格 | ||
currency | string | {price} > 0 | ✓ | ~ 8文字 | 通貨コード | |
count | int | ✓ | ~ 2147483646 | 所持量 | ||
depositedAt | long | 入金日時 (UNIX時間 単位:ミリ秒) |
VerifyReceiptEvent
レシート検証イベント
型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 | |
---|---|---|---|---|---|---|
contentName | string | ✓ | ~ 128文字 | ストアコンテンツモデル名 | ||
platform | enum { “AppleAppStore”, “GooglePlay”, “fake” } | ✓ | ~ 128文字 | ストアプラットフォーム | ||
appleAppStoreVerifyReceiptEvent | AppleAppStoreVerifyReceiptEvent | Apple AppStore のレシート検証イベント | ||||
googlePlayVerifyReceiptEvent | GooglePlayVerifyReceiptEvent | Google Play のレシート検証イベント |
platform に指定する列挙型の定義
定義 | 説明 |
---|---|
AppleAppStore | Apple AppStore |
GooglePlay | Google Play |
fake | Fake |
DepositEvent
入金イベント
型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 | |
---|---|---|---|---|---|---|
slot | int | ✓ | ~ 100000000 | スロット番号 | ||
depositTransactions | List<DepositTransaction> | [] | ~ 1000 items | 入金トランザクションリスト | ||
status | WalletSummary | ✓ | ウォレットの状態 |
WithdrawEvent
出金イベント
型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 | |
---|---|---|---|---|---|---|
slot | int | ✓ | ~ 100000000 | スロット番号 | ||
withdrawDetails | List<DepositTransaction> | [] | ~ 1000 items | 出金したウォレットの詳細リスト | ||
status | WalletSummary | ✓ | ウォレットの状態 |
RefundEvent
返金イベント
型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 | |
---|---|---|---|---|---|---|
contentName | string | ✓ | ~ 128文字 | ストアコンテンツモデル名 | ||
platform | enum { “AppleAppStore”, “GooglePlay”, “fake” } | ✓ | ~ 128文字 | ストアプラットフォーム | ||
appleAppStoreRefundEvent | AppleAppStoreVerifyReceiptEvent | Apple AppStore のレシート検証イベント | ||||
googlePlayRefundEvent | GooglePlayVerifyReceiptEvent | Google Play のレシート検証イベント |
platform に指定する列挙型の定義
定義 | 説明 |
---|---|
AppleAppStore | Apple AppStore |
GooglePlay | Google Play |
fake | Fake |
AppleAppStoreVerifyReceiptEvent
Apple AppStore のレシート
型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 | |
---|---|---|---|---|---|---|
environment | enum { “sandbox”, “production” } | ✓ | ~ 128文字 | 環境 |
environment に指定する列挙型の定義
定義 | 説明 |
---|---|
sandbox | Sandbox |
production | Production |
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文字 | 通知が送信された日時 |