AS2 (Applicability Statement 2) is a widely used protocol for securely exchanging business documents over the internet. It is commonly used in Electronic Data Interchange (EDI) environments to transfer documents such as purchase orders, invoices, shipping notices, and inventory reports between trading partners.
AS2 enables organizations to exchange data directly and securely using standard internet technologies while ensuring confidentiality, integrity, authentication, and non-repudiation.
Why is AS2 Important?
Many retailers, manufacturers, logistics providers, and healthcare organizations require their business partners to exchange documents via AS2 because it offers:
How AS2 Works
The AS2 protocol uses the following process:
This process ensures that both parties can trust the authenticity and integrity of the exchanged data.
Key AS2 Terminology
Trading Partner
A Trading Partner is an organization that exchanges business documents with another organization via AS2.
Examples:
Each trading partner maintains configuration information required for communication.
AS2 Identifier (AS2 ID)
An AS2 ID uniquely identifies a trading partner within an AS2 connection.
Example:
Sender AS2 ID: COMPANY_A
Receiver AS2 ID: COMPANY_B
The AS2 IDs are included in every message and must match the values configured by both partners.
Endpoint URL
The AS2 Endpoint URL is the HTTPS address where AS2 messages are delivered.
Example:
https://as2.company.com/as2/receive
Trading partners must exchange and configure their endpoint URLs before communication can begin.
Digital Certificate
A Digital Certificate is used to support encryption and digital signatures.
Certificates contain:
AS2 commonly uses X.509 certificates.
Public Key
The Public Key is shared with trading partners.
It is used to:
Public keys can be distributed without compromising security.
Private Key
The Private Key remains confidential and is stored securely by the certificate owner.
It is used to:
The private key should never be shared.
Encryption
Encryption protects the content of a message from unauthorized access during transmission.
Common encryption algorithms include:
Only the intended recipient can decrypt the message using their private key.
Digital Signature
A Digital Signature proves the identity of the sender and ensures that the message has not been altered.
Benefits:
Common signing algorithms include:
HTTPS
AS2 messages are transported over HTTPS (Hypertext Transfer Protocol Secure).
HTTPS provides:
AS2 adds additional message-level security on top of HTTPS.
EDI Document
An EDI Document is the business data exchanged through AS2.
Common document types include:
Document | Purpose |
Purchase Order (850) | Place an order |
Invoice (810) | Request payment |
Advance Ship Notice (856) | Notify shipment |
Purchase Order Acknowledgment (855) | Confirm order |
Inventory Report | Share stock levels |
AS2 itself is transport technology; it does not define document formats.
Payload
The Payload is the actual business document being transmitted.
Examples:
AS2 treats the payload as content to be securely delivered.
MDN (Message Disposition Notification)
An MDN is an acknowledgment sent by the receiver after processing an AS2 message.
It confirms:
MDNs provide proof that a message reached its destination.
Types of MDNs
Synchronous MDN
Returned immediately within the same HTTPS connection.
Benefits:
Asynchronous MDN
Returned later through a separate HTTPS connection.
Benefits:
Non-Repudiation
Non-Repudiation means a sender cannot deny having sent a message.
This is achieved through:
Non-repudiation is often required for compliance and contractual agreements.
MIC (Message Integrity Check)
The MIC is a cryptographic hash generated from the transmitted message.
It allows both parties to verify:
The MIC value is included in the MDN response.
Compression
AS2 supports message compression before transmission.
Benefits:
Commonly implemented using ZLIB compression.
Message Integrity
Message Integrity ensures that data has not been altered during transport.
Integrity is verified using:
Any modification to the message invalidates the integrity check.
Certificate Exchange
Before AS2 communication can begin, trading partners exchange:
This setup process is commonly called Trading Partner Onboarding.
Typical AS2 Configuration Information
When establishing a new AS2 connection, partners usually exchange the following details:
Configuration Item | Example |
AS2 ID | COMPANY_A |
AS2 URL | https://as2.company.com/receive |
Certificate | X.509 Public Certificate |
Encryption | AES-256 |
Signature | SHA-256 |
MDN Type | Synchronous |
MDN Signing | Required |
Advantages of AS2
Security
Strong encryption and digital signatures protect sensitive business data.
Reliability
MDNs provide confirmation that messages were received successfully.
Cost Efficiency
Uses the public internet instead of expensive private EDI networks.
Compliance
Supports auditability and non-repudiation requirements.
Industry Adoption
Widely accepted by major retailers, manufacturers, logistics providers, and healthcare organizations.
Summary
AS2 is a secure and reliable protocol for exchanging business documents over the internet. By combining HTTPS, encryption, digital signatures, and MDNs, AS2 enables organizations to automate B2B communication while maintaining high levels of security and accountability.
Understanding core AS2 terminology—including AS2 IDs, certificates, encryption, digital signatures, MDNs, MICs, and trading partners—is essential for successfully implementing and managing AS2 integrations.