19#ifndef __TELEBOT_PAYMENTS_H__
20#define __TELEBOT_PAYMENTS_H__
46 long long int chat_id,
int message_thread_id,
const char *title,
47 const char *description,
const char *payload,
const char *provider_token,
48 const char *currency,
const char *prices,
int max_tip_amount,
49 const char *suggested_tip_amounts,
const char *start_parameter,
50 const char *provider_data,
const char *photo_url,
int photo_size,
51 int photo_width,
int photo_height,
bool need_name,
bool need_phone_number,
52 bool need_email,
bool need_shipping_address,
bool send_phone_number_to_provider,
53 bool send_email_to_provider,
bool is_flexible,
bool disable_notification,
54 bool protect_content,
const char *reply_parameters,
const char *reply_markup,
61 const char *title,
const char *description,
const char *payload,
62 const char *provider_token,
const char *currency,
const char *prices,
63 int max_tip_amount,
const char *suggested_tip_amounts,
const char *provider_data,
64 const char *photo_url,
int photo_size,
int photo_width,
int photo_height,
65 bool need_name,
bool need_phone_number,
bool need_email,
bool need_shipping_address,
66 bool send_phone_number_to_provider,
bool send_email_to_provider,
bool is_flexible,
73 const char *shipping_query_id,
bool ok,
const char *shipping_options,
74 const char *error_message);
80 const char *pre_checkout_query_id,
bool ok,
const char *error_message);
102 long long int user_id,
const char *telegram_payment_charge_id);
151 const char *gift_id,
bool pay_for_upgrade,
const char *text,
152 const char *text_parse_mode,
const char *text_entities);
158 long long int user_id,
long long int chat_id,
const char *gift_id);
164 const char *gift_id);
170 long long int user_id,
long long int chat_id,
const char *gift_id,
171 bool pay_for_upgrade,
const char *text,
const char *text_parse_mode,
172 const char *text_entities);
178 long long int user_id,
int month_count,
int star_count,
const char *text,
179 const char *text_parse_mode,
const char *text_entities);
telebot_error_e telebot_upgrade_gift(telebot_handler_t handle, const char *gift_id, bool pay_for_upgrade, const char *text, const char *text_parse_mode, const char *text_entities)
Use this method to upgrade a gift.
telebot_error_e telebot_refund_star_payment(telebot_handler_t handle, long long int user_id, const char *telegram_payment_charge_id)
Use this method to refund a successful payment in Telegram Stars.
telebot_error_e telebot_convert_gift_to_stars(telebot_handler_t handle, const char *gift_id)
Use this method to convert a gift to Telegram Stars.
telebot_error_e telebot_get_chat_gifts(telebot_handler_t handle, long long int chat_id, int offset, int limit, telebot_user_gifts_t *gifts)
Use this method to get a list of gifts received by a chat.
telebot_error_e telebot_put_chat_gifts(telebot_user_gifts_t *gifts)
Release chat gifts obtained with telebot_get_chat_gifts.
telebot_error_e telebot_get_user_gifts(telebot_handler_t handle, long long int user_id, int offset, int limit, telebot_user_gifts_t *gifts)
Use this method to get a list of gifts received by a user.
telebot_error_e telebot_put_user_gifts(telebot_user_gifts_t *gifts)
Release user gifts obtained with telebot_get_user_gifts.
telebot_error_e telebot_get_star_transactions(telebot_handler_t handle, int offset, int limit, telebot_star_transactions_t *transactions)
Use this method to get the bot's Telegram Star transactions.
telebot_error_e telebot_put_user_gift(telebot_user_gift_t *gift)
Release a user gift object.
telebot_error_e telebot_get_available_gifts(telebot_handler_t handle, telebot_gifts_t *gifts)
Use this method to get a list of gifts that can be sent by the bot to users.
telebot_error_e telebot_answer_shipping_query(telebot_handler_t handle, const char *shipping_query_id, bool ok, const char *shipping_options, const char *error_message)
Use this method to reply to shipping queries.
telebot_error_e telebot_put_star_transactions(telebot_star_transactions_t *transactions)
Release star transactions obtained with telebot_get_star_transactions.
telebot_error_e telebot_send_invoice(telebot_handler_t handle, long long int chat_id, int message_thread_id, const char *title, const char *description, const char *payload, const char *provider_token, const char *currency, const char *prices, int max_tip_amount, const char *suggested_tip_amounts, const char *start_parameter, const char *provider_data, const char *photo_url, int photo_size, int photo_width, int photo_height, bool need_name, bool need_phone_number, bool need_email, bool need_shipping_address, bool send_phone_number_to_provider, bool send_email_to_provider, bool is_flexible, bool disable_notification, bool protect_content, const char *reply_parameters, const char *reply_markup, telebot_message_t *message)
Use this method to send an invoice.
telebot_error_e telebot_create_invoice_link(telebot_handler_t handle, const char *title, const char *description, const char *payload, const char *provider_token, const char *currency, const char *prices, int max_tip_amount, const char *suggested_tip_amounts, const char *provider_data, const char *photo_url, int photo_size, int photo_width, int photo_height, bool need_name, bool need_phone_number, bool need_email, bool need_shipping_address, bool send_phone_number_to_provider, bool send_email_to_provider, bool is_flexible, char **invoice_link)
Use this method to create a link for an invoice.
telebot_error_e telebot_put_gift(telebot_gift_t *gift)
Release a gift object.
struct telebot_handler * telebot_handler_t
This is opaque object to represent a telebot handler.
Definition telebot-types.h:3489
telebot_error_e telebot_send_gift(telebot_handler_t handle, long long int user_id, long long int chat_id, const char *gift_id, bool pay_for_upgrade, const char *text, const char *text_parse_mode, const char *text_entities)
Use this method to send a gift.
telebot_error_e telebot_put_available_gifts(telebot_gifts_t *gifts)
Release available gifts obtained with telebot_get_available_gifts.
telebot_error_e telebot_get_my_star_balance(telebot_handler_t handle, long long int *balance)
Use this method to get the current Telegram Stars balance of the bot.
telebot_error_e
Enumerations of error code for telebot programming interface.
Definition telebot-common.h:45
telebot_error_e telebot_gift_premium_subscription(telebot_handler_t handle, long long int user_id, int month_count, int star_count, const char *text, const char *text_parse_mode, const char *text_entities)
Use this method to gift a Telegram Premium subscription to a user.
telebot_error_e telebot_transfer_gift(telebot_handler_t handle, long long int user_id, long long int chat_id, const char *gift_id)
Use this method to transfer a gift.
telebot_error_e telebot_answer_pre_checkout_query(telebot_handler_t handle, const char *pre_checkout_query_id, bool ok, const char *error_message)
Use this method to respond to pre-checkout queries.
This object represents a gift that can be sent by the bot.
Definition telebot-types.h:1471
This object represent a list of gifts.
Definition telebot-types.h:2222
This object represents a message.
Definition telebot-types.h:1777
Contains a list of Telegram Star transactions.
Definition telebot-types.h:1713
This object represents a gift received by a user.
Definition telebot-types.h:2244
This object represents a list of gifts received by a user.
Definition telebot-types.h:2278
This file contains types used to create telegram bot.