# Validar y preparar pago Global66

> Valida un pago contra Global66 sin ejecutarlo.



{/* AUTO-GENERATED by @emisso/codegen. DO NOT EDIT. */}

|                     |                                                                   |
| ------------------- | ----------------------------------------------------------------- |
| **Tool ID**         | `global66.pago.validar`                                           |
| **Nombre MCP**      | `global66__pago__validar`                                         |
| **Conector**        | `global66`                                                        |
| **Plano**           | `action`                                                          |
| **Scope (permiso)** | `global66:read`                                                   |
| **Auth**            | `connection_credentials`                                          |
| **Versión**         | `1`                                                               |
| **Sensible**        | no                                                                |
| **Deprecado**       | no                                                                |
| **Comportamiento**  | readOnly=true, destructive=false, idempotent=true, openWorld=true |

> **Requiere conexión.** Indica cuál en cada llamada: header `X-Connect-Connection` en REST y campo `connectionId` en el `execute` de MCP. No hay resolución implícita, ni siquiera con una sola conexión activa: la conexión es la empresa. El id sale de [`conexiones.estado.consultar`](/docs/referencia/conexiones/estado-consultar).

## Qué hace [#qué-hace]

Si es válido, deja una preparación de 15 minutos ligada a esta conexión y a quien valida, con su externalReferenceId ya reservado, y devuelve el preparacionId que exige global66.pago.ejecutar (o global66.pago\_raas.ejecutar con raas:true). Solo la misma persona o agente puede ejecutarla, y solo con este mismo pago. No mueve dinero.

## Entrada [#entrada]

| Campo                           | Tipo                                                                                                      | Requerido            | Descripción                                                                                                                                             |
| ------------------------------- | --------------------------------------------------------------------------------------------------------- | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `pago`                          | valor                                                                                                     | sí                   | Pago según el contrato oficial de Global66; transactionType decide los campos.                                                                          |
| `raas`                          | booleano                                                                                                  | no · default `false` | True si se ejecutará por global66.pago\_raas.ejecutar.                                                                                                  |
| `remitter`                      | objeto                                                                                                    | no                   | Remitente final (RaaS). Solo en global66.pago\_raas.ejecutar y solo para REMITTANCE por WIRE\_TRANSFER a una cuenta bancaria en corredores habilitados. |
| `remitter.name`                 | string                                                                                                    | sí                   | Nombre o razón social del remitente final.                                                                                                              |
| `remitter.identificationNumber` | string                                                                                                    | sí                   | Documento del remitente (RUT en Chile, NIT/CC en Colombia), como texto.                                                                                 |
| `remitter.identificationType`   | string                                                                                                    | sí                   | Tipo de documento del remitente.                                                                                                                        |
| `remitter.countryCode`          | string `^[A-Z]{2}$`                                                                                       | no                   | País ISO 3166-1 alfa-2.                                                                                                                                 |
| `remitter.accountType`          | string                                                                                                    | no                   | Tipo de cuenta del remitente.                                                                                                                           |
| `remitter.address`              | string                                                                                                    | no                   | Dirección del remitente.                                                                                                                                |
| `remitter.city`                 | string                                                                                                    | no                   | Ciudad del remitente.                                                                                                                                   |
| `remitter.contactNumber`        | string                                                                                                    | no                   | Teléfono con código de país.                                                                                                                            |
| `remitter.email`                | string `^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$` | no                   | Correo del remitente.                                                                                                                                   |
| `voucherSha256`                 | string `^[0-9a-f]{64}$`                                                                                   | no                   | SHA-256 del voucher que se adjuntará, si hay.                                                                                                           |

