Skip to main content

Invoice Lifecycle & Events

This documentation details the technical and business statuses an invoice transitions through within the A-Cube API. The invoice lifecycle is governed by a state machine that determines which transitions are permitted based on the invoice's current status and its direction relative to the user (Inbound vs. Outbound).

Every invoice begins in the ACQUIRED state when it first enters the A-Cube system. From there, it moves through the state machine based on network responses and business actions.

AFNOR to Internal Status Mapping

When the system receives an official AFNOR status code, it automatically maps it to a unified internal InvoiceStatus to more closely correspond to the API's internal logic and state.

Internal StatusAFNOR Statuses
SUBMITTED"SUBMITTED 200 or ISSUED 201"
RECEIVED"RECEIVED 202 or MADE_AVAILABLE 203 or IN_HAND 204"
APPROVED"APPROVED 205 or PARTIALLY_APPROVED 206 or PAYMENT_SENT"
DISPUTEDDISPUTED 207
SUSPENDEDSUSPENDED 208
COMPLETEDCOMPLETED 209
REFUSEDREFUSED 210
PAIDPAYMENT_RECEIVED 212
REJECTEDREJECTED 213

Allowed Transitions

Transitions from state to state are only allowed for the party (INBOUND or OUTBOUND) that can verify the next step in the process

From StateTarget StateAvailable For
ACQUIREDRECEIVEDInbound
ACQUIREDSUBMITTEDOutbound
SUBMITTEDRECEIVEDBoth (Inbound & Outbound)
ACQUIRED or SUBMITTEDREJECTEDInbound
RECEIVEDSUSPENDEDInbound
RECEIVEDDISPUTEDInbound
RECEIVEDREFUSEDInbound
RECEIVED or DISPUTEDAPPROVEDInbound
SUSPENDEDCOMPLETEDOutbound
COMPLETEDRECEIVEDOutbound
APPROVEDPAIDOutbound

REJECTED or REFUSED invoices are in "end states" and cannot be reactivate, another correct invoice needs to be sent.

SUSPENDED invoices are those that require further clarification between buyer and seller. The buyer (INBOUND party) SUSPENDs the invoice, the seller COMPLETEs it when ready to move forward. The cycle can continue as needed.

Similarly, DISPUTED invoices also need to be APPROVED or not by the INBOUND party.


The Happy Path

Example of the minumum state trasition needed for the correct resolution of an invoice.

StatusDescription
ACQUIREDThe initial state for all invoices upon entering the A-Cube system.
SUBMITTEDApplicable to outbound invoices. The document has been processed and sent to the network.
RECEIVEDThe invoice has been successfully delivered to the recipient.
APPROVEDThe recipient has reviewed and accepted the invoice.
COMPLETEDProcessing has successfully resumed and concluded for an invoice that was previously suspended.
PAIDThe approved invoice has been fully settled.