| Internet-Draft | FideX AS5 Protocol | December 2026 |
| Munoz | Expires 7 June 2027 | [Page] |
This document specifies the FideX Protocol (AS5), a modern application-layer protocol for secure Business-to-Business (B2B) message exchange. FideX provides cryptographic non-repudiation, data integrity, and confidentiality using JOSE (JSON Object Signing and Encryption) over HTTPS, replacing legacy AS2 and AS4 standards with a REST-oriented approach accessible to modern web developers.¶
FideX adopts the "AS" naming lineage: AS2 ([RFC4130]) used S/MIME over HTTP; AS4 ([OASIS-ebMS]) used SOAP/WS-Security; AS5 (FideX) uses REST/JSON/JOSE over HTTPS. This document defines the message format, cryptographic operations, partner discovery, state management, acknowledgment receipts (J-MDN), and error handling.¶
This revision adds an optional event capability. Events are represented as CNCF CloudEvents version 1.0 and are exchanged between partners inside the existing FideX envelope, with the same signature, encryption, and receipt guarantees as business documents.¶
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. This document is a work in progress and represents the current thinking of the FideX Protocol Working Group at Greicodex Software.¶
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.¶
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."¶
This Internet-Draft will expire on 7 June 2027.¶
Copyright (c) 2026 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document.¶
FideX (Fast Integration for Digital Enterprises eXchange) defines a secure, reliable message exchange protocol for B2B electronic data interchange. The protocol ensures:¶
This specification defines:¶
This specification does NOT define:¶
FideX adopts the "AS" (Application Statement) naming lineage from established B2B interchange standards:¶
The designation signals evolutionary continuity while marking a generational leap to modern web-native architecture. AS5 is implementable by any developer with knowledge of REST APIs and standard JOSE libraries, without requiring specialized B2B middleware.¶
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
Additional terms used in this document:¶
Nodes MUST support HTTP/1.1 over TLS 1.3 as defined in [RFC8446]. TLS 1.2 ([RFC5246]) MAY be supported with Perfect Forward Secrecy (ECDHE key exchange) as fallback for backward compatibility.¶
Transport requirements:¶
Nodes MAY additionally support:¶
All FideX message transmissions MUST use the HTTP POST method to the receiving endpoint specified in the partner's AS5 configuration (see Section 6).¶
FideX message envelopes MUST use Content-Type: application/json.
Registration requests MUST use Content-Type: application/jose
(see Section 6.3).¶
Implementations MUST accept messages up to 10 megabytes (10,000,000 octets
in the complete HTTP request body, including the JSON envelope and all JOSE
serialization overhead). This is not a limit on the unencoded business document.
Implementations MAY accept larger messages by prior bilateral agreement.
Senders MUST NOT assume support above 10 MB without prior explicit agreement.
Implementations SHOULD reject oversized messages with HTTP 413 and the error
code PAYLOAD_TOO_LARGE (see Section 8.3).¶
A FideX message envelope consists of exactly two top-level JSON fields:¶
{
"routing_header": { ... },
"encrypted_payload": "eyJhbGc..."
}
¶
The routing_header is cleartext JSON containing message metadata
readable by intermediate infrastructure without decryption. The
encrypted_payload is a JWE compact serialization that wraps the
signed business document. These two fields are the ONLY top-level fields
in a FideX message envelope.¶
The routing header is a cleartext JSON object conveying message routing metadata. It MUST contain the following fields:¶
^[A-Z0-9_]+$. See Section 3.3.¶
YYYY-MM-DDTHH:mm:ss.SSSZ. The UTC designator "Z" MUST
be used; no local timezone offsets are permitted.¶
receive_receipt endpoint from the
sender's AS5 configuration (see Section 7.3.5).¶
encrypted_payload field
value. Computed as "sha256:" followed by the lowercase hexadecimal encoding
of SHA-256 applied to the UTF-8 byte representation of the
encrypted_payload string as it appears in the JSON envelope.
Enables routing-layer integrity checks without decryption.¶
Extension fields MAY be included and MUST use the prefix "x-" to avoid collision with future standard fields. Implementations MUST ignore unknown extension fields without error.¶
The sender_id and receiver_id fields MUST use URN format.
The following URN namespaces are recognized:¶
The document_type field uses a two-tier naming system to accommodate
both standardized inter-organization document types and organization-specific
custom types.¶
The following standard document types are defined by the FideX Working Group.
Standard types use uppercase alphanumeric characters and underscores, matching
the pattern ^[A-Z0-9_]+$. GS1 document types are defined in
[GS1-JSON].¶
| Type Identifier | Standard | Description |
|---|---|---|
| GS1_ORDER_JSON | GS1 | Purchase order (JSON binding) |
| GS1_INVOICE_JSON | GS1 | Commercial invoice (JSON binding) |
| GS1_DESADV_JSON | GS1 | Despatch advice (JSON binding) |
| GS1_RECADV_JSON | GS1 | Receiving advice (JSON binding) |
| GS1_CATALOG_JSON | GS1 | Product catalog (JSON binding) |
| X12_850 | ANSI X12 | Purchase order |
| X12_810 | ANSI X12 | Invoice |
| X12_856 | ANSI X12 | Advance ship notice |
| EDIFACT_ORDERS | UN/EDIFACT | Purchase order message |
| EDIFACT_INVOIC | UN/EDIFACT | Invoice message |
| EDIFACT_DESADV | UN/EDIFACT | Despatch advice message |
| UBL_ORDER_21 | OASIS UBL 2.1 | Order document |
| UBL_INVOICE_21 | OASIS UBL 2.1 | Invoice document |
| CLOUDEVENTS_JSON | CNCF CloudEvents 1.0 | Single event in the JSON Event Format (see Section 9.2) |
Organizations MAY define custom document types using reverse domain notation to avoid collision with standard types and with other organizations' custom types.¶
Custom types MUST follow the pattern: {TLD}_{ORG}_{DOCTYPE}_{VERSION},
for example: COM_ACME_WAREHOUSE_RECEIPT_V2.¶
Custom types MUST NOT use the reserved prefixes: GS1_,
X12_, EDIFACT_, UBL_, or
CLOUDEVENTS_.¶
Receiver nodes:¶
The encrypted_payload field contains a JWE (JSON Web Encryption)
token in compact serialization as defined in [RFC7516]. The
JWE encrypts a JWS (JSON Web Signature) token as defined in
[RFC7515], creating a nested "sign-then-encrypt" structure:¶
JWE( JWS( business_document ) )¶
This pattern ensures both authenticity (the signature is inside the encryption envelope, protecting it from substitution) and confidentiality (the business content is encrypted end-to-end).¶
Messages MUST be signed using the sender's private key before encryption.¶
The REQUIRED signing algorithm is RS256 (RSASSA-PKCS1-v1_5 with SHA-256) as defined in [RFC7518].¶
The following signing algorithms are OPTIONAL:¶
Minimum key sizes: 2048 bits for RSA (4096 bits RECOMMENDED); P-256 minimum for ECDSA (P-384 RECOMMENDED).¶
The JWS Protected Header MUST include:¶
{
"alg": "RS256",
"kid": "{sender-key-id}"
}
¶
Signed messages MUST be encrypted using the receiver's public key.¶
The REQUIRED algorithms are:¶
Implementations SHOULD also support RSA-OAEP-256, which uses SHA-256 for both OAEP and MGF1, as defined in [RFC7518], Section 4.3. Algorithm selection follows Section 6.2.1. RSA-OAEP remains the REQUIRED interoperability baseline for protocol version 1.0.¶
The JWE Protected Header MUST include:¶
{
"alg": "RSA-OAEP",
"enc": "A256GCM",
"cty": "JWT",
"kid": "{receiver-key-id}"
}
¶
The cty (content type) header parameter MUST be set to "JWT" to indicate
the JWE payload contains a nested JWS/JWT token, per [RFC7516]
Section 4.1.12. This is required for correct processing of nested tokens.¶
The JWS payload MUST be the UTF-8 encoding of the JSON-serialized business document. Binary payloads (images, PDFs, etc.) MUST be base64-encoded before JWS signing.¶
Receivers MUST verify that the JWS signing key identified by kid in the
JWS header belongs to the partner identified by sender_id in the routing
header. Specifically:¶
kid MUST resolve to a public key in the sender's JWKS.¶
public_domain associated
with the sender_id in the local partner registry.¶
This prevents cross-partner key substitution attacks where an attacker uses a valid key from one partner to impersonate another.¶
Nodes MUST publish their public keys via a JWKS endpoint at the well-known URI:¶
https://{public_domain}/.well-known/jwks.json
¶
This endpoint:¶
Per [RFC7517], keys MUST include at minimum the following fields. An RSA signing key example:¶
{
"keys": [
{
"kty": "RSA",
"use": "sig",
"kid": "acme-sign-rsa-2026-01",
"alg": "RS256",
"n": "{base64url-encoded-modulus}",
"e": "AQAB"
}
]
}
¶
An EC signing key example:¶
{
"keys": [
{
"kty": "EC",
"use": "sig",
"kid": "acme-sign-ec-2026-01",
"alg": "ES256",
"crv": "P-256",
"x": "{base64url-x-coordinate}",
"y": "{base64url-y-coordinate}"
}
]
}
¶
Field semantics:¶
Implementations SHOULD rotate keys annually. During rotation, the following procedure MUST be followed to ensure uninterrupted partner communication:¶
The kid value SHOULD encode the purpose and date to aid key management,
e.g., "org-sign-rsa-2026-01".¶
Partner discovery enables automated trading partner onboarding without manual certificate exchange. The process consists of four phases:¶
The AS5 configuration URL MAY be distributed via QR code, email, or a trading partner portal. The protocol is designed so that scanning a QR code initiates fully automated mutual trust establishment.¶
Nodes MUST expose an AS5 configuration document at an HTTPS URL. This URL:¶
The AS5 configuration document structure:¶
{
"fidex_version": "1.0",
"supported_versions": ["1.0"],
"conformance_profile": "core",
"node_id": "urn:gln:1234567890123",
"organization_name": "Example Corp",
"public_domain": "fidex.example.com",
"supported_document_types": ["GS1_ORDER_JSON", "GS1_INVOICE_JSON"],
"endpoints": {
"receive_message": "https://fidex.example.com/api/v1/receive",
"receive_receipt": "https://fidex.example.com/api/v1/receipt",
"register": "https://fidex.example.com/api/v1/register",
"jwks": "https://fidex.example.com/.well-known/jwks.json"
},
"security": {
"signature_algorithm": "RS256",
"encryption_algorithm": "RSA-OAEP",
"supported_encryption_algorithms": ["RSA-OAEP", "RSA-OAEP-256"],
"content_encryption": "A256GCM",
"minimum_key_size": 2048
}
}
¶
Required fields in the AS5 configuration:¶
The REQUIRED security.encryption_algorithm string identifies
an algorithm the node accepts from legacy peers. The OPTIONAL
security.supported_encryption_algorithms array declares all
accepted JWE key-management algorithms. When present, the array MUST
be non-empty, contain unique algorithm names, and include the value
of encryption_algorithm. Nodes MUST NOT advertise algorithms
they cannot accept. Version 1.0 nodes MUST continue to support RSA-OAEP.¶
Before encrypting a message, the sender MUST:¶
encryption_algorithm value as a one-element list.
A missing or malformed required declaration is a configuration error,
not permission to assume an algorithm.¶
alg, the selected algorithm
MUST match that declaration.¶
alg to the selected algorithm.
Receivers MUST enforce their own algorithm allowlist when decrypting.¶
Senders MUST NOT retry with a different algorithm solely because decryption or delivery failed. Cached capabilities MUST remain associated with the partner record. If they are unavailable after a restart, refresh discovery before sending instead of treating that loss as a legacy advertisement. Local policy MAY prohibit an algorithm; a node that disables RSA-OAEP cannot claim the version 1.0 Core baseline.¶
When two nodes with different supported versions communicate, the sender MUST:¶
supported_versions from their AS5 configuration.¶
supported_versions arrays.¶
fidex_version in the routing header to the negotiated version.¶
The receiver MUST reject messages with a fidex_version not present in its
supported_versions.¶
If no common version exists, the sender MUST NOT transmit and SHOULD report an incompatibility error to the local system.¶
The four-phase discovery handshake proceeds as follows:¶
Phase 1 -- Initiator Discovers Responder:¶
Phase 2 -- Initiator Registers:¶
The initiator constructs and submits a signed registration payload:¶
{
"fidex_version": "1.0",
"initiator_node_id": "urn:gln:...",
"initiator_as5_config_url": "https://...",
"security_token": "...",
"timestamp": "2026-03-09T19:00:00.000Z"
}
¶
register endpoint with
Content-Type: application/jose.¶
Phase 3 -- Responder Validates:¶
Phase 4 -- Completion:¶
Registration requests MUST:¶
Content-Type: application/jose.¶
Security tokens MUST contain at least 128 bits of entropy, generated using a cryptographically secure pseudo-random number generator (CSPRNG). For example, encode 16 CSPRNG-generated octets as 32 hexadecimal characters or 22 unpadded base64url characters. A UUID v4 has only 122 random bits and does not meet this security-token requirement.¶
Responders MUST:¶
De-registration is a local, unilateral operation. There is no protocol-level de-registration handshake.¶
Partner states:¶
| State | Description |
|---|---|
| ACTIVE | Normal operation -- messages accepted |
| SUSPENDED | Temporarily paused -- messages rejected with HTTP 503 |
| INACTIVE | De-registered -- messages rejected with HTTP 401 |
De-registration procedure:¶
Messages transition through the following states:¶
| State | Description |
|---|---|
| QUEUED | Created locally, awaiting transmission |
| SENT | Transmitted to receiver, awaiting J-MDN receipt |
| DELIVERED | Positive J-MDN received, verified, and matched to the original message |
| FAILED | Permanent failure or maximum retries exceeded |
These are protocol state semantics. Implementations MAY use different
internal database or API labels, such as ACKNOWLEDGED for DELIVERED,
provided they preserve these semantics. The status field in a
transmitted J-MDN MUST still use DELIVERED or FAILED. A verified FAILED
receipt MUST NOT transition the original message to DELIVERED.
Conformance assessment MUST check receipt verification and correlation,
not require a particular internal storage label.¶
Upon receiving a message, nodes MUST perform structural validation and return:¶
HTTP 202 indicates structural acceptance only. It does NOT indicate successful decryption, business document processing, or J-MDN generation.¶
Idempotency: Receivers MUST handle duplicate message_id
values idempotently. If a receiver encounters a message_id it has already
accepted, it MUST return HTTP 202 again and MUST NOT process the message a second
time. This ensures safe sender retries when HTTP responses are lost.¶
The J-MDN (JSON Message Disposition Notification) is the legally most significant artifact in the FideX protocol. It provides cryptographic proof that a specific message was received, decrypted, and accepted or rejected by the trading partner.¶
After processing a message, the receiver MUST send a J-MDN to the sender. The delivery target is determined as follows:¶
receipt_webhook is present in the routing header, deliver to that URL.¶
receive_receipt endpoint from the sender's AS5 configuration.¶
The J-MDN JSON object contains the following fields:¶
message_id from the original message's routing_header.¶
receiver_id in the original routing_header.¶
Positive J-MDN example (DELIVERED):¶
{
"original_message_id": "fdx-a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "DELIVERED",
"receiver_id": "urn:gln:9876543210987",
"hash_verification": "sha256:9f86d08...b0f00a08",
"timestamp": "2026-03-09T19:30:02.000Z",
"error_log": null,
"signature": "eyJhbGciOiJSUzI1NiIs..."
}
¶
Negative J-MDN example (FAILED):¶
{
"original_message_id": "fdx-a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "FAILED",
"receiver_id": "urn:gln:9876543210987",
"hash_verification": "sha256:0000...0000",
"timestamp": "2026-03-09T19:30:02.000Z",
"error_log": {
"error_code": "DECRYPTION_FAILED",
"error_message": "Unable to decrypt payload",
"details": "Key ID mismatch"
},
"signature": "eyJhbGciOiJSUzI1NiIs..."
}
¶
The hash_verification field proves that the receiver decrypted exactly
the payload the sender signed.¶
Definition:¶
hash_verification =
"sha256:" || hex( SHA-256( raw_business_payload_bytes ) )
¶
Where raw_business_payload_bytes is the UTF-8 encoded bytes of the
business JSON payload BEFORE JWS signing (i.e., the exact cleartext that was
the input to the JWS sign operation).¶
When status is "FAILED" and the receiver could NOT decrypt the
payload, hash_verification MUST be set to a string of 64 zero
hex digits: "sha256:" followed by 64 ASCII "0" characters.¶
The signature field MUST contain a JWS compact serialization covering
all other J-MDN fields (i.e., all fields except signature itself).¶
JWS Protected Header for J-MDN signing:¶
{
"alg": "RS256",
"kid": "{receiver-signing-key-id}"
}
¶
Signing procedure:¶
signature.¶
signature to the resulting JWS compact serialization.¶
Verification procedure (sender side):¶
When status is "FAILED", the error_log object MUST contain:¶
| Code | Description |
|---|---|
| DECRYPTION_FAILED | Cannot decrypt JWE (wrong key or corrupted ciphertext) |
| SIGNATURE_INVALID | JWS signature verification failed |
| UNKNOWN_DOCUMENT_TYPE | The document_type is not supported by the receiver |
| PAYLOAD_TOO_LARGE | Message exceeds receiver's processing limits |
| INTERNAL_ERROR | Receiver encountered an internal processing error |
| INVALID_EVENT | The payload of an Event Message is not a valid CloudEvent or violates Section 9.2.1 |
| UNKNOWN_EVENT_TYPE | The event type is not accepted by the receiver from this partner |
The J-MDN is delivered via HTTP POST:¶
POST {receipt_webhook} HTTP/1.1
Host: {sender_host}
Content-Type: application/json
X-FideX-Original-Message-ID: {original_message_id}
{J-MDN JSON body}
¶
Expected response:¶
{
"receipt_acknowledged": true
}
¶
Timing requirements:¶
If the J-MDN delivery endpoint is unreachable, the receiver SHOULD retry according to the following schedule:¶
After 5 failed attempts, the receiver SHOULD log the failure and store the J-MDN for manual retrieval. The J-MDN MUST NOT be discarded.¶
Senders SHOULD retry failed transmissions with exponential backoff:¶
After 5-6 failed attempts, the message SHOULD transition to FAILED state requiring manual operator intervention.¶
A business participant need not operate a FideX node to obtain evidence about its transactions. For example, a pharmaceutical distributor without FideX support can receive transaction evidence through email, a management portal, or an HTTPS webhook. A FideX node or application gateway MAY provide this capability. When it serves a non-FideX participant, it MUST provide at least one evidence delivery or retrieval channel agreed with that participant. Support for all three channels is not required.¶
This capability distributes evidence already held by the node and records additional channel events. It does not change the J-MDN wire format or require the non-FideX participant to implement JOSE. Business document delivery over a non-FideX channel is a separate application function; delivering evidence alone does not establish delivery of that document.¶
Evidence made available through these channels MUST identify the original transaction or FideX message, the business parties, the evidence issuer, the observed event and its timestamp, and the relevant document digest when available. Each digest MUST identify its algorithm and the bytes it covers, such as the business payload or encrypted envelope. If no digest is available, that limitation MUST be explicit.¶
When the evidence includes a J-MDN, the service MUST retain the original signed artifact and make it retrievable by the authorized participant. A human-readable rendering MUST identify the signer, verification result, and whether the asserted event concerns the FideX node, an intermediary, or the ultimate business recipient. Channel event records MUST identify their source and be correlated with the original evidence. A gateway's own observation MUST NOT be represented as a statement signed by the non-FideX participant.¶
source and id
attributes together form the stable event identifier and the
subject attribute carries the transaction correlation
identifier.¶
Destinations and access rights MUST be established through authorized participant configuration, not accepted solely from an inbound message's routing header. The service MUST restrict evidence access to authorized parties and protect confidential content in transit. Retrieval links MUST use HTTPS and enforce authorization; possession of a transaction identifier alone MUST NOT grant access. Delivery failures MUST be recorded, and the evidence MUST remain available for authorized retrieval under the agreed retention policy. Retrying a notification MUST NOT reprocess the original business document.¶
Notification delivery, portal access, and application acknowledgment MUST be recorded separately from the FideX message state. These events MUST NOT by themselves transition a FideX message to DELIVERED; that transition requires the verified positive J-MDN described in Section 7.1. If an intermediary is the FideX receiver, its J-MDN establishes the intermediary's disposition, not an acknowledgment by the ultimate non-FideX recipient. Any downstream acknowledgment MUST identify its actor, authentication method, scope, and original transaction.¶
Email templates, portal interfaces, and downstream business acceptance workflows are outside this specification. Webhook payloads are outside this specification except for the Protocol Events defined in Section 9.4. All of them MUST preserve the evidence attribution and event distinctions above.¶
| Code | Meaning | Sender Action |
|---|---|---|
| 202 | Accepted for processing | Wait for J-MDN |
| 400 | Invalid message structure | Do not retry (permanent error) |
| 401 | Authentication failed or partner INACTIVE | Do not retry (permanent error) |
| 413 | Payload too large | Do not retry (permanent error) |
| 429 | Rate limit exceeded | Retry with backoff; honor Retry-After header |
| 500 | Server internal error | Retry with backoff |
| 503 | Service unavailable or partner SUSPENDED | Retry with backoff |
Implementations SHOULD include a Retry-After header on HTTP 429 responses,
per [RFC9110] Section 10.2.3.¶
All error responses MUST use the following JSON structure:¶
{
"error": {
"code": "INVALID_ROUTING_HEADER",
"message": "Missing required field: message_id",
"timestamp": "2026-03-09T19:00:00.000Z"
}
}
¶
Message transmission errors:¶
INVALID_ROUTING_HEADER -- Missing or malformed routing header¶
UNKNOWN_RECEIVER -- receiver_id not recognized in partner registry¶
UNKNOWN_DOCUMENT_TYPE -- document_type not supported¶
PAYLOAD_TOO_LARGE -- Message exceeds the 10 MB size limit¶
Cryptographic errors:¶
DECRYPTION_FAILED -- Cannot decrypt JWE¶
SIGNATURE_INVALID -- JWS signature verification failed¶
UNKNOWN_KEY_ID -- Key ID not found in JWKS¶
Event errors (reported in the J-MDN error_log; see Section 9.2.3):¶
INVALID_EVENT -- Event Message payload is not a valid CloudEvent¶
UNKNOWN_EVENT_TYPE -- Event type not accepted from this partner¶
Discovery errors:¶
The preceding sections describe the exchange of business documents. Trading partners also need to tell each other that something happened: a shipment left a warehouse, a payment was settled, a stock level changed, or a document reached a processing stage. Such a statement is an event. An event records an occurrence that has already taken place. Its producer does not address a request to the consumer and does not expect a reply.¶
FideX does not define its own event structure. Events are CloudEvents as specified in [CloudEvents], version 1.0, serialized in the JSON Event Format [CE-JSON]. Implementations can therefore use existing CloudEvents libraries, brokers, and tools on either side of a FideX exchange.¶
This document uses events in two ways:¶
Event support is OPTIONAL and is not part of any conformance profile
(see Appendix C). It does not change the message envelope, the
cryptographic requirements, the J-MDN structure, or the protocol
version: a node that supports events continues to use
fidex_version "1.0". A node that does not support events
handles an Event Message like any other message with an unsupported
document_type
(Section 3.3.3).¶
This document does not define commands, that is, messages that request a partner to perform an action and that expect a correlated result. An event MUST NOT be interpreted as obliging its consumer to act. Any obligation to react to an event arises from agreement between the partners, not from this protocol.¶
An Event Message is a FideX message whose routing header carries the
document_type value CLOUDEVENTS_JSON. All requirements
of Sections 2 through 8 apply to it without change.¶
The JWS payload (Section 4.3) MUST be the UTF-8
encoding of exactly one CloudEvent serialized according to the JSON
Event Format [CE-JSON], that is, the representation
identified by the media type application/cloudevents+json.
The JSON Batch Format MUST NOT be used: each event is carried in its
own message so that each event has its own J-MDN.¶
The complete CloudEvent, including its context attributes, is inside the encrypted payload. The cleartext routing header reveals only that the message carries an event. Senders SHOULD NOT copy event attributes into routing header extension fields.¶
The routing header timestamp is the time of transmission and
is subject to the validation window of
Section 10.2. The event time attribute
is the time of the occurrence and can be much earlier. Receivers
MUST NOT apply the transmission window to the time attribute.¶
The CloudEvent in an Event Message MUST satisfy [CloudEvents] and the following additional requirements:¶
source and id together are unique for each
distinct event. A UUID ([RFC9562]) is RECOMMENDED.
A producer that sends the same event again, for example in a new
FideX message after a failed delivery, MUST reuse the same
source and id.¶
https URI whose
host is the sender's public_domain, or the sender's node
identifier URN.¶
com.example.shipment.departed.v1. The prefix
org.fidex-protocol. is reserved for event types defined
by this document.¶
datacontenttype is absent, the event data is JSON.¶
Receivers MUST accept events that contain extension attributes they do not recognize.¶
Events SHOULD be compact. It is RECOMMENDED that a serialized event not exceed 64 kilobytes, the size that [CloudEvents] expects intermediaries to forward. Larger content SHOULD be sent as a business document and referenced from the event. The message size limit of Section 2.5 applies in all cases.¶
This document defines the following CloudEvents extension attributes. Their names follow the CloudEvents attribute naming convention, and their values are of the CloudEvents type String.¶
| Attribute | Value | Use |
|---|---|---|
| fidexmsgid | The message_id of a FideX message that the event refers to |
OPTIONAL in Event Messages |
| fidexsender | The sender_id of the FideX message that a Protocol Event describes |
Protocol Events |
| fidexreceiver | The receiver_id of the FideX message that a Protocol Event describes |
Protocol Events |
| fidexdoctype | The document_type of the FideX message that a Protocol Event describes |
Protocol Events |
The fidexmsgid attribute lets a producer relate a business
event to a document previously exchanged over FideX, for example
relating a "shipment departed" event to the message that carried
the despatch advice. It identifies a message other than the Event
Message that carries the event.¶
A receiver that supports events processes an Event Message as follows:¶
INVALID_EVENT.¶
type is accepted from the
authenticated sender. If it is not, send a negative J-MDN with
error code UNKNOWN_EVENT_TYPE. A receiver MUST NOT report
DELIVERED for an event that it discards because it does not accept
its type.¶
sender_id, source, and
id. If the receiver has already accepted an event with the
same identity, it MUST NOT make the event available to consumers
again and SHOULD send a positive J-MDN.¶
Receivers MUST retain event identities for at least the replay cache period required by Section 10.2 and SHOULD retain them for as long as the partners agree that an event can be re-sent.¶
The hash_verification value of the J-MDN is computed as
specified in Section 7.3.2 over the JWS payload
octets as received, that is, over the serialized CloudEvent.
Receivers MUST NOT re-serialize the event before computing it.¶
Delivery is at-least-once: a consumer can observe an event more than
once after the receiver's duplicate records expire, so consumers
SHOULD process events idempotently. FideX does not guarantee that
Event Messages arrive in the order in which the occurrences
happened. A producer whose consumers need to reconstruct an order
has to convey it in the event, for example through time or
through a sequence value carried in the event data or in an agreed
extension attribute.¶
A positive J-MDN for an Event Message proves that the receiver decrypted the payload, verified the sender's signature, validated the payload as a CloudEvent, and accepted the event for handling. It does not prove that any consumer acted on the event, nor that the receiver agrees that the occurrence took place as stated. The signed event is evidence that the sender asserted the occurrence.¶
Events complement business documents. Where agreement or regulation requires a specific business document, such as an invoice, an event that announces it does not replace that document.¶
A partner that reacts to an event does so by sending its own
business document or its own event. The reaction can reference the
FideX message that carried the original event through the
fidexmsgid attribute.¶
A node that accepts Event Messages MUST list CLOUDEVENTS_JSON
in the supported_document_types array of its AS5
configuration (Section 6.2). It MAY also publish an
events object:¶
{
"supported_document_types": [
"GS1_ORDER_JSON", "CLOUDEVENTS_JSON"
],
"events": {
"accepted_types": [
"com.example.shipment.departed.v1",
"com.example.payment.settled.v1"
],
"published_types": [
"com.example.stock.level-changed.v1"
]
}
}
¶
type values
that the node accepts in Event Messages. When absent, the accepted
types are established by agreement between the partners.¶
type values
that the node is able to send. This member is informational:
listing a type does not oblige the node to send those events to
any particular partner.¶
A sender SHOULD NOT transmit an Event Message to a partner whose AS5
configuration does not list CLOUDEVENTS_JSON, unless the
partners have agreed otherwise. When the receiver's configuration
contains events.accepted_types, the sender SHOULD NOT
transmit an event whose type is not listed. A receiver MAY
accept from a given partner a narrower set of types than it
advertises.¶
Which events a node sends to which partner is established by agreement between the partners. This document does not define a subscription interface.¶
A node MAY emit Protocol Events to report the life cycle of the FideX messages it sends or receives. Protocol Events let applications and authorized external consumers follow a transaction without polling the node and without implementing JOSE.¶
The following Protocol Event types are defined:¶
An incompatible change to the data of a Protocol Event type will be
published under a new version suffix. Implementations MUST NOT
define their own event types under the org.fidex-protocol.
prefix.¶
A Protocol Event is a CloudEvent with the following attributes:¶
source, for each
distinct occurrence. Redeliveries of the same Protocol Event
MUST keep the same id.¶
https://{public_domain} of that node.¶
message_id of the FideX message.¶
sender_id, receiver_id, and
document_type from the routing header of the FideX
message (Section 9.2.2).¶
The event data is a JSON object with the following members:¶
signature
member. It lets a consumer retain and verify the original signed
evidence (Section 7.5.1).¶
message.failed,
message.rejected, and receipt.undeliverable
events; MUST NOT be present otherwise. It contains
error_code (string, REQUIRED) and
error_message (string, REQUIRED). The
error_code is a code from
Section 7.3.4 or Section 8.3
when one applies, and an implementation-defined code otherwise.¶
The event data MUST NOT contain the business document, any part of its content, or key material. Consumers MUST ignore members they do not recognize.¶
Example:¶
{
"specversion": "1.0",
"id": "c2f6a4de-0b7e-4d41-8a55-3f1f0d9a6e02",
"source": "https://fidex.example.com",
"type": "org.fidex-protocol.message.delivered.v1",
"time": "2026-03-09T19:30:03.250Z",
"subject": "fdx-a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"datacontenttype": "application/json",
"fidexsender": "urn:gln:1234567890123",
"fidexreceiver": "urn:gln:9876543210987",
"fidexdoctype": "GS1_ORDER_JSON",
"data": {
"message_state": "DELIVERED",
"hash_verification": "sha256:9f86d08...b0f00a08",
"jmdn": {
"original_message_id":
"fdx-a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "DELIVERED",
"receiver_id": "urn:gln:9876543210987",
"hash_verification": "sha256:9f86d08...b0f00a08",
"timestamp": "2026-03-09T19:30:02.000Z",
"error_log": null,
"signature": "eyJhbGciOiJSUzI1NiIs..."
}
}
}
¶
Delivery to the node's own applications is an implementation matter.¶
When a Protocol Event is delivered to an HTTPS endpoint, including
the webhook channel of Section 7.5.2,
the node SHOULD use the HTTP Protocol Binding for CloudEvents
[CE-HTTP] in structured content mode: an HTTP POST
request whose Content-Type is
application/cloudevents+json and whose body is the event.
The destination, authentication, and authorization requirements of
Section 7.5.2 apply. A successful
HTTP response establishes endpoint acceptance only. Nodes MAY
additionally implement the delivery and abuse-protection
conventions of [CE-WEBHOOK].¶
By agreement, a node MAY send Protocol Events to a partner as Event Messages (Section 9.2). In that case:¶
fidexsender or by
fidexreceiver. Otherwise it MUST send a negative J-MDN
with error code INVALID_EVENT.¶
FideX addresses the following threats:¶
Implementations MUST:¶
Implementations SHOULD:¶
use values).¶
Private keys:¶
Public keys:¶
source or type attributes. Receivers
MUST treat those attributes as claims made by the authenticated
sender and MUST scope event identity to the sender_id
(Section 9.2.3). Receivers SHOULD maintain, for
each partner, the list of event types accepted from that partner,
and SHOULD reject an event whose type implies an authority the
sender does not have, such as a Protocol Event about a message to
which the sender is not a party.¶
message_id replay cache
(Section 10.2). An event re-sent by its
producer in a new message is detected through the event identity
(Section 9.2.3).¶
time attribute is asserted by the producer and is not
verified by the protocol. A consumer that relies on it for
contractual or regulatory deadlines can corroborate it with the
routing header timestamp and with the J-MDN
timestamp.¶
subject and extension attributes.¶
FideX is designed to support compliance with:¶
Recommended audit trail retention periods:¶
FideX is designed to operate on standard web infrastructure. A conforming node can be implemented as a standard HTTPS web application behind any reverse proxy (Nginx, Apache, Caddy, cloud load balancers). No specialized B2B middleware, message broker, or gateway software is required. This is a key differentiator from AS2 (which required dedicated gateway software) and AS4 (which required SOAP stacks and ebMS processing engines).¶
This document has no IANA actions. The media type
application/cloudevents+json referenced in
Section 9 is defined by [CE-JSON] and is
not registered by this document.¶
The following illustrates a complete FideX message exchange.¶
HTTP request (sender to receiver):¶
POST /api/v1/receive HTTP/1.1
Host: partner.example.com
Content-Type: application/json
{
"routing_header": {
"fidex_version": "1.0",
"message_id": "fdx-a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"sender_id": "urn:gln:1234567890123",
"receiver_id": "urn:gln:9876543210987",
"document_type": "GS1_ORDER_JSON",
"timestamp": "2026-03-09T19:30:00.000Z",
"receipt_webhook": "https://sender.example.com/api/v1/receipt"
},
"encrypted_payload": "eyJhbGciOiJSU0EtT0FFUCIs..."
}
¶
HTTP 202 response (receiver accepts):¶
{
"status": "accepted",
"message_id": "fdx-a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"timestamp": "2026-03-09T19:30:00.500Z"
}
¶
J-MDN receipt (receiver delivers to sender's webhook):¶
POST /api/v1/receipt HTTP/1.1
Host: sender.example.com
Content-Type: application/json
X-FideX-Original-Message-ID: fdx-a1b2c3d4-e5f6-7890-abcd-ef1234567890
{
"original_message_id": "fdx-a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "DELIVERED",
"receiver_id": "urn:gln:9876543210987",
"hash_verification": "sha256:9f86d08...b0f00a08",
"timestamp": "2026-03-09T19:30:02.000Z",
"error_log": null,
"signature": "eyJhbGciOiJSUzI1NiIs..."
}
¶
Event Message example (Section 9.2). The routing header identifies the payload as an event:¶
{
"fidex_version": "1.0",
"message_id": "fdx-7c9e6679-7425-40de-944b-e07fc1f90ae7",
"sender_id": "urn:gln:1234567890123",
"receiver_id": "urn:gln:9876543210987",
"document_type": "CLOUDEVENTS_JSON",
"timestamp": "2026-03-10T08:15:00.000Z"
}
¶
The CloudEvent below is the JWS payload before signing. It relates a shipment departure to the FideX message that carried the despatch advice:¶
{
"specversion": "1.0",
"id": "5f0c1e5e-7a3b-4c57-9d0e-2b6a8f1c9d11",
"source": "https://fidex.example.com/warehouse/01",
"type": "com.example.shipment.departed.v1",
"time": "2026-03-10T08:14:52Z",
"subject": "DA-2026-004512",
"datacontenttype": "application/json",
"fidexmsgid": "fdx-a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"data": {
"despatch_advice": "DA-2026-004512",
"carrier": "Example Logistics",
"estimated_arrival": "2026-03-11T16:00:00Z"
}
}
¶
FideX defines three conformance profiles to enable progressive adoption.
Implementations MUST declare which profile(s) they conform to via the
conformance_profile field in their AS5 configuration.¶
Core conformance includes signed J-MDN generation, delivery, and verification, as well as the mandatory security requirements of this document. A test suite that omits these checks establishes only partial implementation coverage; it does not establish Core conformance.¶
An implementation claiming FideX Core conformance MUST support all requirements listed in Sections 2 through 8 of this specification, including:¶
An implementation claiming FideX Enhanced conformance MUST satisfy FideX Core AND additionally support:¶
An implementation claiming FideX Edge conformance MUST satisfy FideX Enhanced AND additionally support:¶
Event support is an optional capability that is independent of the
three profiles above. It is advertised through the AS5 configuration
(Section 9.3), not through the
conformance_profile field. An implementation that claims
event support MUST satisfy FideX Core AND additionally:¶
CLOUDEVENTS_JSON message it sends¶
INVALID_EVENT and UNKNOWN_EVENT_TYPE negative
receipts and duplicate detection by sender, source, and
id¶
CLOUDEVENTS_JSON in
supported_document_types when it accepts Event Messages¶
Emitting Protocol Events is a further option. An implementation that emits them MUST use the types, attributes, and data of Section 9.4.¶
This appendix provides known-answer test vectors to allow implementers to verify their JOSE cryptographic operations produce correct output.¶
WARNING: The key material in this appendix is public and MUST NOT be used for any production traffic.¶
Test payload (UTF-8 bytes):¶
{"order_id":"PO-TEST-001","amount":100.00,"currency":"USD"}
¶
SHA-256 hash of test payload:¶
sha256: bf21a9e8fbc5a3846fb05b4fa0859e0917b2202f9a69e4c98b7b0f09cb281e71¶
Expected JWS header for signing:¶
{"alg":"RS256","kid":"test-sign-2026-01"}
¶
Expected JWE header for encryption:¶
{
"alg": "RSA-OAEP",
"enc": "A256GCM",
"cty": "JWT",
"kid": "test-enc-2026-01"
}
¶
Test routing header:¶
{
"fidex_version": "1.0",
"message_id": "fdx-00000000-0000-0000-0000-000000000001",
"sender_id": "urn:gln:0000000000001",
"receiver_id": "urn:gln:0000000000002",
"document_type": "GS1_ORDER_JSON",
"timestamp": "2026-01-01T00:00:00.000Z",
"receipt_webhook": "https://test.sender.example.com/receipt"
}
¶
Verification procedure:¶
The following JSON Schema (Draft-07) definitions provide machine-readable validation rules for FideX structures.¶
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://fidex-protocol.org/schemas/v1/routing-header.json",
"title": "FideX Routing Header",
"type": "object",
"required": [
"fidex_version", "message_id", "sender_id",
"receiver_id", "document_type", "timestamp"
],
"additionalProperties": true,
"properties": {
"fidex_version": {
"type": "string", "pattern": "^\\d+\\.\\d+$"
},
"message_id": {
"type": "string", "minLength": 1, "maxLength": 256
},
"sender_id": {
"type": "string",
"pattern": "^urn:(gln|duns|lei|tin|custom):.+$"
},
"receiver_id": {
"type": "string",
"pattern": "^urn:(gln|duns|lei|tin|custom):.+$"
},
"document_type": {
"type": "string", "pattern": "^[A-Z0-9_]+$",
"minLength": 1, "maxLength": 128
},
"timestamp": { "type": "string", "format": "date-time" },
"receipt_webhook": {
"type": "string", "format": "uri",
"pattern": "^https://"
},
"payload_digest": {
"type": "string",
"pattern": "^sha256:[a-f0-9]{64}$"
}
},
"patternProperties": { "^x-": {} }
}
¶
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://fidex-protocol.org/schemas/v1/jmdn.json",
"title": "FideX J-MDN",
"type": "object",
"required": [
"original_message_id", "status", "receiver_id",
"hash_verification", "timestamp", "error_log", "signature"
],
"additionalProperties": false,
"properties": {
"original_message_id": { "type": "string", "minLength": 1 },
"status": {
"type": "string", "enum": ["DELIVERED", "FAILED"]
},
"receiver_id": {
"type": "string",
"pattern": "^urn:(gln|duns|lei|tin|custom):.+$"
},
"hash_verification": {
"type": "string",
"pattern": "^sha256:[a-f0-9]{64}$"
},
"timestamp": { "type": "string", "format": "date-time" },
"error_log": {
"oneOf": [
{ "type": "null" },
{
"type": "object",
"required": ["error_code", "error_message"],
"properties": {
"error_code": {
"type": "string",
"enum": [
"DECRYPTION_FAILED",
"SIGNATURE_INVALID",
"UNKNOWN_DOCUMENT_TYPE",
"PAYLOAD_TOO_LARGE",
"INTERNAL_ERROR",
"INVALID_EVENT",
"UNKNOWN_EVENT_TYPE"
]
},
"error_message": { "type": "string" },
"details": { "type": "string" }
}
}
]
},
"signature": { "type": "string", "minLength": 1 }
}
}
¶
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://fidex-protocol.org/schemas/v1/as5-config.json",
"title": "FideX AS5 Configuration",
"type": "object",
"required": [
"fidex_version", "supported_versions", "node_id",
"organization_name", "public_domain",
"endpoints", "security"
],
"properties": {
"fidex_version": {
"type": "string", "pattern": "^\\d+\\.\\d+$"
},
"supported_versions": {
"type": "array",
"items": { "type": "string" },
"minItems": 1
},
"conformance_profile": {
"type": "string",
"enum": ["core", "enhanced", "edge"]
},
"node_id": { "type": "string", "pattern": "^urn:" },
"organization_name": { "type": "string", "minLength": 1 },
"public_domain": { "type": "string" },
"supported_document_types": {
"type": "array",
"items": {
"type": "string", "pattern": "^[A-Z0-9_]+$"
}
},
"events": {
"type": "object",
"properties": {
"accepted_types": {
"type": "array",
"items": { "type": "string", "minLength": 1 },
"uniqueItems": true
},
"published_types": {
"type": "array",
"items": { "type": "string", "minLength": 1 },
"uniqueItems": true
}
}
},
"endpoints": {
"type": "object",
"required": [
"receive_message", "receive_receipt",
"register", "jwks"
],
"properties": {
"receive_message": { "type": "string", "format": "uri" },
"receive_receipt": { "type": "string", "format": "uri" },
"register": { "type": "string", "format": "uri" },
"jwks": { "type": "string", "format": "uri" }
}
},
"security": {
"type": "object",
"required": [
"signature_algorithm", "encryption_algorithm",
"content_encryption", "minimum_key_size"
],
"properties": {
"signature_algorithm": { "type": "string" },
"encryption_algorithm": { "type": "string", "minLength": 1 },
"supported_encryption_algorithms": {
"type": "array",
"items": { "type": "string", "minLength": 1 },
"minItems": 1,
"uniqueItems": true
},
"content_encryption": { "type": "string" },
"minimum_key_size": {
"type": "integer", "minimum": 2048
}
}
}
}
}
¶
This schema expresses the additional requirements of Section 9.2.1. It does not replace validation against [CloudEvents].¶
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://fidex-protocol.org/schemas/v1/event.json",
"title": "FideX Event Message Payload (CloudEvent)",
"type": "object",
"required": ["specversion", "id", "source", "type", "time"],
"additionalProperties": true,
"properties": {
"specversion": { "const": "1.0" },
"id": { "type": "string", "minLength": 1 },
"source": {
"type": "string", "format": "uri", "minLength": 1
},
"type": { "type": "string", "minLength": 1 },
"time": { "type": "string", "format": "date-time" },
"subject": { "type": "string", "minLength": 1 },
"datacontenttype": { "type": "string", "minLength": 1 },
"dataschema": {
"type": "string", "format": "uri", "minLength": 1
},
"data_base64": { "type": "string" },
"fidexmsgid": { "type": "string", "minLength": 1 },
"fidexsender": {
"type": "string",
"pattern": "^urn:(gln|duns|lei|tin|custom):.+$"
},
"fidexreceiver": {
"type": "string",
"pattern": "^urn:(gln|duns|lei|tin|custom):.+$"
},
"fidexdoctype": {
"type": "string", "pattern": "^[A-Z0-9_]+$"
}
}
}
¶
This appendix is informative and records development plans, not claims of implementation availability or demonstrated conformance. Full Java and C#/.NET implementations are planned to broaden deployment options and provide additional independent interoperability coverage. Language examples alone do not constitute a complete protocol implementation.¶
Each implementation is intended to support the complete Core profile, including discovery and registration, JOSE message exchange, signed J-MDN generation and verification, algorithm negotiation, retry handling, and the mandatory security requirements. Evidence delivery to non-FideX participants can be provided through the application integration described in Section 7.5.¶
Interoperability evaluation is planned in both directions between Java, C#/.NET, Go, and PHP implementations, using shared positive and negative test vectors. Results should identify the exact draft revision, software versions, tested capabilities, and known limitations. No Java or C#/.NET implementation or successful interoperability result is asserted by this document at the time of this revision.¶
The event capability of Section 9 is specified in this revision. No implementation of it, and no interoperability result for it, is asserted by this document.¶
CLOUDEVENTS_JSON and
reserved the CLOUDEVENTS_ prefix.¶
events object to the AS5 configuration
and to its schema.¶
INVALID_EVENT and
UNKNOWN_EVENT_TYPE.¶