New parameter: include_payment_info on GET /invoices


  • The GET /invoices/{identifier} endpoint now supports an optional include_payment_info query parameter.
  • When enabled, each invoice in the response is enriched with its associated payment details sourced from pago (type P) CFDI records.

⚙️ What Changes

  • New optional query parameterinclude_payment_info (boolean, default false).
  • Backward compatible — when the parameter is omitted, the response is identical to the current behavior. No payment_info field is present.
  • When include_payment_info=true, each invoice object includes a new payment_info field:
    • pago invoices with paymentspayment_info is an array of payment objects.
    • All other invoice types (ingreso, egreso, nomina) — payment_info is null.

🧾 New payment_info object

Each item in the payment_info array contains:

FieldTypeDescription
total_amount_paidnumberTotal amount paid in this payment record
currencystringCurrency of the payment (default: MXN)
exchange_ratenumberExchange rate at time of payment (default: 1)
payment_formstringSAT payment form code (01 = cash, 02 = check, 03 = transfer)
payment_datestring (date)Date of the payment (YYYY-MM-DD)
payment_relationsarrayRelated invoices this payment was applied to

Each item in payment_relations:

FieldTypeDescription
related_fiscal_codestringFolio fiscal of the related invoice
paid_amountnumberAmount applied to that related invoice

💡 Example

Request: GET /invoices/MXRA850712HDFLNB03?include_payment_info=true

Response (ingreso invoice — no payments):

{
  "type": "pago",
  "amount": 18500,
  "currency": "MXN",
  "issue_date": "2026-03-20",
  "rfc_issuer": "SVC930401EM5",
  "issuer_name": "SERVICIOS COMERCIALES DEL NORTE SA DE CV",
  "rfc_receiver": "MXRA850712LK9",
  "receiver_name": "ALEJANDRO MORA REYES",
  "incomes": [],
  "deductions": [],
  "folio_fiscal": "7B4E1A92-3C56-4D08-F731-9E2B05A8C364",
  "invoice_status": "",
  "zip_code_receiver": "",
  "payment_info": [
    {
      "total_amount_paid": 18500,
      "currency": "MXN",
      "exchange_rate": 1,
      "payment_form": "03",
      "payment_date": "2026-03-18",
      "payment_relations": [
        {
          "related_fiscal_code": "2F9D4B17-8A30-4E65-C912-3D7A06B5F481",
          "paid_amount": 18500
        }
      ]
    }
  ]
}

🛠️ No Action Required

This is a non-breaking, additive change. The parameter defaults to false and the response is unchanged unless you explicitly pass include_payment_info=true.