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.
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 |