GS2-Money2 Master Data Reference

Reference for the master data format and the models to be imported

Master Data Format

{
  "version": "2024-06-20",
  "storeContentModels": [
    {
      "name": "[string]Store Content Model name",
      "metadata": "[string?]Metadata",
      "appleAppStore": {
        "productId": "[string?]Product ID"
      },
      "googlePlay": {
        "productId": "[string?]Product ID"
      }
    }
  ],
  "storeSubscriptionContentModels": [
    {
      "name": "[string]Store Subscription Content Model name",
      "metadata": "[string?]Metadata",
      "scheduleNamespaceId": "[string]Namespace GRN of GS2-Schedule to link the subscription period",
      "triggerName": "[string]Trigger name to reflect the subscription period",
      "triggerExtendMode": "[string (enum)]Mode to reflect the subscription period on the trigger",
      "rollupHour": "[int]Hour of the day to roll up the subscription period (UTC)",
      "reallocateSpanDays": "[int]Time span (days) that allows subscription contract information to be assigned to other users",
      "appleAppStore": {
        "subscriptionGroupIdentifier": "[string?]Subscription Group ID"
      },
      "googlePlay": {
        "productId": "[string?]Product ID"
      }
    }
  ]
}
Type Condition Required Default Value Limits Description
version string
2024-06-20 Format version of master data
storeContentModels List<StoreContentModel> ~ 1000 items Store Content Model
This is a model for storing content from various store platforms.
storeSubscriptionContentModels List<StoreSubscriptionContentModel> ~ 1000 items Store Subscription Content Model
This is a model for storing subscription-based content from various store platforms.

Models

StoreContentModel

Store Content Model

This is a model for storing content from various store platforms.

Type Condition Required Default Value Limits Description
storeContentModelId string
*
~ 1024 chars Store Content Model GRN
* Set automatically by the server
name string
~ 128 chars Store Content Model name
metadata string ~ 1024 chars Metadata
Arbitrary values can be set in the metadata.
Since they do not affect GS2’s behavior, they can be used to store information used in the game.
appleAppStore AppleAppStoreContent Apple AppStore Content
The Apple App Store product information (product ID) for this store content. Used during receipt verification to match the purchased product.
googlePlay GooglePlayContent Google Play Content
The Google Play product information (product ID) for this store content. Used during receipt verification to match the purchased product.

AppleAppStoreContent

Content of Apple AppStore

Contains the Apple App Store product ID that corresponds to an in-app purchase product. Used to match receipts during verification.

Type Condition Required Default Value Limits Description
productId string ~ 1024 chars Product ID
The Apple App Store product identifier registered in App Store Connect for this in-app purchase item.

GooglePlayContent

Content of Google Play

Contains the Google Play product ID that corresponds to an in-app purchase product. Used to match receipts during verification.

Type Condition Required Default Value Limits Description
productId string ~ 1024 chars Product ID
The Google Play product identifier registered in Google Play Console for this in-app purchase item.

StoreSubscriptionContentModel

Store Subscription Content Model

This is a model for storing subscription-based content from various store platforms.

Type Condition Required Default Value Limits Description
storeSubscriptionContentModelId string
*
~ 1024 chars Subscription Content Model GRN
* Set automatically by the server
name string
~ 128 chars Store Subscription Content Model name
metadata string ~ 1024 chars Metadata
scheduleNamespaceId string
~ 1024 chars Namespace GRN of GS2-Schedule to link the subscription period
triggerName string
~ 128 chars Trigger name to reflect the subscription period
The name of the GS2-Schedule trigger that will be activated to reflect the subscription’s active period. The trigger duration is set to the subscription’s expiration time.
triggerExtendMode string (enum)
enum {
  “just”,
  “rollupHour”
}
“just” Mode to reflect the subscription period on the trigger
Controls how the subscription expiration is mapped to the trigger duration. “just” uses the exact subscription period. “rollupHour” extends the period to the next specified hour (UTC) to avoid mid-day expirations.
DefinitionDescription
“just”Reflect the subscription period as it is
“rollupHour”Extend the subscription period to the next day crossing time
rollupHour int {triggerExtendMode} == “rollupHour” 0 0 ~ 23 Hour of the day to roll up the subscription period (UTC)
When triggerExtendMode is “rollupHour”, the subscription period is extended to this hour (0-23, UTC) on the expiration day. This prevents subscriptions from expiring in the middle of a user’s play session.
* Enabled only if triggerExtendMode is “rollupHour”
reallocateSpanDays int 30 0 ~ 365 Time span (days) that allows subscription contract information to be assigned to other users
The number of days after the last allocation before a subscription contract can be reassigned to a different user. This prevents abuse when users change accounts, by enforcing a waiting period before the subscription can be transferred.
appleAppStore AppleAppStoreSubscriptionContent Apple AppStore Content
The Apple App Store subscription information (subscription group identifier) for this subscription content.
googlePlay GooglePlaySubscriptionContent Google Play Content
The Google Play subscription information (product ID) for this subscription content.

AppleAppStoreSubscriptionContent

Subscription content of Apple AppStore

Contains the Apple App Store subscription group identifier for subscription-based products. Used to manage and verify auto-renewable subscriptions.

Type Condition Required Default Value Limits Description
subscriptionGroupIdentifier string ~ 64 chars Subscription Group ID
The subscription group identifier registered in App Store Connect. Subscriptions within the same group are mutually exclusive, meaning a user can only subscribe to one at a time.

GooglePlaySubscriptionContent

Google Play Subscription Content

Contains the Google Play product ID for subscription-based products. Used to manage and verify auto-renewable subscriptions on Google Play.

Type Condition Required Default Value Limits Description
productId string ~ 1024 chars Product ID