refundStarPayment

Returns: bool

class aiogram.methods.refund_star_payment.RefundStarPayment(*, user_id: int, telegram_payment_charge_id: str, **extra_data: Any)[source]

Refunds a successful payment in Telegram Stars. Returns True on success.

Source: https://core.telegram.org/bots/api#refundstarpayment

user_id: int

Identifier of the user whose payment will be refunded

model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_post_init(context: Any, /) None

We need to both initialize private attributes and call the user-defined model_post_init method.

telegram_payment_charge_id: str

Telegram payment identifier

Usage

As bot method

result: bool = await bot.refund_star_payment(...)

Method as object

Imports:

  • from aiogram.methods.refund_star_payment import RefundStarPayment

  • alias: from aiogram.methods import RefundStarPayment

With specific bot

result: bool = await bot(RefundStarPayment(...))

As reply into Webhook in handler

return RefundStarPayment(...)