# Enviar botão PIX

`POST /send/pix-button`

Pasta: **Enviar Mensagem**

## Autenticação

```http
token: {{token}}
```

## Descrição

# Enviar botão PIX

Envia um botão interativo de pagamento PIX (`payment_info`). Por baixo dos panos usa o mesmo fluxo de `/send/button` com `type=pix`.

## Endpoint

```http
POST {{baseUrl}}/send/pix-button
```

## Autenticação

Envie o token da instância no header:

```http
token: {{token}}
```

## Corpo da requisição

| Campo | Tipo | Obrigatório | Descrição |
| --- | --- | --- | --- |
| number | string | Sim* | Destinatário |
| chatid | string | Sim* | Alternativa a number |
| title / text / description | string | Não | Se buttons vazio, title vira o nome do merchant |
| footer / footerText | string | Não | Rodapé (ignorado no fluxo PIX puro) |
| buttons | array | Recomendado | Um botão com type=pix (se vazio, cria um com Name=title) |
| buttons[].type | string | Não | Forçado para pix se vazio |
| buttons[].name | string | Sim | Nome do merchant/recebedor |
| buttons[].key | string | Sim | Chave PIX |
| buttons[].keyType | string | Não | PHONE, EMAIL, CPF, CNPJ, EVP |
| buttons[].currency | string | Não | Padrão BRL |
| buttons[].amount / value | int | Não | Valor em centavos |
| buttons[].itemName | string | Não | Nome do item |

## Exemplo de Requisição

```bash
curl -X POST "{{baseUrl}}/send/pix-button" \
  -H "token: {{token}}" \
  -H "Content-Type: application/json" \
  -d '{"number": "{{remoteJid}}", "title": "Pagamento via PIX", "buttons": [{"type": "pix", "name": "GoZAP Pagamentos", "key": "pix@gozap.dev", "keyType": "EMAIL", "currency": "BRL", "amount": 9900, "itemName": "Pedido #1234"}]}'
```

## Resposta de Sucesso

```json
{
  "success": true,
  "message": {
    "id": "3EB0A1B2C3D4E5F6",
    "timestamp": "2026-07-17T12:34:56Z",
    "sender": "5511888888888@s.whatsapp.net"
  }
}
```

## Erros comuns

- `pix buttons cannot be combined with other buttons`
- Chave PIX ausente (`key`)
- Cooldown interativo

## Observações

- Não use campos `pixKey`/`pixType` soltos no root — eles não existem em MenuInput. Passe dentro de `buttons[]`.
- Apenas 1 botão PIX por mensagem.

## Corpo (exemplo)

```json
{
  "number": "{{remoteJid}}",
  "title": "Pagamento via PIX",
  "buttons": [
    {
      "type": "pix",
      "name": "GoZAP Pagamentos",
      "key": "pix@gozap.dev",
      "keyType": "EMAIL",
      "currency": "BRL",
      "amount": 9900,
      "itemName": "Pedido #1234"
    }
  ]
}
```

## cURL

```bash
curl -X POST "{{baseUrl}}/send/pix-button" \
  -H "token: {{token}}" \
  -H "Content-Type: application/json" \
  -d '{
  "number": "{{remoteJid}}",
  "title": "Pagamento via PIX",
  "buttons": [
    {
      "type": "pix",
      "name": "GoZAP Pagamentos",
      "key": "pix@gozap.dev",
      "keyType": "EMAIL",
      "currency": "BRL",
      "amount": 9900,
      "itemName": "Pedido #1234"
    }
  ]
}'
```

---

[Índice da pasta](./index.md) · [Índice geral](../index.md) · [UI](https://gozap.dev/docs?op=enviar-mensagem/enviar-botao-pix)
