telegram api method · layer 229 · #7998c914

payments.sendStarsForm

usable by users and bots

Make a payment using Telegram Stars, see here » for more info.

definition

payments.sendStarsForm#7998c914 form_id:long invoice:InputInvoice = payments.PaymentResult;

parameters

nametypedescription
form_idlongPayment form ID
invoiceInputInvoiceInvoice

returns

payments.PaymentResult

errors (26)

codeerrordescription
400BALANCE_TOO_LOWThe transaction cannot be completed because the current Telegram Stars balance is too low.
400BOT_INVOICE_INVALIDThe specified invoice is invalid.
400BUSINESS_CONNECTION_INVALIDThe connection_id passed to the wrapping invokeWithBusinessConnection call is invalid.
400BUSINESS_CONNECTION_NOT_ALLOWEDThis method was invoked over a business connection using invokeWithBusinessConnection, but either (1) we're a user, and users cannot invoke methods over a business connection; (2) we're a bot, but business mode was disabled in @botfather or (3); we're a bot, but this method cannot be invoked over a business connection.
400FORM_EXPIREDThe form was generated more than 10 minutes ago and has expired, please re-generate it using payments.getPaymentForm and pass the new form_id.
400FORM_ID_EMPTYThe specified form ID is empty.
400FORM_SUBMIT_DUPLICATEThe same payment form was already submitted. .
400FORM_UNSUPPORTEDPlease update your client.
400GIFT_STARS_INVALIDThe specified amount of stars is invalid.
400MEDIA_ALREADY_PAIDYou already paid for the specified media.
400MONTH_INVALIDThe number of months specified in inputInvoicePremiumGiftStars.months is invalid.
400PEER_ID_INVALIDThe provided peer id is invalid.
400PURPOSE_INVALIDThe specified payment purpose is invalid.
400STARGIFT_ALREADY_UPGRADEDThe specified gift was already upgraded to a collectible gift.
400STARGIFT_NOT_FOUNDThe specified gift was not found.
400STARGIFT_OWNER_INVALIDYou cannot transfer or sell a gift owned by another user.
400STARGIFT_SLUG_INVALIDThe specified gift slug is invalid.
400STARGIFT_USAGE_LIMITEDThe gift is sold out.
400STARGIFT_USER_USAGE_LIMITEDYou've reached the starGift.limited_per_user limit, you can't buy any more gifts of this type.
400TO_ID_INVALIDThe specified to_id of the passed inputInvoiceStarGiftResale or inputInvoiceStarGiftTransfer is invalid.
400USER_ID_INVALIDThe provided user ID is invalid.
401AUTH_KEY_UNREGISTEREDThe specified authorization key is not registered in the system (for example, a PFS temporary key has expired).
403BOT_ACCESS_FORBIDDENThe 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.
406API_GIFT_RESTRICTED_UPDATE_APPPlease update the app to access the gift API.
406PRECHECKOUT_FAILEDPrecheckout failed, a detailed and localized description for the error will be emitted via an updateServiceNotification as specified here ».
406STARS_FORM_AMOUNT_MISMATCHThe form amount has changed, please fetch the new form using payments.getPaymentForm and restart the process.

history

present in layers 181–229 · constructor id changed 1×

idlayers
#02bb731d181–188
#7998c914189–229