Layer 227
PaymentsGetPaymentForm
Get a payment form
method
Users
Bots
Business
payments.getPaymentForm#37148dbb flags:# invoice:InputInvoice theme_params:flags.0?DataJSON = payments.PaymentForm;
Parameters
| Name | Type | Description |
|---|---|---|
| Invoice | InputInvoice | Invoice |
| ThemeParams | flags .0? DataJSON | Theme parameters |
Returns
payments.PaymentFormGogram Example
// PaymentsGetPaymentForm - positional arguments result, err := client.PaymentsGetPaymentForm(&tg.InputInvoice{}, nil) if err != nil { // handle error } // result is *tg.PaymentsPaymentForm
Possible Errors
| Code | Type | Description |
|---|---|---|
| 406 | API_GIFT_RESTRICTED_UPDATE_APP | Please update the app to access the gift API. |
| 400 | BOOST_PEER_INVALID | The specified boost_peer is invalid. |
| 403 | BOT_ACCESS_FORBIDDEN | The specified method can be used over a business connection for some operations, but the specified query attempted an operation that is not allowed over a business connection. |
| 400 | BOT_INVOICE_INVALID | The specified invoice is invalid. |
| 400 | BUSINESS_CONNECTION_INVALID | The connection_id passed to the wrapping invoke With Business Connection call is invalid. |
| 400 | GIFT_MONTHS_INVALID | The value passed in invoice. input Invoice Premium Gift Stars. months is invalid. |
| 400 | GIFT_STARS_INVALID | The specified amount of stars is invalid. |
| 400 | INVOICE_INVALID | The specified invoice is invalid. |
| 400 | MESSAGE_ID_INVALID | The provided message id is invalid. |
| 400 | MESSAGE_TOO_LONG | The provided message is too long. |
| 400 | MONTH_INVALID | The number of months specified in input Invoice Premium Gift Stars. months is invalid. |
| 400 | MSG_ID_INVALID | Invalid message ID provided. |
| 400 | NO_PAYMENT_NEEDED | The upgrade/transfer of the specified gift was already paid for or is free. |
| 400 | PEER_ID_INVALID | The provided peer id is invalid. |
| 400 | PREMIUM_PURPOSE_INVALID | The specified Input Store Payment Purpose is invalid. |
| 400 | SLUG_INVALID | The specified invoice slug is invalid. |
| 400 | STARGIFT_ALREADY_CONVERTED | The specified star gift was already converted to Stars. |
| 400 | STARGIFT_ALREADY_REFUNDED | The specified star gift was already refunded. |
| 400 | STARGIFT_ALREADY_UPGRADED | The specified gift was already upgraded to a collectible gift. |
| 406 | STARGIFT_EXPORT_IN_PROGRESS | A gift export is in progress, a detailed and localized description for the error will be emitted via an update Service Notification as specified here. |
| 400 | STARGIFT_INVALID | The passed gift is invalid. |
| 400 | STARGIFT_MESSAGE_INVALID | The specified input Invoice Star Gift. message is invalid. |
| 400 | STARGIFT_NOT_FOUND | The specified gift was not found. |
| 400 | STARGIFT_NOT_OWNER | You're not the owner of the gift you trying to transfer. |
| 400 | STARGIFT_NOT_UNIQUE | You can't transfer a non-collectible gift. |
| 400 | STARGIFT_OWNER_INVALID | You cannot transfer or sell a gift owned by another user. |
| 400 | STARGIFT_PEER_INVALID | The specified input Saved Star Gift Chat. peer is invalid. |
| 400 | STARGIFT_RESELL_CURRENCY_NOT_ALLOWED | You can't buy the gift using the specified currency (i. e. trying to pay in Stars for TON gifts). |
| 400 | STARGIFT_RESELL_TOO_EARLY_%d | You will be able to resell this gift in <number> seconds. |
| 400 | STARGIFT_SLUG_INVALID | The specified gift slug is invalid. |
| 400 | STARGIFT_TRANSFER_TOO_EARLY_%d | You cannot transfer this gift yet, wait <number> seconds. |
| 400 | STARGIFT_UPGRADE_UNAVAILABLE | A received gift can only be upgraded to a collectible gift if the message Action Star Gift / saved Star Gift. can_upgrade flag is set. |
| 406 | STARS_FORM_AMOUNT_MISMATCH | The form amount has changed, please fetch the new form using payments. get Payment Form and restart the process. |
| 400 | TO_ID_INVALID | The specified to_id of the passed input Invoice Star Gift Resale or input Invoice Star Gift Transfer is invalid. |
| 400 | UNTIL_DATE_INVALID | Invalid until date provided. |
| 403 | USER_DISALLOWED_STARGIFTS |