verifactu-sdk API / Invoice
Interface: Invoice
Defined in: src/types.ts:292
Full English-named registration input (RegistroAlta).
Properties
invoiceId
invoiceId:
InvoiceId
Defined in: src/types.ts:294
Triple identifying the invoice.
externalReference?
optionalexternalReference?:string
Defined in: src/types.ts:296
Optional caller-supplied external reference.
issuerName
issuerName:
string
Defined in: src/types.ts:298
Legal name of the issuer (mirrors NombreRazonEmisor).
correction?
optionalcorrection?:YesNo
Defined in: src/types.ts:300
'S' when this submission supersedes a prior incorrectly-issued record.
priorRejection?
optionalpriorRejection?:"S"|"N"|"X"
Defined in: src/types.ts:302
Prior-rejection flag ('N'/'S'/'X').
invoiceType
invoiceType:
InvoiceType
Defined in: src/types.ts:304
Invoice-type code (L4).
rectificationKind?
optionalrectificationKind?:RectificationKind
Defined in: src/types.ts:306
Required when invoiceType starts with 'R'.
rectifiedInvoices?
optionalrectifiedInvoices?:InvoiceId[]
Defined in: src/types.ts:308
Identifiers of the invoices being rectified.
substitutedInvoices?
optionalsubstitutedInvoices?:InvoiceId[]
Defined in: src/types.ts:310
Identifiers of the invoices being substituted (only F3).
rectificationBreakdown?
optionalrectificationBreakdown?:RectificationBreakdown
Defined in: src/types.ts:312
Substitutive-rectification breakdown (only when rectificationKind === 'S').
operationDate?
optionaloperationDate?:string
Defined in: src/types.ts:314
Operation date (ISO) when distinct from InvoiceId.issueDate.
description
description:
string
Defined in: src/types.ts:316
Operation description (up to 500 chars).
simplifiedArt7273?
optionalsimplifiedArt7273?:YesNo
Defined in: src/types.ts:318
'S' when the invoice qualifies under art. 7.2/7.3 RD 1619/2012.
withoutRecipientArt61d?
optionalwithoutRecipientArt61d?:YesNo
Defined in: src/types.ts:320
'S' when the invoice has no recipient identification (art. 6.1.d).
macroData?
optionalmacroData?:YesNo
Defined in: src/types.ts:322
'S' when the total amount exceeds the AEAT macrodata threshold.
issuedBy?
optionalissuedBy?:"T"|"D"
Defined in: src/types.ts:324
Issued by a third party ('T') or by the recipient itself ('D').
thirdParty?
optionalthirdParty?:Counterpart
Defined in: src/types.ts:326
Third-party / self-billing recipient details.
recipients?
optionalrecipients?:Counterpart[]
Defined in: src/types.ts:328
List of recipients (omit for F2/R5 invoices).
coupon?
optionalcoupon?:YesNo
Defined in: src/types.ts:330
'S' when the invoice includes a coupon-related base reduction.
breakdown
breakdown:
BreakdownItem[]
Defined in: src/types.ts:332
Tax-breakdown lines (1–12 entries).
totalTaxAmount
totalTaxAmount:
string
Defined in: src/types.ts:334
Sum of repercussed amounts (CuotaTotal).
totalAmount
totalAmount:
string
Defined in: src/types.ts:336
Total invoiced amount (ImporteTotal).
billingSystem
billingSystem:
BillingSystem
Defined in: src/types.ts:338
Producer-software descriptor — usually filled in by the client.
generatedAt
generatedAt:
string
Defined in: src/types.ts:345
ISO 8601 timestamp with timezone when the record was generated. It is part of the hash: persist it before the first submission and reuse it on every retry, so a retry after a lost response produces the same Huella the AEAT already stored.
agreementNumber?
optionalagreementNumber?:string
Defined in: src/types.ts:347
Invoicing-agreement number (up to 15 chars).
systemAgreementId?
optionalsystemAgreementId?:string
Defined in: src/types.ts:349
SIF agreement identifier (up to 16 chars).
chainLink
chainLink:
ChainLink
Defined in: src/types.ts:351
Chain link — usually filled in by the client.
hash
hash:
string
Defined in: src/types.ts:353
SHA-256 hash of the record — filled in by the client.