Transaction Action of GS2-Money
Specification of verify/consume/acquire transaction actions
ConsumeAction
Gs2Money:WithdrawByUserId
Consume balance from wallet by specifying a user ID
Whether the action allows quantity specification: YES
Whether the action is reversible: YES
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||
| userId | string | ✓ | ~ 128 chars | User ID Set #{userId} to replace the currently logged in user ID. | ||
| slot | int | ✓ | 0 ~ 100000000 | Slot Number | ||
| count | int | ✓ | 1 ~ 2147483646 | Quantity of premium currency to be consumed | ||
| paidOnly | bool | ✓ | false | Only for paid currency | ||
| timeOffsetToken | string | ~ 1024 chars | Time offset token |
{
"action": "Gs2Money:WithdrawByUserId",
"request": {
"namespaceName": "[string]Namespace name",
"userId": "[string]User ID",
"slot": "[int]Slot Number",
"count": "[int]Quantity of premium 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 premium 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 premium currency to be consumed",
paidOnly="[bool]Only for paid currency",
timeOffsetToken="[string]Time offset token",
})Gs2Money:RecordReceipt
Record receipt
Whether the action allows quantity specification: NO
Whether the action is reversible: NO
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||
| userId | string | ✓ | ~ 128 chars | User ID Set #{userId} to replace the currently logged in user ID. | ||
| contentsId | string | ✓ | ~ 1024 chars | Content IDs sold on the store platform | ||
| receipt | string | ✓ | ~ 524288 chars | Receipt | ||
| timeOffsetToken | string | ~ 1024 chars | 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"
}
}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 a user ID
Whether the action allows quantity specification: YES
Whether the action is reversible: YES
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||
| userId | string | ✓ | ~ 128 chars | User ID Set #{userId} to replace the currently logged in user ID. | ||
| slot | int | ✓ | 0 ~ 100000000 | Slot Number | ||
| price | float | ✓ | 0 ~ 100000.0 | Purchase Price | ||
| count | int | ✓ | 1 ~ 2147483646 | Quantity of premium currency to be granted | ||
| timeOffsetToken | string | ~ 1024 chars | 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 premium 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 premium 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 premium currency to be granted",
timeOffsetToken="[string]Time offset token",
})Gs2Money:RevertRecordReceipt
Delete receipt record by specifying a user ID
Whether the action allows quantity specification: NO
Whether the action is reversible: NO
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||
| userId | string | ✓ | ~ 128 chars | User ID Set #{userId} to replace the currently logged in user ID. | ||
| receipt | string | ✓ | ~ 524288 chars | Receipt | ||
| timeOffsetToken | string | ~ 1024 chars | Time 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",
})