refund_invoice
Process refunds for BTCPay invoices with flexible calculation methods including rate-based, fiat amount, or overpayment options.
Instructions
Refund a BTCPay invoice.
Args: invoice_id: The invoice ID to refund. refund_variant: Refund calculation method. Options: 'RateThen' (use rate at time of invoice, default), 'CurrentRate', 'Fiat' (refund exact fiat amount), 'OverpaidAmount' (refund only overpayment). payout_method_id: Optional payout method ID for the refund destination. subtract_percentage: Percentage to subtract from refund (0-100). Default: 0.
Returns the refund result with pull payment ID and amount.
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": {
"invoice_id": "<invoice_id>"
},
"name": "refund_invoice"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| invoice_id | Yes | ||
| refund_variant | No | RateThen | |
| payout_method_id | No | ||
| subtract_percentage | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |