Skip to main content
Key: fr-ctc-flow6-v1 Module: github.com/invopop/gobl.fr.ctc Support for Flow 6 (“Cycle de Vie”) lifecycle status messages of the French CTC reform. Carries the CDAR ProcessConditionCode on bill.Status documents exchanged between registered dematerialisation platforms (PDPs) and the Portail Public de Facturation (PPF).

Sources

Extensions

Party Role Code

UNCL 3035 role code carried as the CDAR RoleCode (MDT-158) on each populated party of any Flow 6 lifecycle message — set on Supplier / Customer of both bill.Status and bill.Payment. Labels follow the French CTC specification, which assigns CDAR-specific meanings to WK (dematerialisation platform / operator) and DFH (Portail Public de Facturation). The normalizer fills the obvious defaults (Supplier → SE, Customer → BY) and leaves the rest for the caller to set explicitly.
CodeName
BYBuyer
ABBuyer’s agent
DLFactor
SESeller
SRSeller’s agent
WKDematerialisation platform or operator
DFHPortail Public de Facturation (PPF)
PEPayee
PRPayer
IIInvoicer
IVInvoicee

CDAR Reason Code

Exact CDAR ReasonCode pinned on a bill.Reason under a bill.Status — Status-only (bill.Payment has no Reasons). The CDAR ReasonCode dimension is 1:N with bill.Reason.Key: this extension lets the caller pick the precise code within a bucket. The normalizer derives a default from Reason.Key (see normalizeReason); callers can override to one of the bucket’s other allowed codes.
CodeName
NON_TRANSMISENot transmitted
JUSTIF_ABSJustification absent
ROUTAGE_ERRRouting error
AUTREOther
COORD_BANC_ERRBank account details error
TX_TVA_ERRVAT rate error
MONTANTTOTAL_ERRTotal amount error
CALCUL_ERRCalculation error
NON_CONFORMENon-compliant
DOUBLONDuplicate
DEST_INCUnknown recipient
DEST_ERRRecipient error
TRANSAC_INCUnknown transaction
EMMET_INCUnknown issuer
CONTRAT_TERMContract terminated
DOUBLE_FACTDouble invoicing
CMD_ERROrder reference error
ADR_ERRAddress error
SIRET_ERRSIRET error
CODE_ROUTAGE_ERRRouting code error
REF_CT_ABSENTContract reference absent
REF_ERRReference error
PU_ERRUnit price error
REM_ERRDiscount error
QTE_ERRQuantity error
ART_ERRItem error
MODPAI_ERRPayment method error
QUALITE_ERRQuality issue
LIVR_INCOMPIncomplete delivery
REJ_SEMANSemantic rejection
REJ_UNIUniqueness violation
REJ_COHCoherence rejection
REJ_ADRAddress rejection
REJ_CONT_B2GB2G context rejection
REJ_REF_PJAttachment reference rejection
REJ_ASS_PJAttachment association rejection
IRR_VIDE_FEmpty file
IRR_TYPE_FInvalid file type
IRR_SYNTAXSyntax error
IRR_TAILLE_PJAttachment size
IRR_NOM_PJAttachment name
IRR_VID_PJEmpty attachment
IRR_EXT_DOCExternal document
IRR_TAILLE_FFile size
IRR_ANTIVIRUSAntivirus

CDAR Process Condition Code

CDAR ProcessConditionCode (MDT-9) identifying the lifecycle event reported by the Flow 6 message. Unified vocabulary; the rules narrow the allow-list per document type:
  • bill.Status accepts 200 / 201 / 202 / 203 / 204 / 205 / 206 / 207 / 208 / 209 / 210 / 213. The normalizer derives the value from the (StatusLine.Key, Status.Type) pair via processTable.
  • bill.Payment accepts 211 (Paiement transmis) and 212 (Encaissée). The normalizer derives the value from bill.Payment.Type (advice → 211, receipt → 212).
Callers can pre-set the ext directly to pin a specific code (e.g. when round-tripping a parsed CDV).
CodeName
200Deposited
201Issued by platform
202Received by PA
203Made available
204Taken into account
205Approved
206Partially approved
207In dispute
208Suspended
209Completed
210Rejected
211Payment transmitted
212Cashed in
213Semantically rejected

Flow 6 Condition Code

CDAR CharacteristicTypeCode (MDT-207). Unified vocabulary; the rules narrow the allow-list per document type:
  • On bill.Reason under bill.Status: CBB, DIV, DVA, MAJ (field-level corrections), MAP / MAPTTC / MNA / MNATTC (partial-approval / rejection amounts), ESC / RAB / REM (discount markers). Each Reason carries 0..1 condition (CDAR cardinality); to convey multiple characteristics for the same status line, add multiple Reasons. bill.Condition entries on each Reason are reserved for Peppol cac:Condition-style business-rule codes describing the affected field and value.
  • On bill.Payment.Ext: MEN (Encaissé), MPA (Payé), RAP (Reste à payer). The normalizer defaults the value from bill.Payment.Type (receipt → MEN, advice → MPA); partial payments can override to RAP.
CodeName
CBBBank details to modify
DIVInvalid data
DVAExpected valid data
MAJReplacement value
MAPApproved amount (excl. VAT)
MAPTTCApproved amount (incl. VAT)
MNARejected amount (excl. VAT)
MNATTCRejected amount (incl. VAT)
ESCDiscount granted
RABRebate granted
REMReduction granted
MENAmount received
MPAAmount paid
RAPAmount remaining

Flow 6 Action Code

CDAR RequestedActionCode (MDT-121) carried on a bill.Action under a bill.Status line. Tells the issuer what to do next with the referenced invoice — reissue it, send a credit note, provide more information, etc. The normalizer derives the default from bill.Action.Key (NOA / PIN / NIN / CNF / CNP / CNA / OTH); callers can override directly on the extension when round-tripping a parsed CDV.
CodeName
NOANo action
PINProvide information
NINReissue invoice
CNFCredit note (full)
CNPCredit note (partial)
CNACredit note (amount)
OTHOther

Validation Rules

FieldTestValidation Code / Message
type
  • One of [response, update]
GOBL-FR-CTC-FLOW6-BILL-STATUS-01
Status type must be one of: response, update
ext
  • Ext ‘fr-ctc-flow6-status’ in [200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 213]
GOBL-FR-CTC-FLOW6-BILL-STATUS-02
Status ext fr-ctc-flow6-status must be a Status-applicable ProcessConditionCode (200-210 or 213); codes 211, 212 belong on bill.Payment
supplier
  • Present
GOBL-FR-CTC-FLOW6-BILL-STATUS-03
Status supplier is required (BR-FR-CDV-13)
supplier
  • Supplier has inbox unless WK/DFH
GOBL-FR-CTC-FLOW6-BILL-STATUS-04
Status supplier must have an inbox when its role is not WK or DFH (BR-FR-CDV-08)
supplier.ext
  • Ext require [fr-ctc-flow6-role]
GOBL-FR-CTC-FLOW6-BILL-STATUS-05
Status supplier ext fr-ctc-flow6-role is required (BR-FR-CDV-CL-03)
supplier.identities
  • Has a ext [iso-scheme-id] in [0002]
GOBL-FR-CTC-FLOW6-BILL-STATUS-06
Status supplier must have an identity with ISO/IEC 6523 scheme 0002 (SIREN)
customer
  • Present
GOBL-FR-CTC-FLOW6-BILL-STATUS-07
Status customer is required (BR-FR-CDV-CL-04)
customer
  • Customer has inbox unless WK/DFH
GOBL-FR-CTC-FLOW6-BILL-STATUS-08
Status customer must have an inbox when its role is not WK or DFH (BR-FR-CDV-08)
customer.ext
  • Ext require [fr-ctc-flow6-role]
