Skip to content

FISCALISTO / API / REFERENCE

Change the self-invoicing rules · Self-invoicing

Open in ChatGPTOpen in ClaudeOpen in Cursor
POST
/v1/issuers/{id}/self_invoicing

Until when a receipt can be invoiced and how often the global invoice is stamped.

Authorization

bearerAuth
headerAuthorizationBearer <key>

Your secret key: fk_test_… in test mode, fk_live_… in production. Desarrolladores › Llaves.

Path parameters

id*string

The object's id.

Headers

Idempotency-Key?string

Optional (the SDKs send it on their own). If the response is lost, repeat the request with the same value within 24 hours: it answers the same, with idempotent-replayed: true, and doesn't do it twice (it doesn't create, send emails or charge).

Length1 <= length <= 255

Request body

application/json
  1. body
window?string

Until when a receipt can be invoiced: month, until the end of the sale's month (the usual with SAT); days, window_days days later.

One of"month""days"
window_days?integer

Days to invoice with window: days.

Range1 <= value <= 365
global_periodicity?string

c_Periodicidad of the global invoice with the receipts nobody invoiced: 01 daily, 02 weekly, 03 every two weeks, 04 monthly.

One of"01""02""03""04"
global_invoice?string

auto (the default): the receipts nobody invoiced go on their own into the global invoice when their period ends. off: Fiscalisto doesn't make a global invoice of the receipts (for example, because your point of sale already makes it); they stay pending and you answer for them before SAT.

One of"auto""off"
ask_total?boolean

true (the default): the buyer finds their receipt with the code and the total. false: with the code only (its 4 random characters; each receipt locks after several failed attempts).

portal_title?|

The portal's title, instead of «Facture su ticket». null removes it.

portal_message?|

A message under the title (instructions, hours, whom to write to). null removes it.

code_hint?|

Where the buyer finds their code, under the field («Viene en su correo de salida»). null sets Fiscalisto's.

portal_theme?string

The portal's theme: auto (the default), that of the buyer's device, which they can change; light or dark, always that one. It applies on its page, its QRs and inside your site (unless the embed code picks another).

One of"auto""light""dark"
portal_accent?|

The color of the portal's buttons, like #0b7c77. null sets Fiscalisto's.

portal_radius?|

How rounded the portal's corners are, in pixels (0 to 24). null sets Fiscalisto's (10).

portal_style?|

Everything else about how the portal looks (Autofactura › Cómo se ve el portal): layout, header, colors, font, borders, texts in Spanish and English, the ways to give the data, the button to go back to your site and custom CSS. Send only what changes: colors, ways and texts are merged by key (a text set to null removes it); the rest is replaced. null takes everything back to Fiscalisto's design. The «Facturado con Fiscalisto» legend can't be hidden.

retention_mode?string

When a persona moral invoices and withholds (1.25% ISR to an issuer in RESICO, article 113-J of the LISR, or whatever the product says): keep_total (the default), the base grows so the invoice adds up to what was paid; subtract, the base is the receipt's and the withholding is subtracted, so the invoice's total is less than what was paid.

One of"keep_total""subtract"
invoice_series?|

The series of the invoices buyers make themselves on the portal (and those issued from a receipt), like AF: up to 25 characters, without |. null or an empty one uses the issuer's invoice series. The global invoice keeps the usual series.

customer_notes?boolean

true: the portal asks the buyer for a note for their invoice's PDF (up to 500 characters; Autofactura › Nota del cliente). It only shows on the PDF, never in the XML. false by default.

failure_email?boolean

true (default): when a buyer can't invoice because of something on the issuer's side (its CSD, its data, the PAC), the owners and admins get an email. false: it only stays in Alertas, no email. An error in the buyer's own data never alerts: the portal tells them how to fix it.

split_max?integer

Splitting a receipt into several invoices (Autofactura › Reglas de los tickets): the most invoices one receipt can have, from 2 to 50, counting the one that takes all that's left. 0 (the default): the buyer can't split it. Each invoice uses a stamp.

Range0 <= value <= 50
split_min?number

