# SAT downloads

An issuer's issued and received invoices, straight from SAT, with their XML.

The guide, step by step: https://fiscalisto.com/en/docs/api/descargas-del-sat.md

## Endpoints

- [Request an issuer's invoices from SAT](https://fiscalisto.com/en/docs/api/referencia/descargas-del-sat/create-sat-download.md): `POST /v1/sat_downloads`
- [List SAT downloads](https://fiscalisto.com/en/docs/api/referencia/descargas-del-sat/list-sat-downloads.md): `GET /v1/sat_downloads`
- [Get a SAT download](https://fiscalisto.com/en/docs/api/referencia/descargas-del-sat/get-sat-download.md): `GET /v1/sat_downloads/{id}`
- [List SAT invoices](https://fiscalisto.com/en/docs/api/referencia/descargas-del-sat/list-sat-invoices.md): `GET /v1/sat_invoices`
- [Get a SAT invoice](https://fiscalisto.com/en/docs/api/referencia/descargas-del-sat/get-sat-invoice.md): `GET /v1/sat_invoices/{id}`
- [Update a SAT invoice](https://fiscalisto.com/en/docs/api/referencia/descargas-del-sat/update-sat-invoice.md): `POST /v1/sat_invoices/{id}`
- [Mark a received invoice as paid](https://fiscalisto.com/en/docs/api/referencia/descargas-del-sat/mark-sat-invoice-paid.md): `POST /v1/sat_invoices/{id}/mark_paid`
- [Remove the paid mark](https://fiscalisto.com/en/docs/api/referencia/descargas-del-sat/mark-sat-invoice-unpaid.md): `POST /v1/sat_invoices/{id}/mark_unpaid`
- [Download a SAT invoice's XML](https://fiscalisto.com/en/docs/api/referencia/descargas-del-sat/get-sat-invoice-xml.md): `GET /v1/sat_invoices/{id}/xml`
- [Download a SAT invoice's PDF](https://fiscalisto.com/en/docs/api/referencia/descargas-del-sat/get-sat-invoice-pdf.md): `GET /v1/sat_invoices/{id}/pdf`
- [List withholding certificates](https://fiscalisto.com/en/docs/api/referencia/descargas-del-sat/list-sat-retentions.md): `GET /v1/sat_retentions`
- [Get a withholding certificate](https://fiscalisto.com/en/docs/api/referencia/descargas-del-sat/get-sat-retention.md): `GET /v1/sat_retentions/{id}`
- [Download a withholding certificate's XML](https://fiscalisto.com/en/docs/api/referencia/descargas-del-sat/get-sat-retention-xml.md): `GET /v1/sat_retentions/{id}/xml`
- [Download a withholding certificate's PDF](https://fiscalisto.com/en/docs/api/referencia/descargas-del-sat/get-sat-retention-pdf.md): `GET /v1/sat_retentions/{id}/pdf`
- [Cancel an issued withholding certificate](https://fiscalisto.com/en/docs/api/referencia/descargas-del-sat/cancel-sat-retention.md): `POST /v1/sat_retentions/{id}/cancel`

## The SatDownload object

A request to the SAT for an issuer's issued or received invoices in a period.

| Field | Type | Always present | Description |
| --- | --- | --- | --- |
| `id` | string | yes | Object identifier, with its prefix (iss_, inv_, ret_, cus_, prd_, emp_, bat_, brn_, whs_, stm_, adj_, evt_, whe_). |
| `livemode` | boolean | yes | true in production (fk_live_ keys), false in test mode (fk_test_). Test objects aren't valid before the SAT. |
| `object` | `"sat_download"` | yes | What kind of object it is («invoice», «customer»…). |
| `issuer` | string | yes | The issuer whose invoices are requested. |
| `direction` | `received`, `issued` | yes | received (the ones made to them) or issued (the ones they issued). |
| `from` | string or null | yes | From which day (inclusive). |
| `to` | string or null | yes | Up to which day (inclusive). |
| `type` | `I`, `E`, `P`, `T`, `N` or null | yes | The receipt type requested, or null for all. |
| `counterparty_tax_id` | string or null | yes | The counterparty RFC requested, or null. |
| `uuid` | string or null | yes | The tax folio requested, or null. |
| `status` | `processing`, `completed`, `failed` | yes | processing (the SAT is preparing it: minutes to hours), completed (the invoices are now in GET /v1/sat_invoices) or failed (the reason in error). |
| `new_invoices` | integer or null | yes | How many new invoices it brought (the ones it already had don't count). null until it finishes. |
| `error` | string or null | yes | Why it failed, as the SAT said. null if it didn't fail. |
| `created_at` | string (date-time) or null | yes | When it was requested. |
| `completed_at` | string (date-time) or null | yes | When it finished, or null. |

Example:

```json
{
  "id": "sdl_OufpKqnrvx9p3n8vQd2LkW7mZr1XyT5uBc",
  "object": "sat_download",
  "livemode": false,
  "issuer": "iss_OufpKqnrvx9p",
  "direction": "received",
  "from": "2026-09-01",
  "to": "2026-09-30",
  "type": null,
  "counterparty_tax_id": null,
  "uuid": null,
  "status": "processing",
  "new_invoices": null,
  "error": null,
  "created_at": "2026-10-24T10:20:00-06:00",
  "completed_at": null
}
```

## The SatInvoice object

An invoice the SAT has for the issuer, issued or received, brought in by a download.

| Field | Type | Always present | Description |
| --- | --- | --- | --- |
| `id` | string | yes | Object identifier, with its prefix (iss_, inv_, ret_, cus_, prd_, emp_, bat_, brn_, whs_, stm_, adj_, evt_, whe_). |
| `livemode` | boolean | yes | true in production (fk_live_ keys), false in test mode (fk_test_). Test objects aren't valid before the SAT. |
| `object` | `"sat_invoice"` | yes | What kind of object it is («invoice», «customer»…). |
| `issuer` | string | yes | The issuer in your account (iss_…) this invoice belongs to. |
| `uuid` | string | yes | The tax folio (UUID of the stamp). |
| `direction` | `received`, `issued` | yes | received (made to the issuer) or issued (the issuer issued it). |
| `type` | `I`, `E`, `P`, `T`, `N` or null | yes | Receipt type (TipoDeComprobante): I income, E expense, P payment, T transfer, N payroll. |
| `date` | string | yes | The receipt's date (Fecha), in the local time it was issued with. |
| `series` | string or null | yes | Series (Serie), or null. |
| `folio` | string or null | yes | Folio (Folio), or null. |
| `issued_by` | object | yes | Who issued it (Emisor). |
| `issued_by.tax_id` | string | yes | RFC (Rfc), 12 characters for a persona moral and 13 for a persona física. |
| `issued_by.legal_name` | string or null | yes | Name or razón social exactly as on the constancia de situación fiscal, without the capital regime (without «S.A. de C.V.»). |
| `issued_to` | object | yes | Who it was issued to (Receptor). |
| `issued_to.tax_id` | string | yes | RFC (Rfc), 12 characters for a persona moral and 13 for a persona física. |
| `issued_to.legal_name` | string or null | yes | Name or razón social exactly as on the constancia de situación fiscal, without the capital regime (without «S.A. de C.V.»). |
| `currency` | string or null | yes | Currency (Moneda): MXN, USD… |
| `exchange_rate` | number or null | yes | Exchange rate (TipoCambio), or null in pesos. |
| `payment_method` | string or null | yes | Payment method (MetodoPago): PUE or PPD. |
| `payment_form` | string or null | yes | Payment form (FormaPago), c_FormaPago code. |
| `use` | string or null | yes | CFDI use (UsoCFDI). |
| `subtotal` | number or null | yes | Subtotal (SubTotal). |
| `total` | number or null | yes | Total (Total). |
| `taxes` | object | yes | The receipt's taxes: transferred (iva, ieps), withheld (iva_withheld, isr_withheld, ieps_withheld) and local. |
| `taxes.iva` | number | yes | IVA transferred. |
| `taxes.ieps` | number | yes | IEPS transferred. |
| `taxes.iva_withheld` | number | yes | IVA withheld. |
| `taxes.isr_withheld` | number | yes | ISR withheld. |
| `taxes.ieps_withheld` | number | yes | IEPS withheld. |
| `taxes.local_transferred` | number | yes | Local taxes transferred (ISH and similar). |
| `taxes.local_withheld` | number | yes | Local taxes withheld. |
| `sat_status` | `active`, `canceled` or null | yes | Its status at the SAT when it was checked: active (valid) or canceled. null if it hasn't been checked yet. |
| `paid_otherwise` | object or null | yes | Received only, marked with mark_paid, in the app or by a rule: without_complement true on a PPD paid without a payment complement (the SAT still sees it as unpaid); false on a PUE, where only the source of the money was noted. |
| `paid_otherwise.without_complement` | boolean | yes | true: a PPD paid without a complement, out of Por pagar. false: a PUE, already paid, with its source of money. |
| `paid_otherwise.paid_on` | string or null | yes | The day it was paid (YYYY-MM-DD), if given. |
| `paid_otherwise.payment_form` | string or null | yes | What it was paid with: c_FormaPago code (01 cash, 03 transfer…). |
| `paid_otherwise.money_source` | `petty_cash`, `reimbursement`, `bank`, `other` or null | yes | Where the money came from: petty_cash, reimbursement (a person, who was reimbursed later), bank or other. |
| `paid_otherwise.by_rule` | boolean | yes | true when a rule in Ajustes › Pagos sin complemento marked it. |
| `cash_confirmation` | `pending`, `confirmed` or null | yes | Only on a received PUE paid in cash when the empresa asks to confirm these payments (Ajustes › Pagos en efectivo): pending until someone notes where the money came from (mark_paid with money_source), confirmed afterwards. Null on the rest. Its taxes don't change. |
| `cost_center` | string or null | yes | Its cost center (ccn_…), or null. Set or change it with POST /v1/sat_invoices/{id}. |
| `account` | string or null | yes | The number of your chart's account its income or expense is booked to instead of its category's (in the app, by a rule of Ajustes › Reglas or with account). Null: its category's. |
| `tags` | array of object | yes | Its tags, by name. automatic: true on those a rule added (the purchase order it was linked to or a rule in Ajustes › Reglas). Change them with POST /v1/sat_invoices/{id}. |
| `tags[].id` | string | yes | The tag (tag_…). |
| `tags[].name` | string | yes | Its name. |
| `tags[].color` | string | yes | Its color. |
| `tags[].automatic` | boolean | yes | true if a rule added it (its purchase order or Ajustes › Reglas), not a person. |
| `sat_download` | string or null | yes | The download (sdl_…) that brought it, or null. |
| `downloaded_at` | string (date-time) or null | yes | When it arrived. |

Example:

```json
{
  "id": "sat_OufpKqnrvx9p1F",
  "object": "sat_invoice",
  "livemode": false,
  "issuer": "iss_OufpKqnrvx9p",
  "uuid": "9B2D4E61-7C3A-4F18-8E5D-0A6B9C1D2E3F",
  "direction": "received",
  "type": "I",
  "date": "2026-09-12T11:04:00",
  "series": "A",
  "folio": "4821",
  "issued_by": {
    "tax_id": "XIA190128J61",
    "legal_name": "XENON INDUSTRIAL ARTICLES"
  },
  "issued_to": {
    "tax_id": "TOL190312KT4",
    "legal_name": "TOLPI"
  },
  "currency": "MXN",
  "exchange_rate": null,
  "payment_method": "PUE",
  "payment_form": "03",
  "use": "G03",
  "subtotal": 18400,
  "total": 21344,
  "taxes": {
    "iva": 2944,
    "ieps": 0,
    "iva_withheld": 0,
    "isr_withheld": 0,
    "ieps_withheld": 0,
    "local_transferred": 0,
    "local_withheld": 0
  },
  "sat_status": "active",
  "paid_otherwise": null,
  "cash_confirmation": null,
  "cost_center": null,
  "account": null,
  "tags": [
    {
      "id": "tag_OufpKqnrvx9p1",
      "name": "Obra Norte",
      "color": "info",
      "automatic": false
    }
  ],
  "sat_download": "sdl_OufpKqnrvx9p3n8vQd2LkW7mZr1XyT5uBc",
  "downloaded_at": "2026-10-24T10:27:40-06:00"
}
```

## The SatRetention object

A withholdings and payment information CFDI of the issuer, received (the certificate a bank, a platform or whoever paid them gave them) or issued, as Facturas › Retenciones shows it.

| Field | Type | Always present | Description |
| --- | --- | --- | --- |
| `id` | string | yes | Object identifier, with its prefix (iss_, inv_, ret_, cus_, prd_, emp_, bat_, brn_, whs_, stm_, adj_, evt_, whe_). |
| `livemode` | boolean | yes | true in production (fk_live_ keys), false in test mode (fk_test_). Test objects aren't valid before the SAT. |
| `object` | `"sat_retention"` | yes | What kind of object it is («invoice», «customer»…). |
| `issuer` | string | yes | The issuer in your account (iss_…) this certificate belongs to. |
| `uuid` | string | yes | The tax folio (UUID of the stamp). |
| `direction` | `received`, `issued` | yes | received (given to the issuer: a bank, a platform, whoever paid them) or issued (the issuer issued it). |
| `date` | string | yes | The issue date (FechaExp). |
| `internal_folio` | string or null | yes | Internal folio (FolioInt), or null. |
| `code` | string or null | yes | Withholding code (CveRetenc), such as 14 dividends, 16 interest or 26 platforms. |
| `description` | string or null | yes | Withholding description (DescRetenc), or null. |
| `issued_by` | object | yes | Who withheld (Emisor). |
| `issued_by.tax_id` | string or null | yes | RFC (Rfc), 12 characters for a persona moral and 13 for a persona física. |
| `issued_by.legal_name` | string or null | yes | Name or razón social exactly as on the constancia de situación fiscal, without the capital regime (without «S.A. de C.V.»). |
| `issued_to` | object | yes | Who was withheld from (Receptor). |
| `issued_to.tax_id` | string or null | yes | RFC (Rfc), 12 characters for a persona moral and 13 for a persona física. |
| `issued_to.legal_name` | string or null | yes | Name or razón social exactly as on the constancia de situación fiscal, without the capital regime (without «S.A. de C.V.»). |
| `period` | object or null | yes | The months and fiscal year it covers (Periodo), or null if it couldn't be read. |
| `period.year` | integer | yes | Fiscal year (Ejercicio). (from -9007199254740991 to 9007199254740991) |
| `period.month_start` | integer | yes | Start month (MesIni), 1 to 12. (from -9007199254740991 to 9007199254740991) |
| `period.month_end` | integer | yes | End month (MesFin), 1 to 12. (from -9007199254740991 to 9007199254740991) |
| `totals` | object | yes | The Totales amounts. |
| `totals.operation` | number or null | yes | Total amount of the operation (MontoTotOperacion). |
| `totals.taxed` | number or null | yes | Taxed amount (MontoTotGrav). By default, operation minus exempt. |
| `totals.exempt` | number or null | yes | Exempt amount (MontoTotExent). 0 by default. |
| `totals.withheld` | number or null | yes | Total withheld (MontoTotRet). |
| `withheld_taxes` | array of object | yes | Each tax withheld (ImpRetenidos). |
| `withheld_taxes[].base` | number or null | yes | Base of the withheld tax (BaseRet). |
| `withheld_taxes[].tax` | string or null | yes | Tax: isr, iva or ieps (ImpuestoRet 001, 002, 003). |
| `withheld_taxes[].amount` | number or null | yes | Amount. |
| `withheld_taxes[].payment_type` | string or null | yes | Withholding payment type (TipoPagoRet): 01 final VAT, 02 final IEPS, 03 final ISR, 04 provisional ISR. By default the usual one for each tax. |
| `status` | `active`, `canceled` | yes | active or canceled: the issuer canceled it in Fiscalisto, or the SAT reports it canceled (checked every month). A canceled one is no longer tax withheld. |
| `read_error` | string or null | yes | If its XML couldn't be read, why; its fields stay null. Otherwise, null. |
| `downloaded_at` | string (date-time) or null | yes | When it arrived at Fiscalisto. |

Example:

```json
{
  "id": "srt_OufpKqnrvx9p1G",
  "object": "sat_retention",
  "livemode": false,
  "issuer": "iss_OufpKqnrvx9p",
  "uuid": "4C7E9A12-3B5D-4E6F-8A1B-2C3D4E5F6A7B",
  "direction": "received",
  "date": "2026-02-10T10:00:00",
  "internal_folio": "R-1",
  "code": "16",
  "description": "Intereses",
  "issued_by": {
    "tax_id": "BAN010101AB1",
    "legal_name": "BANCO EJEMPLO"
  },
  "issued_to": {
    "tax_id": "TOL190312KT4",
    "legal_name": "TOLPI"
  },
  "period": {
    "year": 2025,
    "month_start": 1,
    "month_end": 12
  },
  "totals": {
    "operation": 10000,
    "taxed": 10000,
    "exempt": 0,
    "withheld": 1000
  },
  "withheld_taxes": [
    {
      "base": 10000,
      "tax": "001",
      "amount": 1000,
      "payment_type": "01"
    }
  ],
  "status": "active",
  "read_error": null,
  "downloaded_at": "2026-02-11T03:12:40-06:00"
}
```
