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"
      }
    }
  ]
}
有効化条件必須デフォルト値の制限説明
version2024-06-20マスターデータのフォーマットバージョン
storeContentModelsList<StoreContentModel>~ 1000 itemsストアプラットフォームのコンテンツ
storeSubscriptionContentModelsList<StoreSubscriptionContentModel>~ 1000 itemsストアプラットフォームの定期課金コンテンツ

StoreContentModel

ストアプラットフォームのコンテンツ

有効化条件必須デフォルト値の制限説明
storeContentModelIdstring~ 1024文字コンテンツモデルGRN
namestring~ 128文字ストアコンテンツモデル名
metadatastring~ 1024文字メタデータ
appleAppStoreAppleAppStoreContentApple AppStore のコンテンツ
googlePlayGooglePlayContentGoogle Play のコンテンツ

StoreSubscriptionContentModel

ストアプラットフォームの定期課金コンテンツ

有効化条件必須デフォルト値の制限説明
storeSubscriptionContentModelIdstring~ 1024文字期間課金コンテンツモデルGRN
namestring~ 128文字定期課金ストアコンテンツモデル名
metadatastring~ 1024文字メタデータ
scheduleNamespaceIdstring~ 1024文字サブスクリプション期間を連動させる GS2-Schedule のネームスペースGRN
triggerNamestring~ 128文字サブスクリプション期間を反映するトリガー名
triggerExtendModeenum {
    “just”,
    “rollupHour”
}
“just”~ 128文字サブスクリプション期間をトリガーに反映する時のモード
rollupHourint{triggerExtendMode} == “rollupHour”0~ 23期限が切れる日、契約期間を日またぎの時刻まで延長する場合日跨ぎの時刻(UTC)
reallocateSpanDaysint30~ 365サブスクリプションの契約情報を他のユーザーに割り当て可能となる期間(日)
appleAppStoreAppleAppStoreSubscriptionContentApple AppStore のコンテンツ
googlePlayGooglePlaySubscriptionContentGoogle Play のコンテンツ

triggerExtendMode に指定する列挙型の定義

定義説明
justそのままサブスクリプション期間を反映
rollupHour次の日跨ぎ時刻まで延長してサブスクリプション期間を反映

Receipt

ストアプラットフォームのレシート

有効化条件必須デフォルト値の制限説明
Storeenum {
    “AppleAppStore”,
    “GooglePlay”,
    “fake”
}
~ 128文字ストア
TransactionIDstring~ 1024文字トランザクションID
Payloadstring~ 1048576文字ペイロード

Store に指定する列挙型の定義

定義説明
AppleAppStoreApple App Store
GooglePlayGoogle Play
fakeFake

PlatformSetting

ストアプラットフォームの設定

有効化条件必須デフォルト値の制限説明
appleAppStoreAppleAppStoreSettingApple AppStore の設定
googlePlayGooglePlaySettingGoogle Play の設定
fakeFakeSettingFake(Unity Editor) の設定

AppleAppStoreSetting

Apple AppStore の設定

有効化条件必須デフォルト値の制限説明
bundleIdstring~ 1024文字Apple AppStore のバンドルID
sharedSecretKeystring~ 1024文字AppStore Connect で発行したレシートの暗号化に使用する共有秘密鍵
issuerIdstring~ 1024文字AppStore Connect で登録したアプリ内課金の Issuer ID
keyIdstring~ 1024文字Apple に登録済みのキーID
privateKeyPemstring~ 10240文字Apple から受け取った秘密鍵

GooglePlaySetting

Google Play の設定

有効化条件必須デフォルト値の制限説明
packageNamestring~ 5120文字Google Play で配信するパッケージ名
publicKeystring~ 5120文字署名検証に使用する暗号鍵

FakeSetting

デバッグ用の偽のプラットフォームの設定

有効化条件必須デフォルト値の制限説明
acceptFakeReceiptenum {
    “Accept”,
    “Reject”
}
“Reject”~ 128文字UnityEditorが出力する偽のレシートで決済できるようにするか

