Case StudyIntegration ServicesAugust 11, 202610 min read

Cash on Delivery Across OMS, WMS, and TMS: What Breaks Without Orchestration

IBM Sterling OMS · Last-mile payment collection · Enterprise integration

Direct answer

COD requires a four-system workflow: Sterling OMS holds the order with gateway-free payment rules, the WMS pack event branches prepaid vs COD into the correct TMS configuration, the driver confirms cash collection in the TMS app, and stateless middleware records the charge in OMS via recordExternalCharges followed by requestCollection to reach PAID status.

By Amutha Karuvelamuthu · Enterprise Integration Engineering, Adaptive Development

AI Assistants

Business value

Reliable COD orchestration protects revenue recognition, finance reconciliation, and customer trust in markets where cash at delivery remains a primary payment method.

Introduction

Cash on Delivery remains a primary payment method for many enterprise retailers. Customers expect to pay when goods arrive—not when they click checkout. IBM Sterling Order Management can support that model, but only when fulfillment, transport, and payment recording are orchestrated as one workflow.

Adaptive Development recently delivered a production COD integration for an enterprise retail client across IBM Sterling OMS, a warehouse management system, a transport management platform with a driver mobile app, and a stateless Java middleware layer on IBM Cloud. The lesson is consistent: COD fails quietly when teams treat it like prepaid card capture with a different label.

Industry Context

Prepaid digital payments follow a familiar pattern—authorize or charge at order creation, ship, invoice, done. COD inverts the payment moment. The order is valid and releasable before any money changes hands. Finance, operations, and customer service all depend on a later event: the driver confirming cash collection.

That delay creates a multi-system problem. The OMS must know the order is COD without expecting a gateway response. The warehouse must release inventory on the same schedule as prepaid orders. The TMS must route a driver with the correct collection amount. And only after delivery should the OMS mark the order paid—with an audit trail finance can reconcile.

Problem Analysis

Teams integrating COD for the first time often configure Sterling payment types correctly but still see production failures. Typical symptoms include:

  • TMS delivery orders created with prepaid configuration—no collect-cash step for the driver.
  • Orders marked paid at invoice generation because Charge Instead Of Authorize is enabled for COD.
  • Payment recording skipped because PaymentReference1 was empty and OMS set IncompletePaymentType.
  • Custom payment user exits intercepting COD as an "Other" type and expecting card-gateway references.
  • Charges recorded in OMS but payment status stuck at INVOICED instead of PAID.
  • Middleware losing shipment-to-order mapping after TMS internal updates in a stateless runtime.

None of these are Sterling core defects. They are integration boundary failures—assumptions that one system’s prepaid path can be reused without a COD branch.

Solution Architecture

The production pattern connects four systems through event-driven middleware. Sterling OMS owns order state and payment configuration. The WMS executes pick, pack, and ship with webhooks at each transition. The TMS assigns drivers, exposes a COD collection action in the mobile app, and emits status webhooks. Middleware holds no durable state—it reads and writes across the other three platforms.

  • Order created in Sterling with CASH_ON_DELIVERY payment type and a COD-specific payment rule.
  • OMS schedules, releases, and sends the shipment to the warehouse node.
  • At WMS pack completion, middleware queries OMS PaymentType and branches COD vs prepaid.
  • COD path: TMS order with COD configuration, collection amount, and a driver collect-cash activity.
  • Prepaid path: standard TMS transport configuration with no collection step.
  • On driver collect-cash confirmation, middleware records payment in OMS and finalizes settlement.

Engineering Perspective

Sterling OMS configuration sets the foundation. Authorization Required should be off for COD. Processing Not Required must be checked so the Payment Collection Agent does not call a gateway. Charge Instead Of Authorize must stay off—otherwise OMS can mark an order paid before cash is physically collected. Settlement Required should be on so the post-collection cycle can complete. For step-by-step payment rule guidance, see the companion IBM Community article linked in the references below.

Existing custom YFSCollectionOthersUE implementations for card gateways often intercept all Other payment types. COD must return early from that exit so collection happens later through recordExternalCharges—not through Stripe or similar references at order time.