GOBL-FR-CTC-FLOW6-BILL-STATUS-09
Status customer ext fr-ctc-flow6-role is required (BR-FR-CDV-CL-04)
customer.identities
  • Has a ext [iso-scheme-id] in [0002, 0009, 0223, 0224, 0226, 0227, 0228, 0229, 0238]
GOBL-FR-CTC-FLOW6-BILL-STATUS-10
Status customer must have at least one identity with an iso-scheme-id in the Flow 6 allow-list; STC 0231 is a Flow 2 invoice concept
lines
  • Present
  • Length between 1 and 1
GOBL-FR-CTC-FLOW6-BILL-STATUS-11
Status lines must contain exactly one entry
lines[*].doc
  • Present
GOBL-FR-CTC-FLOW6-BILL-STATUS-12
Status line doc is required (BR-FR-CDV-10)
lines[*].doc.code
  • Present
GOBL-FR-CTC-FLOW6-BILL-STATUS-13
Status line doc code is required (BR-FR-CDV-10)
lines[*].doc.issue_date
  • Present
GOBL-FR-CTC-FLOW6-BILL-STATUS-14
Status line doc issue_date is required (BR-FR-CDV-11)
lines[*].key
  • One of [issued, acknowledged, processing, accepted, querying, rejected, error]
GOBL-FR-CTC-FLOW6-BILL-STATUS-15
Status line key must be a recognised Flow 6 event
lines[*].reasons
  • Status line key in [rejected, querying, error]
  • Present
GOBL-FR-CTC-FLOW6-BILL-STATUS-16
Status line reasons require at least one entry when key is rejected, querying or error (BR-FR-CDV-14)
lines[*].reasons[*].ext
  • Line status code 200
  • Ext ‘fr-ctc-flow6-reason’ in [NON_TRANSMISE]
GOBL-FR-CTC-FLOW6-BILL-STATUS-17
Status line reason ext fr-ctc-flow6-reason for status code 200 (Déposée — transmission rejection) must be NON_TRANSMISE (BR-FR-CDV-CL-09)
lines[*].reasons[*].ext
  • Line status code 206
  • Ext ‘fr-ctc-flow6-reason’ in [AUTRE, CMD_ERR, SIRET_ERR, CODE_ROUTAGE_ERR, REF_CT_ABSENT, REF_ERR, PU_ERR, REM_ERR, QTE_ERR, ART_ERR, MODPAI_ERR, QUALITE_ERR, LIVR_INCOMP]
GOBL-FR-CTC-FLOW6-BILL-STATUS-18
Status line reason ext fr-ctc-flow6-reason for status code 206 (Approuvée partiellement) must be one of AUTRE, CMD_ERR, SIRET_ERR, CODE_ROUTAGE_ERR, REF_CT_ABSENT, REF_ERR, PU_ERR, REM_ERR, QTE_ERR, ART_ERR, MODPAI_ERR, QUALITE_ERR, LIVR_INCOMP (BR-FR-CDV-CL-09)
lines[*].reasons[*].ext
  • Line status code 207
  • Ext ‘fr-ctc-flow6-reason’ in [AUTRE, COORD_BANC_ERR, TX_TVA_ERR, MONTANTTOTAL_ERR, CALCUL_ERR, NON_CONFORME, DOUBLON, DEST_ERR, TRANSAC_INC, EMMET_INC, CONTRAT_TERM, DOUBLE_FACT, CMD_ERR, ADR_ERR, SIRET_ERR, CODE_ROUTAGE_ERR, REF_CT_ABSENT, REF_ERR, PU_ERR, REM_ERR, QTE_ERR, ART_ERR, MODPAI_ERR, QUALITE_ERR, LIVR_INCOMP]
