mirror of
https://github.com/bohd4nx/FragmentAPI.git
synced 2026-07-29 08:07:35 +00:00
855 B
855 B
Stars Purchase
Use this method to send Telegram Stars directly to a user.
Method
await client.purchase_stars(
username: str,
amount: int,
show_sender: bool = True,
payment_method: PaymentMethod = "ton",
) -> StarsResult
Parameters
username: accepts@username,username, orhttps://t.me/usernameamount: integer from50to1_000_000show_sender: controls sender visibility on recipient sidepayment_method:"ton"or"usdt_ton"
Amount must be between 50 and 1_000_000.
Return
StarsResult(transaction_id, username, amount)
Typical errors
ConfigurationError: invalid amount or payment methodUserNotFoundError: target user not foundWalletError: insufficient balance or wallet-side issueVerificationError: verification/KYC required for operation