<details>
  <summary>
    JSON Schema de entrada
  </summary>

  ```json
  {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "pago": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "transactionType": {
                "type": "string",
                "const": "REMITTANCE",
                "description": "Remesa a un beneficiario externo."
              },
              "cuentaOrigenId": {
                "type": "string",
                "pattern": "^\\d{1,10}$",
                "description": "accountId (walletId) de la cuenta de origen, de global66.saldos.consultar. Se comprueba que pertenezca a la conexión."
              },
              "amount": {
                "type": "number",
                "minimum": 0,
                "description": "Monto en la moneda de origen (way ORIGIN) o en la de destino (way DESTINY)."
              },
              "way": {
                "type": "string",
                "enum": [
                  "ORIGIN",
                  "DESTINY"
                ],
                "description": "ORIGIN: amount es lo que se envía. DESTINY: amount es lo que recibe el beneficiario."
              },
              "description": {
                "description": "Glosa para el proveedor de pago; máximo 66 caracteres.",
                "type": "string",
                "maxLength": 66
              },
              "paymentType": {
                "type": "string",
                "enum": [
                  "WIRE_TRANSFER",
                  "SWIFT",
                  "BREB"
                ],
                "description": "Riel de pago; los válidos para un destino salen de global66.medios_pago.listar."
              },
              "purposeCode": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "purposeCode": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991,
                      "description": "ID del propósito de global66.propositos.listar."
                    },
                    "amount": {
                      "description": "Monto de este propósito en moneda de origen.",
                      "type": "number"
                    }
                  },
                  "required": [
                    "purposeCode"
                  ]
                },
                "description": "Propósitos de la remesa con su monto en moneda de origen."
              },
              "beneficiary": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "operationType": {
                        "type": "string",
                        "const": "BANK_TRANSFER",
                        "description": "Transferencia bancaria local."
                      },
                      "destinationCurrency": {
                        "type": "string",
                        "pattern": "^[A-Z]{3,5}$",
                        "description": "Moneda que recibe el beneficiario."
                      },
                      "beneficiaryName": {
                        "type": "string",
                        "minLength": 1,
                        "description": "Nombre o razón social del beneficiario."
                      },
                      "beneficiaryLastName": {
                        "description": "Apellido del beneficiario.",
                        "type": "string"
                      },
                      "typeBeneficiary": {
                        "type": "string",
                        "enum": [
                          "INDIVIDUAL",
                          "COMPANY"
                        ],
                        "description": "Persona natural (INDIVIDUAL) o empresa (COMPANY)."
                      },
                      "email": {
                        "description": "Correo del beneficiario.",
                        "type": "string",
                        "maxLength": 100,
                        "format": "email",
                        "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                      },
                      "countryCode": {
                        "type": "string",
                        "pattern": "^[A-Z]{2}$",
                        "description": "País ISO 3166-1 alfa-2."
                      },
                      "accountType": {
                        "type": "string",
                        "enum": [
                          "SAVING",
                          "ELECTRONIC",
                          "CHECKING",
                          "NOT_APPLY",
                          "VISTA",
                          "RUT"
                        ],
                        "description": "Tipo de cuenta bancaria del beneficiario."
                      },
                      "bankId": {
                        "description": "ID del banco en el catálogo de la ruta (bankingCodes de global66.destinos.listar).",
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "accountNumber": {
                        "type": "string",
                        "minLength": 1,
                        "description": "Número de cuenta, como texto."
                      },
                      "branchCode": {
                        "description": "Sucursal (agência); requerida en algunos corredores.",
                        "type": "string",
                        "maxLength": 20
                      },
                      "residenceCity": {
                        "description": "Ciudad de residencia; requerida en VE, BR y UY.",
                        "type": "string",
                        "maxLength": 100
                      },
                      "state": {
                        "description": "Estado o provincia; requerido en VE, BR y UY.",
                        "type": "string",
                        "maxLength": 100
                      },
                      "postalCode": {
                        "description": "Código postal; requerido en VE, BR y UY.",
                        "type": "string",
                        "maxLength": 20
                      },
                      "address": {
                        "description": "Dirección; requerida en VE, BR y UY.",
                        "type": "string",
                        "maxLength": 200
                      },
                      "documentNumber": {
                        "type": "string",
                        "maxLength": 30,
                        "description": "Número de documento del beneficiario, como texto."
                      },
                      "documentType": {
                        "type": "string",
                        "maxLength": 20,
                        "description": "Tipo de documento (RUT, DNI, PASSPORT…); los válidos por país salen de global66.documentos.listar."
                      }
                    },
                    "required": [
                      "operationType",
                      "destinationCurrency",
                      "beneficiaryName",
                      "typeBeneficiary",
                      "countryCode",
                      "accountType",
                      "accountNumber",
                      "documentNumber",
                      "documentType"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "operationType": {
                        "type": "string",
                        "const": "BANK_ROUTING",
                        "description": "Cuenta con código de ruteo (ACH, SORT, BSB, IFSC, TRANSIT, AGENCIA)."
                      },
                      "destinationCurrency": {
                        "type": "string",
                        "pattern": "^[A-Z]{3,5}$",
                        "description": "Moneda que recibe el beneficiario."
                      },
                      "beneficiaryName": {
                        "type": "string",
                        "minLength": 1,
                        "description": "Nombre o razón social del beneficiario."
                      },
                      "beneficiaryLastName": {
                        "description": "Apellido del beneficiario.",
                        "type": "string"
                      },
                      "typeBeneficiary": {
                        "type": "string",
                        "enum": [
                          "INDIVIDUAL",
                          "COMPANY"
                        ],
                        "description": "Persona natural (INDIVIDUAL) o empresa (COMPANY)."
                      },
                      "email": {
                        "description": "Correo del beneficiario.",
                        "type": "string",
                        "maxLength": 100,
                        "format": "email",
                        "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                      },
                      "countryCode": {
                        "type": "string",
                        "pattern": "^[A-Z]{2}$",
                        "description": "País ISO 3166-1 alfa-2."
                      },
                      "routingCode": {
                        "type": "string",
                        "enum": [
                          "ACH",
                          "SORT",
                          "BSB",
                          "IFSC",
                          "TRANSIT",
                          "AGENCIA"
                        ],
                        "description": "Tipo de código de ruteo; fija el formato de routingValue."
                      },
                      "routingValue": {
                        "type": "string",
                        "minLength": 1,
                        "description": "Valor de ruteo, como texto."
                      },
                      "accountNumber": {
                        "type": "string",
                        "minLength": 1,
                        "description": "Número de cuenta, como texto."
                      },
                      "accountType": {
                        "type": "string",
                        "enum": [
                          "SAVING",
                          "ELECTRONIC",
                          "CHECKING",
                          "NOT_APPLY",
                          "VISTA",
                          "RUT"
                        ],
                        "description": "Tipo de cuenta bancaria del beneficiario."
                      },
                      "bankId": {
                        "description": "ID del banco en el catálogo de la ruta.",
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "documentNumber": {
                        "type": "string",
                        "maxLength": 30,
                        "description": "Número de documento del beneficiario, como texto."
                      },
                      "documentType": {
                        "type": "string",
                        "maxLength": 20,
                        "description": "Tipo de documento (RUT, DNI, PASSPORT…); los válidos por país salen de global66.documentos.listar."
                      }
                    },
                    "required": [
                      "operationType",
                      "destinationCurrency",
                      "beneficiaryName",
                      "typeBeneficiary",
                      "countryCode",
                      "routingCode",
                      "routingValue",
                      "accountNumber",
                      "documentNumber",
                      "documentType"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "operationType": {
                        "type": "string",
                        "const": "SWIFT",
                        "description": "Transferencia internacional SWIFT."
                      },
                      "destinationCurrency": {
                        "type": "string",
                        "pattern": "^[A-Z]{3,5}$",
                        "description": "Moneda que recibe el beneficiario."
                      },
                      "beneficiaryName": {
                        "type": "string",
                        "minLength": 1,
                        "description": "Nombre o razón social del beneficiario."
                      },
                      "beneficiaryLastName": {
                        "description": "Apellido del beneficiario.",
                        "type": "string"
                      },
                      "typeBeneficiary": {
                        "type": "string",
                        "enum": [
                          "INDIVIDUAL",
                          "COMPANY"
                        ],
                        "description": "Persona natural (INDIVIDUAL) o empresa (COMPANY)."
                      },
                      "email": {
                        "description": "Correo del beneficiario.",
                        "type": "string",
                        "maxLength": 100,
                        "format": "email",
                        "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                      },
                      "countryCode": {
                        "type": "string",
                        "pattern": "^[A-Z]{2}$",
                        "description": "País ISO 3166-1 alfa-2."
                      },
                      "swiftCode": {
                        "type": "string",
                        "pattern": "^[A-Z]{4}[A-Z]{2}[A-Z0-9]{2}([A-Z0-9]{3})?$",
                        "description": "BIC de 8 u 11 caracteres."
                      },
                      "accountNumber": {
                        "type": "string",
                        "minLength": 1,
                        "description": "Número de cuenta internacional, como texto."
                      },
                      "documentNumber": {
                        "type": "string",
                        "maxLength": 30,
                        "description": "Número de documento del beneficiario, como texto."
                      },
                      "documentType": {
                        "type": "string",
                        "maxLength": 20,
                        "description": "Tipo de documento (RUT, DNI, PASSPORT…); los válidos por país salen de global66.documentos.listar."
                      }
                    },
                    "required": [
                      "operationType",
                      "destinationCurrency",
                      "beneficiaryName",
                      "typeBeneficiary",
                      "countryCode",
                      "swiftCode",
                      "accountNumber",
                      "documentNumber",
                      "documentType"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "operationType": {
                        "type": "string",
                        "const": "IBAN",
                        "description": "Transferencia a una cuenta IBAN."
                      },
                      "destinationCurrency": {
                        "type": "string",
                        "pattern": "^[A-Z]{3,5}$",
                        "description": "Moneda que recibe el beneficiario."
                      },
                      "beneficiaryName": {
                        "type": "string",
                        "minLength": 1,
                        "description": "Nombre o razón social del beneficiario."
                      },
                      "beneficiaryLastName": {
                        "description": "Apellido del beneficiario.",
                        "type": "string"
                      },
                      "typeBeneficiary": {
                        "type": "string",
                        "enum": [
                          "INDIVIDUAL",
                          "COMPANY"
                        ],
                        "description": "Persona natural (INDIVIDUAL) o empresa (COMPANY)."
                      },
                      "email": {
                        "description": "Correo del beneficiario.",
                        "type": "string",
                        "maxLength": 100,
                        "format": "email",
                        "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                      },
                      "countryCode": {
                        "type": "string",
                        "pattern": "^[A-Z]{2}$",
                        "description": "País ISO 3166-1 alfa-2."
                      },
                      "iban": {
                        "type": "string",
                        "maxLength": 34,
                        "pattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{1,30}$",
                        "description": "IBAN del beneficiario."
                      },
                      "documentNumber": {
                        "type": "string",
                        "maxLength": 30,
                        "description": "Número de documento del beneficiario, como texto."
                      },
                      "documentType": {
                        "type": "string",
                        "maxLength": 20,
                        "description": "Tipo de documento (RUT, DNI, PASSPORT…); los válidos por país salen de global66.documentos.listar."
                      }
                    },
                    "required": [
                      "operationType",
                      "destinationCurrency",
                      "beneficiaryName",
                      "typeBeneficiary",
                      "countryCode",
                      "iban",
                      "documentNumber"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "operationType": {
                        "type": "string",
                        "const": "PIX",
                        "description": "PIX en Brasil."
                      },
                      "destinationCurrency": {
                        "type": "string",
                        "pattern": "^[A-Z]{3,5}$",
                        "description": "Moneda que recibe el beneficiario."
                      },
                      "beneficiaryName": {
                        "type": "string",
                        "minLength": 1,
                        "description": "Nombre o razón social del beneficiario."
                      },
                      "beneficiaryLastName": {
                        "description": "Apellido del beneficiario.",
                        "type": "string"
                      },
                      "typeBeneficiary": {
                        "type": "string",
                        "enum": [
                          "INDIVIDUAL",
                          "COMPANY"
                        ],
                        "description": "Persona natural (INDIVIDUAL) o empresa (COMPANY)."
                      },
                      "email": {
                        "description": "Correo del beneficiario.",
                        "type": "string",
                        "maxLength": 100,
                        "format": "email",
                        "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                      },
                      "countryCode": {
                        "type": "string",
                        "pattern": "^[A-Z]{2}$",
                        "description": "País ISO 3166-1 alfa-2."
                      },
                      "pixKeyType": {
                        "type": "string",
                        "enum": [
                          "EVP",
                          "DOCUMENT_NUMBER",
                          "EMAIL",
                          "PHONE"
                        ],
                        "description": "Tipo de llave PIX."
                      },
                      "pixKeyValue": {
                        "type": "string",
                        "maxLength": 77,
                        "description": "Valor de la llave PIX."
                      },
                      "documentNumber": {
                        "type": "string",
                        "maxLength": 30,
                        "description": "Número de documento del beneficiario, como texto."
                      },
                      "documentType": {
                        "type": "string",
                        "enum": [
                          "CPF",
                          "CNPJ"
                        ],
                        "description": "CPF o CNPJ."
                      }
                    },
                    "required": [
                      "operationType",
                      "destinationCurrency",
                      "beneficiaryName",
                      "typeBeneficiary",
                      "countryCode",
                      "pixKeyType",
                      "pixKeyValue",
                      "documentNumber",
                      "documentType"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "operationType": {
                        "type": "string",
                        "const": "STABLECOINS",
                        "description": "Envío a una billetera de stablecoins."
                      },
                      "destinationCurrency": {
                        "type": "string",
                        "pattern": "^[A-Z]{3,5}$",
                        "description": "Moneda que recibe el beneficiario."
                      },
                      "beneficiaryName": {
                        "type": "string",
                        "minLength": 1,
                        "description": "Nombre o razón social del beneficiario."
                      },
                      "beneficiaryLastName": {
                        "description": "Apellido del beneficiario.",
                        "type": "string"
                      },
                      "typeBeneficiary": {
                        "type": "string",
                        "enum": [
                          "INDIVIDUAL",
                          "COMPANY"
                        ],
                        "description": "Persona natural (INDIVIDUAL) o empresa (COMPANY)."
                      },
                      "email": {
                        "description": "Correo del beneficiario.",
                        "type": "string",
                        "maxLength": 100,
                        "format": "email",
                        "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                      },
                      "stablecoin": {
                        "type": "string",
                        "enum": [
                          "USDC",
                          "USDT",
                          "PYUSD"
                        ],
                        "description": "Stablecoin."
                      },
                      "network": {
                        "type": "string",
                        "minLength": 1,
                        "description": "Red, por ejemplo SOLANA o ETHEREUM."
                      },
                      "walletAddress": {
                        "type": "string",
                        "minLength": 1,
                        "description": "Dirección de la billetera en la red indicada."
                      }
                    },
                    "required": [
                      "operationType",
                      "destinationCurrency",
                      "beneficiaryName",
                      "typeBeneficiary",
                      "stablecoin",
                      "network",
                      "walletAddress"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "operationType": {
                        "type": "string",
                        "const": "BREB",
                        "description": "Llave Bre-B en Colombia."
                      },
                      "destinationCurrency": {
                        "type": "string",
                        "pattern": "^[A-Z]{3,5}$",
                        "description": "Moneda que recibe el beneficiario."
                      },
                      "beneficiaryName": {
                        "type": "string",
                        "minLength": 1,
                        "description": "Nombre o razón social del beneficiario."
                      },
                      "beneficiaryLastName": {
                        "description": "Apellido del beneficiario.",
                        "type": "string"
                      },
                      "typeBeneficiary": {
                        "type": "string",
                        "enum": [
                          "INDIVIDUAL",
                          "COMPANY"
                        ],
                        "description": "Persona natural (INDIVIDUAL) o empresa (COMPANY)."
                      },
                      "email": {
                        "description": "Correo del beneficiario.",
                        "type": "string",
                        "maxLength": 100,
                        "format": "email",
                        "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                      },
                      "countryCode": {
                        "type": "string",
                        "const": "CO",
                        "description": "Bre-B solo existe en Colombia."
                      },
                      "keyValue": {
                        "type": "string",
                        "maxLength": 92,
                        "description": "Llave Bre-B: celular, correo, documento o alfanumérica."
                      },
                      "documentType": {
                        "type": "string",
                        "maxLength": 20,
                        "description": "Tipo de documento (RUT, DNI, PASSPORT…); los válidos por país salen de global66.documentos.listar."
                      },
                      "documentNumber": {
                        "type": "string",
                        "maxLength": 30,
                        "description": "Número de documento del beneficiario, como texto."
                      }
                    },
                    "required": [
                      "operationType",
                      "destinationCurrency",
                      "beneficiaryName",
                      "typeBeneficiary",
                      "countryCode",
                      "keyValue"
                    ]
                  }
                ],
                "description": "Beneficiario de la remesa; operationType decide los campos. Global66 no permite crear beneficiarios por API: estos datos viajan en cada pago."
              }
            },
            "required": [
              "transactionType",
              "cuentaOrigenId",
              "amount",
              "way",
              "paymentType",
              "purposeCode",
              "beneficiary"
            ]
          },
          {
            "type": "object",
            "properties": {
              "transactionType": {
                "type": "string",
                "const": "P2P",
                "description": "Pago a otro usuario de Global66."
              },
              "cuentaOrigenId": {
                "type": "string",
                "pattern": "^\\d{1,10}$",
                "description": "accountId (walletId) de la cuenta de origen, de global66.saldos.consultar. Se comprueba que pertenezca a la conexión."
              },
              "amount": {
                "type": "number",
                "minimum": 0,
                "description": "Monto en la moneda de origen (way ORIGIN) o en la de destino (way DESTINY)."
              },
              "way": {
                "type": "string",
                "enum": [
                  "ORIGIN",
                  "DESTINY"
                ],
                "description": "ORIGIN: amount es lo que se envía. DESTINY: amount es lo que recibe el beneficiario."
              },
              "description": {
                "description": "Glosa para el proveedor de pago; máximo 66 caracteres.",
                "type": "string",
                "maxLength": 66
              },
              "paymentType": {
                "type": "string",
                "enum": [
                  "WIRE_TRANSFER",
                  "SWIFT",
                  "BREB"
                ],
                "description": "Riel de pago; los válidos para un destino salen de global66.medios_pago.listar."
              },
              "operationType": {
                "type": "string",
                "const": "P2P",
                "description": "Siempre P2P."
              },
              "destinationCurrency": {
                "type": "string",
                "pattern": "^[A-Z]{3,5}$",
                "description": "Código de moneda ISO 4217 o de Global66 (3 a 5 letras mayúsculas)."
              },
              "purposeCode": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "description": "IDs de propósito."
              },
              "beneficiary": {
                "type": "object",
                "properties": {
                  "username": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Usuario Global66 del destinatario."
                  },
                  "typeBeneficiary": {
                    "type": "string",
                    "enum": [
                      "INDIVIDUAL",
                      "COMPANY"
                    ],
                    "description": "Persona natural (INDIVIDUAL) o empresa (COMPANY)."
                  }
                },
                "required": [
                  "username",
                  "typeBeneficiary"
                ],
                "description": "Destinatario P2P."
              }
            },
            "required": [
              "transactionType",
              "cuentaOrigenId",
              "amount",
              "way",
              "paymentType",
              "operationType",
              "destinationCurrency",
              "purposeCode",
              "beneficiary"
            ]
          },
          {
            "type": "object",
            "properties": {
              "transactionType": {
                "type": "string",
                "const": "EXCHANGE",
                "description": "Cambio de divisas entre cuentas propias."
              },
              "cuentaOrigenId": {
                "type": "string",
                "pattern": "^\\d{1,10}$",
                "description": "accountId (walletId) de la cuenta de origen, de global66.saldos.consultar. Se comprueba que pertenezca a la conexión."
              },
              "amount": {
                "type": "number",
                "minimum": 0,
                "description": "Monto en la moneda de origen (way ORIGIN) o en la de destino (way DESTINY)."
              },
              "way": {
                "type": "string",
                "enum": [
                  "ORIGIN",
                  "DESTINY"
                ],
                "description": "ORIGIN: amount es lo que se envía. DESTINY: amount es lo que recibe el beneficiario."
              },
              "description": {
                "description": "Glosa para el proveedor de pago; máximo 66 caracteres.",
                "type": "string",
                "maxLength": 66
              },
              "paymentType": {
                "type": "string",
                "enum": [
                  "WIRE_TRANSFER",
                  "SWIFT",
                  "BREB"
                ],
                "description": "Riel de pago; los válidos para un destino salen de global66.medios_pago.listar."
              },
              "operationType": {
                "type": "string",
                "const": "EXCHANGE",
                "description": "Siempre EXCHANGE."
              },
              "destinationCurrency": {
                "type": "string",
                "pattern": "^[A-Z]{3,5}$",
                "description": "Código de moneda ISO 4217 o de Global66 (3 a 5 letras mayúsculas)."
              }
            },
            "required": [
              "transactionType",
              "cuentaOrigenId",
              "amount",
              "way",
              "paymentType",
              "operationType",
              "destinationCurrency"
            ]
          }
        ],
        "description": "Pago según el contrato oficial de Global66; transactionType decide los campos."
      },
      "raas": {
        "default": false,
        "description": "True si se ejecutará por global66.pago_raas.ejecutar.",
        "type": "boolean"
      },
      "remitter": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 255,
            "description": "Nombre o razón social del remitente final."
          },
          "identificationNumber": {
            "type": "string",
            "maxLength": 50,
            "description": "Documento del remitente (RUT en Chile, NIT/CC en Colombia), como texto."
          },
          "identificationType": {
            "type": "string",
            "maxLength": 50,
            "description": "Tipo de documento del remitente."
          },
          "countryCode": {
            "type": "string",
            "pattern": "^[A-Z]{2}$",
            "description": "País ISO 3166-1 alfa-2."
          },
          "accountType": {
            "description": "Tipo de cuenta del remitente.",
            "type": "string",
            "maxLength": 50
          },
          "address": {
            "description": "Dirección del remitente.",
            "type": "string",
            "maxLength": 255
          },
          "city": {
            "description": "Ciudad del remitente.",
            "type": "string",
            "maxLength": 100
          },
          "contactNumber": {
            "description": "Teléfono con código de país.",
            "type": "string",
            "maxLength": 50
          },
          "email": {
            "description": "Correo del remitente.",
            "type": "string",
            "maxLength": 100,
            "format": "email",
            "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
          }
        },
        "required": [
          "name",
          "identificationNumber",
          "identificationType"
        ],
        "description": "Remitente final (RaaS). Solo en global66.pago_raas.ejecutar y solo para REMITTANCE por WIRE_TRANSFER a una cuenta bancaria en corredores habilitados."
      },
      "voucherSha256": {
        "description": "SHA-256 del voucher que se adjuntará, si hay.",
        "type": "string",
        "pattern": "^[0-9a-f]{64}$"
      }
    },
    "required": [
      "pago"
    ]
  }
  ```
