James DarbyJames Darby
March 10, 2026
Last reviewed May 9, 2026
13 min read
EDI Basics

AS2 EDI Connection: How It Works and When to Use It

Learn what AS2 is, how it connects EDI trading partners, and when AS2 makes sense compared to VAN, SFTP, or API-based EDI connections.

AS2 (Applicability Statement 2) is the HTTPS-based protocol defined in RFC 4130 for sending EDI documents directly between trading partners with encryption, digital signing, and cryptographic delivery receipts, which is why Walmart mandated it for all suppliers and it became the dominant retail EDI transport method.

If a major retailer has told you to "set up AS2," you're not alone in wondering what that actually means. AS2 is one of the most common ways to send and receive EDI documents between trading partners. It is the connection method, not the data format. Think of it this way: EDI is the language, AS2 is the delivery truck.

This guide covers how AS2 works, when you need it, and how it compares to other EDI connection methods like VANs, SFTP, and APIs.

What Is AS2?

AS2 (Applicability Statement 2) is an HTTP-based protocol defined in RFC 4130 for transmitting EDI documents directly between trading partners over the internet, using digital certificates for encryption and signing and confirming delivery through automatic receipts called MDNs (Message Disposition Notifications).

AS2 was defined by the IETF in 2005. It replaced the original AS1 protocol (which ran over email/SMTP) with a faster, more reliable HTTP-based approach. The protocol became widely adopted after Walmart mandated it for all suppliers in the mid-2000s, and it remains one of the most common EDI transport methods in retail supply chains today.

Key context on AS2 adoption:

  • The IETF RFC 4130 specification is the definitive technical standard for AS2, defining the encryption, signing, and MDN receipt requirements that all certified AS2 implementations must follow
  • The ASC X12 standards body governs the EDI document formats (850, 856, 810) that travel over AS2 connections, making X12 and AS2 complementary layers of the same retail EDI stack

The key thing to understand: AS2 is a point-to-point connection. You send EDI files directly to your trading partner's AS2 server, and they send files directly to yours. There is no middleman routing your documents (unlike a VAN). This means lower per-transaction costs, but more setup responsibility on your end.

How an AS2 EDI Connection Works

AS2 can sound intimidating because it involves certificates, encryption, and digital signatures. Here is what actually happens when you send an EDI document over AS2, step by step.

1. You Prepare the EDI Document

Your system generates a standard EDI file (an 850 purchase order, 856 ship notice, 810 invoice, etc.). The EDI content itself is the same regardless of whether you send it via AS2, SFTP, or a VAN. AS2 only handles the transport.

2. Your AS2 Software Encrypts and Signs the Message

Before sending, your AS2 software does two things:

  • Encrypts the file using your trading partner's public certificate. This ensures only the intended recipient can read the contents. Think of it like putting the document in a locked box that only your partner has the key to open.
  • Digitally signs the file using your private certificate. This proves the message came from you and was not altered in transit. It works like a tamper-evident seal.

3. The Message Travels Over HTTPS

Your AS2 software sends the encrypted, signed message to your trading partner's AS2 URL (a specific web address they provide). This happens over HTTPS, the same secure protocol your browser uses. No special network connections or leased lines required.

4. The Recipient's Server Processes the Message

Your partner's AS2 server receives the message, decrypts it using their private key, and verifies your digital signature using your public certificate. If anything was tampered with or the signature does not match, the message is rejected.

5. An MDN Receipt Comes Back

The receiving server sends back a Message Disposition Notification (MDN). This is an automatic receipt confirming the message was received and processed successfully (or flagging an error). MDNs can be synchronous (returned immediately in the same HTTP session) or asynchronous (returned later to a separate URL).

The MDN is critical. It gives you a non-repudiation audit trail, meaning your trading partner cannot claim they never received the document. This is one of the main reasons retailers prefer AS2 over simpler file transfer methods.

AS2 vs Other EDI Connection Methods

Choosing a connection method depends on what your trading partners require and what makes sense for your volume and technical setup. Here is how AS2 compares to the most common alternatives.

FeatureAS2VANSFTPFTPSAPI
Connection typePoint-to-pointHub-and-spokePoint-to-pointPoint-to-pointPoint-to-point
ProtocolHTTPSProprietarySSHFTP over TLSREST/HTTPS
EncryptionBuilt-in (certificates)Provider-managedBuilt-in (SSH keys)Built-in (TLS)TLS
Delivery confirmationMDN receiptsProvider trackingNone built-inNone built-inHTTP response codes
Non-repudiationYes (signed MDNs)Partial (provider logs)NoNoVaries
Per-transaction costNoneYes ($0.05-$1+/doc)NoneNoneVaries
Setup complexityMedium-highLowLow-mediumLow-mediumMedium
Firewall requirementsPort 443 (outbound)Provider-specificPort 22Port 990/21Port 443
Best forHigh-volume retailMultiple partnersSmaller partnersLegacy systemsModern integrations

