create_invoice
Generate payment invoices in BTCPay Server to accept cryptocurrency or fiat payments. Specify amount, currency, and optional order details to create checkout links for customers.
Instructions
Create a new BTCPay invoice.
Args: amount: Payment amount as a string (e.g., '0.001' or '10.00'). Precision is preserved because amounts are sent as strings. currency: Currency code (e.g., 'BTC', 'USD', 'EUR'). Default: 'BTC'. order_id: Optional order ID for tracking (stored in metadata). item_desc: Optional item description (stored in metadata).
Returns the invoice ID, status, checkout URL, and expiration time. Use the checkout URL to direct users to the payment page.
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": {
"amount": "<amount>"
},
"name": "create_invoice"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | ||
| currency | No | BTC | |
| order_id | No | ||
| item_desc | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |