Telegram Stars icon

Telegram Stars

Interact with Telegram Stars payments API

Overview

This node interacts with the Telegram Stars payments API, specifically allowing users to send invoices for payment in Telegram Stars. It is useful for bots that want to request payments from users within Telegram by sending detailed invoices including product name, description, price, and currency. For example, a bot selling digital goods or services can use this node to send an invoice to a user or channel chat.

Use Case Examples

  1. Sending an invoice to a user chat with product details and price in Telegram Stars.
  2. Adding optional fields like product photo URL or disabling notifications for the invoice message.

Properties

Name Meaning
Chat ID Unique identifier for the target chat or username of the target channel where the invoice will be sent.
Title Product name, between 1 and 32 characters, shown on the invoice.
Description Product description, between 1 and 255 characters, shown on the invoice.
Payload Bot-defined invoice payload, a string of 1-128 bytes used to identify the invoice.
Currency Three-letter ISO 4217 currency code for the invoice. Use "XTR" for Telegram Stars.
Price Label Label for the price portion of the invoice.
Price Amount Price of the product in the smallest units of the currency, must be a positive number.
Additional Fields Optional additional parameters such as message thread ID, provider data, photo URL and dimensions, notification settings, reply message ID, and sending options.

Output

JSON

  • chat_id - Identifier of the chat where the invoice was sent.
  • title - Title of the product in the invoice.
  • description - Description of the product in the invoice.
  • payload - Payload string defined by the bot for the invoice.
  • currency - Currency code used in the invoice.
  • prices
    • 0
      * label - Label for the price portion.
      * amount - Amount of the price in smallest currency units.
  • message_id - Identifier of the sent message containing the invoice.

Dependencies

  • Telegram Stars API
  • An API key credential for Telegram Stars

Troubleshooting

  • Ensure the price label is not empty; otherwise, the node throws an error 'Price label is required'.
  • Ensure the price amount is a positive number; otherwise, the node throws an error 'Price amount must be a positive number'.
  • Verify that the chat ID is correct and accessible by the bot to avoid message sending failures.
  • If additional fields are used, ensure their values are valid and correctly formatted, especially JSON-serialized provider data.
  • Check that the currency code is a valid ISO 4217 code or 'XTR' for Telegram Stars.

Discussion