Interface Invoice

Product invoice.

interface Invoice {
    @type: "invoice";
    currency: string;
    is_flexible?: boolean;
    is_test?: boolean;
    max_tip_amount: number;
    need_email_address?: boolean;
    need_name?: boolean;
    need_phone_number?: boolean;
    need_shipping_address?: boolean;
    price_parts: LabeledPricePart[];
    recurring_payment_terms_of_service_url: string;
    send_email_address_to_provider?: boolean;
    send_phone_number_to_provider?: boolean;
    subscription_period: number;
    suggested_tip_amounts: number[];
    terms_of_service_url: string;
}

Properties

@type: "invoice"
currency: string

ISO 4217 currency code.

is_flexible?: boolean

True, if the total price depends on the shipping method.

is_test?: boolean

True, if the payment is a test payment.

max_tip_amount: number

The maximum allowed amount of tip in the smallest units of the currency.

need_email_address?: boolean

True, if the user's email address is needed for payment.

need_name?: boolean

True, if the user's name is needed for payment.

need_phone_number?: boolean

True, if the user's phone number is needed for payment.

need_shipping_address?: boolean

True, if the user's shipping address is needed for payment.

price_parts: LabeledPricePart[]

A list of objects used to calculate the total price of the product.

recurring_payment_terms_of_service_url: string

An HTTP URL with terms of service for recurring payments. If non-empty, the invoice payment will result in recurring payments and the user must accept the terms of service before allowed to pay.

send_email_address_to_provider?: boolean

True, if the user's email address will be sent to the provider.

send_phone_number_to_provider?: boolean

True, if the user's phone number will be sent to the provider.

subscription_period: number

The number of seconds between consecutive Telegram Star debiting for subscription invoices; 0 if the invoice doesn't create subscription.

suggested_tip_amounts: number[]

Suggested amounts of tip in the smallest units of the currency.

terms_of_service_url: string

An HTTP URL with terms of service for non-recurring payments. If non-empty, then the user must accept the terms of service before allowed to pay.