Refund transaction
refund_transactionRefund settled Midtrans transactions by order_id, with optional amount and reason; omit amount for a full refund.
Instructions
Refund a settled Midtrans transaction by order_id. Omit amount for a full refund. This moves real money back to the customer — use deliberately.
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_id": "<order_id>"
},
"name": "refund_transaction"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | No | Refund amount in IDR. Omit for a full refund. | |
| reason | No | Optional refund reason. | |
| order_id | Yes | The order_id to refund. | |
| refund_key | No | Optional idempotency key so a retried refund is not applied twice. |