FactusCreateCreditNote
Description
Section titled “Description”Generates a DIAN-validated electronic credit note in Colombia against an already-authorized Factus invoice. Can be used to fully cancel an invoice (reason 2), or to register partial returns, discounts, or price adjustments.
Configuration
Section titled “Configuration”| Field | Type | Required | Description |
|---|---|---|---|
| credentials_id | credentials | Yes | Factus OAuth2 credentials |
| bill_id | text | Yes | Factus internal ID of the original invoice |
| reason_code | select | No | Credit note reason (default: 2=Cancellation) |
| observation | text | No | Description or reason |
| items | array | No | Items to return (only for reason 1 — partial return) |
Available reasons
Section titled “Available reasons”| Code | Description |
|---|---|
| 1 | Partial return of goods |
| 2 | Invoice cancellation (default) |
| 3 | Global commercial discount |
| 4 | Price adjustment |
| 5 | Other |
Output
Section titled “Output”{ "success": true, "note_id": "456", "note_number": "NC-001", "cufe": "def789...hash256", "bill_id": "123", "raw": { ... }}Usage Example
Section titled “Usage Example”Full invoice cancellation
Section titled “Full invoice cancellation”{ "credentials_id": "cred-factus-prod", "bill_id": "123", "reason_code": "2", "observation": "Invoice issued with incorrect customer data"}Partial return
Section titled “Partial return”{ "credentials_id": "cred-factus-prod", "bill_id": "123", "reason_code": "1", "observation": "Return of 2 defective units", "items": [ { "code_reference": "PROD-001", "name": "Returned product", "quantity": 2, "price": 50000, "tax_rate": "19.00", "unit_measure_id": 70, "standard_code_id": 1, "is_excluded": 0 } ]}- For reason 2 (Cancellation),
itemsis not needed; Factus cancels the full invoice amount - For reason 1 (Partial return),
itemsmust include only the products/services being returned - The credit note CUFE is the unique DIAN identifier — store it for records
Related Nodes
Section titled “Related Nodes”- FactusCreateInvoice - Issue an invoice
- FactusGetInvoice - Query an invoice