AS2 vs VAN: VANs are easier to set up because the VAN provider handles routing and connectivity. You connect to the VAN once, and they connect to your partners. The tradeoff is ongoing per-document fees that add up fast at high volumes. AS2 eliminates those fees but requires you to manage each trading partner connection individually.

AS2 vs SFTP: SFTP is simpler to configure and works well for many trading partners. However, it lacks built-in delivery receipts and non-repudiation. If a partner claims they never got your ASN, you have no cryptographic proof with SFTP. With AS2, the signed MDN settles that question. For a deeper look at integration approaches, see our EDI vs API comparison.

AS2 vs API: APIs offer real-time, bidirectional communication and are gaining ground in B2B. But most large retailers still require EDI over AS2 or VAN, not API. APIs are better suited for partners who have built modern integration endpoints. Check our EDI integration guide for more on connecting these approaches.

When Retailers Require AS2

The single biggest reason companies set up AS2 is retailer compliance. Some major retailers mandate AS2 as their connection method.

Walmart is the most notable example. Walmart requires all suppliers to exchange EDI documents via AS2 (or through a VAN that connects via AS2 on the backend). If you are onboarding as a Walmart supplier, setting up an AS2 connection is non-negotiable. See our full Walmart EDI requirements guide for details on their specific transaction sets and compliance rules.

Other retailers and large trading partners that commonly require or prefer AS2 include:

  • Amazon (for vendor central EDI, not seller central)
  • Home Depot
  • Lowe's
  • Target (supports AS2 alongside VAN)
  • Costco

Even if a retailer does not explicitly require AS2, choosing it can save money at scale. If you are exchanging hundreds or thousands of EDI documents per month, the per-document VAN fees can run into thousands of dollars annually. AS2 eliminates that recurring cost after the initial setup.

For companies just getting started with EDI, our essential guide to EDI covers the fundamentals before you worry about connection methods.

Setting Up an AS2 Connection

Here is a practical walkthrough of what the setup process looks like. The specifics vary by AS2 software, but the steps are consistent.

Step 1: Choose Your AS2 Software or Service

You need an AS2-capable system. Options range from standalone AS2 servers (like mendelson AS2, Drummond Certified solutions) to integrated EDI platforms that include AS2 connectivity. The Drummond Group maintains a certification program that tests AS2 interoperability between products, so look for certified solutions to avoid compatibility headaches.

Step 2: Generate or Obtain Your Certificates

You need two types of certificates:

  • Your certificate pair: A public certificate (shared with partners) and a private key (kept secret on your server). You can generate self-signed certificates or purchase them from a Certificate Authority (CA).
  • Your partner's public certificate: Your trading partner will send you their public certificate so you can encrypt messages to them.

Most AS2 software includes a certificate generation wizard. Self-signed certificates work fine for AS2 since both parties exchange certificates directly (you are not relying on browser-style trust chains).

Step 3: Exchange Configuration Details with Your Trading Partner

Both sides need to share:

  • AS2 ID: A unique identifier for each party (often your company name or DUNS number)
  • AS2 URL: The HTTPS endpoint where incoming messages should be sent
  • Public certificate: For encryption and signature verification
  • MDN preferences: Synchronous or asynchronous, signed or unsigned

This exchange typically happens through a trading partner onboarding form or portal. For Walmart, you submit this information through their Retail Link system.

Step 4: Configure Your AS2 Software

Enter your trading partner's details into your AS2 system:

  • Partner AS2 ID and URL
  • Import their public certificate
  • Set encryption algorithm (AES-256 is standard)
  • Set signing algorithm (SHA-256 is standard)
  • Configure MDN settings to match partner requirements

Step 5: Run Connectivity Tests

Send test EDI documents (typically a 997 functional acknowledgment or a test 850) and verify:

  • The message reaches your partner's server
  • You receive an MDN back
  • Your partner can decrypt and read the document
  • Inbound messages from your partner arrive and decrypt correctly

Most retailers have a test/staging environment specifically for this. Do not skip testing. Certificate or configuration mismatches are common on the first attempt.

Our EDI implementation guide covers the broader implementation process, including mapping and testing beyond just the AS2 connection.

Common AS2 Problems and How to Fix Them

Even after a working AS2 connection is established, issues come up. Here are the most frequent problems.

Certificate Expiration

Certificates have expiration dates, typically 1 to 3 years after issuance. When a certificate expires, messages fail immediately. Both sending and receiving stop working.

Fix: Track certificate expiration dates for every trading partner. Set calendar reminders at least 30 days before expiration. When you renew, send the new public certificate to all affected partners before the old one expires.

MDN Failures

You send a document but never get an MDN back, or you get an MDN with an error status.

Fix: Check your partner's AS2 URL for changes. Verify your firewall allows inbound connections on the MDN return URL (for async MDNs). Confirm your signing certificate matches what your partner has on file.

Firewall and Network Issues

