Transaction Action of GS2-Money2

VerifyAction

ConsumeAction

Gs2Money2:WithdrawByUserId

Withdraw balance from wallet by specifying user ID

Actions for which quantity can be specified: YES

Reversible action: YES

TypeDescription
namespaceNamestringNamespace Name
userIdstringSet #{userId} to replace the currently logged in user ID.
slotintSlot Number
withdrawCountintQuantity of billable currency to be consumed
paidOnlyboolOnly for paid currency
timeOffsetTokenstringTime offset token
{
    "action": "Gs2Money2:WithdrawByUserId",
    "request": {
        "namespaceName": "[string]Namespace Name",
        "userId": "[string]User Id",
        "slot": "[int]Slot Number",
        "withdrawCount": "[int]Quantity of billable 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 billable 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 billable currency to be consumed",
    paidOnly="[bool]Only for paid currency",
    timeOffsetToken="[string]Time offset token",
})

Gs2Money2:VerifyReceiptByUserId

Record receipt as used by specifying user ID

Actions for which quantity can be specified: NO

Reversible action: NO

TypeDescription
namespaceNamestringNamespace Name
userIdstringSet #{userId} to replace the currently logged in user ID.
contentNamestringStore Content Model Name
receiptReceiptReceipt
timeOffsetTokenstringTime 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 user ID

Actions for which quantity can be specified: YES

Reversible action: YES

TypeDescription
namespaceNamestringNamespace Name
userIdstringSet #{userId} to replace the currently logged in user ID.
slotintSlot Number
depositTransactionsDepositTransaction[]List of Deposit transactions
timeOffsetTokenstringTime offset token
{
    "action": "Gs2Money2:DepositByUserId",
    "request": {
        "namespaceName": "[string]Namespace Name",
        "userId": "[string]User Id",
        "slot": "[int]Slot Number",
        "depositTransactions": [
            {
                "price": "[float]Purchase Price",
                "currency": "[string]Currency Code",
                "count": "[int]Count",
                "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: "[float]Purchase Price"
      currency: "[string]Currency Code"
      count: "[int]Count"
      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="[float]Purchase Price",
            currency="[string]Currency Code",
            count="[int]Count",
            depositedAt="[long]Deposit Date"
        }
    },
    timeOffsetToken="[string]Time offset token",
})