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.
| 名前 | 型 | 必須 | 説明 |
|---|---|---|---|
peer | InputPeer | はい | Owner of the collectible gift: equal to [starGiftUnique](https://core.telegram.org/constructor/starGiftUnique.md).`owner_id`. |
slug | string | はい | Identifier of the collectible gift: equal to [starGiftUnique](https://core.telegram.org/constructor/starGiftUnique.md).`slug`. |
price | StarsAmount | はい | Offer price, in stars or TON. |
duration | int | はい | 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 | はい | 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 | いいえ | 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`). |
レスポンス
Updates
MTProto RPC
- 400 · INPUT_STARS_AMOUNT_INVALID — The specified offer amount in stars is invalid, see [here »](https://core.telegram.org/api/gifts.md#collectible-gift-purchase-offers) for the allowed range.
- 400 · INPUT_STARS_NANOS_INVALID — The specified offer amount in nanotons is invalid, see [here »](https://core.telegram.org/api/gifts.md#collectible-gift-purchase-offers) for the allowed range.
- 400 · INVOICE_INVALID — The specified invoice is invalid.
- 400 · PEER_ID_INVALID — The provided peer id is invalid.
- 400 · RESELL_STARS_TOO_FEW — The offered price is too low.
- 400 · RESELL_STARS_TOO_MUCH — The offered price is too high.
- 400 · STARGIFT_OFFER_INVALID — The specified offer amount is invalid.
- 400 · STARGIFT_OFFER_NOT_ALLOWED — You can't send a purchase offer for this gift.
- 400 · STARGIFT_SLUG_INVALID — The specified gift slug is invalid.