Package-level declarations

Types

Link copied to clipboard
@Serializable
data class Invoice(val title: String, val description: String, val startParameter: String, val currency: Currency, val totalAmount: Int)

This object contains basic information about an invoice.

Link copied to clipboard
@Serializable
data class LabeledPrice(val label: String, val amount: Int)

This object represents a portion of the price for goods or services.

Link copied to clipboard
@Serializable
data class OrderInfo(val name: String? = null, val phoneNumber: String? = null, val email: String? = null, val shippingAddress: ShippingAddress? = null)

This object represents information about an order.

Link copied to clipboard
@Serializable
data class PreCheckoutQuery(val id: String, val from: User, val currency: Currency, val totalAmount: Int, val invoicePayload: String, val shippingOptionId: String? = null, val orderInfo: OrderInfo? = null)

This object contains information about an incoming pre-checkout query.

Link copied to clipboard
@Serializable
data class RefundedPayment(val currency: Currency = Currency.XTR, val totalAmount: Int, val invoicePayload: String, val telegramPaymentChargeId: String, val providerPaymentChargeId: String? = null)

This object contains basic information about a refunded payment.

Link copied to clipboard
@Serializable
data class ShippingAddress(val countryCode: String, val state: String, val city: String, val streetLine1: String, val streetLine2: String, val postCode: String)

This object represents a shipping address.

Link copied to clipboard
@Serializable
data class ShippingOption(val id: String, val title: String, val prices: List<LabeledPrice>)

This object represents one shipping option.

Link copied to clipboard
@Serializable
data class ShippingQuery(val id: String, val from: User, val invoicePayload: String, val shippingAddress: ShippingAddress)

This object contains information about an incoming shipping query.

Link copied to clipboard
@Serializable
data class SuccessfulPayment(val currency: Currency, val totalAmount: Int, val invoicePayload: String, val shippingOptionId: String? = null, val orderInfo: OrderInfo? = null, val subscriptionExpirationDate: Instant? = null, val isRecurring: Boolean? = null, val isFirstRecurring: Boolean? = null, val telegramPaymentChargeId: String, val providerPaymentChargeId: String)

This object contains basic information about a successful payment.