API Documentation
We have added API keys for access to the public API and for data integration with external systems.
How to find this feature:
Go to the Creator Dashboard in the Tribute mini-app.
Click the three-dot icon in the top right corner and select Settings.
Open the API Keys section.
How Webhooks Work:
We send a request with the event payload to the user upon specific events.
Currently, there are two webhooks:
NewSubscriptionEvent – triggered when a subscription is purchased
CancelledSubscriptionEvent – triggered when a subscription is cancelled
Note: There is currently no webhook for subscription renewal.
Verifying Request Signatures:
Take the raw body of the incoming request.
Sign it using your API key with the same method.
Compare the resulting signature to the
trbt-signature
header.
If the signatures match, the request is authentic.
Response Examples:
NewSubscriptionEvent
SubscriptionName
string
subscription_name
SubscriptionID
uint
subscription_id
PeriodID
uint
period_id
Period
string
period
Price
int64
price
Amount
int64
amount
Currency
string
currency
UserID
uint
user_id
TelegramUserID
uint
telegram_user_id
ChannelID
uint
channel_id
ChannelName
string
channel_name
ExpiresAt
time
expires_at
CancelledSubscriptionEvent
SubscriptionName
string
subscription_name
SubscriptionID
uint
subscription_id
PeriodID
uint
period_id
Period
string
period
Price
int64
price
Amount
int64
amount
Currency
string
currency
UserID
uint
user_id
TelegramUserID
uint
telegram_user_id
ChannelID
uint
channel_id
ChannelName
string
channel_name
CancelReason
string
cancel_reason
ExpiresAt
time
expires_at
Last updated