GOBL-FR-CTC-FLOW6-BILL-STATUS-19
Status line reason ext fr-ctc-flow6-reason for status code 207 (En litige) must be one of AUTRE, COORD_BANC_ERR, TX_TVA_ERR, MONTANTTOTAL_ERR, CALCUL_ERR, NON_CONFORME, DOUBLON, DEST_ERR, TRANSAC_INC, EMMET_INC, CONTRAT_TERM, DOUBLE_FACT, CMD_ERR, ADR_ERR, SIRET_ERR, CODE_ROUTAGE_ERR, REF_CT_ABSENT, REF_ERR, PU_ERR, REM_ERR, QTE_ERR, ART_ERR, MODPAI_ERR, QUALITE_ERR, LIVR_INCOMP (BR-FR-CDV-CL-09)
lines[*].reasons[*].ext
  • Line status code 208
  • Ext ‘fr-ctc-flow6-reason’ in [JUSTIF_ABS, COORD_BANC_ERR, CMD_ERR, SIRET_ERR, CODE_ROUTAGE_ERR, REF_CT_ABSENT, REF_ERR]
GOBL-FR-CTC-FLOW6-BILL-STATUS-20
Status line reason ext fr-ctc-flow6-reason for status code 208 (Suspendue) must be one of JUSTIF_ABS, COORD_BANC_ERR, CMD_ERR, SIRET_ERR, CODE_ROUTAGE_ERR, REF_CT_ABSENT, REF_ERR (BR-FR-CDV-CL-09)
lines[*].reasons[*].ext
  • Line status code 210
  • Ext ‘fr-ctc-flow6-reason’ in [TX_TVA_ERR, MONTANTTOTAL_ERR, CALCUL_ERR, NON_CONFORME, DOUBLON, DEST_ERR, TRANSAC_INC, EMMET_INC, CONTRAT_TERM, DOUBLE_FACT, CMD_ERR, ADR_ERR, REF_CT_ABSENT]
GOBL-FR-CTC-FLOW6-BILL-STATUS-21
Status line reason ext fr-ctc-flow6-reason for status code 210 (Refusée) must be one of TX_TVA_ERR, MONTANTTOTAL_ERR, CALCUL_ERR, NON_CONFORME, DOUBLON, DEST_ERR, TRANSAC_INC, EMMET_INC, CONTRAT_TERM, DOUBLE_FACT, CMD_ERR, ADR_ERR, REF_CT_ABSENT (BR-FR-CDV-CL-09)
lines[*].reasons[*].ext
  • Line status code 213
  • Ext ‘fr-ctc-flow6-reason’ in [MONTANTTOTAL_ERR, CALCUL_ERR, DOUBLON, ADR_ERR, REJ_SEMAN, REJ_UNI, REJ_COH, REJ_ADR, REJ_CONT_B2G, REJ_REF_PJ, REJ_ASS_PJ]
GOBL-FR-CTC-FLOW6-BILL-STATUS-22
Status line reason ext fr-ctc-flow6-reason for status code 213 (Rejetée sémantique) must be one of MONTANTTOTAL_ERR, CALCUL_ERR, DOUBLON, ADR_ERR, REJ_SEMAN, REJ_UNI, REJ_COH, REJ_ADR, REJ_CONT_B2G, REJ_REF_PJ, REJ_ASS_PJ (BR-FR-CDV-CL-09)
lines[*].key
  • Status type in [response]
  • One of [acknowledged, processing, accepted, querying, rejected, error]
GOBL-FR-CTC-FLOW6-BILL-STATUS-23
Status line key must be consistent with status type ‘response’
lines[*].key
  • Status type in [update]
  • One of [issued]
GOBL-FR-CTC-FLOW6-BILL-STATUS-24
Status line key must be consistent with status type ‘update’
FieldTestValidation Code / Message
type
Calculated
  • One of [advice, receipt]
GOBL-FR-CTC-FLOW6-BILL-PAYMENT-01
Payment type must be ‘advice’ (CDAR 211) or ‘receipt’ (CDAR 212); ‘request’ is not a Flow 6 CDV event
supplier
  • Present
GOBL-FR-CTC-FLOW6-BILL-PAYMENT-02
Payment supplier is required (BR-FR-CDV-13)
supplier.identities
  • Has a ext [iso-scheme-id] in [0002]
