Transaction Action of GS2-Money2

Specification of verify/consume/acquire transaction actions

ConsumeAction

Gs2Money2:WithdrawByUserId

Withdraw balance from Wallet by specifying a user ID

Whether the action allows quantity specification: YES

Whether the action is reversible: YES

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
userIdstring
~ 128 charsUser ID
Set #{userId} to replace the currently logged in user ID.
slotint
0 ~ 100000000Slot Number
withdrawCountint
1 ~ 2147483646Quantity of premium currency to be consumed
paidOnlybool
falseOnly for paid currency
timeOffsetTokenstring~ 1024 charsTime offset token
{
    "action": "Gs2Money2:WithdrawByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "userId": "[string]User ID",
        "slot": "[int]Slot Number",
        "withdrawCount": "[int]Quantity of premium currency to be consumed",
        "paidOnly": "[bool]Only for paid currency",
        "timeOffsetToken": "[string]Time offset token"
    }
}
action: Gs2Money2:WithdrawByUserId
request:
  namespaceName: "[string]Namespace name"
  userId: "[string]User ID"
  slot: "[int]Slot Number"
  withdrawCount: "[int]Quantity of premium currency to be consumed"
  paidOnly: "[bool]Only for paid currency"
  timeOffsetToken: "[string]Time offset token"
transaction.service("money2").consume.withdraw_by_user_id({
    namespaceName="[string]Namespace name",
    userId="[string]User ID",
    slot="[int]Slot Number",
    withdrawCount="[int]Quantity of premium currency to be consumed",
    paidOnly="[bool]Only for paid currency",
    timeOffsetToken="[string]Time offset token",
})

Gs2Money2:VerifyReceiptByUserId

Record receipt as used by specifying a user ID

Whether the action allows quantity specification: NO

Whether the action is reversible: NO

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
userIdstring
~ 128 charsUser ID
Set #{userId} to replace the currently logged in user ID.
contentNamestring
~ 128 charsStore Content Model name
receiptReceipt
Receipt
timeOffsetTokenstring~ 1024 charsTime offset token
{
    "action": "Gs2Money2:VerifyReceiptByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "userId": "[string]User ID",
        "contentName": "[string]Store Content Model name",
        "receipt": {
            "Store": "[string]Store",
            "TransactionID": "[string]Transaction ID",
            "Payload": "[string]Payload"
        },
        "timeOffsetToken": "[string]Time offset token"
    }
}
action: Gs2Money2:VerifyReceiptByUserId
request:
  namespaceName: "[string]Namespace name"
  userId: "[string]User ID"
  contentName: "[string]Store Content Model name"
  receipt: 
  Store: "[string]Store"
  TransactionID: "[string]Transaction ID"
  Payload: "[string]Payload"
  timeOffsetToken: "[string]Time offset token"
transaction.service("money2").consume.verify_receipt_by_user_id({
    namespaceName="[string]Namespace name",
    userId="[string]User ID",
    contentName="[string]Store Content Model name",
    receipt={
        store="[string]Store",
        transactionID="[string]Transaction ID",
        payload="[string]Payload"
    },
    timeOffsetToken="[string]Time offset token",
})

AcquireAction

Gs2Money2:DepositByUserId

Deposit balance to Wallet by specifying a user ID

Whether the action allows quantity specification: YES

Whether the action is reversible: YES

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
userIdstring
~ 128 charsUser ID
Set #{userId} to replace the currently logged in user ID.
slotint
0 ~ 100000000Slot Number
depositTransactionsList<DepositTransaction>
1 ~ 1000 itemsList of Deposit transactions
timeOffsetTokenstring~ 1024 charsTime offset token
{
    "action": "Gs2Money2:DepositByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "userId": "[string]User ID",
        "slot": "[int]Slot Number",
        "depositTransactions": [
            {
                "price": "[double]Purchase Price",
                "currency": "[string]Currency Code",
                "count": "[int]Quantity of premium currency",
                "depositedAt": "[long]Deposit Date"
            }
        ],
        "timeOffsetToken": "[string]Time offset token"
    }
}
action: Gs2Money2:DepositByUserId
request:
  namespaceName: "[string]Namespace name"
  userId: "[string]User ID"
  slot: "[int]Slot Number"
  depositTransactions: 
    - price: "[double]Purchase Price"
      currency: "[string]Currency Code"
      count: "[int]Quantity of premium currency"
      depositedAt: "[long]Deposit Date"
  timeOffsetToken: "[string]Time offset token"
transaction.service("money2").acquire.deposit_by_user_id({
    namespaceName="[string]Namespace name",
    userId="[string]User ID",
    slot="[int]Slot Number",
    depositTransactions={
        {
            price="[double]Purchase Price",
            currency="[string]Currency Code",
            count="[int]Quantity of premium currency",
            depositedAt="[long]Deposit Date"
        }
    },
    timeOffsetToken="[string]Time offset token",
})