> ## Documentation Index
> Fetch the complete documentation index at: https://docs.centsless.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Handle overrides, voids, and refunds

> Manage post-transaction corrections using the Centsless API. Overrides adjust rounding, voids cancel transactions, and refunds reverse them — all with full audit attribution.

Centsless tracks all post-transaction changes with employee attribution and separate audit hashes. Every override, void, and refund is recorded as an immutable entry in the hash chain — the chain links each record to the one before it, so the full correction history for any transaction is tamper-evident and auditor-readable.

## Overrides

Use `POST /transaction/override` when a manager needs to adjust the rounded cash total on a completed transaction. The override is applied on top of the original transaction and creates its own audit record with a separate override hash.

**Required fields:**

| Field                  | Type    | Description                                                                       |
| ---------------------- | ------- | --------------------------------------------------------------------------------- |
| `transaction_id`       | string  | ID of the transaction to override                                                 |
| `employee_id`          | string  | ID of the employee authorizing the override                                       |
| `employee_name`        | string  | Name of the employee authorizing the override                                     |
| `reason`               | string  | One of: `customer-request`, `manager-discretion`, `pricing-error`, `system-error` |
| `new_cash_total_cents` | integer | The corrected cash total in cents                                                 |

```bash theme={null}
curl -X POST https://api.centsless.org/api/v1/transaction/override \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
    "transaction_id": "TXN-2026-04-14-A82C2EAA",
    "employee_id": "EMP-001",
    "employee_name": "Test Cashier",
    "reason": "customer-request",
    "new_cash_total_cents": 720
  }'
```

<Note>
  Each override creates an immutable audit record with a separate override hash. The original transaction record is not modified — the override is stored as a linked correction in the hash chain.
</Note>

## Voids

Use `POST /transaction/void` to cancel a transaction. The API creates a reversal record with negative amounts and maintains hash chain integrity. The original rounding delta is correctly reversed in the void record.

**Required fields:**

| Field                     | Type   | Description                                                                                                    |
| ------------------------- | ------ | -------------------------------------------------------------------------------------------------------------- |
| `original_transaction_id` | string | ID of the transaction to void                                                                                  |
| `void_reason`             | string | One of: `customer_changed_mind`, `pricing_error`, `duplicate_transaction`, `employee_error`, `fraud_suspected` |
| `voided_by`               | string | Employee ID or identifier of the person authorizing the void                                                   |

```bash theme={null}
curl -X POST https://api.centsless.org/api/v1/transaction/void \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
    "original_transaction_id": "TXN-2026-04-14-A82C2EAA",
    "void_reason": "customer_changed_mind",
    "voided_by": "EMP-001"
  }'
```

<Note>
  The rounding delta from the original transaction is correctly reversed in the void record. Hash chain integrity is maintained — the void is appended as a new entry linked to the original transaction.
</Note>

## Refunds

Use `POST /transaction/refund` to process a partial or full refund. The engine verifies that the refund's rounding direction correctly reverses the original transaction's rounding delta.

**Required fields:**

| Field                     | Type    | Description                                                                            |
| ------------------------- | ------- | -------------------------------------------------------------------------------------- |
| `original_transaction_id` | string  | ID of the transaction to refund                                                        |
| `refund_amount`           | integer | Refund amount in cents                                                                 |
| `void_reason`             | string  | One of: `defective_product`, `customer_dissatisfied`, `wrong_item`, `price_adjustment` |
| `voided_by`               | string  | Employee ID or identifier of the person processing the refund                          |

```bash theme={null}
curl -X POST https://api.centsless.org/api/v1/transaction/refund \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
    "original_transaction_id": "TXN-2026-04-14-A82C2EAA",
    "refund_amount": 1403,
    "void_reason": "defective_product",
    "voided_by": "EMP-001"
  }'
```

<Note>
  If the refund's rounding delta doesn't correctly reverse the original transaction's rounding direction, the engine flags a normalization failure in the response. Normalization failures are recorded for compliance review but do not block the refund from completing.
</Note>
