9.3 add and Update (writing collections/payments)
| Field | Type | Required | Description |
|---|---|---|---|
idPay | number | Only Update | Slip to update. Ignored in add; the new ID is returned in the response |
distCode | text | Yes | Distributor code |
customerCode | text | Yes | Customer code |
evDate | date | Yes | Document date |
items | list | Yes | Line items; the slip amount is the sum of the items |
items[].paymentType | text | No | Payment type (Common codes) |
items[].price | number | No | Item amount |
items[].explanation | text | No | Item note |
sellerCode | text | No | Sales representative |
receiptNumber | text | No | Receipt number |
direction | text | No | Default Collection |
explanation | text | No | Note |
idInv | number | No | Linked invoice ID |
{ "distCode": "131", "customerCode": "M001", "sellerCode": "S01", "evDate": "2026-01-15", "receiptNumber": "TH-12", "direction": "Collection", "items": [ { "paymentType": "Cash", "price": 1000 }, { "paymentType": "CreditCard", "price": 500 } ] }
The response returns the record you sent inside data; for add, idPay is the ID of the new slip. Update deletes and rewrites the line items, and makes a canceled slip valid again.