The least each invoice of a split receipt can be, taxes included (100 by default). Less than this can't be left to invoice either, except by the invoice that takes all that's left.

Range0.01 <= value <= 1000000
split_same?boolean

true (the default): a buyer can make several invoices with the same details at once (4 of 250 from a 1,000 receipt). false: one per person.

invoice_concepts?|

The line items of the invoice the buyer makes (Autofactura › Conceptos de la factura): itemized or in one, and whether the buyer can choose. Send only what changes; null goes back to itemized without a choice.

global_concepts?string

The global invoice's line items: ticket (the default), one «Venta» per receipt with its folio as NoIdentificacion; summary, only the period's total amount, one per combination of taxes with NoIdentificacion «Resumen» (rule 2.7.1.21 of the RMF 2026). summary is only for a persona física issuer in RESICO (626); another one answers invalid_request.

One of"ticket""summary"

Response body

OK.

application/json
  1. response

An issuer's self-invoicing portal and its rules.

object*string

What kind of object it is («invoice», «customer»…).

livemode*boolean

true in production (fk_live_ keys), false in test mode (fk_test_). Test objects aren't valid before the SAT.

issuer*string

The issuer.

portal_url*string

The issuer's permanent portal: there any buyer invoices with their code and total.

window*string

month: it can be invoiced until the end of the sale's month. days: until window_days days after.

One of"month""days"
window_days*integer

Days to invoice with window: days.

Range-9007199254740991 <= value <= 9007199254740991
global_periodicity*string

How often the global invoice is stamped on its own with what nobody invoiced: 01 daily, 02 weekly, 03 biweekly, 04 monthly.

One of"01""02""03""04"
global_invoice*string

auto: 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).

One of"auto""off"
ask_total*boolean

Whether 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*string

auto: 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.

One of"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*string

When 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.

One of"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*boolean

true: 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*boolean

true: 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*integer

The 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.

Range-9007199254740991 <= value <= 9007199254740991
split_min*number

The 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*boolean

true: a buyer can make several invoices with the same details at once (4 of 250 from a 1,000 receipt).

global_concepts*string

ticket: 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).

One of"ticket""summary"

Errors

  • The issuer is archived and no longer stamps. Its documents can still be read and canceled.

  • The account has several issuers and the request doesn't say which: send issuer (iss_…).

  • The object belongs to the other mode: an fk_test_ key only sees test data and an fk_live_ key only live data.

  • The ticket couldn't be registered (invalid folio, a sale date in the future or over a year ago, a product no longer in the catalog…). message_es says which.

  • Live, this part of the API (inventario, portal de proveedores, pedidos, comprobación de gastos) follows the empresa's plan, as in the app: it comes with Operaciones (added to any paid plan; included in Corporativo). The books (the /v1/accounting routes except DIOT, cross checks, IVA refunds and fixed assets) come with Contabilidad (added to Independiente, Emprendedor or Negocio; included in Despacho and Corporativo): without it, changing the books answers this error, and reading them works only up to the last month it had it. Add either in Ajustes › Plan y pagos; test mode has everything.

  • That issuer is an empresa of the app connected to your account: through the API it only offers its Portal de proveedores (/v1/portal_suppliers and /v1/supplier_invoices) and, once someone who may pay suppliers and change Configurar pagos turned them on, its supplier payouts (/v1/payouts and /v1/payroll_payouts). It also stops when whoever connected it (or turned its payouts on) no longer has that permission in the empresa: message_es says which. Do everything else in the app.

  • This key can't use that issuer.

  • There is no such issuer in the account (or it belongs to the other mode).

Plus those of any call (key, fields, limits): Errors. They all carry code, message and, when it's about a field, param.

curl -X POST 'https://api.fiscalisto.com/v1/issuers/iss_OufpKqnrvx9p/self_invoicing' \  -H 'Authorization: Bearer fk_test_…' \  -H 'Idempotency-Key: pedido-A-1042' \  -H 'Content-Type: application/json' \  -d '{  "window": "month",  "global_periodicity": "04"}'
{  "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?