---
search:
  tags:
    - invoices
    - POST
seo:
  description: >-
    Reference for the POST /v1/invoices/{invoiceId}/void endpoint in the Vortex
    Payments API.
sidebar:
  label: POST /v1/invoices/{invoiceId}/void
  badge: POST
title: POST /v1/invoices/{invoiceId}/void
type: openapi-operation
---
`POST /v1/invoices/{invoiceId}/void`

**curl**

```bash
curl "https://api.vortex.nyc/v1/invoices/:invoiceId/void?environment=...&merchantAccountId=..." \
  -X POST \
  -H "Authorization: Bearer $VORTEX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{...}'
```

**TypeScript**

```ts
import { voidInvoice, createVortex } from "@vortex-api/vortex/2026-09";

const vortex = createVortex({ apiKey: process.env.VORTEX_API_KEY });
const { data } = await voidInvoice({
  client: vortex,
  path: { invoiceId: "..." },
  query: { environment: "...", merchantAccountId: "..." },
  body: {...},
});
```

**Request body** (`application/json`, required)

- `environment` (string | null)
- `merchantAccountId` (string | null)
- `invoiceId` (string | null)
- `voidedBy` (string, required)
- `voidedByRef` (string, required)
- `reason` (string | null)
- `voidedAt` (string | null)

Request body example:

```json
{
  "environment": "sandbox",
  "merchantAccountId": "string",
  "invoiceId": "string",
  "voidedBy": "string",
  "voidedByRef": "string",
  "reason": "string",
  "voidedAt": "string"
}
```

**Responses**

- `200` — Success

Response example, 200:

```json
{
  "data": {
    "invoice": {
      "invoiceId": "string",
      "customerId": "string",
      "billingAccountId": "string",
      "status": "draft",
      "currency": "string",
      "subtotal": 0,
      "discountTotal": 0,
      "taxTotal": 0,
      "total": 0,
      "amountPaid": 0,
      "amountRemaining": 0,
      "metadata": {
        "property1": "string",
        "property2": "string"
      },
      "subscriptionId": "string",
      "creditNoteTotal": 0,
      "customerBalanceAppliedTotal": 0,
      "periodStartAt": "string",
      "periodEndAt": "string",
      "issuedAt": "string",
      "dueAt": "string",
      "finalizedAt": "string",
      "voidedAt": "string",
      "createdAt": "string",
      "updatedAt": "string"
    },
    "lines": [
      {
        "invoiceLineId": "string",
        "invoiceId": "string",
        "lineType": "fixed",
        "description": "string",
        "quantity": 0,
        "unitAmount": 0,
        "subtotal": 0,
        "priceSnapshot": {
          "property1": "string",
          "property2": "string"
        },
        "metadata": {
          "property1": "string",
          "property2": "string"
        },
        "sortOrder": 0,
        "priceId": "string",
        "meterId": "string",
        "periodStartAt": "string",
        "periodEndAt": "string"
      }
    ]
  },
  "requestId": "string"
}
```
