refundPayment
refundPaymentIssue a full or partial payment refund, specifying amount, destination (original method or credits), and whether to write 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.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| paymentId | Yes | The unique identifier (UUID) of the payment to refund. | |
| refund_amount | Yes | Refund amount in the smallest currency unit (integer cents/paise). Use 0 to refund the full payment, or a positive integer for a partial refund. Must not exceed the payment's remaining refundable amount. | |
| 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). | |
| 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. | |
| __userContext | No | Internal user context for multi-tenant authentication and approval workflow |