GOBL-FR-CTC-FLOW6-BILL-PAYMENT-03
Payment supplier must have an identity with ISO/IEC 6523 scheme 0002 (SIREN)
supplier.identities[*].ext
  • Ext ‘iso-scheme-id’ in [0002, 0009, 0223, 0224, 0226, 0227, 0228, 0229, 0238]
GOBL-FR-CTC-FLOW6-BILL-PAYMENT-04
Payment supplier identity ext iso-scheme-id must be in the Flow 6 allow-list; STC 0231 is a Flow 2 invoice concept
customer
  • Present
GOBL-FR-CTC-FLOW6-BILL-PAYMENT-05
Payment customer is required (BR-FR-CDV-CL-04)
customer.identities
  • Has a ext [iso-scheme-id] in [0002]
GOBL-FR-CTC-FLOW6-BILL-PAYMENT-06
Payment customer must have an identity with ISO/IEC 6523 scheme 0002 (SIREN)
customer.identities[*].ext
  • Ext ‘iso-scheme-id’ in [0002, 0009, 0223, 0224, 0226, 0227, 0228, 0229, 0238]
GOBL-FR-CTC-FLOW6-BILL-PAYMENT-07
Payment customer identity ext iso-scheme-id must be in the Flow 6 allow-list; STC 0231 is a Flow 2 invoice concept
payee.identities[*].ext
  • Ext ‘iso-scheme-id’ in [0002, 0009, 0223, 0224, 0226, 0227, 0228, 0229, 0238]
GOBL-FR-CTC-FLOW6-BILL-PAYMENT-08
Payment payee identity ext iso-scheme-id must be in the Flow 6 allow-list; STC 0231 is a Flow 2 invoice concept
lines
  • Exactly one line
GOBL-FR-CTC-FLOW6-BILL-PAYMENT-09
Payment lines must contain exactly one entry (a CDV references a single invoice)
lines[*].document
  • Present
GOBL-FR-CTC-FLOW6-BILL-PAYMENT-10
Payment line document is required (BR-FR-CDV-10)
lines[*].document.code
  • Present
GOBL-FR-CTC-FLOW6-BILL-PAYMENT-11
Payment line document code is required (BR-FR-CDV-10)
lines[*].document.issue_date
  • Present
GOBL-FR-CTC-FLOW6-BILL-PAYMENT-12
Payment line document issue_date is required (BR-FR-CDV-11)
ext
  • Ext ‘fr-ctc-flow6-status’ in [211, 212]
GOBL-FR-CTC-FLOW6-BILL-PAYMENT-13
Payment ext fr-ctc-flow6-status must be a Payment-applicable ProcessConditionCode (211 advice or 212 receipt); codes 200-210, 213 belong on bill.Status
ext
  • Ext ‘fr-ctc-flow6-condition’ in [MEN, MPA, RAP]
GOBL-FR-CTC-FLOW6-BILL-PAYMENT-14
Payment ext fr-ctc-flow6-condition must be a Payment-applicable CharacteristicTypeCode (MEN, MPA, RAP); status-only codes (CBB, DIV, DVA, MAJ, MAP, MAPTTC, MNA, MNATTC, ESC, RAB, REM) belong on a bill.Reason under bill.Status
ext
  • Payment type in [advice]
  • Ext ‘fr-ctc-flow6-status’ in [211]
GOBL-FR-CTC-FLOW6-BILL-PAYMENT-15
Payment ext fr-ctc-flow6-status for an advice payment must be ProcessConditionCode 211 (Paiement transmis)
ext
  • Payment type in [receipt]
  • Ext ‘fr-ctc-flow6-status’ in [212]
