# POST /api/v1/credit-memos/{credit_memo_id}/void

> Void credit memo

- **Tag:** credit-memos
- **Operation ID:** `void_credit_memo_api_v1_credit_memos__credit_memo_id__void_post`

## Description

Void a credit memo. Requires a reason.

## Authentication

Bearer token in `Authorization` header.
Required header: `x-business-id: <business uuid>`.

## Parameters

- `credit_memo_id` (path, string, required)

## Request body

Schema: `CreditMemoVoid`

- `reason` (string · required) — Reason for voiding

## Responses

### 201 — Successful Response

Schema: `CreditMemoResponse`

- `id` (string · required) — Credit memo ID
- `business_id` (string · required) — Business that issued the credit
- `customer_id` (string · required) — Customer receiving the credit
- `invoice_id` (string) — Original invoice being credited
- `number` (string) — Auto-generated credit memo number (e.g. CM-001)
- `status` (string · required) — Status: draft, issued, partially_applied, fully_applied, void
- `currency` (string · required) — ISO currency code (e.g. USD)
- `amount` (integer · required) — Total credit amount in cents
- `amount_in_dollars` (string · required) — Total credit amount in dollars
- `amount_applied` (integer · required) — Amount applied in cents
- `amount_applied_in_dollars` (string · required) — Amount applied in dollars
- `amount_remaining` (integer · required) — Remaining amount in cents
- `amount_remaining_in_dollars` (string · required) — Remaining amount in dollars
- `issue_date` (string · date · required) — Date the credit memo was issued
- `applied_date` (string · date-time) — When credits were last applied
- `created_at` (string · date-time · required) — Record creation timestamp
- `updated_at` (string · date-time · required) — Last update timestamp
- `reason` (string · required) — Reason code (e.g. pricing_error, refund, other)
- `reason_display` (string · required) — Human-readable reason label
- `description` (string) — Description of the credit
- `internal_notes` (string) — Internal notes (not visible to customer)
- `line_items` (object) — Detailed line items breakdown
- `voided_at` (string · date-time) — When the credit memo was voided
- `voided_reason` (string) — Reason for voiding
- `customer_name` (string) — Customer display name
- `invoice_number` (string) — Original invoice number
- `applications` (array · CreditMemoApplicationResponse) — Applications to invoices
- `can_be_applied` (boolean · required) — Whether credits can be applied to invoices
- `can_be_voided` (boolean · required) — Whether the credit memo can be voided
- `can_be_deleted` (boolean · required) — Whether the credit memo can be deleted (drafts only)
- `has_applications` (boolean · required) — Whether any credits have been applied

### 400 — Bad Request - Invalid input

### 401 — Unauthorized - Authentication required

### 403 — Forbidden - Insufficient permissions

### 404 — Not Found - Resource does not exist

### 422 — Validation Error

Schema: `HTTPValidationError`

- `detail` (array · ValidationError) → `ValidationError`
  - `loc` (array · string | integer · required)
  - `msg` (string · required)
  - `type` (string · required)
  - `input` (object)
  - `ctx` (object)

## Code samples

### cURL

```bash
curl -X POST 'https://api.ondayzero.com/api/v1/credit-memos/{credit_memo_id}/void' \
  -H 'Authorization: Bearer dz_your_token' \
  -H 'x-business-id: YOUR_BUSINESS_ID' \
  -H 'Content-Type: application/json' \
  -d '{
  "reason": "string"
}'
```

### JavaScript

```javascript
const response = await fetch('https://api.ondayzero.com/api/v1/credit-memos/{credit_memo_id}/void', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer dz_your_token',
    'x-business-id': 'YOUR_BUSINESS_ID',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "reason": "string"
}),
});
const data = await response.json();
```

### Python

```python
import httpx

headers = {
    "Authorization": "Bearer dz_your_token",
    "x-business-id": "YOUR_BUSINESS_ID",
}

payload = {
  "reason": "string"
}

response = httpx.post("https://api.ondayzero.com/api/v1/credit-memos/{credit_memo_id}/void", headers=headers, json=payload)
data = response.json()
```

## See also

- HTML version: https://www.ondayzero.com/docs/reference/credit-memos/void-credit-memo
- OpenAPI slice: https://www.ondayzero.com/docs/reference/credit-memos/void-credit-memo/openapi.json
- Other endpoints in **credit-memos**: https://www.ondayzero.com/docs/reference/credit-memos
