Class TransactionPartner

java.lang.Object
io.github.natanimn.telebof.types.payments.TransactionPartner

public class TransactionPartner extends Object
This class describes the source of a transaction, or its recipient for outgoing transactions.
Since:
3 March 2025
Author:
Natanim
  • Field Details

    • type

      private TransactionPartnerType type
      Type of the transaction partner
    • transactionType

      @SerializedName("transaction_type") private String transactionType
      Type 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
    • invoicePayload

      @SerializedName("invoice_payload") private String invoicePayload
      Bot-specified invoice payload. Can be available only for "invoice_payment" transactions.
    • user

      private User user
      Information about the user
    • withdrawalState

      @SerializedName("withdrawal_state") private RevenueWithdrawalState withdrawalState
      State of the transaction if the transaction is outgoing
    • paidMedia

      @SerializedName("paid_media") private List<PaidMedia> paidMedia
      Information about the paid media bought by the user; for "paid_media_payment" transactions only
    • requestCount

      @SerializedName("request_count") private Integer requestCount
      The number of successful requests that exceeded regular limits and were therefore billed
    • subscriptionPeriod

      @SerializedName("subscription_period") private Integer subscriptionPeriod
      The duration of the paid subscription. Can be available only for "invoice_payment" transactions.
    • gift

      private Gift gift
      The gift sent to the user by the bot; for "gift_purchase" transactions only or The gift sent to the chat by the bot
    • affiliate

      private AffiliateInfo affiliate
      Information about the affiliate that received a commission via this transaction. Can be available only for "invoice_payment" and "paid_media_payment" transactions.
    • sponsorUser

      @SerializedName("sponsor_user") private User sponsorUser
      Information about the bot that sponsored the affiliate program
    • commissionPerMille

      @SerializedName("commission_per_mille") private Integer commissionPerMille
      The number of Telegram Stars received by the bot for each 1000 Telegram Stars received by the affiliate program sponsor from referred users
    • chat

      private Chat chat
      Information about the chat
    • premiumSubscriptionDuration

      @SerializedName("premium_subscription_duration") private Integer premiumSubscriptionDuration
      Optional. Number of months the gifted Telegram Premium subscription will be active for; for "premium_purchase" transactions only
  • Constructor Details

    • TransactionPartner

      public TransactionPartner()
  • Method Details

    • getType

      public TransactionPartnerType getType()
    • getTransactionType

      public String getTransactionType()
    • getInvoicePayload

      public String getInvoicePayload()
    • getUser

      public User getUser()
    • getWithdrawalState

      public RevenueWithdrawalState getWithdrawalState()
    • getPaidMedia

      public List<PaidMedia> getPaidMedia()
    • getRequestCount

      public Integer getRequestCount()
    • getSubscriptionPeriod

      public Integer getSubscriptionPeriod()
    • getGift

      public Gift getGift()
    • getAffiliate

      public AffiliateInfo getAffiliate()
    • getSponsorUser

      public User getSponsorUser()
    • getCommissionPerMille

      public Integer getCommissionPerMille()
    • getChat

      public Chat getChat()
    • getPremiumSubscriptionDuration

      public Integer getPremiumSubscriptionDuration()