Refund a payment
refund_paymentFor shop owners: refund all or part of one payment on an order. Nothing is refunded by this call: it always returns needs_confirmation, and the refund happens only when the seller taps Confirm. A card payment goes back to the customer's card through the shop's card provider; money paid outside Confita is marked refunded and the seller gives it back herself. With several payments on the order, payment names one. Cancelling a whole order (decide_order) refunds its card payments itself.
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": {
"order": "<order>",
"revision": "<revision>",
"request_id": "<request_id>"
},
"name": "refund_payment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| order | Yes | The order by its number ("1042" or "#1042") or id (ord_...). | |
| amount | No | How much to refund; left out, everything left on that payment. For example {"amount": "10.00", "currency": "USD"} for $10 back. | |
| reason | No | A short reason, kept with the refund. | |
| payment | No | The payment's id (pay_...), needed only when the order has several payments with money left to refund. | |
| revision | Yes | The order's `revision` as last read; if the order changed since, nothing happens. | |
| request_id | Yes | Unique per call; the same id again returns the first result. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| next | No | ||
| error | No | ||
| order | No | ||
| choices | No | ||
| outcome | No | ||
| payment | No | ||
| timezone | No | ||
| confirmation | No |