StarTransaction

class aiogram.types.star_transaction.StarTransaction(*, id: str, amount: int, date: _datetime_serializer, return_type=int, when_used=unless - none)], source: TransactionPartnerUser | TransactionPartnerFragment | TransactionPartnerTelegramAds | TransactionPartnerTelegramApi | TransactionPartnerOther | None = None, receiver: TransactionPartnerUser | TransactionPartnerFragment | TransactionPartnerTelegramAds | TransactionPartnerTelegramApi | TransactionPartnerOther | None = None, **extra_data: Any)[source]

Describes a Telegram Star transaction.

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

id: str

Unique identifier of the transaction. Coincides with the identifier of the original transaction for refund transactions. Coincides with SuccessfulPayment.telegram_payment_charge_id for successful incoming payments from users.

amount: int

Number of Telegram Stars transferred by the transaction

date: DateTime

Date the transaction was created in Unix time

model_post_init(context: Any, /) None

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

source: TransactionPartnerUser | TransactionPartnerFragment | TransactionPartnerTelegramAds | TransactionPartnerTelegramApi | TransactionPartnerOther | None

Optional. Source of an incoming transaction (e.g., a user purchasing goods or services, Fragment refunding a failed withdrawal). Only for incoming transactions

receiver: TransactionPartnerUser | TransactionPartnerFragment | TransactionPartnerTelegramAds | TransactionPartnerTelegramApi | TransactionPartnerOther | None

Optional. Receiver of an outgoing transaction (e.g., a user for a purchase refund, Fragment for a withdrawal). Only for outgoing transactions