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

# Void Invoice

> This endpoint voids an invoice

<Warning>
  **Legacy contract: confirm deployment before use.** This page does not establish a
  provisioned public service. Check the dated [host report](/api-reference/hosts) and obtain
  a supported host and API version. New integrations should begin with the
  [API directory](/api-reference/introduction) or [local commerce walkthrough](/guides/first-operation).
</Warning>

### Body

<ParamField body="id" type="string">
  This is the ID of the invoice to be voided.
</ParamField>

### Response

<ResponseField name="success" type="number">
  Indicates whether the call was successful. 1 if successful, 0 if not.
</ResponseField>

<Note>
  This endpoint returns an acknowledgement rather than the affected resource.
  `success` is `1` when the write was applied and `0` when it was not — read
  the resource back if you need its new state.
</Note>

### Errors

Succeeds with `201`. Failures return `400`, `401`, `403`, `422` or `429` with an error body, per the [platform status-code contract](/api-reference/errors#http-status-codes).

<RequestExample>
  ```bash cURL theme={null}
  curl --location --request POST 'https://api.stateset.com/v1/invoice/void' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --data-raw '{
      "id": ""
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "success": 1
  }
  ```
</ResponseExample>
