---
title: "Refund all remaining order lines"
description: "Prepare a full remaining refund without guessing amounts or treating the request as complete before processing succeeds."
canonical: "https://studio.inttegro.com/inttegro-mcp/workflows/refunds/refund-all-remaining-lines"
format: inttegro-machine-docs/v1
language: "Go"
sdk_version: "v11.0.1"
reader_profile: optional
reader_manifest: "https://studio.inttegro.com/machine/go/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: 668
model_token_report: "https://studio.inttegro.com/machine/token-report.json"
preamble_questions: 5
preamble_source: "general"
recommended_mcp_tools: ["get_refund_options","get_refund","create_refund"]
estimated_tokens: 1372
token_estimate_method: "utf8_bytes_divided_by_4"
---

## Machine preamble

**Summary:** Prepare a full remaining refund without guessing amounts or treating the request as complete before processing succeeds. This Go representation uses the selected SDK's native names wherever Studio has a verified mapping.

### Five questions

#### Q1. When should the reader use Refund all remaining order lines?

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_options`, `get_refund`, `create_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 [get_refund](https://studio.inttegro.com/machine/go/inttegro-mcp/tools.md#get_refund) and [create_refund](https://studio.inttegro.com/machine/go/inttegro-mcp/tools.md#create_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_options`](https://studio.inttegro.com/machine/go/inttegro-mcp/tools.md#get_refund_options) — read; no mutation confirmation. Returns numbered order lines, exact major-unit paid amounts, existing reservations, and conservative remaining refundable amounts.
- [`get_refund`](https://studio.inttegro.com/machine/go/inttegro-mcp/tools.md#get_refund) — read; no mutation confirmation. Gets one refund for authoritative lifecycle reconciliation. Only succeeded means the refund completed.
- [`create_refund`](https://studio.inttegro.com/machine/go/inttegro-mcp/tools.md#create_refund) — action; exact user confirmation required. Creates an asynchronous line-item refund from exact major-unit decimal amounts after refreshing availability and confirming every amount, per-line reason, and required overall reason.

## Document content

# Refund all remaining order lines

Use this workflow when the customer should receive every amount that remains refundable on a paid order. The agent still shows each line and exact amount before creating anything.

### Prompt

> **Copyable prompt:**
>
> Prepare a refund for every amount that remains refundable on order
> `<ORDER_ID>`. Show each line's original paid amount, any amount already
> reserved or refunded, and the exact remaining amount. Ask for the overall
> reason, then give me one final itemized confirmation. Do not create the refund
> until I approve it, and do not call it complete until its status is succeeded.

The agent first calls [`get_refund_options`](https://studio.inttegro.com/machine/go/inttegro-mcp/tools.md#get_refund_options). It may offer the full remaining amount for each line, but you must approve the itemized values and provide the overall reason before [`create_refund`](https://studio.inttegro.com/machine/go/inttegro-mcp/tools.md#create_refund) is called.

## Sample response: Full remaining refund ready

Every currently refundable line is included. No refund has been created yet.

- **Order**: ord\_example\_2088
- **Currency**: GHS
- **Refund total**: GHS 145.00
- **Overall reason**: Requested by customer

Amounts awaiting confirmation

- **Row 1**: Order line: Canvas bag × 1; Original paid: GHS 95.00; Already reserved: GHS 20.00; This refund: GHS 75.00
- **Row 2**: Order line: Delivery × 1; Original paid: GHS 70.00; Already reserved: GHS 0.00; This refund: GHS 70.00

Approving this summary starts an asynchronous refund for GHS 145.00. It does
not mean the customer has received the money.

After creation, the agent uses [`get_refund`](https://studio.inttegro.com/machine/go/inttegro-mcp/tools.md#get_refund) to reconcile the result. `pending` and `processing` remain in progress; only `succeeded` is complete.