GOBL-FR-CTC-FLOW6-BILL-PAYMENT-16
Payment ext fr-ctc-flow6-status for a receipt payment must be ProcessConditionCode 212 (Encaissée)
FieldTestValidation Code / Message
ext
  • Ext ‘fr-ctc-flow6-reason’ in [NON_TRANSMISE, JUSTIF_ABS, ROUTAGE_ERR, AUTRE, COORD_BANC_ERR, TX_TVA_ERR, MONTANTTOTAL_ERR, CALCUL_ERR, NON_CONFORME, DOUBLON, DEST_INC, DEST_ERR, TRANSAC_INC, EMMET_INC, CONTRAT_TERM, DOUBLE_FACT, CMD_ERR, ADR_ERR, SIRET_ERR, CODE_ROUTAGE_ERR, REF_CT_ABSENT, REF_ERR, PU_ERR, REM_ERR, QTE_ERR, ART_ERR, MODPAI_ERR, QUALITE_ERR, LIVR_INCOMP, REJ_SEMAN, REJ_UNI, REJ_COH, REJ_ADR, REJ_CONT_B2G, REJ_REF_PJ, REJ_ASS_PJ, IRR_VIDE_F, IRR_TYPE_F, IRR_SYNTAX, IRR_TAILLE_PJ, IRR_NOM_PJ, IRR_VID_PJ, IRR_EXT_DOC, IRR_TAILLE_F, IRR_ANTIVIRUS]
GOBL-FR-CTC-FLOW6-BILL-REASON-01
Reason ext fr-ctc-flow6-reason must be a known CDAR ReasonCode
ext
  • Ext ‘fr-ctc-flow6-condition’ in [CBB, DIV, DVA, MAJ, MAP, MAPTTC, MNA, MNATTC, ESC, RAB, REM]
GOBL-FR-CTC-FLOW6-BILL-REASON-02
Reason ext fr-ctc-flow6-condition must be a Status-applicable CharacteristicTypeCode (CBB, DIV, DVA, MAJ, MAP, MAPTTC, MNA, MNATTC, ESC, RAB, REM); MEN, MPA, RAP belong on bill.Payment
FieldTestValidation Code / Message
ext
  • Ext ‘fr-ctc-flow6-action’ in [NOA, PIN, NIN, CNF, CNP, CNA, OTH]
GOBL-FR-CTC-FLOW6-BILL-ACTION-01
Action ext fr-ctc-flow6-action must be a known CDAR RequestedActionCode (MDT-121)
FieldTestValidation Code / Message
ext
  • Known fr-ctc-flow6-role
GOBL-FR-CTC-FLOW6-ORG-PARTY-01
Party ext fr-ctc-flow6-role must be one of the UNCL 3035 subset: SE, BY, WK, DFH, AB, SR, DL, PE, PR, II, IV
identities
  • SIRET/SIREN coherent
GOBL-FR-CTC-FLOW6-ORG-PARTY-02
Party identities SIRET and SIREN codes must be coherent (BR-FR-09/10)
identities
  • Unique iso-scheme-id
GOBL-FR-CTC-FLOW6-ORG-PARTY-03
Party identities must not duplicate iso-scheme-id values (BR-FR-CO-10)
identities[*].ext
  • Ext require [iso-scheme-id]
GOBL-FR-CTC-FLOW6-ORG-PARTY-04
Party identity ext iso-scheme-id is required (BR-FR-CO-10)
identities[*].ext
  • Ext ‘iso-scheme-id’ in [0002, 0009, 0223, 0224, 0226, 0227, 0228, 0229, 0238]
GOBL-FR-CTC-FLOW6-ORG-PARTY-05
Party identity ext iso-scheme-id must be one of the Flow 6 allowed schemes (BR-FR-CO-10)
identities[*].code
  • Scheme 0224 (private-id)
  • Length between 0 and 100
GOBL-FR-CTC-FLOW6-ORG-PARTY-06
Party identity code for private-id (0224) must not exceed 100 characters (BR-FR-26)
identities[*].code
  • Scheme 0224 (private-id)
  • Matches ^[A-Za-z0-9+-_/]+$
GOBL-FR-CTC-FLOW6-ORG-PARTY-07
Party identity code for private-id (0224) must contain only alphanumeric characters and +, -, _, / (BR-FR-24)
inboxes[*]
  • Valid inbox
GOBL-FR-CTC-FLOW6-ORG-PARTY-08
Party inbox code format is invalid