> ## Documentation Index
> Fetch the complete documentation index at: https://beta-developers.mizaniyapay.dz/llms.txt
> Use this file to discover all available pages before exploring further.

# POST /un-set-qr-config: Clear QR Code Amount Configuration

> Remove the current amount configuration from a static Mizaniya Pay QR code so it no longer presents pre-configured amounts.

Use the `/un-set-qr-config` endpoint to remove any existing amount configuration from a static QR code. This is helpful when you want to deactivate pricing on a QR code, for example at the end of a campaign or when a product is no longer offered. On success the API returns `204 No Content` with an empty response body.

## Request

**Endpoint**<br />`POST {api_base_url}/un-set-qr-config`

**Headers**

| Header       | Value              |
| ------------ | ------------------ |
| Content-Type | `application/json` |
| x-api-key    | `<your_api_key>`   |

### Body parameters

<ParamField body="token" type="string" required>
  QR code identifier retrieved from the Mizaniya Partner Platform.
</ParamField>

### Example request body

```json theme={null}
{
  "token": "8f2c1a52-9be4-4d0e-b1a7-3f65c02a9e11"
}
```

## Code examples

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "{api_base_url}/un-set-qr-config" \
    -H "Content-Type: application/json" \
    -H "x-api-key: <your_api_key>" \
    -d '{
      "token": "8f2c1a52-9be4-4d0e-b1a7-3f65c02a9e11"
    }'
  ```

  ```js JavaScript (Node.js) theme={null}
  const url = `${apiBaseUrl}/un-set-qr-config`;

  fetch(url, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      "x-api-key": apiKey,
    },
    body: JSON.stringify({
      token: "8f2c1a52-9be4-4d0e-b1a7-3f65c02a9e11",
    }),
  })
    .then((res) => {
      if (res.status === 204) {
        console.log("Configuration cleared successfully (no body)");
        return null;
      }
      return res.json().then((data) => {
        throw new Error(`Error ${res.status}: ${JSON.stringify(data)}`);
      });
    })
    .catch((err) => console.error(err));
  ```

  ```python Python theme={null}
  import requests

  url = f"{api_base_url}/un-set-qr-config"
  headers = {
      "Content-Type": "application/json",
      "x-api-key": api_key,
  }
  payload = {
      "token": "8f2c1a52-9be4-4d0e-b1a7-3f65c02a9e11",
  }

  response = requests.post(url, headers=headers, json=payload)

  if response.status_code == 204:
      print("Configuration cleared successfully (no body)")
  else:
      print(f"Error {response.status_code}: {response.json()}")
  ```
</CodeGroup>

## Responses

### 204 No Content

The configuration was removed successfully. The response body is empty.

### 400 Bad Request

Returned when the request body fails validation.

```json theme={null}
{
  "statusCode": 400,
  "message": [
    "token must be a string",
    "token should not be empty"
  ],
  "error": "Bad Request"
}
```

### 401 Unauthorized

Returned when the `x-api-key` header is missing or invalid.

```json theme={null}
{
  "statusCode": 401,
  "message": "Unauthorized",
  "errorCode": "AUTH401_UNAUTHORIZED_ACCESS",
  "timestamp": "2026-07-13T09:05:00.000Z"
}
```

### 404 Not Found

Returned when no QR code exists for the supplied token.

```json theme={null}
{
  "statusCode": 404,
  "message": "QR code not found",
  "errorCode": "QR_CODE404_NOT_FOUND",
  "timestamp": "2026-07-13T09:05:00.000Z",
  "details": {
    "token": "8f2c1a52-9be4-4d0e-b1a7-3f65c02a9e11"
  }
}
```

<Tip>
  After un-setting, the QR code no longer presents any pre-configured amounts to customers. You can call `/set-qr-config` at any time to add a new configuration.
</Tip>
