Create order
create_orderBuy Stars or Premium for a Telegram @username. pay='usdt' or 'gram' returns an invoice to pay from your TON wallet (address, amount, comment, TON Connect transaction); pay='wallet' spends Stars from the key owner's bot wallet and delivers at once. dry_run=true checks and prices without ordering. max_price refuses the order above that price, in the unit you pay in.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"product": "<product>",
"quantity": "<quantity>",
"recipient": "<recipient>",
"pay": "<pay>",
"idempotency_key": "<idempotency_key>"
},
"name": "create_order"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pay | Yes | ||
| dry_run | No | ||
| product | Yes | stars or premium | |
| quantity | Yes | Stars for 'stars' (50 and up); months for 'premium' (3, 6 or 12). | |
| max_price | No | Optional ceiling in USDT, GRAM or Stars. | |
| recipient | Yes | The Telegram @username that receives it (a person's public username). | |
| payer_address | No | Your TON wallet address: lets a USDT invoice come with a ready transaction. | |
| idempotency_key | Yes | Your unique id for this request; reuse it when retrying the same request. |