MessageActionPaymentRefunded

class pyrogram.raw.types.MessageActionPaymentRefunded

Describes a payment refund (service message received by both users and bots).

Constructor of MessageAction.

Details:
  • Layer: 223

  • ID: 41B3E202

Parameters:
  • peer (Peer) – Identifier of the peer that returned the funds.

  • currency (str) – Currency, XTR for Telegram Stars.

  • total_amount (int 64-bit) – Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).

  • charge (PaymentCharge) – Provider payment identifier

  • payload (bytes, optional) – Bot specified invoice payload (only received by bots).

TL Schema

messageActionPaymentRefunded#41b3e202
flags:#
peer:Peer
currency:string
total_amount:long
payload:flags.0?bytes
charge:PaymentCharge

= MessageAction

Parameter Tree

MessageActionPaymentRefunded
├── peerPeer
│ ├── PeerUser
│ │ └── user_idlong
│ ├── PeerChat
│ │ └── chat_idlong
│ └── PeerChannel
│ └── channel_idlong
├── currencystring
├── total_amountlong
├── payloadbytes (optional)
└── chargePaymentCharge
└── PaymentCharge
├── idstring
└── provider_charge_idstring

Example

MessageActionPaymentRefunded(
    peer=PeerUser(user_id=0),
    currency="text",
    total_amount=0,
    charge=PaymentCharge(
        id="text",
        provider_charge_id="text"
    ),
)