Actions32
- Bot Actions
- Callback Actions
- Chat Actions
- File Actions
- Message Actions
- Payment Actions
- Sticker Actions
Overview
The node integrates with the Bale Messenger API to send payment invoices within chats. Specifically, the Send Invoice operation under the Payment resource allows users to create and send a payment request (invoice) directly to a specified chat in Bale Messenger. This is useful for scenarios such as e-commerce bots, service providers, or any application that needs to request payments from users via chat.
Practical examples include:
- Sending an invoice for a purchased product with itemized prices.
- Requesting payment for services rendered with a detailed description.
- Including a product image URL to visually represent the invoice item.
Properties
Name | Meaning |
---|---|
Chat ID | Unique identifier for the target chat where the invoice will be sent. |
Reply Markup | Additional interface options for the message; can be one of: Inline Keyboard, None, Reply Keyboard, or Reply Keyboard Remove. |
Reply Keyboard | Custom keyboard with reply options (only shown if Reply Markup is set to Reply Keyboard). |
Reply Keyboard Remove | Options to remove the custom keyboard, including whether to remove it selectively. |
Reply To Message ID | If the invoice message is a reply, this is the ID of the original message. |
Title | Title of the invoice, typically the product or service name. |
Description | Description text explaining the invoice or payment request. |
Payload | Internal payload string (1 to 128 bytes) used to differentiate payment requests; not visible to users. |
Provider Token | The token representing the payment provider or card number for processing the payment. |
Prices | A list of price objects, each containing a label (e.g., product name) and amount (in smallest currency unit). |
Photo Url | URL of the product image to include with the invoice for visual reference. |
Output
The output JSON contains the response from the Bale Messenger API after sending the invoice. It includes details about the sent invoice message, such as confirmation data returned by the API.
No binary data output is produced by this operation.
Dependencies
- Requires an active Bale Messenger API credential with a valid authentication token.
- Uses the Bale Messenger Bot API endpoint at
https://tapi.bale.ai/bot
. - The node depends on the
node-telegram-bot-api
library adapted for Bale Messenger API calls. - Requires proper configuration of the API token credential in n8n.
Troubleshooting
- Invalid Chat ID: If the chat ID is incorrect or the bot does not have access to the chat, the API call will fail. Verify the chat ID and bot permissions.
- Provider Token Issues: An invalid or expired provider token will cause payment processing errors. Ensure the token is current and correct.
- Malformed Prices JSON: The prices must be a properly formatted list of objects with
label
andamount
. Invalid formatting will cause errors. - Reply Markup Misconfiguration: Incorrectly configured reply markup options may cause the message to fail or display improperly.
- API Errors: Network issues or API downtime can cause failures. Check logs for error messages returned by the Bale API.
Common error messages are logged with details from the API response to assist debugging.
Links and References
- Bale Messenger Bot API Documentation
- n8n Documentation on Creating Custom Nodes
- node-telegram-bot-api GitHub Repository (used as base for API calls)
This summary focuses exclusively on the Payment - Send Invoice operation extracted from the provided source code and property definitions.