Layer 227
InputStorePaymentAuthCode
Indicates payment for a login code.
constructor
inputStorePaymentAuthCode#9bb2636d flags:# restore:flags.0?true phone_number:string phone_code_hash:string currency:string amount:long = InputStorePaymentPurpose;
Parameters
| Name | Type | Description |
|---|---|---|
| Restore | flags .0? true | Set this flag to restore a previously made purchase. |
| PhoneNumber | string | Phone number. |
| PhoneCodeHash | string | phone_code_hash returned by auth. send Code. |
| PremiumDays | int | Duration in days of the Telegram Premium subscription granted by this purchase, as indicated in auth. sent Code Payment Required. premium_days. |
| Currency | string | Three-letter ISO 4217 currency code |
| Amount | long | Price of the product 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, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). |
Returns
InputStorePaymentPurposeGogram Example
// Creating InputStorePaymentAuthCode constructor obj := &tg.InputStorePaymentAuthCode{ Restore: nil, PhoneNumber: "Hello, World!", PhoneCodeHash: "Hello, World!", PremiumDays: 42, Currency: "Hello, World!", Amount: int64(1234567890), }