# Realizar Pagamento via PIX

Este endpoint é utilizado para **realizar o envio de um PIX**, debitando o valor da conta do usuário autenticado e transferindo-o para o destinatário informado.

A operação requer o **identificador da chave PIX** (`keyInfoId`) obtido previamente no endpoint\
**Consultar Informações de uma Chave PIX**.

É necessário informar:

* `keyInfoId`: ID da chave PIX de destino;
* `amount`: valor do PIX (em reais, com até duas casas decimais);
* `pin`: código PIN do usuário para autenticação da transação.

O retorno contém o objeto `transaction`, que representa o PIX iniciado e seus respectivos status.

## Endpoint para Realizar Pix

<mark style="color:green;">`POST`</mark> `/accounts/{accountId}/pix/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                |
| ----------- | ------ | -------------------------- |
| `keyInfoId` | string | Identificador da chave PIX |
| `amount`    | number | Valor                      |
| `pin`       | string | PIN transacional           |

**Response**

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

```json
{
  "transaction": {
    "id": "a1b9d8c3-2e5f-48d4-97f1-621eb3c2f8a4",
    "amount": 150.75,
    "status": "PROCESSING",
    "externalStatus": "PROCESSING",
    "category": "Pix enviado",
    "beneficiaryName": "Juliana Santos Almeida",
    "type": "PIX",
    "credit": false,
    "createdAt": "2025-10-10T14:45:12.487Z"
  }
}

```

{% endtab %}

{% tab title="404" %}

```json
{
    "code": "NOT_FOUND",
    "error": "Informações da chave pix não encontrada",
    "message": "Informações da chave pix não encontrada"
}
```

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