AS2 runs over HTTPS (port 443), but some corporate firewalls block outbound connections to unknown URLs or require proxy configuration.

Fix: Whitelist your trading partner's AS2 URL in your firewall. If you are behind a proxy, configure your AS2 software to route through it. For inbound AS2 messages, ensure port 443 is open and mapped to your AS2 server.

URL or Endpoint Changes

Trading partners occasionally change their AS2 URL without much notice. Messages start failing with HTTP 404 or connection refused errors.

Fix: When messages suddenly stop working after a period of success, contact your trading partner to confirm their AS2 URL has not changed. Subscribe to their partner communications if available.

Message Size Limits

Some AS2 servers have maximum message size limits. Large EDI files (batch 856 ASNs with hundreds of shipments) can exceed these limits.

Fix: Check with your trading partner on size limits. If needed, split large batches into multiple smaller transmissions.

If you need to troubleshoot the EDI content itself (as opposed to the AS2 connection), use our free EDI Inspector to parse and validate your EDI files before sending them.

Connecting AS2 to Your ERP

Getting EDI documents delivered via AS2 is only half the problem. Those documents need to flow into your ERP, warehouse management system, or order processing workflow. Most AS2 servers drop received files into a local directory, and you need middleware or an integration layer to pick them up, transform them, and load them into your business systems.

This is where ERP integration tools come in. An automated pipeline watches for incoming EDI files, maps them to your ERP's data format, validates the contents, and creates orders, invoices, or shipment records without manual data entry.

FAQ

What is AS2 in EDI?

AS2 (Applicability Statement 2) is a protocol for sending EDI documents securely over the internet using HTTPS. It is a transport method, not a document format. AS2 handles encryption, digital signing, and delivery receipts (MDNs), while the EDI data inside (X12, EDIFACT) follows its own standard.

Is AS2 the same as EDI?

No. EDI is the data format (X12 850, 856, 810, etc.), and AS2 is one of several ways to transmit EDI files between trading partners. You can send EDI over AS2, SFTP, VAN, or other protocols. AS2 is specifically the transport layer.

Why does Walmart require AS2?

Walmart adopted AS2 to reduce VAN costs and improve security. AS2 provides direct, encrypted connections with cryptographic delivery receipts. At Walmart's scale (tens of thousands of suppliers, millions of daily transactions), eliminating per-document VAN fees saves significant money. Walmart was one of the earliest large-scale AS2 adopters and helped drive industry-wide adoption.

Can I use SFTP instead of AS2?

It depends on your trading partner's requirements. If a retailer mandates AS2, you need AS2 (or a VAN/service provider that handles AS2 on your behalf). If your partner accepts SFTP, it is simpler to set up but lacks AS2's built-in delivery receipts and non-repudiation. For partners that accept either, your choice depends on volume, compliance needs, and technical resources.

How much does an AS2 connection cost?

The AS2 protocol itself is free (it is an open standard). Costs come from the software or service you use to run it. Open-source AS2 servers like mendelson AS2 are free but require self-hosting and maintenance. Commercial AS2 solutions or managed EDI platforms typically charge monthly fees ranging from $50 to $500+, depending on features and volume. The key savings come from eliminating per-document VAN fees, which can run $0.05 to $1+ per transaction.

James Darby

Stop manually entering orders

OrderSync turns EDI, email, PDF, and fax orders into structured data automatically. See how it works for your business.

Related Guides & Resources

Related Articles

3PL EDI Integration: How to Connect Your Warehouse

Learn how 3PL EDI integration works, which transactions your warehouse partner needs, and how to avoid the data gaps that cause fulfillment errors.

EDI Basics

What Does EDI Capable Mean? Requirements Guide

EDI capable means your business can exchange standardized electronic documents with trading partners. Learn what retailers require and how to get there.

EDI Basics

EDI Integration: What It Is and How It Works

Learn what EDI integration means, how it connects your ERP to trading partners, and what to look for in an EDI integration approach.

EDI Basics

EDI Mapping Tools: Map Transactions to ERP

Learn what EDI mapping is, how mapping tools translate EDI segments to your system's fields, and what to look for when choosing an EDI mapping solution.

EDI Basics

EDI Payments Explained: How EDI 820 Works

Learn what EDI payments are, how the EDI 820 payment order works, and how electronic payments fit into the order-to-cash cycle for B2B suppliers.

EDI Basics

EDI VAN Explained: What It Is and When You Need One

Learn what an EDI VAN (Value Added Network) is, how it works, what it costs, and when direct connections or API-based alternatives make more sense.

EDI Basics

Retail EDI: What Suppliers Need to Know

A practical guide to retail EDI for suppliers. Learn which transactions retailers require, common compliance pitfalls, and how to get started.

EDI Basics

What Is EDI? The Essential Guide for B2B

What EDI is, how it works, common transaction types, costs, and how to implement it. The complete guide to Electronic Data Interchange.

EDI Basics

More from the Blog