> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ryzeapi.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# Send Pix

> Send a PIX payment button with key and merchant

**Auth:** `TokenAccount` or `TokenInstance` • **Rate-limit:** `Global` (100/min) • **Idempotent:** no

## Description

Sends a message with a **visual PIX card** in the WhatsApp chat, displaying the beneficiary name, the key type and the key itself. The button works as a **"copy key"** with PIX styling, when tapped, the recipient copies the key to the clipboard and pastes it into their banking app to pay. It does not open a payment screen, does not create a charge, and there is no confirmation callback, it is just the visual presentation of the key in a friendly, clickable format.

## Examples

### PIX with CPF Key

Sends the PIX button using a `CPF` key. Send **digits only** (no dots or dashes).

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://ryzeapi.cloud/api/message/pix/$Instance_Name" \
    -H "token: $Token_Instance" \
    -H "Content-Type: application/json" \
    -d '{
      "number":       "5511999999999",
      "merchantName": "RyzeAPI Tecnologia",
      "pixKey":       "12345678901",
      "pixKeyType":   "CPF"
    }'
  ```

  ```javascript JavaScript theme={null}
  await fetch(`https://ryzeapi.cloud/api/message/pix/${process.env.Instance_Name}`, {
    method: "POST",
    headers: {
      "token":        process.env.Token_Instance,
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      number:       "5511999999999",
      merchantName: "RyzeAPI Tecnologia",
      pixKey:       "12345678901",
      pixKeyType:   "CPF"
    })
  });
  ```

  ```python Python theme={null}
  import os, requests

  requests.post(
      f"https://ryzeapi.cloud/api/message/pix/{os.environ['Instance_Name']}",
      headers={
          "token":        os.environ["Token_Instance"],
          "Content-Type": "application/json"
      },
      json={
          "number":       "5511999999999",
          "merchantName": "RyzeAPI Tecnologia",
          "pixKey":       "12345678901",
          "pixKeyType":   "CPF"
      }
  )
  ```

  ```go Go theme={null}
  package main

  import (
      "net/http"
      "os"
      "strings"
  )

  func main() {
      body := strings.NewReader(`{
          "number":       "5511999999999",
          "merchantName": "RyzeAPI Tecnologia",
          "pixKey":       "12345678901",
          "pixKeyType":   "CPF"
      }`)
      req, _ := http.NewRequest("POST", "https://ryzeapi.cloud/api/message/pix/"+os.Getenv("Instance_Name"), body)
      req.Header.Set("token", os.Getenv("Token_Instance"))
      req.Header.Set("Content-Type", "application/json")
      http.DefaultClient.Do(req)
  }
  ```
</CodeGroup>

### PIX with CNPJ Key

Sends the PIX button using a `CNPJ` key. Send **digits only** (no dots, dashes or slashes).

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://ryzeapi.cloud/api/message/pix/$Instance_Name" \
    -H "token: $Token_Instance" \
    -H "Content-Type: application/json" \
    -d '{
      "number":       "5511999999999",
      "merchantName": "RyzeAPI Tecnologia",
      "pixKey":       "12345678000199",
      "pixKeyType":   "CNPJ"
    }'
  ```

  ```javascript JavaScript theme={null}
  await fetch(`https://ryzeapi.cloud/api/message/pix/${process.env.Instance_Name}`, {
    method: "POST",
    headers: {
      "token":        process.env.Token_Instance,
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      number:       "5511999999999",
      merchantName: "RyzeAPI Tecnologia",
      pixKey:       "12345678000199",
      pixKeyType:   "CNPJ"
    })
  });
  ```

  ```python Python theme={null}
  import os, requests

  requests.post(
      f"https://ryzeapi.cloud/api/message/pix/{os.environ['Instance_Name']}",
      headers={
          "token":        os.environ["Token_Instance"],
          "Content-Type": "application/json"
      },
      json={
          "number":       "5511999999999",
          "merchantName": "RyzeAPI Tecnologia",
          "pixKey":       "12345678000199",
          "pixKeyType":   "CNPJ"
      }
  )
  ```

  ```go Go theme={null}
  package main

  import (
      "net/http"
      "os"
      "strings"
  )

  func main() {
      body := strings.NewReader(`{
          "number":       "5511999999999",
          "merchantName": "RyzeAPI Tecnologia",
          "pixKey":       "12345678000199",
          "pixKeyType":   "CNPJ"
      }`)
      req, _ := http.NewRequest("POST", "https://ryzeapi.cloud/api/message/pix/"+os.Getenv("Instance_Name"), body)
      req.Header.Set("token", os.Getenv("Token_Instance"))
      req.Header.Set("Content-Type", "application/json")
      http.DefaultClient.Do(req)
  }
  ```
</CodeGroup>

### PIX with Email Key

Sends the PIX button using an `EMAIL` key.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://ryzeapi.cloud/api/message/pix/$Instance_Name" \
    -H "token: $Token_Instance" \
    -H "Content-Type: application/json" \
    -d '{
      "number":       "5511999999999",
      "merchantName": "RyzeAPI Tecnologia",
      "pixKey":       "contato@ryzeapi.cloud",
      "pixKeyType":   "EMAIL"
    }'
  ```

  ```javascript JavaScript theme={null}
  await fetch(`https://ryzeapi.cloud/api/message/pix/${process.env.Instance_Name}`, {
    method: "POST",
    headers: {
      "token":        process.env.Token_Instance,
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      number:       "5511999999999",
      merchantName: "RyzeAPI Tecnologia",
      pixKey:       "contato@ryzeapi.cloud",
      pixKeyType:   "EMAIL"
    })
  });
  ```

  ```python Python theme={null}
  import os, requests

  requests.post(
      f"https://ryzeapi.cloud/api/message/pix/{os.environ['Instance_Name']}",
      headers={
          "token":        os.environ["Token_Instance"],
          "Content-Type": "application/json"
      },
      json={
          "number":       "5511999999999",
          "merchantName": "RyzeAPI Tecnologia",
          "pixKey":       "contato@ryzeapi.cloud",
          "pixKeyType":   "EMAIL"
      }
  )
  ```

  ```go Go theme={null}
  package main

  import (
      "net/http"
      "os"
      "strings"
  )

  func main() {
      body := strings.NewReader(`{
          "number":       "5511999999999",
          "merchantName": "RyzeAPI Tecnologia",
          "pixKey":       "contato@ryzeapi.cloud",
          "pixKeyType":   "EMAIL"
      }`)
      req, _ := http.NewRequest("POST", "https://ryzeapi.cloud/api/message/pix/"+os.Getenv("Instance_Name"), body)
      req.Header.Set("token", os.Getenv("Token_Instance"))
      req.Header.Set("Content-Type", "application/json")
      http.DefaultClient.Do(req)
  }
  ```
</CodeGroup>

## Success response

```json 200 OK theme={null}
{
  "success": true,
  "message": "Message sent successfully",
  "status":  "sent",
  "data": {
    "messageId":   "3EB08FCF27E532F1B0F5",
    "direction":   "outgoing",
    "messageType": "pix",
    "content":     "",
    "source":      "api",
    "timestamp":   "2026-04-30T14:30:00Z",
    "chat": {
      "jid":     "5511999999999@s.whatsapp.net",
      "isGroup": false
    },
    "sender": {
      "jid":      "5511777777777@s.whatsapp.net",
      "instance": "minha-instancia"
    }
  }
}
```

<Note>
  The button **only copies the PIX key** to the recipient's clipboard, it does not open the bank's payment screen or initiate a charge. Payment is done manually by the recipient in their own banking app, and **there is no "paid" callback via WhatsApp**.
</Note>

## Path parameters

<ParamField path="instance" type="string" required>
  Instance name (e.g., `$Instance_Name`).
</ParamField>

## Headers

<ParamField header="token" type="string" required>
  `TokenAccount` or `TokenInstance`.
</ParamField>

<ParamField header="Content-Type" type="string" required>
  `application/json`
</ParamField>

## Request body

<ParamField body="number" type="string" required>
  Destination: phone (`5511999999999`) or JID (`@s.whatsapp.net`, `@lid`, `@g.us`).
</ParamField>

<ParamField body="merchantName" type="string" required>
  Beneficiary name displayed on the visual PIX card (above the key).
</ParamField>

<ParamField body="pixKey" type="string" required>
  PIX key (CPF, CNPJ, email, phone or random key).
</ParamField>

<ParamField body="pixKeyType" type="string" required>
  Key type. Accepted values: `CPF`, `CNPJ`, `EMAIL`, `PHONE`, `RANDOM`.
</ParamField>

<ParamField body="delay" type="int" default="0">
  Time in **seconds** to wait before sending. During the interval, the server sends the "typing..." indicator to the recipient.
</ParamField>

<ParamField body="replyTo" type="string">
  ID of the message to be quoted (reply). The original message must belong to the same instance and have been saved in the database.
</ParamField>

<ParamField body="replyPrivate" type="boolean" default="false">
  When `true` **and** `replyTo` points to a message originating from a group, the reply is redirected to the original author's **private** chat.
</ParamField>

<ParamField body="source" type="string" default="api">
  Origin identifier for traceability (e.g., `crm`, `checkout`, `n8n`).
</ParamField>

## Notes

<Note>
  * The **`pixKeyType`** is validated by `oneof`, if you send a value outside `CPF | CNPJ | EMAIL | PHONE | RANDOM`, the request is rejected with `400`.
  * For CPF/CNPJ keys, send **digits only** (no dots, dashes or slashes): `12345678901` or `12345678000199`.
  * For `PHONE`, use the international format without `+` (e.g., `5511999999999`).
  * For `RANDOM`, use the UUID generated by the bank (e.g., `aabbccdd-1234-5678-90ab-cdef01234567`).
  * This endpoint does not create a Brcode QR Code or register a charge, it is only the **visual representation** of the order with a clickable PIX key.
</Note>

## Errors

| HTTP | Internal status   | Message                                 |
| ---- | ----------------- | --------------------------------------- |
| 400  | ,                 | `Instance name is required`             |
| 400  | ,                 | `Invalid request: <detail>`             |
| 400  | ,                 | `Number is required`                    |
| 400  | ,                 | `MerchantName is required`              |
| 400  | ,                 | `PixKey is required`                    |
| 400  | ,                 | `PixKeyType is required`                |
| 400  | `invalid_number`  | `Invalid phone number format: <detail>` |
| 400  | `invalid_request` | (`oneof` validation or other reason)    |
| 404  | ,                 | `Instance not found`                    |
| 500  | `send_failed`     | `Failed to send message: <reason>`      |
| 503  | `disconnected`    | `Instance is not connected to WhatsApp` |

Error envelope:

```json theme={null}
{
  "success": false,
  "error": { "message": "PixKeyType is required" }
}
```
