> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.supay.dev/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.supay.dev/_mcp/server.

# Firmar XML

Firma cualquier XML con el certificado P12 activo del punto de venta, sin
emitir. Útil para flujos propios (como el [33 · Tasa Cero Ley 1613](/sectores/sectores-especiales/33-tasa-cero-ley-1613),
cuyo XML firmas tú) y para diagnóstico.

| Campo | Tipo   | Obligatorio | Qué significa  |
| ----- | ------ | ----------- | -------------- |
| `xml` | string | Sí          | XML sin firmar |

#### SDK TypeScript

```typescript
// Firma con el P12 del POS y devuelve el XML firmado
const firmado = await supay.siat.signXml({
  pointOfSaleId: pos.id,
  xml: "<xml-sin-firmar/>",
});
// firmado.xml
```

#### REST API

```bash
curl -s -X POST "$BASE/v1/siat/firma/$POS" \
  -H "X-API-Key: $KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "xml": "<xml-sin-firmar/>"
  }'
```

## Errores típicos

| Situación              | Respuesta      |
| ---------------------- | -------------- |
| Sin certificado activo | `409 CONFLICT` |
| POS de otro tenant     | `404`          |

Siguiente: [Enviar compras](/operaciones-siat/enviar-compras) · [Sincronización](/operaciones-siat/sincronizacion-de-catalogos).