> For the complete documentation index, see [llms.txt](https://bohd4nx.gitbook.io/pyfragment/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bohd4nx.gitbook.io/pyfragment/api-guides/stars/purchase.md).

# Purchase

Use this method to send Telegram Stars directly to a user.

## Method

```python
await client.purchase_stars(
    username: str,
    amount: int,
    show_sender: bool = True,
    payment_method: PaymentMethod = PaymentMethod.GRAM,
) -> StarsResult
```

## Parameters

* `username`: accepts `@username`, `username`, or `https://t.me/username`
* `amount`: integer from `50` to `10_000_000`
* `show_sender`: controls sender visibility on recipient side
* `payment_method`: `PaymentMethod.GRAM` (default), `PaymentMethod.USDT_GRAM`, or any other `PaymentMethod` value

**Amount must be between `50` and `10_000_000`.**

## Return

* `StarsResult(transaction_id, username, amount, confirmed)`

`confirmed` reflects Fragment's own post-broadcast acknowledgement, not whether the transfer happened — see [Result Models](/pyfragment/reference/models.md#confirmed).

## Typical errors

* `ConfigurationError`: invalid amount or payment method
* `UserNotFoundError`: target user not found
* `WalletError`: insufficient balance or wallet-side issue
* `VerificationError`: verification/KYC required for operation

## Example

```python
result: StarsResult = await client.purchase_stars("@username", amount=500, payment_method=PaymentMethod.GRAM)
print(result.amount)
```
