Skip to content

SriEmitirNota

Issues a Credit Note (type 04) or a Debit Note (type 05) to Ecuador’s SRI. Both reference the modified document (docModificado: type, number and date of the original invoice). The node builds the XML, computes the access key, signs it and runs the same two-step flow as an invoice: reception and authorization.

The Credit Note carries items (just like an invoice, to void or correct amounts); the Debit Note carries motivos[] (reason and amount) for additional charges on the original document.

FieldTypeRequiredDescription
credentials_idcredentialsYesSRI credential
notajsonNoNote JSON: tipo (04 credit, 05 debit), comprador, docModificado (tipo, numero, fecha). The credit note carries items; the debit note carries motivos[] (razon, valor). If omitted, the previous node’s input is used

This module requires an sri credential type with the following fields:

  • Certificate (.p12): the issuer’s digital certificate, PKCS#12 format
  • Certificate password: password to open the .p12 file
  • RUC: issuer’s tax ID (13 digits)
  • Environment: pruebas (testing) or producción (production)
{
"claveAcceso": "0512202504179001234500110010010000000021234567822",
"tipo": "04",
"estado": "authorized",
"numeroAutorizacion": "0512202504179001234500110010010000000021234567822",
"docModificado": { "tipo": "01", "numero": "001-001-000000001" },
"total": 100.00,
"xml": "<?xml version=\"1.0\"?><autorizacion>...</autorizacion>"
}
{
"credentials_id": "cred-sri-prod",
"nota": {
"tipo": "04",
"comprador": {
"tipoIdentificacion": "05",
"identificacion": "1712345678",
"razonSocial": "Juan Pérez"
},
"docModificado": {
"tipo": "01",
"numero": "001-001-000000001",
"fecha": "2025-12-01"
},
"motivo": "Product return",
"items": [
{
"codigo": "0001",
"descripcion": "Cotton shirt, size M",
"cantidad": 1,
"precioUnitario": 100.00,
"codigoPorcentajeIva": 4
}
]
}
}
{
"credentials_id": "cred-sri-prod",
"nota": {
"tipo": "05",
"comprador": {
"tipoIdentificacion": "04",
"identificacion": "1790012345001",
"razonSocial": "Comercial Andina S.A."
},
"docModificado": {
"tipo": "01",
"numero": "001-001-000000002",
"fecha": "2025-12-01"
},
"motivos": [
{ "razon": "Late payment interest", "valor": 12.50 }
]
}
}
  • motivo (Credit Note) and docModificado are mandatory; without the referenced document the SRI rejects the note.
  • Just like the invoice, the note is only valid once the SRI AUTHORIZES it.
  • If the note is left IN PROCESSING, reconcile its status with SriConsultarAutorizacion.