refundPayment
refundPaymentRefund a payment in full or partially, sending funds to the original payment method or customer credits, while optionally writing off linked invoices.
Instructions
Refund a payment (full or partial). Pass refund_amount=0 (or full original amount) for a full refund, or a smaller positive integer for a partial refund. refund_destination + writeoff_invoices control where the refund money goes and whether linked invoices are written off. Host enforces user confirmation via the approval gate; do NOT ask the user to re-confirm before calling.
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": {
"paymentId": "<paymentId>",
"refund_amount": "<refund_amount>",
"refund_destination": "<refund_destination>",
"writeoff_invoices": "<writeoff_invoices>"
},
"name": "refundPayment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| paymentId | Yes | The unique identifier (UUID) of the payment to refund. | |
| __userContext | No | Internal user context for multi-tenant authentication and approval workflow | |
| refund_amount | Yes | Refund amount in cents. Use 0 to refund the full payment, or a positive integer for a partial refund. Must not exceed the payment's remaining refundable amount. | |
| writeoff_invoices | Yes | If true, the invoice(s) linked to this payment are marked written off (no further collection). Set false to leave invoice balance owing after refund. | |
| refund_destination | Yes | Where to send the refund. Valid values: 'original_payment_method' (refund back to the source card/bank), 'credits' (issue customer credits instead of returning money). |