FISCALISTO / API / REFERENCE
Self-invoicing
Receipts your buyers invoice themselves on the issuer's portal.
Guide to Self-invoicing: what each endpoint is for, step by step and with examples.
Objects
The object Ticket
- Ticket
A sale your buyer can invoice themselves in the issuer's portal (self-invoicing).
id*stringObject identifier, with its prefix (iss_, inv_, ret_, cus_, prd_, emp_, bat_, brn_, whs_, stm_, adj_, evt_, whe_).
livemode*booleantrue in production (fk_live_ keys), false in test mode (fk_test_). Test objects aren't valid before the SAT.
object*stringWhat kind of object it is («invoice», «customer»…).
issuer*stringThe issuer that sold.
folio*stringThe sale's folio in your system.
code*stringWhat your buyer types in the portal along with the total: the folio and 4 random characters (A123-K7QX). Print it on the ticket or send it with the purchase.
status*stringpending (can be invoiced), invoiced (your buyer invoiced it: the invoice in invoice), global (it went into the period's global invoice) or cancelled.
"pending""invoiced""global""cancelled"url*|The portal page with the ticket's code (c) and total (t): the portal finds it on its own and the buyer only gives their details. Anyone with the link can invoice the ticket: give it only to the buyer (like the printed ticket). You can embed it with fiscalisto.js. null if it is no longer pending.
total*numberWhat was charged, taxes included and without tip.
tip*numberThe tip (it doesn't go on the invoice).
payment_form*stringThe sale's c_FormaPago.
description*stringThe invoice's line item (the first one, if it has several).
product_key*stringThe line item's c_ClaveProdServ (the first one, if it has several).
lines*array<>Its line items, in order: just one if it was recorded without lines. Each with its product (prd_… or null), description, SAT codes, IVA (null if not subject to tax), units and what was charged for it, taxes included.
sold_at*stringWhen it was sold.
date-timeinvoiceable_until*stringThe last day (YYYY-MM-DD) the buyer can invoice it; after that it goes into the global invoice.
invoice*|The invoice (inv_…) your buyer made, or null.
global_invoice*|The global invoice (inv_…) it went into, or null.
invoiced_amount*numberWhat the invoices of a receipt split into several already cover (self-invoicing allows it with split_max), taxes included. 0 if it hasn't been split; a pending receipt above 0 has total - invoiced_amount left to invoice with the same code, and a split invoiced receipt has invoice null.
customer*|Who it was invoiced to, or null.
branch*|The branch (brn_…) where the sale was made, or null (the Matriz). Its invoice is stamped from there and the portal shows its name and logo.
buyer*|Who paid, as the sale's source knows them (the buyer you sent, or the customer of a Stripe payment). It isn't the invoice's recipient (customer).
created_at*|When it was recorded.
Example Ticket
{ "id": "tkt_OufpKqnrvx9p6hW1yQbT3mZr8sKdLx0VeN", "object": "ticket", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "folio": "A1042", "code": "A1042-K7QX", "status": "pending", "url": "https://fiscalisto.com/autofactura/Tx8mQ2vLp9WnR4c?c=A1042-K7QX&t=580", "total": 580, "tip": 0, "payment_form": "04", "description": "Consumo de alimentos", "product_key": "90101501", "lines": [ { "product": null, "description": "Consumo de alimentos", "product_key": "90101501", "unit_key": "E48", "iva": "0.16", "local_taxes": [], "ieps": null, "ieps_factor": null, "detail": null, "quantity": 1, "total": 580 } ], "sold_at": "2026-10-24T14:32:00-06:00", "invoiceable_until": "2026-10-31", "invoice": null, "global_invoice": null, "invoiced_amount": 0, "customer": null, "branch": null, "buyer": { "name": "Laura Méndez", "email": "laura@example.com" }, "created_at": "2026-10-24T14:32:05-06:00"}The object SelfInvoicing
- SelfInvoicing
An issuer's self-invoicing portal and its rules.
object*stringWhat kind of object it is («invoice», «customer»…).
livemode*booleantrue in production (fk_live_ keys), false in test mode (fk_test_). Test objects aren't valid before the SAT.
issuer*stringThe issuer.
portal_url*stringThe issuer's permanent portal: there any buyer invoices with their code and total.
window*stringmonth: it can be invoiced until the end of the sale's month. days: until window_days days after.
"month""days"window_days*integerDays to invoice with window: days.
-9007199254740991 <= value <= 9007199254740991global_periodicity*stringHow often the global invoice is stamped on its own with what nobody invoiced: 01 daily, 02 weekly, 03 biweekly, 04 monthly.
"01""02""03""04"global_invoice*stringauto: tickets nobody invoiced go on their own to their period's global invoice. off: Fiscalisto doesn't make a global invoice for these tickets (you make it elsewhere).
"auto""off"ask_total*booleanWhether the portal asks for the total to find the ticket (true) or only its code (false).
portal_title*|The portal's title, or null for «Facture su ticket».
portal_message*|The message under the title, or null.
code_hint*|Where the buyer finds their code, under the field; null for Fiscalisto's text.
portal_theme*stringauto: the theme of the buyer's device, which they can change. light or dark: always that one, on the portal page, its QRs and inside your site.
"auto""light""dark"portal_accent*|The portal's button color («#rrggbb»), or null for Fiscalisto's.
portal_radius*|The portal's corners in pixels (0 to 24), or null for Fiscalisto's.
portal_style*How the portal looks besides its theme, color and corners: layout, header, colors, font, texts, ways to give the details, back button and CSS.
invoice_concepts*Broken down, in a single line item or by the empresa's groups, and what the buyer can choose (Autofactura › Conceptos de la factura).
retention_mode*stringWhen invoicing a persona moral that withholds (1.25% ISR in RESICO, or the product's). keep_total: the base grows and the invoice adds up to what was paid. subtract: the base is the ticket's and the total is what was paid minus the withholding.
"keep_total""subtract"invoice_series*|The series for invoices issued from the portal and from a ticket, like AF, or null for the issuer's invoice series. The global invoice doesn't use it.
customer_notes*booleantrue: the portal asks the buyer for a note for their invoice's PDF (up to 500 characters). It only appears on the PDF, never in the XML.
failure_email*booleantrue: when a buyer can't invoice because of something on the issuer's side, an email goes out; false: it only stays in Alertas.
split_max*integerThe most invoices a receipt can have (splitting a receipt into several invoices), counting the one that takes all that's left; 0: it can't be split.
-9007199254740991 <= value <= 9007199254740991split_min*numberThe least each invoice of a split receipt can be, taxes included; less can't be left to invoice either, except by the invoice that takes all that's left.
split_same*booleantrue: a buyer can make several invoices with the same details at once (4 of 250 from a 1,000 receipt).
global_concepts*stringticket: the global invoice carries one «Venta» line item per ticket, with its folio. summary: only the period's total amount, one per tax combination (NoIdentificacion «Resumen»), for a persona física in RESICO (rule 2.7.1.21 of the RMF 2026).
"ticket""summary"Example SelfInvoicing
{ "object": "self_invoicing", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "portal_url": "https://fiscalisto.com/autofactura/Tx8mQ2vLp9WnR4c", "window": "month", "window_days": 7, "global_periodicity": "04", "global_invoice": "auto", "ask_total": true, "portal_title": null, "portal_message": null, "code_hint": null, "portal_theme": "auto", "portal_accent": "#0b7c77", "portal_radius": null, "portal_style": { "layout": "checkout", "density": "comfortable", "header": "name_rfc", "logo_size": "m", "logo_shape": "rounded", "font": "system", "heading_font": null, "heading_size": "m", "borders": "subtle", "shadow": "soft", "ways": { "constancia": true, "qr": true, "cif": true, "recall": true, "abroad": true, "norfc": false }, "email_required": false, "show_deadline": true, "back": null, "css": "", "colors": { "background": null, "card": null, "text": null, "button_text": null }, "noun": "ticket", "texts": {} }, "retention_mode": "keep_total", "invoice_series": null, "customer_notes": false, "failure_email": true, "split_max": 4, "split_min": 100, "split_same": true, "global_concepts": "ticket", "invoice_concepts": { "mode": "itemized", "customer_choice": true, "customer_options": [ "itemized", "single", "grouped" ], "description": "Consumo", "product_key": null, "unit_key": null, "groups": [ { "name": "Alimentos y bebidas", "product_key": "90101501", "unit_key": "E48", "sat_keys": [ "901015" ], "categories": [] }, { "name": "Hospedaje", "product_key": null, "unit_key": null, "sat_keys": [], "categories": [ "Hotel › Habitaciones" ] } ], "ungrouped": "group", "ungrouped_name": "Otros servicios", "line_detail": "customer" }}Was this page helpful?