SuccessfulPayment constructor
const
SuccessfulPayment({
- @JsonKey(name: 'currency') required String currency,
- @JsonKey(name: 'total_amount') required int totalAmount,
- @JsonKey(name: 'invoice_payload') required String invoicePayload,
- @JsonKey(name: 'shipping_option_id') String? shippingOptionId,
- @JsonKey(name: 'order_info') OrderInfo? orderInfo,
- @JsonKey(name: 'telegram_payment_charge_id') required String telegramPaymentChargeId,
- @JsonKey(name: 'provider_payment_charge_id') required String providerPaymentChargeId,
- @JsonKey(name: 'is_recurring') bool? isRecurring,
- @JsonKey(name: 'is_first_recurring') bool? isFirstRecurring,
Constructs a SuccessfulPayment object
Implementation
const factory SuccessfulPayment({
/// Three-letter ISO 4217 currency code
@JsonKey(name: 'currency') required String currency,
/// 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](https://core.telegram.org/bots/payments/currencies.json),
/// it shows the number of digits past the decimal point for each currency
/// (2 for the majority of currencies).
@JsonKey(name: 'total_amount') required int totalAmount,
/// Bot specified invoice payload
@JsonKey(name: 'invoice_payload') required String invoicePayload,
/// Optional. Identifier of the shipping option chosen by the user
@JsonKey(name: 'shipping_option_id') String? shippingOptionId,
/// Optional. Order info provided by the user
@JsonKey(name: 'order_info') OrderInfo? orderInfo,
/// Telegram payment identifier
@JsonKey(name: 'telegram_payment_charge_id')
required String telegramPaymentChargeId,
/// Provider payment identifier
@JsonKey(name: 'provider_payment_charge_id')
required String providerPaymentChargeId,
/// Optional. True, if the payment is a recurring payment for a subscription
@JsonKey(name: 'is_recurring') bool? isRecurring,
/// Optional. True, if the payment is the first payment for a subscription
@JsonKey(name: 'is_first_recurring') bool? isFirstRecurring,
}) = _SuccessfulPayment;