Skip to content

Commit 6964c7a

Browse files
Add iinvoice type documentation
1 parent 25c494b commit 6964c7a

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

types.go

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1633,11 +1633,20 @@ type InputContactMessageContent struct {
16331633

16341634
// Invoice contains basic information about an invoice.
16351635
type Invoice struct {
1636-
Title string `json:"title"`
1637-
Description string `json:"description"`
1636+
// Title product name
1637+
Title string `json:"title"`
1638+
// Description product description
1639+
Description string `json:"description"`
1640+
// StartParameter unique bot deep-linking parameter that can be used to generate this invoice
16381641
StartParameter string `json:"start_parameter"`
1639-
Currency string `json:"currency"`
1640-
TotalAmount int `json:"total_amount"`
1642+
// Currency three-letter ISO 4217 currency code
1643+
// (see https://core.telegram.org/bots/payments#supported-currencies)
1644+
Currency string `json:"currency"`
1645+
// TotalAmount otal price in the smallest units of the currency (integer, not float/double).
1646+
// For example, for a price of US$ 1.45 pass amount = 145.
1647+
// See the exp parameter in currencies.json, it shows the number of digits
1648+
// past the decimal point for each currency (2 for the majority of currencies).
1649+
TotalAmount int `json:"total_amount"`
16411650
}
16421651

16431652
// LabeledPrice represents a portion of the price for goods or services.

0 commit comments

Comments
 (0)