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

# Send a PIX payment

> Pay out by PIX key or QR Code with the initiate-then-confirm flow

Outbound PIX is a two-step flow: you **initiate** the payment to resolve the recipient and amount, then **confirm** it to actually move the money. Initiating returns the recipient's details and an `endToEndId` so you can review before committing.

## Flow

```mermaid theme={null}
sequenceDiagram
  participant You
  participant P3 as Portão 3
  You->>P3: POST /pix (initiate)
  P3->>You: pixId, recipient details, status REQUESTED
  You->>P3: POST /pix/{pixId}/confirm
  P3->>You: status CONFIRMED, endToEndId
```

## Step 1: Initiate the payment

You can initiate against a **PIX key** (DICT) or by **scanning a QR Code** (a Copia e Cola / EMV string the payee gives you).

<Tabs>
  <Tab title="By PIX key (DICT)">
    ```bash theme={null}
    curl -X POST \
      'https://api.banking.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/accounts/{accountId}/wallets/{walletId}/pix' \
      -H 'Authorization: Bearer <accessToken>' \
      -H 'x-environment: LIVE' \
      -H 'Content-Type: application/json' \
      -d '{
        "initiationType": "DICT",
        "dict": "CPF",
        "key": "12345678909",
        "amount": 1230,
        "description": "Order 4821"
      }'
    ```

    | Field            | Notes                                                                                                                                                                                                                                                  |
    | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
    | `initiationType` | `DICT` for a key.                                                                                                                                                                                                                                      |
    | `dict`           | Key type: `PHONE`, `EMAIL`, `CPF`, `CNPJ`, or `EVP` (random).                                                                                                                                                                                          |
    | `key`            | The key value. Phone as `+55XXXXXXXXXXX`; CPF is 11 digits; CNPJ is 14 characters, unformatted and uppercased — per Receita Federal NT 49/2024, CNPJs may include letters `A–Z` in the first 12 positions (only the last 2 check digits stay numeric). |
    | `amount`         | Centavos.                                                                                                                                                                                                                                              |
    | `description`    | Shows on your statement.                                                                                                                                                                                                                               |
  </Tab>

  <Tab title="By QR Code (EMV)">
    ```bash theme={null}
    curl -X POST \
      'https://api.banking.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/accounts/{accountId}/wallets/{walletId}/pix' \
      -H 'Authorization: Bearer <accessToken>' \
      -H 'x-environment: LIVE' \
      -H 'Content-Type: application/json' \
      -d '{
        "initiationType": "DYNAMIC_QRCODE",
        "emv": "00020126..."
      }'
    ```

    Pass the `emv` string read from the payee's QR Code (or Copia e Cola). The amount comes from the QR Code itself.
  </Tab>
</Tabs>

The response resolves the transfer and returns `status: "REQUESTED"`. Keep the `external.pixId` (the `pixId`) for the confirm step, and review `creditParty` (who you're paying), `txnUpdatedAmount` (the final amount), and `receipt.endToEndId` (the BACEN receipt ID).

```json theme={null}
{
  "status": "REQUESTED",
  "txnUpdatedAmount": 1230,
  "creditParty": { "name": "...", "document": "...", "bankIspb": "00360305" },
  "receipt": { "endToEndId": "E31680151202507241356RJGLGPJ1CJU" },
  "external": { "pixId": "c7810c30-971f-4e84-8feb-b7819087d4de" }
}
```

Reference: [`POST .../wallets/{walletId}/pix`](/api-reference/banking/pix/realms-organizations-accounts-wallets-pix-1)

## Step 2: Confirm the payment

Confirm the `pixId` to release the funds. Repeat the `amount` as a safeguard and pick the balance `category` to debit.

```bash theme={null}
curl -X POST \
  'https://api.banking.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/accounts/{accountId}/wallets/{walletId}/pix/{pixId}/confirm' \
  -H 'Authorization: Bearer <accessToken>' \
  -H 'x-environment: LIVE' \
  -H 'Content-Type: application/json' \
  -d '{
    "amount": 1230,
    "category": "FLEX_INTERNATIONAL"
  }'
```

A successful confirm returns `status: "CONFIRMED"` and the final `endToEndId` — your proof the payment settled.

Reference: [`POST .../pix/{pixId}/confirm`](/api-reference/banking/pix/realms-organizations-accounts-wallets-pix-confirm)

<Note>
  Confirming a payment may require the transaction `pin` header depending on how your credentials are provisioned. See [Authentication](/#transaction-pin).
</Note>

## Next steps

<CardGroup cols={2}>
  <Card title="Charge with PIX" icon="qrcode" href="/guides/collect-pix">
    Generate a QR Code to receive money instead of sending it.
  </Card>

  <Card title="Wallets for your customers" icon="wallet" href="/guides/wallets">
    Register PIX keys, read balances, and move money between wallets.
  </Card>
</CardGroup>
