Document Flows
How TicoSync chooses FE, TE, FEE, and credit notes, what triggers each flow, and what customers receive.
Document Types
| Type | When TicoSync Uses It | Customer Delivery |
|---|---|---|
| Factura Electronica (FE) | Costa Rica domestic orders that require a full invoice, including B2B orders or consumer orders with a customer cedula. | PDF + signed XML + accepted XML when accepted. |
| Tiquete Electronico (TE) | Consumer orders without a customer cedula when the TE flow is enabled. | Not part of the customer email flow. |
| Factura Electronica de Exportacion (FEE) | Any order whose country code is outside Costa Rica. | PDF only when accepted. |
| Nota de Credito (NC) | Refunds, returns, cancellations, and supported partial refunds after the original document was accepted. | PDF + signed XML + accepted XML when accepted. |
How FE and TE Differ
- A TE clave can be created quickly on order creation for eligible consumer orders.
- The full FE or TE Hacienda submission runs from fulfillment and only includes fulfilled items in the document.
- If a customer cedula is present before fulfillment, an order that would have been TE can upgrade into FE.
How Export Invoices Work
- If the order country code is not CR, TicoSync creates Factura Electronica de Exportacion, except POS orders which stay on the domestic FE/TE flow.
- Export identity uses customer metafield ticosync.tax_id first, then falls back through billing phone, shipping phone, order phone, and customer phone.
- Goods lines use CABYS plus Shopify HS code to build Partida Arancelaria.
- Customer emails for export send only the PDF, even though Hacienda XML is still generated and submitted.
Credit Notes
- Credit notes are generated after refunds, returns, cancellations, and supported partial refunds.
- The original Hacienda document must already be accepted before the credit note flow can complete.
- Export-origin credit notes use the same export receiver identity and include Partida Arancelaria when required.
Operational Notes
TicoSync tracks accepted and rejected main documents separately from accepted and rejected credit notes. If the main document is already accepted but the credit note is rejected, the note can be rebuilt without touching the accepted original document.