# QR Code

## Criar cobrança (Qr Code)

<mark style="color:green;">`POST`</mark> `https://dev.stric.com.br/qrcode`

#### Headers

| Name                                            | Type   | Description               |
| ----------------------------------------------- | ------ | ------------------------- |
| account<mark style="color:red;">\*</mark>       | String | ID da conta a ser operada |
| authorization<mark style="color:red;">\*</mark> | String | Bearer Token              |

#### Request Body

| Name                                     | Type   | Description                                 |
| ---------------------------------------- | ------ | ------------------------------------------- |
| amount<mark style="color:red;">\*</mark> | Number | Valor                                       |
| key<mark style="color:red;">\*</mark>    | String | Chave pix para gerar a cobrança             |
| dueAt<mark style="color:red;">\*</mark>  | Date   | Vencimento/validade da cobrança (yyyy-MM-dd |
| description                              | String | Descrição da cobrança                       |

{% tabs %}
{% tab title="200: OK Caso de sucesso" %}

```javascript
{
  "id": "c03391a3-3abe-4bc2-ab07-5b3d425006b6",
  "hashCode": "HASH_CODE",
  "qrCodeBase64": "QR_CODE_BASE64",
  "payerName": "ANDRE FRANCA DE AVILA",
  "payerDocument": null,
  "status": "PROCESSED",
  "dueAt": "2022-07-14T03:00:00.000Z",
  "date": "2022-07-13T15:13:01.425Z"
}
```

{% endtab %}

{% tab title="400: Bad Request Erro de parâmetros" %}

```javascript
{
    "statusCode": 400,
    "error": "Bad Request",
    "message": "Validation failed",
    "validation": {
        "body": {
            "source": "body",
            "keys": [
                "dueAt"
            ],
            "message": "\"dueAt\" is required"
        }
    }
}
```

{% endtab %}
{% endtabs %}

## Buscar um Qr Code

<mark style="color:blue;">`GET`</mark> `https://dev.stric.com.br/qrcode{id}`

Buscar um QrCode pelo ID

#### Path Parameters

| Name                                 | Type   | Description  |
| ------------------------------------ | ------ | ------------ |
| id<mark style="color:red;">\*</mark> | String | ID do QrCode |

#### Headers

| Name                                            | Type   | Description               |
| ----------------------------------------------- | ------ | ------------------------- |
| account<mark style="color:red;">\*</mark>       | String | ID da conta a ser operada |
| authorization<mark style="color:red;">\*</mark> | String | Bearer Token              |

{% tabs %}
{% tab title="200: OK Caso de sucesso" %}

```javascript
{
  "id": "c03391a3-3abe-4bc2-ab07-5b3d425006b6",
  "hashCode": "HASH_CODE",
  "qrCodeBase64": "QR_CODE_BASE64",
  "payerName": "ANDRE FRANCA DE AVILA",
  "payerDocument": null,
  "status": "PAID",
  "dueAt": "2022-07-14T03:00:00.000Z",
  "date": "2022-07-13T15:13:01.425Z"
}
```

{% endtab %}

{% tab title="400: Bad Request Erro de parâmetros" %}

```javascript
{
    "statusCode": 400,
    "error": "Bad Request",
    "message": "Validation failed",
    "validation": {
        "params": {
            "source": "params",
            "keys": [
                "id"
            ],
            "message": "\"id\" must be a valid GUID"
        }
    }
}
```

{% endtab %}
{% endtabs %}

## Listar todos Qr Code

<mark style="color:blue;">`GET`</mark> `https://dev.stric.com.br/qrcode`

Listar um QrCode pelo ID

#### Query Parameters

| Name                                    | Type | Description |
| --------------------------------------- | ---- | ----------- |
| start<mark style="color:red;">\*</mark> | Date | yyyy-MM-dd  |
| end<mark style="color:red;">\*</mark>   | Date | yyyy-MM-dd  |

#### Headers

| Name                                            | Type   | Description               |
| ----------------------------------------------- | ------ | ------------------------- |
| account<mark style="color:red;">\*</mark>       | String | ID da conta a ser operada |
| authorization<mark style="color:red;">\*</mark> | String | Bearer Token              |

{% tabs %}
{% tab title="200: OK Caso de sucesso" %}

```javascript
{
  "id": "c03391a3-3abe-4bc2-ab07-5b3d425006b6",
  "hashCode": "HASH_CODE",
  "qrCodeBase64": "QR_CODE_BASE64",
  "payerName": "ANDRE FRANCA DE AVILA",
  "payerDocument": null,
  "status": "PAID",
  "dueAt": "2022-07-14T03:00:00.000Z",
  "date": "2022-07-13T15:13:01.425Z"
}
```

{% endtab %}

{% tab title="400: Bad Request Erro de parâmetros" %}

```javascript
{
    "statusCode": 400,
    "error": "Bad Request",
    "message": "Validation failed",
    "validation": {
        "params": {
            "source": "params",
            "keys": [
                "id"
            ],
            "message": "\"id\" must be a valid GUID"
        }
    }
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.stric.com.br/documentacao/pix/qr-code.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