</details>

## Salida [#salida]

| Campo                     | Tipo            | Requerido | Descripción                                         |                                                                                                                              |
| ------------------------- | --------------- | --------- | --------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| `valido`                  | booleano        | sí        | True si Global66 no encontró errores.               |                                                                                                                              |
| `violaciones`             | lista de objeto | sí        | Errores y advertencias de Global66.                 |                                                                                                                              |
| `violaciones[].source`    | string          | null      | sí                                                  | Sección donde falló: REQUEST, BENEFICIARY, ROUTES, VOUCHER, WALLET…                                                          |
| `violaciones[].field`     | string          | null      | sí                                                  | Campo que falló.                                                                                                             |
| `violaciones[].rule`      | string          | null      | sí                                                  | Regla incumplida, por ejemplo NOT\_NULL.                                                                                     |
| `violaciones[].severity`  | string          | null      | sí                                                  | ERROR, WARNING o INFO.                                                                                                       |
| `violaciones[].message`   | string          | null      | sí                                                  | Explicación de Global66.                                                                                                     |
| `resumen`                 | objeto          | sí        | Lo que se va a ejecutar; confírmalo con la persona. |                                                                                                                              |
| `resumen.cuentaOrigenId`  | string          | sí        | Cuenta de origen.                                   |                                                                                                                              |
| `resumen.monedaOrigen`    | string          | sí        | Moneda de la cuenta de origen.                      |                                                                                                                              |
| `resumen.transactionType` | string          | sí        | REMITTANCE, P2P o EXCHANGE.                         |                                                                                                                              |
| `resumen.monto`           | número          | sí        | amount del pago.                                    |                                                                                                                              |
| `resumen.way`             | string          | sí        | ORIGIN o DESTINY.                                   |                                                                                                                              |
| `resumen.monedaDestino`   | string          | null      | sí                                                  | Moneda que recibe el destino.                                                                                                |
| `resumen.beneficiario`    | string          | null      | sí                                                  | Nombre, usuario o cuenta destino resumidos.                                                                                  |
| `preparacionId`           | string          | null      | sí                                                  | Pásalo tal cual al ejecutar, con el MISMO pago. null si el pago no es válido.                                                |
| `externalReferenceId`     | string          | null      | sí                                                  | Referencia que se enviará a Global66 al ejecutar; consulta su estado con global66.pago.estado. null si el pago no es válido. |
| `expiraEn`                | string          | null      | sí                                                  | Instante ISO 8601 con Z en que la preparación deja de servir para una primera ejecución.                                     |

