# Send Pix (/en/docs/pix-processamento/tutoriais/send-pix)

<QuickLinks>
  <QuickLink href="/docs/pix-processamento/endpoints/keys-and-dict/get_pix_key" title="GET /pix/key" method="GET" path="/pix/key" />

  <QuickLink href="/docs/pix-processamento/endpoints/withdrawals/post_withdraw" title="POST /withdraw" method="POST" path="/withdraw" />

  <QuickLink href="/docs/pix-processamento/endpoints/withdrawals/post_withdraw_qrcode" title="POST /withdraw/qrcode" method="POST" path="/withdraw/qrcode" />

  <QuickLink href="/docs/pix-processamento/best-practices/dict" title="DICT Lookup" />
</QuickLinks>

<Mermaid
  chart="`
flowchart LR
  A[&#x22;Decide the recipient&#x22;] --> B{&#x22;How to pay?&#x22;}
  B -->|&#x22;I have a Pix key&#x22;| C[&#x22;DICT lookup&#x22;]
  B -->|&#x22;I have a QR Code&#x22;| D[&#x22;Read QR (optional)&#x22;]
  C --> E[&#x22;POST /withdraw&#x22;]
  D --> F[&#x22;POST /withdraw/qrcode&#x22;]
  E --> G[&#x22;COMPLETED callback&#x22;]
  F --> G
  G --> H[&#x22;GET /withdraw/proof&#x22;]

  click C &#x22;/en/docs/pix-processamento/endpoints/keys-and-dict/get_pix_key&#x22; &#x22;GET /pix/key&#x22;
  click D &#x22;/en/docs/pix-processamento/endpoints/keys-and-dict/post_pix_qrcode_read&#x22; &#x22;Read QR&#x22;
  click E &#x22;/en/docs/pix-processamento/endpoints/withdrawals/post_withdraw&#x22; &#x22;POST /withdraw&#x22;
  click F &#x22;/en/docs/pix-processamento/endpoints/withdrawals/post_withdraw_qrcode&#x22; &#x22;POST /withdraw/qrcode&#x22;
  click G &#x22;/en/docs/pix-processamento/webhooks&#x22; &#x22;Webhooks&#x22;
  click H &#x22;/en/docs/pix-processamento/endpoints/withdrawals/get_withdraw_proof&#x22; &#x22;Receipt&#x22;

  style A fill:#f59e0b,stroke:#d97706,color:#ffffff
  style G fill:#14ce71,stroke:#0eb464,color:#ffffff
`"
/>

## Path 1: by Pix key [#path-1-by-pix-key]

<Steps>
  <Step>
    ### Look up the key in DICT [#look-up-the-key-in-dict]

    Before paying, validate the recipient by querying DICT via [`GET /pix/key`](/docs/pix-processamento/endpoints/keys-and-dict/get_pix_key). It confirms the key exists and returns the holder so you can compare with what you expect.

    <Tabs items="['curl', 'Node.js']">
      <Tab value="curl">
        ```bash
        curl "https://api.payzu.processamento.com/v1/pix/key?pixKey=joao@example.com" \
          -H "Authorization: Bearer $TOKEN" \
          -H "Content-Type: application/json"
        ```
      </Tab>

      <Tab value="Node.js">
        ```ts
        const url = new URL('https://api.payzu.processamento.com/v1/pix/key');
        url.searchParams.set('pixKey', 'joao@example.com');

        const res = await fetch(url, {
          headers: {
            Authorization: `Bearer ${process.env.PAYZU_TOKEN}`,
            'Content-Type': 'application/json',
          },
        });
        const dict = await res.json();
        ```
      </Tab>
    </Tabs>

    More details at [DICT Lookup](/docs/pix-processamento/best-practices/dict).
  </Step>

  <Step>
    ### Execute the payment [#execute-the-payment]

    Use [`POST /withdraw`](/docs/pix-processamento/endpoints/withdrawals/post_withdraw) with the validated key. `pixType` accepts: `cpf`, `cnpj`, `phone`, `email`, `evp`.

    <Tabs items="['curl', 'Node.js']">
      <Tab value="curl">
        ```bash
        curl -X POST https://api.payzu.processamento.com/v1/withdraw \
          -H "Authorization: Bearer $TOKEN" \
          -H "Content-Type: application/json" \
          -d '{
            "amount": 250.00,
            "pixKey": "joao@example.com",
            "pixType": "email",
            "callbackUrl": "https://seusite.com.br/webhooks/payzu",
            "clientReference": "payout-2025-08-001",
            "description": "Pagamento referente ao pedido #1234"
          }'
        ```
      </Tab>

      <Tab value="Node.js">
        ```ts
        const res = await fetch('https://api.payzu.processamento.com/v1/withdraw', {
          method: 'POST',
          headers: {
            Authorization: `Bearer ${process.env.PAYZU_TOKEN}`,
            'Content-Type': 'application/json',
          },
          body: JSON.stringify({
            amount: 250.00,
            pixKey: 'joao@example.com',
            pixType: 'email',
            callbackUrl: 'https://seusite.com.br/webhooks/payzu',
            clientReference: 'payout-2025-08-001',
            description: 'Pagamento referente ao pedido #1234',
          }),
        });
        const withdraw = await res.json();
        ```
      </Tab>
    </Tabs>
  </Step>
</Steps>

## Path 2: by QR Code [#path-2-by-qr-code]

<Steps>
  <Step>
    ### Read the QR first (optional) [#read-the-qr-first-optional]

    If the QR was scanned from an external client, extract the data before paying via [`POST /pix/qrcode/read`](/docs/pix-processamento/endpoints/keys-and-dict/post_pix_qrcode_read).

    ```bash
    curl -X POST https://api.payzu.processamento.com/v1/pix/qrcode/read \
      -H "Authorization: Bearer $TOKEN" \
      -H "Content-Type: application/json" \
      -d '{ "qrCode": "00020126870014br.gov.bcb.pix..." }'
    ```

    <Callout type="info">
      PayZu processes both **dynamic** and **static** QR Code.
    </Callout>
  </Step>

  <Step>
    ### Execute the payment [#execute-the-payment-1]

    [`POST /withdraw/qrcode`](/docs/pix-processamento/endpoints/withdrawals/post_withdraw_qrcode). If the QR already has an embedded amount, `amount` can be omitted.

    ```bash
    curl -X POST https://api.payzu.processamento.com/v1/withdraw/qrcode \
      -H "Authorization: Bearer $TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
        "qrCode": "00020126870014br.gov.bcb.pix...",
        "amount": 100.00,
        "callbackUrl": "https://seusite.com.br/webhooks/payzu",
        "clientReference": "payout-qr-2025-08-001"
      }'
    ```
  </Step>
</Steps>

## Track status [#track-status]

The withdrawal starts as `PENDING` and progresses to `COMPLETED`, `CANCELED`, or `ERROR`. The callback arrives at each transition. To query manually via [`GET /withdraw`](/docs/pix-processamento/endpoints/withdrawals/get_withdraw):

```bash
curl "https://api.payzu.processamento.com/v1/withdraw?clientReference=payout-2025-08-001" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json"
```

## Receipt [#receipt]

After `COMPLETED`, download the official receipt via [`GET /withdraw/proof/{id}`](/docs/pix-processamento/endpoints/withdrawals/get_withdraw_proof):

```bash
curl "https://api.payzu.processamento.com/v1/withdraw/proof/PAYZU2025..." \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json"
```

## Common errors [#common-errors]

| Error                | Resolution                                                                                    |
| -------------------- | --------------------------------------------------------------------------------------------- |
| Insufficient balance | Check [`GET /user/balance`](/docs/pix-processamento/endpoints/account/get_user_balance) first |
| Invalid Pix key      | Validate via DICT first                                                                       |
| Amount below minimum | `amount` ≥ R$ 0.01 (key) or ≥ R$ 0.10 (QR)                                                    |
| Different recipient  | Compare `dict.name` with what you expect before paying                                        |