# refundTender

mutation · in the family [Refunds and payment corrections](/reference/refunds-and-payment-corrections/)

## What it does

Refund a specific payment on an order (the record-only lane for cash/external tenders).

REFUND part of a PLACED order's tendered deposit: a NEGATIVE tender row + for cash the cash_refund drawer lane + both OCC stamps in ONE transaction; cap = the net tendered (CONFLICT/OVER_TENDERED); reason REQUIRED. cancelOrder refuses CONFLICT/TENDERED while net tendered > 0 — refund-then-cancel. Requires the unrestricted capability.

## Careful

Money out, recorded forever.

## Who may call it

Capability area: **Refunds and payment corrections** — Refunds, corrective notes and voiding invoices.

- Owner
- Manager
- Associate Manager
- An API key whose scope allows `api:refundTender`

## Arguments

| Name | Type | Required | Notes |
| --- | --- | --- | --- |
| `input` | [RefundTenderInput](/types/RefundTenderInput/) `RefundTenderInput!` | yes | No further notes. |

## Returns

[Tender](/types/Tender/) `Tender!` — ONE applied tender: FSM-LESS by ratified intent (SPEC_CATALOG / — status is always active; the lifecycle is its Payment / the money facts); sysId-LESS (the class); IMMUTABLE — reversal = a NEW refund tender row (negative appliedMinor), never an edit. Posted ONLY by applyTender, refundTender, and the refund writers (refundReturn/posReturn method=cash) — each in ONE transaction with the Order rollup stamp (+ the drawer entries for cash).

## Example request

```graphql
mutation ExampleRefundTender($input: RefundTenderInput!) {
  refundTender(input: $input) {
    id
    type
    caption
    status
    parentId
    rootId
    tenderType
    appliedMinor
    currency
    collectedMinor
    changeMinor
    tipMinor
    roundingDeltaMinor
    paymentId
    instrumentId
    orgCustomerId
    returnId
    tillSessionId
    reason
    refs
    createdAt
    updatedAt
    revision
    revisionNum
  }
}
```

Variables:

```json
{
  "input": {
    "orderId": "01900000-0000-7000-8000-f6d8263a0000",
    "expectedRevision": "01900000-0000-7000-8000-e02b2e6c0000",
    "tenderType": "cash",
    "amountMinor": 1,
    "tillSessionId": "01900000-0000-7000-8000-83d61fef0000",
    "reason": "Correcting a miscount."
  }
}
```

Send it with the envelope naming the version: `"extensions": {"at": {"version": {"name":"genesis","number":0}}}`.

## Example response

```json
{
  "data": {
    "refundTender": {
      "id": "01900000-0000-7000-8000-37386ae00000",
      "type": "<type>",
      "caption": "Blue jeans",
      "status": "<status>",
      "parentId": "01900000-0000-7000-8000-065235280000",
      "rootId": "01900000-0000-7000-8000-a093dd800000",
      "tenderType": "cash",
      "appliedMinor": 1,
      "currency": "USD",
      "collectedMinor": 1,
      "changeMinor": 1,
      "tipMinor": 1,
      "roundingDeltaMinor": 1,
      "paymentId": "01900000-0000-7000-8000-a7c488a40000",
      "instrumentId": "01900000-0000-7000-8000-736f3dcd0000",
      "orgCustomerId": "01900000-0000-7000-8000-ba56ff800000",
      "returnId": "01900000-0000-7000-8000-4d4c03d20000",
      "tillSessionId": "01900000-0000-7000-8000-83d61fef0000",
      "reason": "Correcting a miscount.",
      "refs": [
        "<refs>"
      ],
      "createdAt": "2027-01-31T00:00:00.000Z",
      "updatedAt": "2027-01-31T00:00:00.000Z",
      "revision": "01900000-0000-7000-8000-b7960e180000",
      "revisionNum": 1
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}
```

## Errors this call can answer

- `VALIDATION/INVALID` — Something in the request is not valid. ([VALIDATION](/errors/VALIDATION/))
- `AUTHN/REQUIRED` — Sign in to do this. ([AUTHN](/errors/AUTHN/))
- `AUTHZ/FORBIDDEN` — Your role does not allow this action. ([AUTHZ](/errors/AUTHZ/))
- `RATE_LIMIT/THROTTLED` — Too many requests in a short time. ([RATE_LIMIT](/errors/RATE_LIMIT/))
- `NOT_FOUND/*` — That record could not be found. ([NOT_FOUND](/errors/NOT_FOUND/))
- `CONFLICT/*` — The record’s state, or a change made in the meantime, does not allow this; the codes are on the CONFLICT page. ([CONFLICT](/errors/CONFLICT/))
- `VALIDATION/VERSION_REQUIRED` — The request did not say which app version it came from. ([VALIDATION](/errors/VALIDATION/))

## Used in

- [Refund a payment](/use-cases/refund-a-payment/)
