AS2 vs SFTP vs VAN: how EDI files travel between trading partners
AS2, SFTP and a VAN are three ways to send EDI files to a trading partner. They differ in what they give you back: AS2 returns a receipt, SFTP just moves the file, and a VAN holds files in a mailbox run by a third party. Often your partner’s requirements decide which one you use. If you have a choice, the trade-off is mostly receipts and setup effort against cost.
This is about transport, the road the file travels on. The file itself, such as an 850 purchase order, is a separate matter.
What is AS2?
AS2 is a specification for sending business data over HTTP. RFC 4130, published in July 2005, says the data can be EDI in X12 or EDIFACT format, XML or other structured formats, packaged with standard MIME. The sender uses an HTTP POST, and the receiver unpacks the data and returns a receipt.
CData (2024) says AS2 is particularly popular in sectors like retail and healthcare. It also says that if your partners mainly use AS2, “it is essential to use AS2 to ensure compatibility.”
What is the AS2 receipt (MDN), and what does it prove?
The receipt is called a Message Disposition Notification, or MDN. RFC 4130 describes two kinds:
- Synchronous: the MDN is sent as the HTTP response to the original POST, on the same connection.
- Asynchronous: the MDN is sent on a separate connection, to a return address the sender asks for.
The MDN can be signed. A signed MDN includes a hash of the content the receiver got, so the sender can check that the file arrived unchanged. RFC 4130 says authentication and confidentiality come from S/MIME, and that a message can be signed, encrypted, both or neither. It notes that only the combination of signed and encrypted data with a signed receipt offers the whole suite of security features.
CData describes the MDN as a digital receipt that confirms delivery and integrity of the message.
- 1Sender packages EDI file
- 2HTTP POST to partner
- 3Partner unpacks the file
- 4Receipt (MDN) in the HTTP reply
With an asynchronous MDN, the last step arrives on a separate connection.
An MDN is not proof the partner accepted the order. An MDN says the file was received. It is not a business answer. For that you still need an acknowledgment inside the EDI, such as a 997 functional acknowledgment or an 855 purchase order acknowledgment.
RFC 4130 is careful about legal proof too. It says non-repudiation of receipt is “thought of as an outcome of possessing relevant evidence,” not a technical message. It recommends digital signatures on both the original message and the receipt, and says that if MDNs are returned unsigned, the evidentiary requirements are weak. If proof matters in your contracts, ask a professional what your setup needs.
What is SFTP, and what does it lack?
SFTP moves files over SSH. CData says SFTP “operates over the SSH protocol,” and RFC 4251 (2006) defines SSH as a protocol for secure remote login and other secure network services over an insecure network.
CData’s comparison table lists SFTP as generally easier to set up with SFTP clients. It also lists non-repudiation as “No” for SFTP and “Yes (via MDNs)” for AS2. In plain terms, SFTP gets the file there securely, but it has no built-in EDI receipt. Orderful’s documentation groups FTP, SFTP and FTPS and says these deliveries are asynchronous and that the host needs maintenance. If you rely on SFTP, your process has to notice when a file did not arrive, for example by watching for the expected acknowledgment.
What is a VAN?
A value-added network is a third-party service. Orderful defines it as a “third-party service using electronic mailboxes to deliver data.” You send files to your mailbox, and the VAN puts them in your partner’s mailbox. The same page says a VAN is the “only way to connect to some partners,” that deliveries are asynchronous and that it typically costs extra, based on transaction size.
How do the three compare?
| AS2 | SFTP | VAN | |
|---|---|---|---|
| Runs over | HTTP or HTTPS | SSH | Mailboxes at a third party |
| Receipt | MDN, can be signed | None built in | Not covered by the sources here; ask the VAN |
| Setup | Certificates and receipt settings | Host, credentials, file names | VAN provider name |
| Delivery | Real time; receipt sync or async | Async | Async |
| Upkeep or cost | Certificates | Server host | Extra cost, often based on transaction size |
The rows come from RFC 4130, CData and Orderful. Your provider’s terms set the real cost.
How do you choose?
Start with your partner’s EDI guide. A partner’s requirement can differ from the next one’s, so you may need more than one connection. Ask each new partner:
- Which transport do you require, and which ports and addresses?
- For AS2: do you want signing, encryption and a signed receipt? Sync or async MDN?
- For SFTP: who hosts the server, and how are files named and picked up?
- Do you use a VAN, and which one?
- Which acknowledgments do you expect inside the EDI?
- How do we test, and who tells us it works?
Write the answers down per partner. An order exception can start with a file that was sent but never picked up.
Where Dockmend fits
Dockmend is being built to help operations teams read partner orders and messages, match them to their own records and flag exceptions for a person to review. It is still being built, and we have not announced support for any specific transport or EDI connection. Start your free trial
This guide is general information, not legal or professional advice. Transport options, receipts and contract terms vary by trading partner and provider, so check your partner’s EDI guide before you set up or change a connection.