SriRIDE
Description
Section titled “Description”Generates the RIDE (printable representation of the electronic document) for an Ecuador SRI document, with its QR code computed from the access key. It can take an already-issued document by passing its clave_acceso (the node fetches the stored data from the database) or preview a hand-built document by passing comprobante as JSON. Returns self-contained HTML, ready to print to PDF.
Configuration
Section titled “Configuration”| Field | Type | Required | Description |
|---|---|---|---|
| credentials_id | credentials | Yes | SRI credential |
| clave_acceso | text | No | Access key (49 digits) of the issued document (fetches data from the database) |
| comprobante | json | No | Document JSON to preview (if no clave_acceso is provided) |
Credentials
Section titled “Credentials”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) orproducción(production)
Output
Section titled “Output”{ "claveAcceso": "0512202501179001234500110010010000000011234567811", "html": "<!DOCTYPE html>...", "qrImage": "data:image/png;base64,...", "numeroAutorizacion": "0512202501179001234500110010010000000011234567811"}Usage Example
Section titled “Usage Example”RIDE for an already-authorized document (by access key)
Section titled “RIDE for an already-authorized document (by access key)”{ "credentials_id": "cred-sri-prod", "clave_acceso": "0512202501179001234500110010010000000011234567811"}Preview of a hand-built document
Section titled “Preview of a hand-built document”{ "credentials_id": "cred-sri-prod", "comprobante": { "tipo": "01", "comprador": { "identificacion": "9999999999999", "razonSocial": "CONSUMIDOR FINAL" }, "items": [ { "descripcion": "Cotton shirt, size M", "cantidad": 1, "precioUnitario": 100.00 } ], "totals": { "totalSinImpuestos": 100.00, "totalIva": 15.00, "importeTotal": 115.00 } }}- When
clave_accesois provided, the node fetches the document’s stored data (issuer, buyer, totals) from the store and builds the RIDE with that real information. - Without
clave_acceso,comprobante(or the previous node’s input) is used for a preview; the document must include at leastitems. - The QR is generated locally from the access key; it does not require an additional call to the SRI.
- Chain it after SriEmitirFactura or SriEmitirNota to generate the RIDE as soon as the document is authorized.
Related Nodes
Section titled “Related Nodes”- SriEmitirFactura - Issue the invoice to represent
- SriEmitirNota - Issue the note to represent
- SriConsultarAutorizacion - Verify the status before generating the RIDE