createInvoice
Create a one-off payment invoice; the payer opens result.mini_app_invoice_url. See the invoices doc.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "createInvoice"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fiat | No | Fiat code (fiat mode). | |
| asset | No | Asset code (crypto mode). | |
| amount | No | Decimal string in MAJOR units, e.g. "5" = 5 USDT. Never a float. Required unless open_amount is true. | |
| payload | No | Opaque data echoed back in the webhook (≤4096). | |
| swap_to | No | Auto-convert the received amount to this asset. | |
| customer | No | ||
| cancel_url | No | A «Return» link shown while the invoice is unpaid. | |
| expires_in | No | Invoice TTL in seconds. | |
| description | No | Shown to the payer (≤1024). | |
| open_amount | No | Crypto mode only: the payer chooses the amount (donation) — pass true and NO amount. | |
| success_url | No | Short form of the paid button: a «Return» button to this link after the payment (not together with paid_btn_*). | |
| webhook_url | No | This operation's own https webhook address — its updates go there instead of the app's `webhook_url`. | |
| max_payments | No | Multi-payment invoice (2..1000000): the link takes this many payments, each one its own invoice with `parent_invoice_id`; wallet payments only. | |
| paid_btn_url | No | URL for the paid button. | |
| currency_type | No | crypto (default) | fiat. | |
| paid_btn_name | No | viewItem | openChannel | openBot | callback. | |
| allow_comments | No | Default true. | |
| hidden_message | No | Revealed to the payer ONLY after payment (≤2048). | |
| accepted_assets | No | Fiat mode: comma-separated assets the payer may pay in. | |
| allow_anonymous | No | Default true. | |
| client_invoice_id | No | Your own id of the invoice (≤64, unique per app): a create that repeats it returns the existing invoice; `getInvoices {client_invoice_id}` finds it. | |
| rate_lock_seconds | No | Fiat mode: freeze crypto quotes for this long. |