Factuarea APIDevelopers
Improved

Invoice activity: AEAT results, email and payments

The invoice activity timeline adds the result of every AEAT submission, undelivered emails, the first daily visit to the public link and payment events, each with an exact metadata contract.

4 October 2026

GET /v1/invoices/{invoice}/activities and the MCP tool get_invoice_activities now publish more events in the timeline of an invoice. Each new event_type has an exact metadata contract, described in the InvoiceActivity schema, and no internal identifiers are exposed.

VeriFactu submissions

The result of each submission of a record to the AEAT is recorded:

event_typeWhenmetadata
verifactu.record_acceptedThe AEAT accepted a record (the alta, a subsanación or the annulment), with or without admissible errors.record_type, csv, aeat_error_code, requires_subsanation, attempt
verifactu.record_rejectedThe AEAT rejected a record.record_type, aeat_error_code, aeat_error_message, attempt
verifactu.transmission_failedThe submission failed because of the AEAT or the network and is retried automatically. One entry per incident, not per attempt.record_type, reason, attempt, next_retry_at
verifactu.transmission_blockedThe submission is stopped, with no automatic retry, until the cause is fixed.record_type, block_reason
  • record_type is alta, subsanacion or anulacion.
  • csv is the secure verification code the AEAT returned; it is null when the AEAT confirmed the record as a duplicate of an earlier submission.
  • aeat_error_code is the admissible error (2xxx) or warning the record was accepted with, or null. For a rejection it is the rejection code (SCHEMA_INVALID when the record broke the AEAT schema and was not sent).
  • requires_subsanation says whether the AEAT requires a subsanación of that admissible error. Every one does except 2004 and 2009.
  • reason is AEAT_UNREACHABLE, UNMATCHED_RESPONSE_LINE or SYSTEM_CERTIFICATE_UNAVAILABLE.
  • A blocked record is reactivated with POST /v1/verifactu/records/retry-blocked.

The VeriFactu record resource adds aeat_warning_requires_subsanation: for a record accepted with an error, whether the AEAT requires its subsanación. It is false for a warning that is not an AEAT code and null when the record is not accepted with a warning.

Email and public link

event_typeWhenmetadata
invoice.email_failedThe invoice email could not be delivered after its retries.recipient, reason (a readable reason in Spanish, without sensitive data)
invoice.public_link_viewedFirst visit of the day (Europe/Madrid) to the public link. Later visits that day add no entry.views_today and, only when known, downloaded_pdf

Payments

Payments registered, reversed or edited on the invoice appear in its timeline, including the ones recorded before these events were published.

event_typeWhenmetadata
payment.payment_createdA payment was registered.amount, method, provider
payment.payment_reversedA payment was reversed.amount, reason, provider
payment.payment_updatedA payment was edited.changed_fields, provider

amount is in euros, method is a key from the catalog of GET /v1/payment-methods, reason is the reversal reason key and changed_fields lists the payment fields that changed (amount, date, method, reference, notes). provider is the gateway that collected the payment (stripe, gocardless, monei, woocommerce or shopify) or null for a payment registered by hand. When performed_by is null and provider is set, the payment came from that gateway.

Updated endpoints8

EndpointDescription
GET/v1/invoices/{invoice}/activitiesList invoice activity
GET/v1/invoices/{invoice}/verifactuRetrieve invoice VeriFactu record
POST/v1/invoices/{invoice}/verifactuForce-create VeriFactu record for invoice
GET/v1/verifactu/recordsList VeriFactu records
GET/v1/verifactu/records/{record}Retrieve a VeriFactu record
POST/v1/verifactu/records/find-by-csvFind a VeriFactu record by AEAT CSV
POST/v1/verifactu/records/find-by-huellaFind a VeriFactu record by hash
POST/v1/verifactu/records/find-by-invoice-numberFind a VeriFactu record by invoice number

On this page

Need a hand?Contact support