payments.sendStarGiftOffer
Send an offer to purchase a collectible gift », see here » for the full flow.
Send an offer to purchase a [collectible gift »](https://core.telegram.org/api/gifts.md#collectible-gift-purchase-offers), see [here »](https://core.telegram.org/api/gifts.md#collectible-gift-purchase-offers) for the full flow.
| Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
peer | InputPeer | Ja | Owner of the collectible gift: equal to [starGiftUnique](https://core.telegram.org/constructor/starGiftUnique.md).`owner_id`. |
slug | string | Ja | Identifier of the collectible gift: equal to [starGiftUnique](https://core.telegram.org/constructor/starGiftUnique.md).`slug`. |
price | StarsAmount | Ja | Offer price, in stars or TON. |
duration | int | Ja | Duration of the offer, in seconds: must be one of `21600`, `43200`, `86400`, `129600`, `172800`, or `259200`; can also be `120` in test mode. |
random_id | long | Ja | Random 64-bit identifier used to avoid sending the same offer twice in case of network issues. See [here »](https://core.telegram.org/api/updates.md#updatemessageid-updates) for more info on random ID deduplication and updateMessageID mapping. |
allow_paid_stars | long | Nein | If the destination peer has [paid messages »](https://core.telegram.org/api/paid-messages.md) enabled, specifies the amount of [Telegram Stars](https://core.telegram.org/api/stars.md) the sending user has agreed to pay in order to send the offer (in addition to the amount for the offer itself, contained in `price`). |
Antworten
Updates
MTProto RPC
- 400 · INPUT_STARS_AMOUNT_INVALID – Der angegebene Angebotsbetrag in Sternen ist ungültig, siehe [hier »](https://core.telegram.org/api/gifts.md#collectible-gift-purchase-offers) für den zulässigen Bereich.
- 400 · INPUT_STARS_NANOS_INVALID – Die angegebene Angebotsmenge in Nanotonnen ist ungültig, siehe [hier »](https://core.telegram.org/api/gifts.md#collectible-gift-purchase-offers) für den zulässigen Bereich.
- 400 · INVOICE_INVALID — Die angegebene Rechnung ist ungültig.
- 400 · PEER_ID_INVALID – Die angegebene Peer-ID ist ungültig.
- 400 · RESELL_STARS_TOO_FEW — Der angebotene Preis ist zu niedrig.
- 400 · RESELL_STARS_TOO_MUCH — Der angebotene Preis ist zu hoch.
- 400 · STARGIFT_OFFER_INVALID — Der angegebene Angebotsbetrag ist ungültig.
- 400 · STARGIFT_OFFER_NOT_ALLOWED — Sie können für dieses Geschenk kein Kaufangebot senden.
- 400 · STARGIFT_SLUG_INVALID – Der angegebene Geschenkartikel ist ungültig.