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

# Close Invoice

> Endpoint used to change the invoice status to closed

<RequestExample>
  ```bash Request Example theme={null}
  curl --request GET 'https://api.mayar.id/hl/v1/invoice/close/f774034d-d9cc-43a0-97d8-a2520c127f03' \
  --header 'Authorization: Bearer Paste-Your-API-Key-Here' \
  --data ''
  ```
</RequestExample>

<ResponseExample>
  ```json Response example if success theme={null}
  {
      "statusCode": 200,
      "messages": "success"
  }
  ```

  ```json Response example if failed theme={null}
  {
      "statusCode": 200,
      "messages": "failed"
  }
  ```
</ResponseExample>

Endpoint:

<CodeGroup>
  ```Production Production theme={null}
  https://api.mayar.id/hl/v1/invoice/close/{id}
  ```

  ```Sandbox Sandbox theme={null}
  https://api.mayar.club/hl/v1/invoice/close/{id}
  ```
</CodeGroup>

## Authorization

<ResponseField name="Authorization" type="string" required>
  Example:

  `Authorization | Bearer Paste-Your-API-Key-Here`
</ResponseField>

## Path Parameters

<ParamField path="id" type="string<uuid>" required>
  A unique identifier obtained when creating an invoice. If accessed through the dashboard, it can be found at the URL on the invoice details page.

  Example:

  `f774034d-d9cc-43a0-97d8-a2520c127f03`
</ParamField>

## Response

Successful Response

### Main Structure (Root)

<ResponseField name="statusCode" type="integer">
  Status code form API.
</ResponseField>

<ResponseField name="messages" type="string">
  Status message that describes the status code.
</ResponseField>