<details>
  <summary>
    JSON Schema de salida
  </summary>

  ```json
  {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "valido": {
        "type": "boolean",
        "description": "True si Global66 no encontró errores."
      },
      "violaciones": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "source": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Sección donde falló: REQUEST, BENEFICIARY, ROUTES, VOUCHER, WALLET…"
            },
            "field": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Campo que falló."
            },
            "rule": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Regla incumplida, por ejemplo NOT_NULL."
            },
            "severity": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "ERROR, WARNING o INFO."
            },
            "message": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Explicación de Global66."
            }
          },
          "required": [
            "source",
            "field",
            "rule",
            "severity",
            "message"
          ],
          "additionalProperties": false,
          "description": "Violación informada por Global66."
        },
        "description": "Errores y advertencias de Global66."
      },
      "resumen": {
        "type": "object",
        "properties": {
          "cuentaOrigenId": {
            "type": "string",
            "description": "Cuenta de origen."
          },
          "monedaOrigen": {
            "type": "string",
            "description": "Moneda de la cuenta de origen."
          },
          "transactionType": {
            "type": "string",
            "description": "REMITTANCE, P2P o EXCHANGE."
          },
          "monto": {
            "type": "number",
            "description": "amount del pago."
          },
          "way": {
            "type": "string",
            "description": "ORIGIN o DESTINY."
          },
          "monedaDestino": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Moneda que recibe el destino."
          },
          "beneficiario": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Nombre, usuario o cuenta destino resumidos."
          }
        },
        "required": [
          "cuentaOrigenId",
          "monedaOrigen",
          "transactionType",
          "monto",
          "way",
          "monedaDestino",
          "beneficiario"
        ],
        "additionalProperties": false,
        "description": "Lo que se va a ejecutar; confírmalo con la persona."
      },
      "preparacionId": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "description": "Pásalo tal cual al ejecutar, con el MISMO pago. null si el pago no es válido."
      },
      "externalReferenceId": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "description": "Referencia que se enviará a Global66 al ejecutar; consulta su estado con global66.pago.estado. null si el pago no es válido."
      },
      "expiraEn": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "description": "Instante ISO 8601 con Z en que la preparación deja de servir para una primera ejecución."
      }
    },
    "required": [
      "valido",
      "violaciones",
      "resumen",
      "preparacionId",
      "externalReferenceId",
      "expiraEn"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Errores de esta tool [#errores-de-esta-tool]

| Código                           | HTTP | Reintentable | Qué hacer                                                                                                                                                                                |
| -------------------------------- | ---- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `connection_disabled`            | 403  | no           | Reactívala en /connections o usa otra conexión del mismo sistema.                                                                                                                        |
| `connection_not_found`           | 404  | no           | Usa uno de los connectionId que lista el error, o revisa la conexión en /connections. No hace falta reactivar nada.                                                                      |
| `connection_credential_required` | 428  | no           | Crea un enlace con conexiones.enlace.crear (modo reconectar si la conexión ya existe) y pide a la persona que entregue la credencial de nuevo. No reintentes con la credencial anterior. |
| `connection_busy`                | 409  | sí           | Espera unos segundos y reintenta. Es una espera transitoria: no necesitas volver a conectar ni ingresar la credencial otra vez.                                                          |
| `upstream_error`                 | 502  | sí           | Reintenta más tarde. Si persiste, el problema está en el sistema externo, no en tu integración.                                                                                          |
| `timeout`                        | 504  | sí           | Reintenta. Para sincronizaciones largas usa la vía asíncrona y consulta el estado del trabajo.                                                                                           |

Toda llamada puede devolver además los códigos transversales (`validation_error`, `unauthorized`, `scope_not_granted`, `rate_limited`, entre otros): el detalle vive en el [catálogo de errores](/docs/referencia/errores).
