Create invoice
Issue and stamp a CFDI 4.0 invoice for a client with one or more lines.
POST https://cotlet.dev/api/v1/facturama/clients/{client_id}/invoices
Issues a CFDI 4.0 invoice of type ingreso and stamps it with the SAT, so there is no draft: the invoice is final once the call succeeds. Returns the invoice_id, series, folio, UUID and totals. It uses one folio of your plan and does not email the invoice: use email_invoice for that. A wrong invoice is fixed by cancel_invoice or create_credit_note. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| client_id string required | string | Client ID from list_clients or create_client. |
| items array required | array | Lines. Each has description, quantity, unit_price and tax_rate (0.16 for 16% IVA), plus optional product_id from list_products. |
| payment_form string | string | How the client pays, for example transfer or cash. |
| payment_method string | string | Single payment or installments. |
| series string | string | Invoice series. Default: your default series. |
Request
curl -X POST https://cotlet.dev/api/v1/facturama/clients/cl_4821/invoices \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"items":[{"description":"Design review hour","quantity":2,"unit_price":500,"tax_rate":0.16}],"payment_form":"transfer","payment_method":"single payment"}' result = client.call("facturama", "create_invoice", {"client_id":"cl_4821","items":[{"description":"Design review hour","quantity":2,"unit_price":500,"tax_rate":0.16}],"payment_form":"transfer","payment_method":"single payment"}) const result = await cotlet.call('facturama', 'create_invoice', {"client_id":"cl_4821","items":[{"description":"Design review hour","quantity":2,"unit_price":500,"tax_rate":0.16}],"payment_form":"transfer","payment_method":"single payment"}); cotlet call facturama create_invoice --data '{"client_id":"cl_4821","items":[{"description":"Design review hour","quantity":2,"unit_price":500,"tax_rate":0.16}],"payment_form":"transfer","payment_method":"single payment"}' Example response
{
"invoice_id": "Y61TLX-Ls_ZJFqzjanPN1w2",
"series": "FAC",
"folio": "101",
"uuid": "6f1c2a90-3b7e-4d55-9a1e-0c52b8e4d7a1",
"cfdi_type": "ingreso",
"status": "issued",
"issued_at": "2026-10-14T10:32:00-06:00",
"client": {
"client_id": "cl_4821",
"rfc": "XAXX010101000",
"name": "Estudio Norte SA de CV"
},
"items": [
{
"description": "Design review hour",
"quantity": 2,
"unit_price": 500,
"subtotal": 1000,
"tax_rate": 0.16,
"tax": 160,
"total": 1160
}
],
"subtotal": 1000,
"tax_total": 160,
"total": 1160,
"currency": "MXN"
}