Transaction Action of GS2-Money

VerifyAction

ConsumeAction

Gs2Money:WithdrawByUserId

Consume 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
countintQuantity of billable currency to be consumed
paidOnlyboolOnly for paid currency
timeOffsetTokenstringTime offset token
{
    "action": "Gs2Money:WithdrawByUserId",
    "request": {
        "namespaceName": "[string]Namespace Name",
        "userId": "[string]User Id",
        "slot": "[int]Slot Number",
        "count": "[int]Quantity of billable currency to be consumed",
        "paidOnly": "[bool]Only for paid currency",
        "timeOffsetToken": "[string]Time offset token"
    }
}
action: Gs2Money:WithdrawByUserId
request:
  namespaceName: "[string]Namespace Name"
  userId: "[string]User Id"
  slot: "[int]Slot Number"
  count: "[int]Quantity of billable currency to be consumed"
  paidOnly: "[bool]Only for paid currency"
  timeOffsetToken: "[string]Time offset token"
transaction.service("money").consume.withdraw_by_user_id({
    namespaceName="[string]Namespace Name",
    userId="[string]User Id",
    slot="[int]Slot Number",
    count="[int]Quantity of billable currency to be consumed",
    paidOnly="[bool]Only for paid currency",
    timeOffsetToken="[string]Time offset token",
})

Gs2Money:RecordReceipt

Record receipt

Actions for which quantity can be specified: NO

Reversible action: NO

TypeDescription
namespaceNamestringNamespace Name
userIdstringSet #{userId} to replace the currently logged in user ID.
contentsIdstringContent IDs sold on the store platform
receiptstringReceipt
timeOffsetTokenstringTime offset token
{
    "action": "Gs2Money:RecordReceipt",
    "request": {
        "namespaceName": "[string]Namespace Name",
        "userId": "[string]User Id",
        "contentsId": "[string]Content IDs sold on the store platform",
        "receipt": "[string]Receipt",
        "timeOffsetToken": "[string]Time offset token"
    }
}
action: Gs2Money:RecordReceipt
request:
  namespaceName: "[string]Namespace Name"
  userId: "[string]User Id"
  contentsId: "[string]Content IDs sold on the store platform"
  receipt: "[string]Receipt"
  timeOffsetToken: "[string]Time offset token"
transaction.service("money").consume.record_receipt({
    namespaceName="[string]Namespace Name",
    userId="[string]User Id",
    contentsId="[string]Content IDs sold on the store platform",
    receipt="[string]Receipt",
    timeOffsetToken="[string]Time offset token",
})

AcquireAction

Gs2Money: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
pricefloatPurchase Price
countintQuantity of billable currency to be granted
timeOffsetTokenstringTime offset token
{
    "action": "Gs2Money:DepositByUserId",
    "request": {
        "namespaceName": "[string]Namespace Name",
        "userId": "[string]User Id",
        "slot": "[int]Slot Number",
        "price": "[float]Purchase Price",
        "count": "[int]Quantity of billable currency to be granted",
        "timeOffsetToken": "[string]Time offset token"
    }
}
action: Gs2Money:DepositByUserId
request:
  namespaceName: "[string]Namespace Name"
  userId: "[string]User Id"
  slot: "[int]Slot Number"
  price: "[float]Purchase Price"
  count: "[int]Quantity of billable currency to be granted"
  timeOffsetToken: "[string]Time offset token"
transaction.service("money").acquire.deposit_by_user_id({
    namespaceName="[string]Namespace Name",
    userId="[string]User Id",
    slot="[int]Slot Number",
    price="[float]Purchase Price",
    count="[int]Quantity of billable currency to be granted",
    timeOffsetToken="[string]Time offset token",
})

Gs2Money:RevertRecordReceipt

Delete receipt record 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.
receiptstringReceipt
timeOffsetTokenstringTime offset token
{
    "action": "Gs2Money:RevertRecordReceipt",
    "request": {
        "namespaceName": "[string]Namespace Name",
        "userId": "[string]User Id",
        "receipt": "[string]Receipt",
        "timeOffsetToken": "[string]Time offset token"
    }
}
action: Gs2Money:RevertRecordReceipt
request:
  namespaceName: "[string]Namespace Name"
  userId: "[string]User Id"
  receipt: "[string]Receipt"
  timeOffsetToken: "[string]Time offset token"
transaction.service("money").acquire.revert_record_receipt({
    namespaceName="[string]Namespace Name",
    userId="[string]User Id",
    receipt="[string]Receipt",
    timeOffsetToken="[string]Time offset token",
})