New parameter: include_payment_info on GET /invoices
13 days ago by Assad Aboultaif
- The
GET /invoices/{identifier}endpoint now supports an optionalinclude_payment_infoquery 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 parameter —
include_payment_info(boolean, defaultfalse). - Backward compatible — when the parameter is omitted, the response is identical to the current behavior. No
payment_infofield is present. - When
include_payment_info=true, each invoice object includes a newpayment_infofield:pagoinvoices with payments —payment_infois an array of payment objects.- All other invoice types (
ingreso,egreso,nomina) —payment_infoisnull.
🧾 New payment_info object
payment_info objectEach item in the payment_info array contains:
| Field | Type | Description |
|---|---|---|
total_amount_paid | number | Total amount paid in this payment record |
currency | string | Currency of the payment (default: MXN) |
exchange_rate | number | Exchange rate at time of payment (default: 1) |
payment_form | string | SAT payment form code (01 = cash, 02 = check, 03 = transfer) |
payment_date | string (date) | Date of the payment (YYYY-MM-DD) |
payment_relations | array | Related invoices this payment was applied to |
Each item in payment_relations:
| Field | Type | Description |
|---|---|---|
related_fiscal_code | string | Folio fiscal of the related invoice |
paid_amount | number | Amount 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.
