TransactionPartnerUser

Raw MD
Describes a transaction with a user

Describes a transaction with a user.

Fields

FieldTypeRequiredDescription
typeStringAlwaysType of the transaction partner, always "user"
transaction_typeStringAlwaysType of the transaction, currently one of "invoice_payment" for payments via invoices, "paid_media_payment" for payments for paid media, "gift_purchase" for gifts sent by the bot, "premium_purchase" for Telegram Premium subscriptions gifted by the bot, "business_account_transfer" for direct transfers from managed business accounts
userUserAlwaysInformation about the user
affiliateAffiliateInfoOptionalInformation about the affiliate that received a commission via this transaction. Can be available only for "invoice_payment" and "paid_media_payment" transactions.
invoice_payloadStringOptionalBot-specified invoice payload. Can be available only for "invoice_payment" transactions.
subscription_periodIntegerOptionalThe duration of the paid subscription. Can be available only for "invoice_payment" transactions.
paid_mediaArray of PaidMediaOptionalInformation about the paid media bought by the user; for "paid_media_payment" transactions only
paid_media_payloadStringOptionalBot-specified paid media payload. Can be available only for "paid_media_payment" transactions.
giftGiftOptionalThe gift sent to the user by the bot; for "gift_purchase" transactions only
premium_subscription_durationIntegerOptionalNumber of months the gifted Telegram Premium subscription will be active for; for "premium_purchase" transactions only
Botlify Cloud Runtime
Credentials are auto-injected in .env — always load them with getenv(): BOT_TOKEN, ADMIN_CHAT_ID, BOT_USERNAME. Main database: database.db (SQLite, WAL mode). Runtime errors: error.log. Quick test: send to $ADMIN_CHAT_ID. Full details: Runtime Reference.