Subscriptions
Managing Stratus Subscription
Overview
Subscriptions empower developers to receive real-time updates triggered by smart contract events or internal loyalty actions. These notifications can either be sent to a webhook endpoint or used to automatically invoke functions.
Event Types
Blockchain Events
Blockchain events notify you whenever a smart contract emits an event or a function is called. These events track on-chain state with minimal latency (typically one block), making them ideal for real-time applications.
Add Contract to Admin Account
Start by adding the desired smart contract to your admin panel.
Select Event
Choose “EVENT” from the subscription options. All available events for the contract will be populated automatically.
Blockchain Function Events
The process mirrors blockchain events with a slight variation:
Add Contract to Admin Panel
Ensure the contract is registered in your admin panel.
Select Function
Choose “FUNCTION” after adding the contract. All smart contract functions will be listed automatically.
Snag Events
Snag events allow subscriptions to internal platform actions. These events relate to loyalty account activities and may have a slight delay (up to 30 seconds) after the action is recorded.
Event Types Reference
LoyaltyTransactionEntry
Triggered when a user’s account balance is updated
UserMetadata
Emitted when a user’s profile is created or updated
UserTokenActivity
Emitted for token-related activities