Skip to content

verifactu-sdk API


verifactu-sdk API / RegisterInvoiceInput

Interface: RegisterInvoiceInput ​

Defined in: src/types.ts:390

Registration input of VerifactuClient.registerInvoice and VerifactuClient.registerBatch: an Invoice whose client-managed fields are optional. A full Invoice is still accepted.

Extends ​

  • Omit<Invoice, "billingSystem" | "chainLink" | "hash">

Properties ​

invoiceId ​

invoiceId: InvoiceId

Defined in: src/types.ts:294

Triple identifying the invoice.

Inherited from ​

Invoice.invoiceId


externalReference? ​

optional externalReference?: string

Defined in: src/types.ts:296

Optional caller-supplied external reference.

Inherited from ​

Invoice.externalReference


issuerName ​

issuerName: string

Defined in: src/types.ts:298

Legal name of the issuer (mirrors NombreRazonEmisor).

Inherited from ​

Invoice.issuerName


correction? ​

optional correction?: YesNo

Defined in: src/types.ts:300

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

Inherited from ​

Invoice.correction


priorRejection? ​

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

Defined in: src/types.ts:302

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

Inherited from ​

Invoice.priorRejection


invoiceType ​

invoiceType: InvoiceType

Defined in: src/types.ts:304

Invoice-type code (L4).

Inherited from ​

Invoice.invoiceType


rectificationKind? ​

optional rectificationKind?: RectificationKind

Defined in: src/types.ts:306

Required when invoiceType starts with 'R'.

Inherited from ​

Invoice.rectificationKind


rectifiedInvoices? ​

optional rectifiedInvoices?: InvoiceId[]

Defined in: src/types.ts:308

Identifiers of the invoices being rectified.

Inherited from ​

Invoice.rectifiedInvoices


substitutedInvoices? ​

optional substitutedInvoices?: InvoiceId[]

Defined in: src/types.ts:310

Identifiers of the invoices being substituted (only F3).

Inherited from ​

Invoice.substitutedInvoices


rectificationBreakdown? ​

optional rectificationBreakdown?: RectificationBreakdown

Defined in: src/types.ts:312

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

Inherited from ​

Invoice.rectificationBreakdown


operationDate? ​

optional operationDate?: string

Defined in: src/types.ts:314

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

Inherited from ​

Invoice.operationDate


description ​

description: string

Defined in: src/types.ts:316

Operation description (up to 500 chars).

Inherited from ​

Invoice.description


simplifiedArt7273? ​

optional simplifiedArt7273?: YesNo

Defined in: src/types.ts:318

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

Inherited from ​

Invoice.simplifiedArt7273


withoutRecipientArt61d? ​

optional withoutRecipientArt61d?: YesNo

Defined in: src/types.ts:320

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

Inherited from ​

Invoice.withoutRecipientArt61d


macroData? ​

optional macroData?: YesNo

Defined in: src/types.ts:322

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

Inherited from ​

Invoice.macroData


issuedBy? ​

optional issuedBy?: "T" | "D"

Defined in: src/types.ts:324

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

Inherited from ​

Invoice.issuedBy


thirdParty? ​

optional thirdParty?: Counterpart

Defined in: src/types.ts:326

Third-party / self-billing recipient details.

Inherited from ​

Invoice.thirdParty


recipients? ​

optional recipients?: Counterpart[]

Defined in: src/types.ts:328

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

Inherited from ​

Invoice.recipients


coupon? ​

optional coupon?: YesNo

Defined in: src/types.ts:330

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

Inherited from ​

Invoice.coupon


breakdown ​

breakdown: BreakdownItem[]

Defined in: src/types.ts:332

Tax-breakdown lines (1–12 entries).

Inherited from ​

Invoice.breakdown


totalTaxAmount ​

totalTaxAmount: string

Defined in: src/types.ts:334

Sum of repercussed amounts (CuotaTotal).

Inherited from ​

Invoice.totalTaxAmount


totalAmount ​

totalAmount: string

Defined in: src/types.ts:336

Total invoiced amount (ImporteTotal).

Inherited from ​

Invoice.totalAmount


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.

Inherited from ​

Invoice.generatedAt


agreementNumber? ​

optional agreementNumber?: string

Defined in: src/types.ts:347

Invoicing-agreement number (up to 15 chars).

Inherited from ​

Invoice.agreementNumber


systemAgreementId? ​

optional systemAgreementId?: string

Defined in: src/types.ts:349

SIF agreement identifier (up to 16 chars).

Inherited from ​

Invoice.systemAgreementId


billingSystem? ​

optional billingSystem?: BillingSystem

Defined in: src/types.ts:393

Producer-software descriptor; defaults to the client's billingSystem option.


optional chainLink?: ChainLink

Defined in: src/types.ts:395

Ignored: the client chains the record to the tail of its HashStore.


hash? ​

optional hash?: string

Defined in: src/types.ts:397

Ignored: the client computes the hash.

Released under the MIT license.