Entitlements Events

Entitlement Event Object


NameTypeDescriptionExample
idstrIdentifier of the event"zzzz1111yyyy2222xxxx"
typestrThe type of event that occurred"entitlement.entitlements_granted""
createdintUnix timestamp when the event occurred1758652772
dataobjectEvent payloadSee JSON below
data.object.typestrResource type of event object"entitlement"
data.object.merchantstrIdentifier of merchant"519f1f120e3411ef984b1e8a267ce85a"
data.object.entitlementsarrayList of entitlement objects[{...}, {...}]
data.object.entitlements[].public_idstrPublic identifier of the entitlement"dee489eb3c6f419dbd65fb99f33c60f5"
data.object.entitlements[].access_typestrAccess type for the entitlement \nOptions: "time_based""time_based"
data.object.entitlements[].createdintUnix timestamp when the entitlement was created1755841156
data.object.entitlements[].last_updatedintUnix timestamp when the entitlement was last updated1758652772
data.object.entitlements[].expirationintUnix timestamp when the entitlement expires1763701794
data.object.entitlements[].grace_periodintGrace period (seconds) after expiration during which access may continue345600
data.object.entitlements[].entitlement_transactionobjectDetails of the transaction that granted or modified the entitlement{ ... }
data.object.entitlements[].entitlement_transaction.public_idstrPublic identifier of the transaction"1f3650bb2d75463e8b71b61f38289c9c"
data.object.entitlements[].entitlement_transaction.transaction_typestrTransaction type \nOptions: "grant_credit""grant_credit"
data.object.entitlements[].entitlement_transaction.source_actionstrOriginating action in merchant workflow"order-placement"
data.object.entitlements[].entitlement_transaction.source_objectstrType of object that initiated the transaction"item"
data.object.entitlements[].entitlement_transaction.source_object_idstrIdentifier of the source object"169719f6110d40b2b157381924f95bf9"
data.object.entitlements[].entitlement_transaction.transaction_initiation_timeintUnix timestamp when the transaction was initiated1758652772
data.object.entitlements[].entitlement_transaction.transaction_execution_timeintUnix timestamp when the transaction executed1758652772
data.object.entitlements[].entitlement_transaction.time_amountintAmount of time credited (seconds)1296000
data.object.entitlements[].entitlement_transaction.grace_periodintTransaction-level grace period (seconds), if applicable345600
data.object.entitlements[].resourceobjectResource to which the entitlement applies{ ... }
data.object.entitlements[].resource.public_idstrPublic identifier of the resource"8bc97390ff944451a8e4bee89bf18473"
data.object.entitlements[].resource.namestrResource display name"Test Resource 2"
data.object.entitlements[].resource.descriptionstrResource description"Test Description 2"
data.object.entitlements[].resource.external_idstrExternal identifier of the resource in merchant system"654321"
data.object.entitlements[].resource.image_urlstr | nullImage URL for the resource, if anynull
data.object.contextobject | nullOptional context specific to the eventnull
data.object.snapshotobjectArbitrary snapshot data at time of event{}
  • Example data:
{
   "id":"5dcc6524c8b3491aba893dbc33282fe9",
   "type":"entitlement.entitlements_granted",
   "created":1758652772,
   "data":{
      "object":{
         "customer":"9621785248035",
         "entitlements":[
            {
               "access_type":"time_based",
               "created":1753215926,
               "entitlement_transaction":{
                  "grace_period":86400,
                  "public_id":"a6ac2b763b4c45db9b3cb4f2e43fa2bb",
                  "source_action":"order-placement",
                  "source_object":"item",
                  "source_object_id":"169719f6110d40b2b157381924f95bf9",
                  "time_amount":2592000,
                  "transaction_execution_time":1758652772,
                  "transaction_initiation_time":1758652772,
                  "transaction_type":"grant_credit"
               },
               "expiration":1773951926,
               "grace_period":86400,
               "last_updated":1758652772,
               "public_id":"36a82fb6bb9549e0877058b2eb8644ad",
               "resource":{
                  "description":"Test Description 1",
                  "external_id":"123456",
                  "image_url":"http://example.com/resource1.jpg",
                  "name":"Test Resource 1",
                  "public_id":"c84a13fc8e904e0f80e6377b15f0464a"
               }
            },
            {
               "access_type":"time_based",
               "created":1755841156,
               "entitlement_transaction":{
                  "grace_period":345600,
                  "public_id":"1f3650bb2d75463e8b71b61f38289c9c",
                  "source_action":"order-placement",
                  "source_object":"item",
                  "source_object_id":"169719f6110d40b2b157381924f95bf9",
                  "time_amount":1296000,
                  "transaction_execution_time":1758652772,
                  "transaction_initiation_time":1758652772,
                  "transaction_type":"grant_credit"
               },
               "expiration":1763701794,
               "grace_period":345600,
               "last_updated":1758652772,
               "public_id":"dee489eb3c6f419dbd65fb99f33c60f5",
               "resource":{
                  "description":"Test Description 2",
                  "external_id":"654321",
                  "image_url":null,
                  "name":"Test Resource 2",
                  "public_id":"8bc97390ff944451a8e4bee89bf18473"
               }
            }
         ],
         "merchant":"519f1f120e3411ef984b1e8a267ce85a",
         "type":"entitlement"
      },
      "context":null,
      "snapshot":{
         
      }
   }
}

Entitlement Event Types

  • entitlement.entitlements_expiring

  • Triggered when an entitlement is approaching expiration. These events fire one week prior to the expiration date whenever possible. If the entitlement lifetime is shorter than one week, the event fires as late as possible (for example: created with 6 days of access → event fires 6 days before expiration). Multiple entitlements with matching conditions are clustered together in a single event.
  • entitlement.entitlements_expired

  • Triggered when an entitlement has reached its expiration time. Multiple entitlements that expire at the same time are clustered together in a single event.
  • entitlement.entitlements_granted

  • Triggered when a customer has been granted one or more entitlements. If multiple entitlements are granted for a customer at the same time, they are clustered together in a single event.