Skip to content

verifactu-sdk API


verifactu-sdk API / Invoice

Interface: Invoice

Defined in: src/types.ts:286

Full English-named registration input (RegistroAlta).

Properties

invoiceId

invoiceId: InvoiceId

Defined in: src/types.ts:288

Triple identifying the invoice.


externalReference?

optional externalReference?: string

Defined in: src/types.ts:290

Optional caller-supplied external reference.


issuerName

issuerName: string

Defined in: src/types.ts:292

Legal name of the issuer (mirrors NombreRazonEmisor).


correction?

optional correction?: YesNo

Defined in: src/types.ts:294

'S' when this submission supersedes a prior incorrectly-issued record.


priorRejection?

optional priorRejection?: "S" | "N" | "X"

Defined in: src/types.ts:296

Prior-rejection flag ('N'/'S'/'X').


invoiceType

invoiceType: InvoiceType

Defined in: src/types.ts:298

Invoice-type code (L4).


rectificationKind?

optional rectificationKind?: RectificationKind

Defined in: src/types.ts:300

Required when invoiceType starts with 'R'.


rectifiedInvoices?

optional rectifiedInvoices?: InvoiceId[]

Defined in: src/types.ts:302

Identifiers of the invoices being rectified.


substitutedInvoices?

optional substitutedInvoices?: InvoiceId[]

Defined in: src/types.ts:304

Identifiers of the invoices being substituted (only F3).


rectificationBreakdown?

optional rectificationBreakdown?: RectificationBreakdown

Defined in: src/types.ts:306

Substitutive-rectification breakdown (only when rectificationKind === 'S').


operationDate?

optional operationDate?: string

Defined in: src/types.ts:308

Operation date (ISO) when distinct from invoiceId.issueDate.


description

description: string

Defined in: src/types.ts:310

Operation description (up to 500 chars).


simplifiedArt7273?

optional simplifiedArt7273?: YesNo

Defined in: src/types.ts:312

'S' when the invoice qualifies under art. 7.2/7.3 RD 1619/2012.


withoutRecipientArt61d?

optional withoutRecipientArt61d?: YesNo

Defined in: src/types.ts:314

'S' when the invoice has no recipient identification (art. 6.1.d).


macroData?

optional macroData?: YesNo

Defined in: src/types.ts:316

'S' when the total amount exceeds the AEAT macrodata threshold.


issuedBy?

optional issuedBy?: "T" | "D"

Defined in: src/types.ts:318

Issued by a third party ('T') or by the recipient itself ('D').


thirdParty?

optional thirdParty?: Counterpart

Defined in: src/types.ts:320

Third-party / self-billing recipient details.


recipients?

optional recipients?: Counterpart[]

Defined in: src/types.ts:322

List of recipients (omit for F2/R5 invoices).


coupon?

optional coupon?: YesNo

Defined in: src/types.ts:324

'S' when the invoice includes a coupon-related base reduction.


breakdown

breakdown: BreakdownItem[]

Defined in: src/types.ts:326

Tax-breakdown lines (1–12 entries).


totalTaxAmount

totalTaxAmount: string

Defined in: src/types.ts:328

Sum of repercussed amounts (CuotaTotal).


totalAmount

totalAmount: string

Defined in: src/types.ts:330

Total invoiced amount (ImporteTotal).


billingSystem

billingSystem: BillingSystem

Defined in: src/types.ts:332

Producer-software descriptor — usually filled in by the client.


generatedAt

generatedAt: string

Defined in: src/types.ts:334

ISO 8601 timestamp with timezone when the record was generated.


agreementNumber?

optional agreementNumber?: string

Defined in: src/types.ts:336

Invoicing-agreement number (up to 15 chars).


systemAgreementId?

optional systemAgreementId?: string

Defined in: src/types.ts:338

SIF agreement identifier (up to 16 chars).


chainLink: ChainLink

Defined in: src/types.ts:340

Chain link — usually filled in by the client.


hash

hash: string

Defined in: src/types.ts:342

SHA-256 hash of the record — filled in by the client.

Released under the MIT license.