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

# Enviar SPEI (cash-out)

> **Requer Bearer JWT**. Envia transferência SPEI para uma CLABE de destino. Confirmação assíncrona via webhook `cash_out`.



## OpenAPI

````yaml post /api/spei/cash-out
openapi: 3.0.0
info:
  title: NTX Pay Public API — México
  description: >-
    API Pública NTX Pay para integração com SPEI (cash-in/cash-out) no México.
    Todos os valores monetários são expressos em centavos MXN.
  version: 1.0.0
  contact: {}
servers:
  - url: https://sandbox.mx.ntxpay.com
    description: Sandbox
security: []
tags:
  - name: auth
    description: Geração de token via certificado X.509 + clientId/clientSecret
  - name: SPEI
    description: >-
      Transferências interbancárias instantâneas mexicanas (cash-in via CLABE
      descartável; cash-out para CLABE)
  - name: Balance
    description: Consulta de saldo da conta (centavos MXN)
  - name: Webhooks Config
    description: Configuração de webhooks para notificações de eventos
paths:
  /api/spei/cash-out:
    post:
      tags:
        - SPEI
      summary: Enviar SPEI (cash-out)
      description: >-
        **Requer Bearer JWT**. Envia transferência SPEI para uma CLABE de
        destino. Confirmação assíncrona via webhook `cash_out`.
      operationId: SpeiCashOutController_create
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SpeiCashOutInputDto'
      responses:
        '201':
          description: Cash-out aceito
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SpeiCashOutOutputDto'
        '400':
          description: Saldo insuficiente ou payload inválido
        '401':
          description: Token inválido
        '502':
          description: Serviço temporariamente indisponível
      security:
        - bearer: []
components:
  schemas:
    SpeiCashOutInputDto:
      type: object
      required:
        - amountCentavos
        - destinationClabe
        - beneficiaryName
      properties:
        amountCentavos:
          type: integer
          minimum: 1
          example: 50000
          description: Valor em centavos MXN (mín. 1).
        destinationClabe:
          type: string
          pattern: ^\d{18}$
          description: CLABE destino (exatamente 18 dígitos).
          example: '012180001234567890'
        beneficiaryName:
          type: string
          minLength: 3
          maxLength: 255
          example: Maria Lopez
        beneficiaryTaxId:
          type: string
          minLength: 10
          maxLength: 20
          description: RFC/CURP (opcional)
          example: LOMA850101ABC
        concept:
          type: string
          minLength: 1
          maxLength: 255
          description: Conceito/descrição (aparece para o beneficiário)
          example: Pago factura 123
    SpeiCashOutOutputDto:
      type: object
      properties:
        transactionId:
          type: string
          format: uuid
          description: >-
            Identificador publico da transacao (UUID). E o mesmo transactionId
            entregue nos webhooks — use-o para correlacionar e consultar a
            transacao.
          example: 3f2a1c34-9d1e-4c7b-8a5e-2b6f0d9c4e71
        status:
          type: string
          enum:
            - PENDING
            - CONFIRMED
            - FAILED
          example: PENDING
        destinationClabe:
          type: string
          example: '012180001234567890'
        amountCentavos:
          type: integer
          example: 50000
        referenceNumerical:
          type: string
          nullable: true
          example: '9876543'
        createdAt:
          type: string
          nullable: true
          format: date-time
          example: '2026-05-13T12:00:00.000Z'
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT obtido em POST /api/auth/token

````