Skip to content

AfipCreditNote

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.

FieldTypeRequiredDescription
credentials_idcredentialsYesAFIP SDK server credential
voucher_typeselectNo3=CN A, 8=CN B, 13=CN C, 2=DN A, 7=DN B, 12=DN C (default: 8)
point_of_salenumberYesPoint of sale enabled in AFIP
conceptselectNo1=Products, 2=Services, 3=Both
doc_typeselectNo99=Final Consumer, 80=CUIT, 96=DNI
doc_numbertextNoReceiver document
total_amountnumberYesTotal amount including VAT
iva_rateselectNo21%, 10.5% or 0%
currencyselectNoPES=Pesos, DOL=Dollars
associated_typenumberYesAssociated voucher type (e.g. 6=Invoice B)
associated_point_of_salenumberNoAssociated point of sale (default: same)
associated_numbernumberYesAssociated voucher number
issue_datetextNoIssue date YYYYMMDD
{
"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 }
}
{
"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_type and associated_number are 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.