Version 0.1.3 · Registry installation commands use exact versions.
Payment timeout: prevent duplicate Telegram Stars purchases
Why a timed-out Stars or Premium request can have an unknown outcome and must not be automatically retried.
An HTTP timeout only means the client did not receive a complete response before its deadline. The server or wallet transfer may already have progressed, so retrying the same POST can create a second purchase.
These SDKs mark transport failure, malformed purchase response, redirect, server failure, and explicit unconfirmed=true as an uncertain purchase outcome where applicable. They expose the error without sending a duplicate request.
Record the original intent, preserve a redacted tx_hash or server metadata, and compare the wallet and recipient state. Only a new, explicit human or application decision should create another purchase.
Backend idempotency-key behavior is not documented for these endpoints. A client-generated key therefore cannot be assumed to deduplicate requests.
Response
{"ok":false,"unconfirmed":true,"tx_hash":"SYNTHETIC_UNCONFIRMED_TX_HASH"}Continue reading
API errors, ambiguous payments, and transport failures · Fragment API automation for Stars and Premium · Buy and gift Telegram Stars through the API