メインコンテンツまでスキップ

Entitlements update notifications

Last updated on September 27, 2024
備考
  • The Entitlement Update Notification API is only available and enabled by default in AGS Private Cloud environments.
  • Currently, notifications are turned on or off globally and not configurable by game namespace. To request assistance in configuring the Entitlement Update Notification API, contact your AccelByte Technical Producer or submit a request through the AccelByte Customer Support Portal.

Introduction

The AccelByte Gaming Services (AGS) Entitlement Update Notification API provides real-time updates on players' entitlements, ensuring they are promptly informed of any changes, including those occurring outside the game client.

Supported notification type

The AGS Entitlement Update Notification API supports entitlementUpdated notifications.

Updated entitlements notifications

The following is a sample payload for entitlementUpdated notifications.

{
"type": "entitlementUpdated",
"payload": {
"action": "grant",
"data": [
{
"id": "c1a2b3c4d5e6f7890123456789abcdef",
"namespace": "gaming",
"clazz": "ENTITLEMENT",
"type": "CONSUMABLE",
"status": "Active",
"sku": "premium_subscription",
"userId": "u1a2b3c4d5e6f7890123456789abcdef",
"itemId": "i1a2b3c4d5e6f7890123456789abcdef",
"itemNamespace": "items",
"name": "Premium Subscription",
"useCount": 10,
"source": "Purchase",
"startDate": "2023-01-01T00:00:00Z",
"endDate": "2024-01-01T00:00:00Z",
"grantedAt": "2023-01-01T00:00:00Z",
"createdAt": "2023-01-01T00:00:00Z",
"updatedAt": "2023-06-01T00:00:00Z",
"collectionId": "col1a2b3c4d5e6f7890123456789abcdef",
"stackable": true,
"stackedUseCount": 20
}
]
}
}

The following table describes the function and supported values for each field in the payload.

FieldTypeDescriptionValue
typeStringNotification typeentitlementUpdated
actionStringAction taken on the walletGrant: grantEntitlements or grantUserEntitlement
Sell: sell or publicSell
Split: publicSplit
Delete: this is triggered by the delete account action from the PlayStation platform.
Update: udpateEntitlement
Transfer: publicTransfer
Consume: publicConsumeUserEntitlement or consumeUserEntitlement
Revoke: revokeEntitlements, revokeAllEntitlements, revokeUserCount, revokeUserEntitlements, revokeUserEntitlement, or revokeUserEntitlementByUseCount
Disable: disable Enable: enable
dataArrayContains the entitlement update details
data.idStringUnique identifier for the entitlement
data.namespaceStringNamespace where the entitlement is in
data.clazzStringClass of the entitlement
data.typeStringType of the entitlement
data.statusStringStatus of the entitlement
data.skuStringSKU of the entitlement
data.userIdStringIdentifier of the user associated with the entitlement
data.itemIdStringIdentifier of the item associated with the entitlement
data.itemNamespaceStringNamespace where the item associated with the entitlement is in
data.nameStringName of the entitlement
data.useCountIntegerRemaining use count of the entitlement
data.sourceStringSource of the entitlement
data.startDateDateTimeStart date of the entitlement validity period
data.endDateDateTimeEnd date of the entitlement validity period
data.grantedAtDateTimeDate and time when the entitlement was granted
data.createdAtDateTimeDate and time when the entitlement was created
data.updatedAtDateTimeDate and time when the entitlement was last updated
data.collectionIdStringIdentifier of the collection associated with the entitlement
data.stackableBooleanIndicates whether the entitlement is stackable or not
data.stackedUseCountIntegerThe stacked use count in the entitlement