Generic Credit Note

Credit Note base

type CreditNote {
  ref: string;  
  issued: string;
  recipient: CreditNoteRecipient;
  invoiceRefs: string[];
  total: {
    amount: number;
    currency?: string;
  };
  customInfo?: StringStringTMap<string | number>;
  error?: Error;
  type?: 'Sent' | 'Received';
}

type CreditNoteRecipient {
  taxId: string;
  name: string;
  customInfo?: StringStringTMap<string | number>;
  contact?: {
    email?: string;
  };
}
NameTypeRequiredDescription
refstringYesSequential number of document
issuedstring (ISO 8601 date)YesDate of document (issue date)
recipient.taxIdstringYesTAX identification number.
recipient.namestringYesCompany name or name and surname
recipient.contact.emailstringNoRecipient email address
invoiceRefsstring arrayYesInvoices associated with this document
total.amountnumberYesThe total amount of the document, including tax charged.
total.currencystringNoThree-letter currency code (ISO 4217-1 alpha-3 ). Defaults to organisation currency.
typestring (System generated)NoA value from an enumerated list of types:
Sent
Received
errorstring map (System generated)NoWhen activation errors occur downstream, the transaction will have an Error status with this error object for more detail.

{ status?: number; message: string; description?: string; }