Detection belongs at WMS pack—not at order creation. By pack time, the shipment is real, amounts are finalized, and middleware can create the correct TMS order. A simple JSON getOrderDetails call with OrderHeaderKey, EnterpriseCode, and DocumentType is enough to read PaymentType. Adding filter fields to that JSON request can trigger YCP0428 security violations in production—a trap teams discover only under load.

Payment recording is a two-step OMS sequence. recordExternalCharges logs the cash amount against the correct PaymentKey—but PaymentKey is not returned in the simple JSON response; an XML template getOrderDetails call is required. After a successful charge, requestCollection triggers the Payment Collection Agent to reconcile the invoice and move status to PAID. Skipping the second call leaves orders appearing settled in operations dashboards while finance still sees INVOICED.

Stateless middleware demands defensive data storage. TMS platforms may rewrite metadata during internal updates. Production implementations store OMS mapping in multiple fields and in a structured notes block so cod_amount and shipment_key can be recovered even when primary meta fields are cleared. Amounts read from TMS payload cents fields are unreliable; string amounts preserved in meta or notes are safer. Idempotency checks against TotalCharged prevent duplicate recording if webhooks retry.

Outcome

After orchestration was in place, the client’s COD orders followed the same warehouse throughput as prepaid orders while payment status transitioned to PAID only after confirmed driver collection. Order Hub showed matching invoiced and collected amounts with a complete audit trail—without modifying Sterling core.

For detailed OMS payment configuration and API sequencing, Amutha Karuvelamuthu’s IBM Community article walks through the same production pattern from an Sterling practitioner’s perspective. Cash on Delivery in IBM Sterling OMS (IBM Community).

Conclusion

Cash on Delivery is not a payment-type checkbox in Sterling—it is a last-mile settlement workflow spanning warehouse, transport, and integration layers. Teams that branch prepaid and COD at pack time, record collection only on driver confirmation, and finalize settlement with requestCollection avoid the silent failures that make COD look broken in production.

The durable engineering principle is simple: treat COD as deferred settlement orchestration, not delayed prepaid capture. Build the branch points, recovery layers, and settlement calls into middleware from day one—and COD becomes as operable as any card flow.

Frequently asked questions

Can Sterling OMS handle COD without custom payment gateway code?

Yes. Configure a COD payment type with Processing Not Required, bypass existing gateway user exits for non-card types, and record collection through recordExternalCharges when the TMS confirms cash received.

Why is payment status sometimes INVOICED instead of PAID after recording a COD charge?

recordExternalCharges records the charge but may not complete settlement evaluation. Calling requestCollection afterward triggers the Payment Collection Agent to finalize status to PAID.

When should middleware detect that an order is COD?

At WMS pack completion—query Sterling OMS for PaymentType and create the TMS delivery order with COD configuration and collection amount before the shipment leaves the warehouse.

References

  1. Cash on Delivery in IBM Sterling OMS — Amutha Karuvelamuthu, IBM Community
  2. IBM Sterling Order Management documentation

Related Insights

Continue exploring enterprise engineering

View all insights →
Case StudyIntegration Services18 Jul 202611 min read

When a Return Order Brings Your Fulfillment to a Halt: Solving Critical IBM Sterling OMS Production Issues

How return-order exceptions across payment, TMS, inventory, and external integrations disrupt IBM Sterling OMS—and a structured engineering approach to reproduce, diagnose, and recover production incidents.

Adaptive DevelopmentRead insight →
ArticleIntegration Services28 May 202611 min read

Building Integration Middleware for IBM Sterling OMS

A practical enterprise guide to designing resilient IBM Sterling OMS middleware using event-driven patterns, protocol translation, observability, and production-grade governance.

Adaptive DevelopmentRead insight →
ArticleIntegration Services17 Jun 20269 min read

Building Cloud-Native Order Management Platforms with IBM Sterling OMS

Modern order management requires real-time inventory, resilient integrations, and cloud-native operations. Adaptive Development shares practical lessons from hands-on IBM Sterling OMS implementations across OpenShift and IBM Cloud.

Adaptive DevelopmentRead insight →