{
  "name": "TransactionPartnerUser",
  "anchor": "transactionpartneruser",
  "description": [
    "Describes a transaction with a user."
  ],
  "table": {
    "headers": [
      "Field",
      "Type",
      "Description"
    ],
    "rows": [
      {
        "field": "type",
        "type": "String",
        "description": "Type of the transaction partner, always “user”"
      },
      {
        "field": "transaction_type",
        "type": "String",
        "description": "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"
      },
      {
        "field": "user",
        "type": "User",
        "description": "Information about the user"
      },
      {
        "field": "affiliate",
        "type": "AffiliateInfo",
        "description": "Optional . Information about the affiliate that received a commission via this transaction. Can be available only for “invoice_payment” and “paid_media_payment” transactions."
      },
      {
        "field": "invoice_payload",
        "type": "String",
        "description": "Optional . Bot-specified invoice payload. Can be available only for “invoice_payment” transactions."
      },
      {
        "field": "subscription_period",
        "type": "Integer",
        "description": "Optional . The duration of the paid subscription. Can be available only for “invoice_payment” transactions."
      },
      {
        "field": "paid_media",
        "type": "Array of PaidMedia",
        "description": "Optional . Information about the paid media bought by the user; for “paid_media_payment” transactions only"
      },
      {
        "field": "paid_media_payload",
        "type": "String",
        "description": "Optional . Bot-specified paid media payload. Can be available only for “paid_media_payment” transactions."
      },
      {
        "field": "gift",
        "type": "Gift",
        "description": "Optional . The gift sent to the user by the bot; for “gift_purchase” transactions only"
      },
      {
        "field": "premium_subscription_duration",
        "type": "Integer",
        "description": "Optional . Number of months the gifted Telegram Premium subscription will be active for; for “premium_purchase” transactions only"
      }
    ]
  },
  "notes": []
}