> ## Documentation Index
> Fetch the complete documentation index at: https://developer.omni.z-api.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Enviar botão Pix

> Envie mensagens com botão de pagamento via Pix

export const ZapiResponseText = ({lang = 'pt'}) => ({
  pt: 'A estrutura de resposta é idêntica à da Z-API. Seu código existente que processa esses retornos continuará funcionando sem alterações.',
  en: 'The response structure is identical to Z-API. Your existing code that processes these returns will continue working without changes.',
  es: 'La estructura de la respuesta es idéntica a la de Z-API. El código que ya tienes para procesar esas respuestas seguirá funcionando sin cambios.'
})[lang];

## Conceituação

Método para envio de mensagens com botão de pagamento via Pix. O destinatário recebe um botão que ao ser clicado copia a chave Pix.

Os tipos de chave suportados são: **CPF**, **CNPJ**, **PHONE**, **EMAIL** e **EVP** (chave aleatória).

<Note>
  <ZapiResponseText lang="pt" />
</Note>


## OpenAPI

````yaml POST /send-button-pix
openapi: 3.1.0
info:
  title: Omni Z-API - Z-API Compatibility
  description: Z-API compatible API to facilitate migration to Omni Z-API
  version: 1.0.0
servers:
  - url: https://api.omni.z-api.io/channels/{channel_id}/token/{channel_token}
    variables:
      channel_id:
        description: Channel ID (equivalent to Z-API instance_id)
        default: YOUR_CHANNEL
      channel_token:
        description: Channel token (equivalent to Z-API token)
        default: YOUR_TOKEN
security:
  - bearerAuth: []
paths:
  /send-button-pix:
    post:
      tags:
        - Messages
      summary: Send Pix button
      description: Sends a message with a Pix payment button.
      operationId: sendButtonPix
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendButtonPixRequest'
            example:
              phone: '5511999999999'
              pixKey: '12345678900'
              type: CPF
              merchantName: Omni Z-API
      responses:
        '200':
          $ref: '#/components/responses/MessageSuccess'
        '405':
          $ref: '#/components/responses/MethodNotAllowed'
        '415':
          $ref: '#/components/responses/UnsupportedMediaType'
components:
  schemas:
    SendButtonPixRequest:
      type: object
      required:
        - phone
        - pixKey
        - type
      properties:
        phone:
          type: string
          description: Recipient phone number (country code + area code + number)
          example: '5511999999999'
        pixKey:
          type: string
          description: Pix key
        type:
          type: string
          description: Pix key type
          enum:
            - CPF
            - CNPJ
            - PHONE
            - EMAIL
            - EVP
        merchantName:
          type: string
          description: 'Button title. Default: "Pix"'
    MessageResponse:
      type: object
      properties:
        zaapId:
          type: string
          description: Internal identifier
        messageId:
          type: string
          description: WhatsApp message ID
        id:
          type: string
          description: Same value as messageId (compatibility)
    Error:
      type: object
      properties:
        error:
          type: integer
          description: Error code
        message:
          type: string
          description: Error description
  responses:
    MessageSuccess:
      description: Message sent successfully
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MessageResponse'
          example:
            zaapId: 3999984263738042930CD6ECDE9VDWSA
            messageId: D241XXXX732339502B68
            id: D241XXXX732339502B68
    MethodNotAllowed:
      description: Method not allowed. Make sure you are using POST.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: 405
            message: Method not allowed
    UnsupportedMediaType:
      description: 'Invalid Content-Type. Send `Content-Type: application/json`.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: 415
            message: Unsupported media type
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Secret Key generated in the Omni Z-API Security panel

````