Skip to content
Swiss federal authorities

sedex Receipts

About Receipts๐Ÿ”—

A receipt is generated for each recipient of a sedex message.

A receipt is issued once a message has been successfully delivered or if the message can no longer be delivered.

When a message is sent to multiple participants, receipts may already be generated for some recipients, while others are still pending.

Each receipt contains a status code and status information that describe the status. Code 100 indicates that the message was successfully delivered.

Format๐Ÿ”—

File-based schema version

Please note: File-based messaging uses version 2 of the eCH-0090 standard for receipts. However, sedex envelopes must still be created using version 1 of the eCH-0090 schema for backward compatibility.

Examples๐Ÿ”—

Examples of receipts for file-based or REST API-based messaging.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<receipt xmlns="http://www.ech.ch/xmlns/eCH-0090/2" version="2.0">
    <eventDate>2025-01-21T16:23:28+01:00</eventDate>
    <statusCode>100</statusCode>
    <statusInfo>Message successfully transmitted</statusInfo>
    <messageId>TEST-76578537820918</messageId>
    <messageType>4711</messageType>
    <messageClass>0</messageClass>
    <senderId>1-1234</senderId>
    <recipientId>1-1234-1</recipientId>
</receipt>
{
  "receipt-list": [
    {
      "event-date": "2025-01-21T16:33:47.576+01:00",
      "status-code": 100,
      "status-info": "Message successfully transmitted",
      "unique-sedex-message-id": 203799712,
      "message-id": "TEST-76578537820918",
      "message-type": 4711,
      "message-class": 0,
      "messaging-interface": "web-service",
      "sender-id": "1-1234-1",
      "recipient-id": "1-1234-1"
    }
  ]
}

Content of a Receipt๐Ÿ”—

Receipts are automatically generated by the sedex client upon message reception or when an error occurs. They follow a standardized format and include essential elements such as:

  • eventDate: The timestamp of the receipt generation.
  • statusCode: Indicates success (e.g., 100) or failure (e.g., 200-599).
  • statusInfo: A descriptive message regarding the receipt status.
  • messageId: References the original message.
  • senderId and recipientId: Identifies the sender and recipient of the message.

Processing of Receipts:๐Ÿ”—

  1. Storage and Retrieval: The sending application retrieves receipts from the sedex clientโ€™s designated receipt directory or via its rest service.
  2. Error Handling: If an error occurred, the system processes the error code and takes appropriate corrective actions (e.g., reattempting transmission for temporary failures).
  3. Archiving: Receipts should be saved or recorded for compliance and auditing purposes.
  4. Removal: Processed receipts should be removed to distinguish between processed and unprocessed receipts.

3. Best Practices๐Ÿ”—

To ensure efficient receipt management, follow these best practices:

  • Automate Receipt Handling: Implement scripts or automated processes to regularly check for and process receipts.
  • Monitor Status Codes: Pay close attention to status codes to differentiate between transient and permanent errors.
  • Log and Store Receipts: Maintain logs of receipts for auditing and troubleshooting, ensuring compliance with retention policies.
  • Implement Retry Mechanisms: For temporary errors (e.g., network issues), configure retry policies to resend messages within the allowed timeframe.
  • Validate Envelope Structure: Ensure that messages conform to sedexโ€™s schema to avoid rejection due to syntax errors.

Status Codes๐Ÿ”—

These are the status codes used by the sedex system and their meanings

Code Remark
100 Message correctly transmitted
200 Invalid envelope syntax
201 Duplicate message ID
202 No payload found
203 Message too old to send
204 Message expired
300 Unknown sender ID
301 Unknown recipient ID
302 Unknown physical sender ID
303 Invalid message type
304 Invalid message class
310 Not allowed to send
311 Not allowed to receive
312 User certificate not valid
313 Other recipients are not allowed to receive
330 Message size exceeds limit
400 Network error
401 OSCI hub not reachable
402 Folder not reachable
403 Logging service not reachable
404 Authorization service not reachable
500 Internal error
501 Error during receiving
601 Message successfully sent to sedex server
701 Message expires soon

Status Code Ranges๐Ÿ”—

In the sedex system, status codes in receipts provide information about the outcome of message transmissions. These codes are categorized into different ranges to indicate the nature of the response or error encountered. Below is a table summarizing these status code ranges:

Status Code Range Description
100-199 Success: The message was successfully delivered and processed.
200-299 Permanent Errors: The message encountered a permanent error and will not be retried.
300-399 Temporary Errors: The message encountered a temporary error and may be retried.
400-499 Network Errors: Issues related to network connectivity or communication failures.
500-599 System Errors: Internal system errors within the sedex infrastructure.
600-699 Progress Information: Progress updates can be optionally enabled for messages stored on the sedex server. These updates can be evaluated or ignored.
700-799 Warnings: A warning is associated with the sent message. These warnings can be evaluated or ignored.

Important Note: Normally, a receipt is generated only when the message has been successfully delivered or can no longer be delivered.

However, receipts in the range of 600-799 are purely informational, and a final receipt will be issued later.