> For the complete documentation index, see [llms.txt](https://docs.stric.com.br/documentacao/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stric.com.br/documentacao/pix/qr-code.md).

# 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 %}