acceptFakeReceipt に指定する列挙型の定義

定義説明
Accept受け入れる
Reject拒否する

WalletSummary

ウォレットの状態

有効化条件必須デフォルト値の制限説明
paidint0~ 2147483646有償課金通貨
freeint0~ 2147483646無償課金通貨
totalint0~ 2147483646総数

DepositTransaction

入金トランザクション

有効化条件必須デフォルト値の制限説明
pricefloat~ 1000000.0購入価格
currencystring{price} > 0~ 8文字通貨コード
countint~ 2147483646所持量
depositedAtlong入金日時 (UNIX時間 単位:ミリ秒)

VerifyReceiptEvent

レシート検証イベント

有効化条件必須デフォルト値の制限説明
contentNamestring~ 128文字ストアコンテンツモデル名
platformenum {
    “AppleAppStore”,
    “GooglePlay”,
    “fake”
}
~ 128文字ストアプラットフォーム
appleAppStoreVerifyReceiptEventAppleAppStoreVerifyReceiptEventApple AppStore のレシート検証イベント
googlePlayVerifyReceiptEventGooglePlayVerifyReceiptEventGoogle Play のレシート検証イベント

platform に指定する列挙型の定義

定義説明
AppleAppStoreApple AppStore
GooglePlayGoogle Play
fakeFake

DepositEvent

入金イベント

有効化条件必須デフォルト値の制限説明
slotint~ 100000000スロット番号
depositTransactionsList<DepositTransaction>[]~ 1000 items入金トランザクションリスト
statusWalletSummaryウォレットの状態

WithdrawEvent

出金イベント

有効化条件必須デフォルト値の制限説明
slotint~ 100000000スロット番号
withdrawDetailsList<DepositTransaction>[]~ 1000 items出金したウォレットの詳細リスト
statusWalletSummaryウォレットの状態

RefundEvent

返金イベント

有効化条件必須デフォルト値の制限説明
contentNamestring~ 128文字ストアコンテンツモデル名
platformenum {
    “AppleAppStore”,
    “GooglePlay”,
    “fake”
}
~ 128文字ストアプラットフォーム
appleAppStoreRefundEventAppleAppStoreVerifyReceiptEventApple AppStore のレシート検証イベント
googlePlayRefundEventGooglePlayVerifyReceiptEventGoogle Play のレシート検証イベント

platform に指定する列挙型の定義

定義説明
AppleAppStoreApple AppStore
GooglePlayGoogle Play
fakeFake

AppleAppStoreVerifyReceiptEvent

Apple AppStore のレシート

有効化条件必須デフォルト値の制限説明
environmentenum {
    “sandbox”,
    “production”
}
~ 128文字環境

environment に指定する列挙型の定義

定義説明
sandboxSandbox
productionProduction

GooglePlayVerifyReceiptEvent

Google Play のレシート検証イベント

有効化条件必須デフォルト値の制限説明
purchaseTokenstring~ 4096文字Purchase Token

AppleAppStoreContent

Apple AppStore のコンテンツ

有効化条件必須デフォルト値の制限説明
productIdstring~ 1024文字プロダクトID

GooglePlayContent

Google Play のコンテンツ

有効化条件必須デフォルト値の制限説明
productIdstring~ 1024文字プロダクトID

AppleAppStoreSubscriptionContent

Apple AppStore の期間課金コンテンツ

有効化条件必須デフォルト値の制限説明
subscriptionGroupIdentifierstring~ 64文字サブスクリプショングループID

GooglePlaySubscriptionContent

Google Play の期間課金コンテンツ

有効化条件必須デフォルト値の制限説明
productIdstring~ 1024文字プロダクトID

GooglePlayRealtimeNotificationMessage

RTDN メッセージ

有効化条件必須デフォルト値の制限説明
datastring~ 1048576文字データ
messageIdstring~ 1024文字メッセージID
publishTimestring~ 1024文字通知が送信された日時