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.fr-ctc-flow6-role
fr-ctc-flow6-role
| Code | Name |
|---|---|
BY | Buyer |
AB | Buyer’s agent |
DL | Factor |
SE | Seller |
SR | Seller’s agent |
WK | Dematerialisation platform or operator |
DFH | Portail Public de Facturation (PPF) |
PE | Payee |
PR | Payer |
II | Invoicer |
IV | Invoicee |
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.fr-ctc-flow6-reason
fr-ctc-flow6-reason
| Code | Name |
|---|---|
NON_TRANSMISE | Not transmitted |
JUSTIF_ABS | Justification absent |
ROUTAGE_ERR | Routing error |
AUTRE | Other |
COORD_BANC_ERR | Bank account details error |
TX_TVA_ERR | VAT rate error |
MONTANTTOTAL_ERR | Total amount error |
CALCUL_ERR | Calculation error |
NON_CONFORME | Non-compliant |
DOUBLON | Duplicate |
DEST_INC | Unknown recipient |
DEST_ERR | Recipient error |
TRANSAC_INC | Unknown transaction |
EMMET_INC | Unknown issuer |
CONTRAT_TERM | Contract terminated |
DOUBLE_FACT | Double invoicing |
CMD_ERR | Order reference error |
ADR_ERR | Address error |
SIRET_ERR | SIRET error |
CODE_ROUTAGE_ERR | Routing code error |
REF_CT_ABSENT | Contract reference absent |
REF_ERR | Reference error |
PU_ERR | Unit price error |
REM_ERR | Discount error |
QTE_ERR | Quantity error |
ART_ERR | Item error |
MODPAI_ERR | Payment method error |
QUALITE_ERR | Quality issue |
LIVR_INCOMP | Incomplete delivery |
REJ_SEMAN | Semantic rejection |
REJ_UNI | Uniqueness violation |
REJ_COH | Coherence rejection |
REJ_ADR | Address rejection |
REJ_CONT_B2G | B2G context rejection |
REJ_REF_PJ | Attachment reference rejection |
REJ_ASS_PJ | Attachment association rejection |
IRR_VIDE_F | Empty file |
IRR_TYPE_F | Invalid file type |
IRR_SYNTAX | Syntax error |
IRR_TAILLE_PJ | Attachment size |
IRR_NOM_PJ | Attachment name |
IRR_VID_PJ | Empty attachment |
IRR_EXT_DOC | External document |
IRR_TAILLE_F | File size |
IRR_ANTIVIRUS | Antivirus |
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).
fr-ctc-flow6-status
fr-ctc-flow6-status
| Code | Name |
|---|---|
200 | Deposited |
201 | Issued by platform |
202 | Received by PA |
203 | Made available |
204 | Taken into account |
205 | Approved |
206 | Partially approved |
207 | In dispute |
208 | Suspended |
209 | Completed |
210 | Rejected |
211 | Payment transmitted |
212 | Cashed in |
213 | Semantically 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.
fr-ctc-flow6-condition
fr-ctc-flow6-condition
| Code | Name |
|---|---|
CBB | Bank details to modify |
DIV | Invalid data |
DVA | Expected valid data |
MAJ | Replacement value |
MAP | Approved amount (excl. VAT) |
MAPTTC | Approved amount (incl. VAT) |
MNA | Rejected amount (excl. VAT) |
MNATTC | Rejected amount (incl. VAT) |
ESC | Discount granted |
RAB | Rebate granted |
REM | Reduction granted |
MEN | Amount received |
MPA | Amount paid |
RAP | Amount 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.fr-ctc-flow6-action
fr-ctc-flow6-action
| Code | Name |
|---|---|
NOA | No action |
PIN | Provide information |
NIN | Reissue invoice |
CNF | Credit note (full) |
CNP | Credit note (partial) |
CNA | Credit note (amount) |
OTH | Other |
Validation Rules
bill.Status
bill.Status
| Field | Test | Validation Code / Message |
|---|---|---|
type |
| GOBL-FR-CTC-FLOW6-BILL-STATUS-01Status type must be one of: response, update |
ext |
| GOBL-FR-CTC-FLOW6-BILL-STATUS-02Status ext fr-ctc-flow6-status must be a Status-applicable ProcessConditionCode (200-210 or 213); codes 211, 212 belong on bill.Payment |
supplier |
| GOBL-FR-CTC-FLOW6-BILL-STATUS-03Status supplier is required (BR-FR-CDV-13) |
supplier |
| GOBL-FR-CTC-FLOW6-BILL-STATUS-04Status supplier must have an inbox when its role is not WK or DFH (BR-FR-CDV-08) |
supplier.ext |
| GOBL-FR-CTC-FLOW6-BILL-STATUS-05Status supplier ext fr-ctc-flow6-role is required (BR-FR-CDV-CL-03) |
supplier.identities |
| GOBL-FR-CTC-FLOW6-BILL-STATUS-06Status supplier must have an identity with ISO/IEC 6523 scheme 0002 (SIREN) |
customer |
| GOBL-FR-CTC-FLOW6-BILL-STATUS-07Status customer is required (BR-FR-CDV-CL-04) |
customer |
| GOBL-FR-CTC-FLOW6-BILL-STATUS-08Status customer must have an inbox when its role is not WK or DFH (BR-FR-CDV-08) |
customer.ext |
| GOBL-FR-CTC-FLOW6-BILL-STATUS-09Status customer ext fr-ctc-flow6-role is required (BR-FR-CDV-CL-04) |
customer.identities |
| GOBL-FR-CTC-FLOW6-BILL-STATUS-10Status 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 |
| GOBL-FR-CTC-FLOW6-BILL-STATUS-11Status lines must contain exactly one entry |
lines[*].doc |
| GOBL-FR-CTC-FLOW6-BILL-STATUS-12Status line doc is required (BR-FR-CDV-10) |
lines[*].doc.code |
| GOBL-FR-CTC-FLOW6-BILL-STATUS-13Status line doc code is required (BR-FR-CDV-10) |
lines[*].doc.issue_date |
| GOBL-FR-CTC-FLOW6-BILL-STATUS-14Status line doc issue_date is required (BR-FR-CDV-11) |
lines[*].key |
| GOBL-FR-CTC-FLOW6-BILL-STATUS-15Status line key must be a recognised Flow 6 event |
lines[*].reasons |
| GOBL-FR-CTC-FLOW6-BILL-STATUS-16Status line reasons require at least one entry when key is rejected, querying or error (BR-FR-CDV-14) |
lines[*].reasons[*].ext |
| GOBL-FR-CTC-FLOW6-BILL-STATUS-17Status 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 |
| GOBL-FR-CTC-FLOW6-BILL-STATUS-18Status 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 |
| GOBL-FR-CTC-FLOW6-BILL-STATUS-19Status 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 |
| GOBL-FR-CTC-FLOW6-BILL-STATUS-20Status 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 |
| GOBL-FR-CTC-FLOW6-BILL-STATUS-21Status 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 |
| GOBL-FR-CTC-FLOW6-BILL-STATUS-22Status 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 |
| GOBL-FR-CTC-FLOW6-BILL-STATUS-23Status line key must be consistent with status type ‘response’ |
lines[*].key |
| GOBL-FR-CTC-FLOW6-BILL-STATUS-24Status line key must be consistent with status type ‘update’ |
bill.Payment
bill.Payment
| Field | Test | Validation Code / Message |
|---|---|---|
typeCalculated |
| GOBL-FR-CTC-FLOW6-BILL-PAYMENT-01Payment type must be ‘advice’ (CDAR 211) or ‘receipt’ (CDAR 212); ‘request’ is not a Flow 6 CDV event |
supplier |
| GOBL-FR-CTC-FLOW6-BILL-PAYMENT-02Payment supplier is required (BR-FR-CDV-13) |
supplier.identities |
| GOBL-FR-CTC-FLOW6-BILL-PAYMENT-03Payment supplier must have an identity with ISO/IEC 6523 scheme 0002 (SIREN) |
supplier.identities[*].ext |
| GOBL-FR-CTC-FLOW6-BILL-PAYMENT-04Payment supplier identity ext iso-scheme-id must be in the Flow 6 allow-list; STC 0231 is a Flow 2 invoice concept |
customer |
| GOBL-FR-CTC-FLOW6-BILL-PAYMENT-05Payment customer is required (BR-FR-CDV-CL-04) |
customer.identities |
| GOBL-FR-CTC-FLOW6-BILL-PAYMENT-06Payment customer must have an identity with ISO/IEC 6523 scheme 0002 (SIREN) |
customer.identities[*].ext |
| GOBL-FR-CTC-FLOW6-BILL-PAYMENT-07Payment 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 |
| GOBL-FR-CTC-FLOW6-BILL-PAYMENT-08Payment payee identity ext iso-scheme-id must be in the Flow 6 allow-list; STC 0231 is a Flow 2 invoice concept |
lines |
| GOBL-FR-CTC-FLOW6-BILL-PAYMENT-09Payment lines must contain exactly one entry (a CDV references a single invoice) |
lines[*].document |
| GOBL-FR-CTC-FLOW6-BILL-PAYMENT-10Payment line document is required (BR-FR-CDV-10) |
lines[*].document.code |
| GOBL-FR-CTC-FLOW6-BILL-PAYMENT-11Payment line document code is required (BR-FR-CDV-10) |
lines[*].document.issue_date |
| GOBL-FR-CTC-FLOW6-BILL-PAYMENT-12Payment line document issue_date is required (BR-FR-CDV-11) |
ext |
| GOBL-FR-CTC-FLOW6-BILL-PAYMENT-13Payment 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 |
| GOBL-FR-CTC-FLOW6-BILL-PAYMENT-14Payment 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 |
| GOBL-FR-CTC-FLOW6-BILL-PAYMENT-15Payment ext fr-ctc-flow6-status for an advice payment must be ProcessConditionCode 211 (Paiement transmis) |
ext |
| GOBL-FR-CTC-FLOW6-BILL-PAYMENT-16Payment ext fr-ctc-flow6-status for a receipt payment must be ProcessConditionCode 212 (Encaissée) |
bill.Reason
bill.Reason
| Field | Test | Validation Code / Message |
|---|---|---|
ext |
| GOBL-FR-CTC-FLOW6-BILL-REASON-01Reason ext fr-ctc-flow6-reason must be a known CDAR ReasonCode |
ext |
| GOBL-FR-CTC-FLOW6-BILL-REASON-02Reason 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 |
bill.Action
bill.Action
| Field | Test | Validation Code / Message |
|---|---|---|
ext |
| GOBL-FR-CTC-FLOW6-BILL-ACTION-01Action ext fr-ctc-flow6-action must be a known CDAR RequestedActionCode (MDT-121) |
org.Party
org.Party
| Field | Test | Validation Code / Message |
|---|---|---|
ext |
| GOBL-FR-CTC-FLOW6-ORG-PARTY-01Party 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 |
| GOBL-FR-CTC-FLOW6-ORG-PARTY-02Party identities SIRET and SIREN codes must be coherent (BR-FR-09/10) |
identities |
| GOBL-FR-CTC-FLOW6-ORG-PARTY-03Party identities must not duplicate iso-scheme-id values (BR-FR-CO-10) |
identities[*].ext |
| GOBL-FR-CTC-FLOW6-ORG-PARTY-04Party identity ext iso-scheme-id is required (BR-FR-CO-10) |
identities[*].ext |
| GOBL-FR-CTC-FLOW6-ORG-PARTY-05Party identity ext iso-scheme-id must be one of the Flow 6 allowed schemes (BR-FR-CO-10) |
identities[*].code |
| GOBL-FR-CTC-FLOW6-ORG-PARTY-06Party identity code for private-id (0224) must not exceed 100 characters (BR-FR-26) |
identities[*].code |
| GOBL-FR-CTC-FLOW6-ORG-PARTY-07Party identity code for private-id (0224) must contain only alphanumeric characters and +, -, _, / (BR-FR-24) |
inboxes[*] |
| GOBL-FR-CTC-FLOW6-ORG-PARTY-08Party inbox code format is invalid |