<!-- canonical: https://docs.costplus.io/api-reference/orders/voidByAmount -->

> Void a specific amount from an authorized transaction.
# Void by amount

Void a specific amount from an authorized transaction.

## Endpoint

```
POST /orders/{id}/transactions/{transaction_id}/voids/amount
```

## Authentication

HTTP Basic — use your API key as the username with an empty password.

```bash
curl -u YOUR_API_KEY: https://api.costplus.online/v1/orders/{id}/transactions/{transaction_id}/voids/amount/
```

## Parameters

| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | `id` | string | yes | Order identifier |
| path | `transaction_id` | string | yes | Transaction identifier |
| header | `if-match` | string | no | ETag for optimistic locking. Only process if the order version matches. |

## Request body

Content-Type: `application/json` (required)

Fields:

- `description` — string. Void description
- `amount` — integer. Amount to void in minor units

Example:

```json
{
  "description": "Partial void",
  "amount": 1500
}
```

## Responses

### 200 — The updated order

### 401 — Invalid or missing API key

### 403 — No authorization for the requested resource

### 412 — ETag version mismatch — the order was modified since last fetched

## cURL

```bash
curl -u YOUR_API_KEY: \
  -X POST 'https://api.costplus.online/v1/orders/{id}/transactions/{transaction_id}/voids/amount/' \
  -H 'Content-Type: application/json' \
  -H 'If-Match: <etag-from-GET-order>' \
  -d '{ "amount": 1500, "description": "Partial void" }'
```
