AfipCreditNote
Description
Section titled “Description”Issues an electronic Credit Note or Debit Note to AFIP through the AFIP SDK server. Unlike an invoice, the note must reference the original voucher (associated voucher). The node computes the number automatically and obtains the CAE.
Configuration
Section titled “Configuration”| Field | Type | Required | Description |
|---|---|---|---|
| credentials_id | credentials | Yes | AFIP SDK server credential |
| voucher_type | select | No | 3=CN A, 8=CN B, 13=CN C, 2=DN A, 7=DN B, 12=DN C (default: 8) |
| point_of_sale | number | Yes | Point of sale enabled in AFIP |
| concept | select | No | 1=Products, 2=Services, 3=Both |
| doc_type | select | No | 99=Final Consumer, 80=CUIT, 96=DNI |
| doc_number | text | No | Receiver document |
| total_amount | number | Yes | Total amount including VAT |
| iva_rate | select | No | 21%, 10.5% or 0% |
| currency | select | No | PES=Pesos, DOL=Dollars |
| associated_type | number | Yes | Associated voucher type (e.g. 6=Invoice B) |
| associated_point_of_sale | number | No | Associated point of sale (default: same) |
| associated_number | number | Yes | Associated voucher number |
| issue_date | text | No | Issue date YYYYMMDD |
Output
Section titled “Output”{ "success": true, "cae": "71234567890123", "cae_fch_vto": "20260808", "voucher_number": 15, "voucher_type": 8, "total_amount": 1210, "associated": { "type": 6, "point_of_sale": 1, "number": 40 }}Usage Example
Section titled “Usage Example”Credit Note B for Invoice B No. 40
Section titled “Credit Note B for Invoice B No. 40”{ "credentials_id": "cred-afip-prod", "voucher_type": "8", "point_of_sale": "1", "total_amount": "1210", "iva_rate": "21", "doc_type": "80", "doc_number": "30123456789", "associated_type": "6", "associated_number": "40"}- The credit/debit note is not valid without the associated voucher:
associated_typeandassociated_numberare required. - The note type must match the letter of the original invoice (CN B for Invoice B, etc.).
- For final consumers (doc_type=99) VAT is not itemized.
Related Nodes
Section titled “Related Nodes”- AfipCreateInvoice - Issue invoice
- AfipRepresentacion - Printable representation with QR