mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-06 16:15:51 +00:00
* Re-generate types * Re-generate methods (only attributes) * Added enums * Base init generator * Added butcher configs * Fixed tests, bump butcher * Added changelog * Added enum docs * Added templates for docs index * Re-generate bot class, remove deprecated methods
243 lines
16 KiB
JSON
243 lines
16 KiB
JSON
{
|
|
"meta": {
|
|
"deprecated": false
|
|
},
|
|
"group": {
|
|
"title": "Payments",
|
|
"anchor": "payments"
|
|
},
|
|
"object": {
|
|
"anchor": "sendinvoice",
|
|
"name": "sendInvoice",
|
|
"description": "Use this method to send invoices. On success, the sent Message is returned.",
|
|
"html_description": "<p>Use this method to send invoices. On success, the sent <a href=\"#message\">Message</a> is returned.</p>",
|
|
"rst_description": "Use this method to send invoices. On success, the sent :class:`aiogram.types.message.Message` is returned.",
|
|
"annotations": [
|
|
{
|
|
"type": "Integer or String",
|
|
"required": true,
|
|
"description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)",
|
|
"html_description": "<td>Unique identifier for the target chat or username of the target channel (in the format <code>@channelusername</code>)</td>",
|
|
"rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n",
|
|
"name": "chat_id"
|
|
},
|
|
{
|
|
"type": "Integer",
|
|
"required": false,
|
|
"description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only",
|
|
"html_description": "<td>Unique identifier for the target message thread (topic) of the forum; for forum supergroups only</td>",
|
|
"rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n",
|
|
"name": "message_thread_id"
|
|
},
|
|
{
|
|
"type": "String",
|
|
"required": true,
|
|
"description": "Product name, 1-32 characters",
|
|
"html_description": "<td>Product name, 1-32 characters</td>",
|
|
"rst_description": "Product name, 1-32 characters\n",
|
|
"name": "title"
|
|
},
|
|
{
|
|
"type": "String",
|
|
"required": true,
|
|
"description": "Product description, 1-255 characters",
|
|
"html_description": "<td>Product description, 1-255 characters</td>",
|
|
"rst_description": "Product description, 1-255 characters\n",
|
|
"name": "description"
|
|
},
|
|
{
|
|
"type": "String",
|
|
"required": true,
|
|
"description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.",
|
|
"html_description": "<td>Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.</td>",
|
|
"rst_description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.\n",
|
|
"name": "payload"
|
|
},
|
|
{
|
|
"type": "String",
|
|
"required": true,
|
|
"description": "Payment provider token, obtained via @BotFather",
|
|
"html_description": "<td>Payment provider token, obtained via <a href=\"https://t.me/botfather\">@BotFather</a></td>",
|
|
"rst_description": "Payment provider token, obtained via `@BotFather <https://t.me/botfather>`_\n",
|
|
"name": "provider_token"
|
|
},
|
|
{
|
|
"type": "String",
|
|
"required": true,
|
|
"description": "Three-letter ISO 4217 currency code, see more on currencies",
|
|
"html_description": "<td>Three-letter ISO 4217 currency code, see <a href=\"/bots/payments#supported-currencies\">more on currencies</a></td>",
|
|
"rst_description": "Three-letter ISO 4217 currency code, see `more on currencies <https://core.telegram.org/bots/payments#supported-currencies>`_\n",
|
|
"name": "currency"
|
|
},
|
|
{
|
|
"type": "Array of LabeledPrice",
|
|
"required": true,
|
|
"description": "Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)",
|
|
"html_description": "<td>Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)</td>",
|
|
"rst_description": "Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)\n",
|
|
"name": "prices"
|
|
},
|
|
{
|
|
"type": "Integer",
|
|
"required": false,
|
|
"description": "The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0",
|
|
"html_description": "<td>The maximum accepted amount for tips in the <em>smallest units</em> of the currency (integer, <strong>not</strong> float/double). For example, for a maximum tip of <code>US$ 1.45</code> pass <code>max_tip_amount = 145</code>. See the <em>exp</em> parameter in <a href=\"/bots/payments/currencies.json\">currencies.json</a>, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0</td>",
|
|
"rst_description": "The maximum accepted amount for tips in the *smallest units* of the currency (integer, **not** float/double). For example, for a maximum tip of :code:`US$ 1.45` pass :code:`max_tip_amount = 145`. See the *exp* parameter in `currencies.json <https://core.telegram.org/bots/payments/currencies.json>`_, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0\n",
|
|
"name": "max_tip_amount"
|
|
},
|
|
{
|
|
"type": "Array of Integer",
|
|
"required": false,
|
|
"description": "A JSON-serialized array of suggested amounts of tips in the smallest units of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount.",
|
|
"html_description": "<td>A JSON-serialized array of suggested amounts of tips in the <em>smallest units</em> of the currency (integer, <strong>not</strong> float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed <em>max_tip_amount</em>.</td>",
|
|
"rst_description": "A JSON-serialized array of suggested amounts of tips in the *smallest units* of the currency (integer, **not** float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed *max_tip_amount*.\n",
|
|
"name": "suggested_tip_amounts"
|
|
},
|
|
{
|
|
"type": "String",
|
|
"required": false,
|
|
"description": "Unique deep-linking parameter. If left empty, forwarded copies of the sent message will have a Pay button, allowing multiple users to pay directly from the forwarded message, using the same invoice. If non-empty, forwarded copies of the sent message will have a URL button with a deep link to the bot (instead of a Pay button), with the value used as the start parameter",
|
|
"html_description": "<td>Unique deep-linking parameter. If left empty, <strong>forwarded copies</strong> of the sent message will have a <em>Pay</em> button, allowing multiple users to pay directly from the forwarded message, using the same invoice. If non-empty, forwarded copies of the sent message will have a <em>URL</em> button with a deep link to the bot (instead of a <em>Pay</em> button), with the value used as the start parameter</td>",
|
|
"rst_description": "Unique deep-linking parameter. If left empty, **forwarded copies** of the sent message will have a *Pay* button, allowing multiple users to pay directly from the forwarded message, using the same invoice. If non-empty, forwarded copies of the sent message will have a *URL* button with a deep link to the bot (instead of a *Pay* button), with the value used as the start parameter\n",
|
|
"name": "start_parameter"
|
|
},
|
|
{
|
|
"type": "String",
|
|
"required": false,
|
|
"description": "JSON-serialized data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider.",
|
|
"html_description": "<td>JSON-serialized data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider.</td>",
|
|
"rst_description": "JSON-serialized data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider.\n",
|
|
"name": "provider_data"
|
|
},
|
|
{
|
|
"type": "String",
|
|
"required": false,
|
|
"description": "URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. People like it better when they see what they are paying for.",
|
|
"html_description": "<td>URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. People like it better when they see what they are paying for.</td>",
|
|
"rst_description": "URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. People like it better when they see what they are paying for.\n",
|
|
"name": "photo_url"
|
|
},
|
|
{
|
|
"type": "Integer",
|
|
"required": false,
|
|
"description": "Photo size in bytes",
|
|
"html_description": "<td>Photo size in bytes</td>",
|
|
"rst_description": "Photo size in bytes\n",
|
|
"name": "photo_size"
|
|
},
|
|
{
|
|
"type": "Integer",
|
|
"required": false,
|
|
"description": "Photo width",
|
|
"html_description": "<td>Photo width</td>",
|
|
"rst_description": "Photo width\n",
|
|
"name": "photo_width"
|
|
},
|
|
{
|
|
"type": "Integer",
|
|
"required": false,
|
|
"description": "Photo height",
|
|
"html_description": "<td>Photo height</td>",
|
|
"rst_description": "Photo height\n",
|
|
"name": "photo_height"
|
|
},
|
|
{
|
|
"type": "Boolean",
|
|
"required": false,
|
|
"description": "Pass True if you require the user's full name to complete the order",
|
|
"html_description": "<td>Pass <em>True</em> if you require the user's full name to complete the order</td>",
|
|
"rst_description": "Pass :code:`True` if you require the user's full name to complete the order\n",
|
|
"name": "need_name"
|
|
},
|
|
{
|
|
"type": "Boolean",
|
|
"required": false,
|
|
"description": "Pass True if you require the user's phone number to complete the order",
|
|
"html_description": "<td>Pass <em>True</em> if you require the user's phone number to complete the order</td>",
|
|
"rst_description": "Pass :code:`True` if you require the user's phone number to complete the order\n",
|
|
"name": "need_phone_number"
|
|
},
|
|
{
|
|
"type": "Boolean",
|
|
"required": false,
|
|
"description": "Pass True if you require the user's email address to complete the order",
|
|
"html_description": "<td>Pass <em>True</em> if you require the user's email address to complete the order</td>",
|
|
"rst_description": "Pass :code:`True` if you require the user's email address to complete the order\n",
|
|
"name": "need_email"
|
|
},
|
|
{
|
|
"type": "Boolean",
|
|
"required": false,
|
|
"description": "Pass True if you require the user's shipping address to complete the order",
|
|
"html_description": "<td>Pass <em>True</em> if you require the user's shipping address to complete the order</td>",
|
|
"rst_description": "Pass :code:`True` if you require the user's shipping address to complete the order\n",
|
|
"name": "need_shipping_address"
|
|
},
|
|
{
|
|
"type": "Boolean",
|
|
"required": false,
|
|
"description": "Pass True if the user's phone number should be sent to provider",
|
|
"html_description": "<td>Pass <em>True</em> if the user's phone number should be sent to provider</td>",
|
|
"rst_description": "Pass :code:`True` if the user's phone number should be sent to provider\n",
|
|
"name": "send_phone_number_to_provider"
|
|
},
|
|
{
|
|
"type": "Boolean",
|
|
"required": false,
|
|
"description": "Pass True if the user's email address should be sent to provider",
|
|
"html_description": "<td>Pass <em>True</em> if the user's email address should be sent to provider</td>",
|
|
"rst_description": "Pass :code:`True` if the user's email address should be sent to provider\n",
|
|
"name": "send_email_to_provider"
|
|
},
|
|
{
|
|
"type": "Boolean",
|
|
"required": false,
|
|
"description": "Pass True if the final price depends on the shipping method",
|
|
"html_description": "<td>Pass <em>True</em> if the final price depends on the shipping method</td>",
|
|
"rst_description": "Pass :code:`True` if the final price depends on the shipping method\n",
|
|
"name": "is_flexible"
|
|
},
|
|
{
|
|
"type": "Boolean",
|
|
"required": false,
|
|
"description": "Sends the message silently. Users will receive a notification with no sound.",
|
|
"html_description": "<td>Sends the message <a href=\"https://telegram.org/blog/channels-2-0#silent-messages\">silently</a>. Users will receive a notification with no sound.</td>",
|
|
"rst_description": "Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.\n",
|
|
"name": "disable_notification"
|
|
},
|
|
{
|
|
"type": "Boolean",
|
|
"required": false,
|
|
"description": "Protects the contents of the sent message from forwarding and saving",
|
|
"html_description": "<td>Protects the contents of the sent message from forwarding and saving</td>",
|
|
"rst_description": "Protects the contents of the sent message from forwarding and saving\n",
|
|
"name": "protect_content"
|
|
},
|
|
{
|
|
"type": "Integer",
|
|
"required": false,
|
|
"description": "If the message is a reply, ID of the original message",
|
|
"html_description": "<td>If the message is a reply, ID of the original message</td>",
|
|
"rst_description": "If the message is a reply, ID of the original message\n",
|
|
"name": "reply_to_message_id"
|
|
},
|
|
{
|
|
"type": "Boolean",
|
|
"required": false,
|
|
"description": "Pass True if the message should be sent even if the specified replied-to message is not found",
|
|
"html_description": "<td>Pass <em>True</em> if the message should be sent even if the specified replied-to message is not found</td>",
|
|
"rst_description": "Pass :code:`True` if the message should be sent even if the specified replied-to message is not found\n",
|
|
"name": "allow_sending_without_reply"
|
|
},
|
|
{
|
|
"type": "InlineKeyboardMarkup",
|
|
"required": false,
|
|
"description": "A JSON-serialized object for an inline keyboard. If empty, one 'Pay total price' button will be shown. If not empty, the first button must be a Pay button.",
|
|
"html_description": "<td>A JSON-serialized object for an <a href=\"/bots/features#inline-keyboards\">inline keyboard</a>. If empty, one 'Pay <code>total price</code>' button will be shown. If not empty, the first button must be a Pay button.</td>",
|
|
"rst_description": "A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_. If empty, one 'Pay :code:`total price`' button will be shown. If not empty, the first button must be a Pay button.\n",
|
|
"name": "reply_markup"
|
|
}
|
|
],
|
|
"category": "methods"
|
|
}
|
|
}
|