Class RefundedPayment

Hierarchy (view full)

Constructors

Properties

currency: string

Three-letter ISO 4217 currency code, or “XTR” for payments in Telegram Stars. Currently, always “XTR”

invoicePayload: string

Bot-specified invoice payload

providerChargeId?: string

Provider payment identifier

telegramChargeId: string

Telegram payment identifier

totalAmount: number

Total refunded price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45, total_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).

Accessors

Methods

  • Protected

    Patches the current instance with new data

    Parameters

    • data: Record<string, any>

      The data to patch the instance with

    Returns Record<string, any>

    The patched data

  • Protected

    Updates the current instance with new data and returns a clone of the updated instance

    Parameters

    • data: Record<string, any>

      The data to update the instance with

    Returns Base

    A clone of the updated instance

  • Refunds a successful payment in Telegram Stars.

    Parameters

    • userId: string | number

      Identifier of the user whose payment will be refunded

    Returns Promise<true>

    Returns True on success.