Actions10
Preview Invoice
AI-generatedSummary
Validate a Mexican CFDI 4.0 invoice and calculate its totals without stamping it with the SAT, by POSTing to /agent/facturas/preview. The node's description says this is at no cost, so use it before Issue CFDI.
Inputs
- conceptos (required) — Line Items (JSON): array of CFDI conceptos. Each has descripcion, clave_prodserv, clave_unidad, cantidad, valor_unitario and precio_incluye_iva. Sent as body property
conceptos. - cliente — Customer (JSON): CFDI recipient with rfc, nombre, regimen_fiscal, cp and uso_cfdi (default G03). The parameter description says you can pass cliente_id of a saved customer instead. Sent as body
cliente. - metodo_pago — SAT payment method: PUE (single payment, default) or PPD (installments/credit).
- forma_pago — SAT payment form code, default 03 (transfer). Others include 01 cash and 04 credit card.
- requestOptions — Node setting for request behavior: batching (items per batch, interval), ignore SSL issues, proxy, and timeout (default 10000 ms).
Output shape
The JSON response from the Notsy API's preview endpoint. By its description, this holds the validation result and calculated totals. The source declares no response fields.
The exact response fields aren't defined in the node source. Nothing is stamped or issued. The request needs the notsyApi credential. The JSON fields are sent as written, so invalid JSON or invalid SAT values will probably surface as an API error or validation result.
Examples
Example 1: Check totals for a consulting invoice before issuing it
Operation: Preview Invoice; conceptos with one item (clave_prodserv 80101500, clave_unidad E48, valor_unitario 1000, precio_incluye_iva false); cliente with rfc, nombre, regimen_fiscal, cp; metodo_pago PUE; forma_pago 03.
Example 2: Preview a credit sale
metodo_pago PPD, forma_pago set as needed, conceptos built from upstream data with an expression.