Skip to content
Receipts (MDNs)

Receipts (MDNs)

A receipt, called an MDN in AS2, tells the sender that a message arrived intact. This page covers the receipts you ask your partners for. Receipts you send covers the other direction, and Reading a receipt shows where to find one.

What a receipt is for

A receipt, called an MDN, is a short reply that confirms a message arrived. It says whether the receiver could decrypt and check the message. It also carries a checksum of what the receiver got, called the MIC. MicroB2B compares that checksum with what it sent, so you know the content arrived unchanged. A signed receipt proves that the partner, and nobody else, confirmed it.

Recommended: ask for a signed, synchronous receipt. That is the default of a new partner profile.

Synchronous or asynchronous

  • Synchronous: the partner sends the receipt back in the answer to your message. This is simple and needs nothing extra.
  • Asynchronous: the partner answers at once, and posts the receipt later to a URL you name. Use this for partners that take long to process, or that ask for it.
  • None: you get no receipt. The message counts as delivered when the partner answers with a 2xx status.

Receipt settings on the partner profile

These are in the Receipts (MDN) section of the partner’s AS2 profile.

SettingWhat it doesDefault
Request MDNSynchronous, Asynchronous, or None.Synchronous
MDN Signature AlgorithmThe algorithm the partner should sign the receipt with: sha1, sha256, sha384, sha512, or None for an unsigned receipt.sha256
Partner MDN Signature CertificatesOptional. If set, the partner’s receipts are checked against only these.none
Receipt Delivery HostsHost names, one per line, that may receive your asynchronous receipts for this partner, besides the Endpoint’s host.none
Send Receipts for Signature FailuresAlso send an asynchronous receipt when the partner’s signature fails or is missing.off
Send Receipts for Unsigned MessagesAlso send an asynchronous receipt for an unsigned message.off
Receipt Timeout (hours)How long to wait for an asynchronous receipt, 1 to 720.24

Ask a partner for a receipt

  1. On your organization’s AS2 profile, fill in MDN Notification To.
  2. For asynchronous receipts, also fill in MDN Receipt Delivery Option. Its path must be the MDN Callback Path of one of your AS2 receivers.
  3. On the partner’s profile, choose Request MDN and the MDN Signature Algorithm.

With an asynchronous receipt, the message shows Awaiting receipt after the partner accepts it. When the receipt arrives, the message becomes Delivered or Error. If no receipt arrives within the Receipt Timeout, the delivery fails. A receipt that arrives after that is refused.

How MicroB2B checks a partner’s receipt

Every receipt is checked the same way, synchronous or asynchronous:

  • It must name the message you sent.
  • It must be signed if you asked for a signed receipt, and the signature must verify. See AS2 security.
  • It must say processed. A processed with a warning still confirms delivery. An error or a failed does not.
  • Its MIC must equal the MIC of what you sent. The MIC is required only for a signed receipt, but a MIC that is present is always compared.

The receipt URL also refuses some receipts without changing the message:

AnswerWhy
404The receipt is for an unknown message, or one that asked for no asynchronous receipt.
400The receipt comes from another partner, or is for another organization.
400It is not a receipt, or its signature is missing or does not verify.

A receipt that is checked and accepted gets a 200. A correct one makes the message Delivered. One that does not confirm delivery makes it Error, unless it is already Delivered or Error. A second copy of a receipt changes nothing. Every receipt, accepted or refused, is a line in the message’s history.