# Realizar Pagamento via QR Code PIX

Este endpoint realiza o **pagamento de um QR Code PIX**, debitando o valor da conta bancária do usuário autenticado e transferindo-o ao recebedor identificado no QR Code.

Antes de efetuar o pagamento, é necessário decodificar o QR Code utilizando o endpoint\
**Decodificar QR Code PIX**, que retorna o identificador único `qrCodeInfoId` usado nesta requisição.

O corpo da requisição deve conter:

* `qrCodeInfoId`: ID retornado após decodificar o QR Code;
* `amount`: valor a ser pago (em reais, com até duas casas decimais);
* `pin`: código PIN do usuário para autenticação da transação.

O retorno inclui o objeto `transaction`, representando o PIX iniciado e seu status atual de processamento.

## Endpoint para Pagamento de QR Code

<mark style="color:green;">`POST`</mark> `/accounts/{accountId}/pix/qrcode/payment`

Este endpoint é protegido e requer o uso do cabeçalho `Authorization: Bearer <token>` e `x-tenant-id`.

**Headers**

| Name          | Value              |
| ------------- | ------------------ |
| Content-Type  | `application/json` |
| Authorization | `Bearer <token>`   |
| x-tenant-id   | `Tenant ID`        |

**Body**

| Name           | Type   | Description      |
| -------------- | ------ | ---------------- |
| `qrCodeInfoId` | string | ID do QR Code    |
| `amount`       | number | Valor            |
| `pin`          | string | PIN transacional |

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
    "transaction": {
        "id": "d877c338-18ba-4d49-b99d-2a28aea0709d",
        "amount": 1,
        "status": "PROCESSING",
        "externalStatus": "PROCESSING",
        "category": "QR Code pago",
        "beneficiaryName": "Pedro Victor Pereira",
        "type": "PIX_QRCODE",
        "credit": false,
        "createdAt": "2025-10-10T10:48:46.017Z"
    }
}
```

{% endtab %}

{% tab title="404" %}

```json
{
    "code": "NOT_FOUND",
    "error": "Informações do Qr Code não encontrado",
    "message": "Informações do Qr Code não encontrado"
}
```

{% 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/pagamentos-via-qr-code-pix/realizar-pagamento-via-qr-code-pix.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.
