Integrating Digital Products into Your Product

This guide is for Telegram bot and service owners who want to use Tribute as a payment system. Accept payments via SBP and Telegram Stars, receive withdrawals in USDT without complex payment provider

Benefits of Tribute Digital Products Integration

For you as a service owner:

  • Payment acceptance - SBP and Telegram Stars

  • Simple integration - create a product, get a link, set up a webhook

  • Ready infrastructure - no need to integrate payment providers yourself

  • Automatic withdrawals - receive money in USDT

For your users:

  • Convenient payment - one-click purchase through Telegram

  • Available payment methods - SBP, Telegram Stars

How it works: general scheme

For example, for an AI assistant it could be "AI Assistant Access for 1 month"

Each product has its own link in the format:

  • For Telegram: https://t.me/tribute/app?startapp=p123

  • For browser: https://web.tribute.tg/p/123

In your bot or other service, add a "Pay" button that leads to the product link

4. User pays

The buyer can:

  • Pay directly with Telegram Stars (if available on balance)

  • Buy Stars via SBP and immediately exchange them for the product

5. You receive a webhook about successful payment

After payment, a POST request with purchase information arrives at your server. More about webhook format in the webhooks documentationarrow-up-right

6. Provide access to the user

Activate the service for the user using the Telegram ID from the webhook

Step-by-step setup instructions

Step 1: Registration in Tribute

  1. Open @tributearrow-up-right in Telegram

  2. Click "Start" and follow the instructions

  3. Go to the "Author Dashboard" section

Step 2: Creating a digital product

  1. In the dashboard, select "Digital Products" → "Create instant product"

  2. You will be redirected to the bot chat

    Send the bot a message that will become your digital product. This can be any message - for example, a photo with description, video, file, or even a voice note.

    Example text message for integration:

    Important: This is the exact message the buyer will receive after payment. Add instructions for the user so they understand what to do next. Once the product is created, this message cannot be edited (but you can always create a new digital product with a different message).

  3. After sending the message, click the "Create Product" button from the bot's message

  4. Fill in the required fields:

    • Currency - choose the payment currency

    • Name - what the buyer will see (for example: "AI Assistant for 1 month")

    • Description - brief product description

    • Price - cost in the selected currency

  5. Save the product

    After saving, you will receive a unique payment link that can be used in your integration

Step 3: Getting API key

  1. In the dashboard, open the menu (three dots) → "Settings"

  2. Go to the "API Keys" section

  3. Click "Generate New Key"

  4. Save the key in a safe place - you'll need it to verify webhooks

Step 4: Setting up webhooks

  1. In the "API Keys" section, find the "Webhook URL" field

  2. Specify your server address for receiving webhooks:

  3. Save settings

Step 5: Processing webhooks on your server

After successful payment for a digital product, Tribute will send a POST request to your URL:

chevron-rightWebhook formathashtag

Webhook signature verification

Each request contains a trbt-signature header with HMAC-SHA256 signature of the request body. Examples of signature verification and webhook processing are available in the webhooks documentationarrow-up-right

Step 6: Integration into your bot

In your Telegram bot, add a payment button

chevron-rightPython codehashtag

Working with API

Get Product by ID

get

Returns a single product by its ID

Authorizations
Api-KeystringRequired

API key for authentication.

Path parameters
idintegerRequired

Product ID

Responses
chevron-right
200

Successful response

application/json
get
/products/{id}

Get Products List

get

Returns a paginated list of products

Authorizations
Api-KeystringRequired

API key for authentication.

Query parameters
pageinteger · min: 1Optional

Page number

Default: 1
sizeinteger · min: 1 · max: 100Optional

Items per page

Default: 20
typestring · enumOptional

Filter by product type

Possible values:
descbooleanOptional

Sort by ID descending

Default: false
Responses
chevron-right
200

Successful response

application/json
get
/products

Cancel Digital Product Purchase

post

Cancels a digital product purchase and refunds the payment.

Important: This endpoint only supports refunds for purchases paid with Telegram Stars. Purchases paid with other payment methods cannot be refunded via this endpoint.

Authorizations
Api-KeystringRequired

API key for authentication.

Path parameters
purchaseIdintegerRequired

Digital product purchase ID (ProductPurchase.ID)

Example: 12345
Responses
chevron-right
200

Purchase successfully cancelled and payment refunded

application/json
post
/products/purchases/{purchaseId}/cancel

New Digital Product Purchase

Notification about a digital product purchase

Payload
namestring · enumRequiredExample: new_digital_productPossible values:
created_atstring · date-timeRequired

Event creation time

Example: 2025-03-20T01:15:58.33246Z
sent_atstring · date-timeRequired

Event sending time

Example: 2025-03-20T01:15:58.542279448Z
Responses
chevron-right
200

Webhook successfully processed

application/json

Payload

Creating different tariffs

For different tiers, create several digital products:

  1. AI Assistant - 1 month (ID: 456) - $9.99

  2. AI Assistant - 3 months (ID: 457) - $24.99

  3. AI Assistant - 1 year (ID: 458) - $79.99

Handling retry attempts

When webhook delivery fails, Tribute retries after:

  • 5 minutes

  • 15 minutes

  • 30 minutes

  • 1 hour

  • 10 hours

Make sure your handler is idempotent (reprocessing the same payment won't create duplicates).

Withdrawals

You can withdraw earned funds in USDT (bank card withdrawals will be added in the future). Set up automatic withdrawals in the "Wallet" section.

Frequently Asked Questions

chevron-rightHow quickly do webhooks arrive?hashtag

Usually within 1-2 seconds after successful payment.

chevron-rightCan I cancel a payment?hashtag

Digital products can be canceled through Tribute support.


Last updated