> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cufea.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Payments

> Means of payment, cash and credit sales, split tender.

List every means of payment actually used in the sale in `payments`, in order. Each entry
becomes one UBL `PaymentMeans` (the Anexo allows 1..N, rule FAN01):

| Sale | `payments` |
| - | - |
| Paid at the sale with one means | `[{"form": "1", "method_code": "<its code>"}]`, e.g. `10` cash, `48` credit card, `49` debit card |
| Paid at the sale with several means (cash plus card...) | One entry per means: `[{"form": "1", "method_code": "10", "amount": "50000.00"}, {"form": "1", "method_code": "48", "amount": "69000.00"}]` |
| On credit | `[{"form": "2", "method_code": "<code>", "due_date": "2026-12-31"}]` |
| Part paid at the sale, the balance on credit | `[{"form": "1", "method_code": "10", "amount": "60000.00"}, {"form": "2", "method_code": "1", "due_date": "2026-12-31", "amount": "59000.00"}]` |

* Do not collapse a split-tender sale into one generic code such as `ZZZ` ("Otro"): send one
  entry per means used.
* `form` `1` (contado) means the seller is paid at the sale, also when a customer pays with a
  credit card; `2` (crédito) means the customer owes the balance. Every credit entry needs a
  `due_date` (FAN04); Cufea refuses the invoice without one (`422 invoice_invalid`).
* `amount` is optional. Cufea stores it and returns it in `payments` on every invoice
  response, but it is not part of the signed XML (the Anexo defines no amount in
  `PaymentMeans`) and Cufea does not check that the amounts add up to the total.
* `payment` (a single object) still works and means the same as `payments` with one entry.
  Send `payment` or `payments`, not both: either both or neither is `422 validation_error`.
* Invoice responses carry `payments` as signed: `form`, `method_code` and `due_date` read
  from the XML, `amount` as you sent it (`null` when you sent none).
* Credit and debit notes keep a single `payment`.
* `method_code` must be a code of the DIAN list MediosPago-2.1 (Anexo 1.9 table 13.3.4.2,
  toolbox `MediosPago-2.1.gc`; the [API reference](https://docs.cufea.com/en/api-reference/introduction.md) lists them as
  the enum of `method_code`). Any other value, on an invoice (`payment` or any `payments` entry)
  or a note, is `422 validation_error` with the field's `loc`, e.g. `["body", "payments", "1",
  "method_code"]`, instead of a DIAN rejection ("Medio de pago inválido", FAN03 / CAN03a /
  DAN03a). `form` takes only `1` or `2`.
* Cufea checks the list only: which code fits a sale or a note is your choice.

## Payment means on a credit note

A credit note carries one `payment`. Cufea does not enforce which means fits which case; this
is the mapping that two real credit notes issued with Siigo and accepted by the DIAN follow:

| What the note does | `payment` |
| - | - |
| Refunds money to the customer | The means of the refund: `{"form": "1", "method_code": "10"}` for cash, `48` credit card, `49` debit card, `47` bank transfer... |
| Only lowers what the customer still owes on an unpaid invoice | `{"form": "1", "method_code": "1"}` (`1` "Instrumento no definido"): no money moves |
| Leaves the customer a credit balance to use later | `{"form": "2", "method_code": "ZZZ", "due_date": "<the note's date>"}` (`ZZZ` "Acuerdo mutuo", "Otro\*" in the toolbox v2026 list) |

A credit `payment` (`form` `2`) needs its `due_date` on a note too (CAN04).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.