tgbot-cpp
Loading...
Searching...
No Matches
TgBot::CreateInvoiceLinkArgs Struct Reference

Arguments for Api::createInvoiceLink. More...

#include <Types.h>

Public Attributes

std::string title { }
 Product name, 1-32 characters.
std::string description { }
 Product description, 1-255 characters.
std::string payload { }
 Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes.
std::string providerToken { }
 Payment provider token, obtained via @BotFather. Pass an empty string for payments in Telegram Stars.
std::string currency { }
 Three-letter ISO 4217 currency code, see more on currencies. Pass “XTR” for payments in Telegram Stars.
std::vector< std::shared_ptr< LabeledPrice > > prices { }
 Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in Telegram Stars.
std::int32_t maxTipAmount = 0
 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. Not supported for payments in Telegram Stars.
std::vector< std::int32_t > suggestedTipAmounts = { }
 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.
std::string providerData = ""
 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.
std::string photoUrl = ""
 URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service.
std::int32_t photoSize = 0
 Photo size in bytes.
std::int32_t photoWidth = 0
 Photo width.
std::int32_t photoHeight = 0
 Photo height.
bool needName = false
 Pass True if you require the user's full name to complete the order. Ignored for payments in Telegram Stars.
bool needPhoneNumber = false
 Pass True if you require the user's phone number to complete the order. Ignored for payments in Telegram Stars.
bool needEmail = false
 Pass True if you require the user's email address to complete the order. Ignored for payments in Telegram Stars.
bool needShippingAddress = false
 Pass True if you require the user's shipping address to complete the order. Ignored for payments in Telegram Stars.
bool sendPhoneNumberToProvider = false
 Pass True if the user's phone number should be sent to the provider. Ignored for payments in Telegram Stars.
bool sendEmailToProvider = false
 Pass True if the user's email address should be sent to the provider. Ignored for payments in Telegram Stars.
bool isFlexible = false
 Pass True if the final price depends on the shipping method. Ignored for payments in Telegram Stars.
std::string businessConnectionId = ""
 Unique identifier of the business connection on behalf of which the link will be created. For payments in Telegram Stars only.
std::int32_t subscriptionPeriod = 0
 The number of seconds the subscription will be active for before the next payment. The currency must be set to “XTR” (Telegram Stars) if the parameter is used. Currently, it must always be 2592000 (30 days) if specified. Any number of subscriptions can be active for a given bot at the same time, including multiple concurrent subscriptions from the same user. Subscription price must no exceed 10000 Telegram Stars.

Detailed Description

Arguments for Api::createInvoiceLink.

Definition at line 14999 of file Types.h.

Member Data Documentation

◆ businessConnectionId

std::string TgBot::CreateInvoiceLinkArgs::businessConnectionId = ""

Unique identifier of the business connection on behalf of which the link will be created. For payments in Telegram Stars only.

Definition at line 15128 of file Types.h.

◆ currency

std::string TgBot::CreateInvoiceLinkArgs::currency { }

Three-letter ISO 4217 currency code, see more on currencies. Pass “XTR” for payments in Telegram Stars.

Definition at line 15026 of file Types.h.

◆ description

std::string TgBot::CreateInvoiceLinkArgs::description { }

Product description, 1-255 characters.

Definition at line 15008 of file Types.h.

◆ isFlexible

bool TgBot::CreateInvoiceLinkArgs::isFlexible = false

Pass True if the final price depends on the shipping method. Ignored for payments in Telegram Stars.

Definition at line 15122 of file Types.h.

◆ maxTipAmount

std::int32_t TgBot::CreateInvoiceLinkArgs::maxTipAmount = 0

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. Not supported for payments in Telegram Stars.

Definition at line 15043 of file Types.h.

◆ needEmail

bool TgBot::CreateInvoiceLinkArgs::needEmail = false

Pass True if you require the user's email address to complete the order. Ignored for payments in Telegram Stars.

Definition at line 15098 of file Types.h.

◆ needName

bool TgBot::CreateInvoiceLinkArgs::needName = false

Pass True if you require the user's full name to complete the order. Ignored for payments in Telegram Stars.

Definition at line 15086 of file Types.h.

◆ needPhoneNumber

bool TgBot::CreateInvoiceLinkArgs::needPhoneNumber = false

Pass True if you require the user's phone number to complete the order. Ignored for payments in Telegram Stars.

Definition at line 15092 of file Types.h.

◆ needShippingAddress

bool TgBot::CreateInvoiceLinkArgs::needShippingAddress = false

Pass True if you require the user's shipping address to complete the order. Ignored for payments in Telegram Stars.

Definition at line 15104 of file Types.h.

◆ payload

std::string TgBot::CreateInvoiceLinkArgs::payload { }

Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes.

Definition at line 15014 of file Types.h.

◆ photoHeight

std::int32_t TgBot::CreateInvoiceLinkArgs::photoHeight = 0

Photo height.

Definition at line 15080 of file Types.h.

◆ photoSize

std::int32_t TgBot::CreateInvoiceLinkArgs::photoSize = 0

Photo size in bytes.

Definition at line 15070 of file Types.h.

◆ photoUrl

std::string TgBot::CreateInvoiceLinkArgs::photoUrl = ""

URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service.

Definition at line 15065 of file Types.h.

◆ photoWidth

std::int32_t TgBot::CreateInvoiceLinkArgs::photoWidth = 0

Photo width.

Definition at line 15075 of file Types.h.

◆ prices

std::vector<std::shared_ptr<LabeledPrice> > TgBot::CreateInvoiceLinkArgs::prices { }

Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in Telegram Stars.

Definition at line 15033 of file Types.h.

◆ providerData

std::string TgBot::CreateInvoiceLinkArgs::providerData = ""

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.

Definition at line 15059 of file Types.h.

◆ providerToken

std::string TgBot::CreateInvoiceLinkArgs::providerToken { }

Payment provider token, obtained via @BotFather. Pass an empty string for payments in Telegram Stars.

Definition at line 15020 of file Types.h.

◆ sendEmailToProvider

bool TgBot::CreateInvoiceLinkArgs::sendEmailToProvider = false

Pass True if the user's email address should be sent to the provider. Ignored for payments in Telegram Stars.

Definition at line 15116 of file Types.h.

◆ sendPhoneNumberToProvider

bool TgBot::CreateInvoiceLinkArgs::sendPhoneNumberToProvider = false

Pass True if the user's phone number should be sent to the provider. Ignored for payments in Telegram Stars.

Definition at line 15110 of file Types.h.

◆ subscriptionPeriod

std::int32_t TgBot::CreateInvoiceLinkArgs::subscriptionPeriod = 0

The number of seconds the subscription will be active for before the next payment. The currency must be set to “XTR” (Telegram Stars) if the parameter is used. Currently, it must always be 2592000 (30 days) if specified. Any number of subscriptions can be active for a given bot at the same time, including multiple concurrent subscriptions from the same user. Subscription price must no exceed 10000 Telegram Stars.

Definition at line 15138 of file Types.h.

◆ suggestedTipAmounts

std::vector<std::int32_t> TgBot::CreateInvoiceLinkArgs::suggestedTipAmounts = { }

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.

Definition at line 15052 of file Types.h.

◆ title

std::string TgBot::CreateInvoiceLinkArgs::title { }

Product name, 1-32 characters.

Definition at line 15003 of file Types.h.


The documentation for this struct was generated from the following file: