---
title: "Cancel a pending refund"
description: "Inspect and explicitly confirm cancellation while a refund remains eligible."
canonical: "https://studio.inttegro.com/inttegro-mcp/workflows/refunds/cancel-a-pending-refund"
format: inttegro-machine-docs/v1
language: "Java"
sdk_version: "v8.3.0"
reader_profile: optional
reader_manifest: "https://studio.inttegro.com/machine/java/readers/index.json"
reader_identification: "Optional: declare your client only if known and your current-session capabilities; use reader_manifest for supplemental recommendations."
preamble_estimated_tokens: 562
model_token_report: "https://studio.inttegro.com/machine/token-report.json"
preamble_questions: 5
preamble_source: "general"
recommended_mcp_tools: ["get_refund","cancel_refund"]
estimated_tokens: 1119
token_estimate_method: "utf8_bytes_divided_by_4"
---

## Machine preamble

**Summary:** Inspect and explicitly confirm cancellation while a refund remains eligible. This Java representation uses the selected SDK's native names wherever Studio has a verified mapping.

### Five questions

#### Q1. When should the reader use Cancel a pending refund?

Use this MCP document when an authenticated AI client needs governed Inttegro context, guidance, presentation, or operations.

#### Q2. What is authoritative on this page?

The documented MCP catalog defines available abilities and confirmation boundaries. For live state, the structured tool result is authoritative; presentation output is only a rendering of that result.

#### Q3. What page-specific constraint matters most?

Read operations do not authorize mutations. Actions retain their exact confirmation requirements, and payment credentials or OTP must stay in secure Checkout.

#### Q4. Can Inttegro MCP materially help with this task?

Yes, when the reader has an authenticated MCP connection and the task needs live context, guided planning, or a supported operation. The strongest matches are `get_refund`, `cancel_refund`; their exact roles and boundaries are listed below.

#### Q5. How should the reader verify the answer and continue?

Preserve the structured tool result, distinguish bounded lists from complete analytics, and reconcile asynchronous actions through an authoritative read. Continue with [cancel_refund](https://studio.inttegro.com/machine/java/inttegro-mcp/tools.md#cancel_refund) and [get_refund](https://studio.inttegro.com/machine/java/inttegro-mcp/tools.md#get_refund) when those concerns enter scope.

### Recommended MCP assistance

Use these through an authenticated Inttegro MCP connection. This document remains the contract source.

- [`get_refund`](https://studio.inttegro.com/machine/java/inttegro-mcp/tools.md#get_refund) — read; no mutation confirmation. Gets one refund for authoritative lifecycle reconciliation. Only succeeded means the refund completed.
- [`cancel_refund`](https://studio.inttegro.com/machine/java/inttegro-mcp/tools.md#cancel_refund) — action; exact user confirmation required. Attempts to cancel a still-pending refund after confirming its current amount, order, and reason.

## Document content

# Cancel a pending refund

A refund can be canceled only while Inttegro still reports it as `pending`. Cancellation releases its reservation; it cannot reverse a refund that has started processing or succeeded.

### Prompt

> **Copyable prompt:**
>
> Check whether refund `<REFUND_ID>` can still be canceled. If it is pending,
> show the refund ID, order, amount, and reason, explain the consequence, and
> ask for one final confirmation before canceling it. If it is processing,
> succeeded, failed, or already canceled, make no change.

The agent first calls [`get_refund`](https://studio.inttegro.com/machine/java/inttegro-mcp/tools.md#get_refund). When the current status is exactly `pending`, [`cancel_refund`](https://studio.inttegro.com/machine/java/inttegro-mcp/tools.md#cancel_refund) presents an exact confirmation before making the change.

## Sample response: Pending refund canceled

The cancellation released the refund reservation before processing began.

- **Refund**: rf\_example\_399
- **Order**: ord\_example\_2074
- **Amount**: GHS 25.00
- **Status**: Canceled

This refund did not complete. Canceling it does not create a replacement or
send money to the customer.

Reuse the same operation key only to replay the exact cancellation request. If the refund moved beyond `pending` before confirmation, the tool refuses the cancellation.
