AfipRepresentacion
Description
Section titled “Description”Generates the printable representation of an AFIP voucher (invoice or note) with the mandatory QR code (RG 4291/2018). It takes the output of the AfipCreateInvoice or AfipCreditNote node (number, CAE, total) and returns a self-contained HTML, printable to PDF. The QR is computed client-side, without calling the SDK.
Configuration
Section titled “Configuration”| Field | Type | Required | Description |
|---|---|---|---|
| credentials_id | credentials | No | AFIP credential (to take the issuer CUIT) |
| voucher_type | number | No | Voucher type (1/6/11…) |
| point_of_sale | number | No | Point of sale |
| voucher_number | number | Yes | Issued voucher number |
| cae | text | Yes | CAE returned by AFIP |
| cae_fch_vto | text | No | CAE due date (YYYYMMDD) |
| total_amount | number | Yes | Total amount |
| doc_type | number | No | Receiver document type |
| doc_number | text | No | Receiver document number |
| issue_date | text | No | Date (YYYYMMDD) |
| currency | select | No | PES=Pesos, DOL=Dollars |
Output
Section titled “Output”{ "html": "<!DOCTYPE html>...", "qrUrl": "https://www.afip.gob.ar/fe/qr/?p=eyJ2ZXIiOjEs...", "qrImage": "data:image/png;base64,...", "qrData": { "ver": 1, "cuit": 30000000007, "codAut": 71234567890123, "...": "..." }, "voucher_number": 42, "cae": "71234567890123"}The AFIP QR
Section titled “The AFIP QR”The QR contains a URL https://www.afip.gob.ar/fe/qr/?p={base64} where the encoded JSON carries: version, date, issuer CUIT, point of sale, voucher type and number, amount, currency, exchange rate, receiver document type and number, and the CAE (tipoCodAut: "E", codAut). Anyone can verify the voucher by scanning it.
Typical Flow
Section titled “Typical Flow”- AfipCreateInvoice — issues the invoice and returns the CAE
- AfipRepresentacion — generates the HTML with the QR (chains the previous step’s
data) - Save/send the PDF (by printing the HTML)
- The QR is mandatory in the printed representation since RG 4291/2018.
- The issuer CUIT is taken from the credential if the
cuitfield is not provided. - It does not call the SDK: the QR and HTML are generated locally.
Related Nodes
Section titled “Related Nodes”- AfipCreateInvoice - Issue invoice
- AfipCreditNote - Credit/debit note