YepMsg documentation

Delivery receipts

How YepMsg correlates carrier delivery receipts to messages, what the customer receives, receipt lifecycle and mask handling, and webhook delivery.

YepMsg documentation

YepMsg documentation

  1. Overview
  2. Binds, accounts and carriers
  3. Routing through the control plane
  4. Delivery receipts
  5. Encodings and concatenation
  6. HTTPS send API and webhooks
  7. High availability and durability
  8. Operations and monitoring

Other products

A delivery receipt (DLR) arrives from a carrier hours or seconds after the submit. YepMsg matches it to the message, applies the customer's receipt mask and delivers it, and tells the control plane.

Correlation

On a successful submit the gateway stores the carrier's message ID against its own message ID. When a receipt arrives it extracts the carrier's ID, normalises it as the connector's message ID type specifies, and finds the message. Correlation lives in PostgreSQL in production, so receipts for messages submitted before a restart or a failover still match.

Receipts that match no message are counted as unmatched and visible in the admin status.

What the customer receives

The customer sees the ID they were given at submit: the gateway's own UUID, returned in the submit_sm_resp or by the HTTP send API. The receipt carries that ID in the id: text and in receipted_message_id. The carrier's ID stays inside the gateway.

State, error code, counts and dates in the receipt are the carrier's. The receipt also carries the message state and, where the carrier supplied one, the network error code.

Lifecycle and mask

The gateway distinguishes interim from final receipts. States are the standard SMPP set: ACCEPTD, ENROUTE, DELIVRD, UNDELIV, EXPIRED, REJECTD, DELETED and UNKNOWN. A receipt is final when no further receipts can follow. The customer's receipt mask decides which receipts they get. The control plane is told about every correlated receipt whatever the mask says, so its records are complete even for a customer who asked for no receipts.

Receipts for webhook accounts

An account with a receipt URL receives the receipt as a signed HTTP POST instead of over SMPP. Delivery is retried until the endpoint answers 2xx, through the durable store, and a delivery still unacknowledged after 24 hours is dropped and counted. Without a URL, the receipt goes to the account's bound sessions and is held and retried while none is bound. See HTTPS send API and webhooks.

Receipts and the control plane

Each correlated receipt is posted to the control plane's receipts hook with the gateway's message ID, state, final flag, error code, carrier and the raw receipt text. This call is asynchronous, and a slow or failing hook never delays the customer's receipt. A 404 from the control plane means it does not know the message and is final. The control plane may receive a receipt before it has the record for the same message. Answer 204 in that case.

Handling in practice

  • Treat receipts as at-least-once. Deduplicate on the message ID and state.
  • A message with no receipt may still have been delivered. Not every destination network returns receipts.
  • Use the flight recorder to settle a dispute about whether a carrier sent a receipt. See Operations.

Contact sales

Questions about YepMsg?

Ask an engineer about your deployment, or request the full interface specifications and a demonstration of YepMsg on a traffic profile like yours.

  1. We reply within one business day to arrange a time.
  2. A scoping call about your traffic, network and billing model.
  3. A demonstration on a traffic profile like yours, and a lab deployment if your engineers want one.

Prefer email? hello@yeptelcosoft.com

What would you like?
Interested in

We reply within one business day. We use your details only to respond to your request. Privacy notice