E-Commerce

Integrating Your Store with Couriers: Automating Shipping and COD Collection

Stop copying orders into courier dashboards. How Egyptian online stores connect to couriers such as Bosta through APIs to create shipments, print airway bills, sync tracking and reconcile cash-on-delivery settlements automatically.

Illustration of an online store dashboard sending orders to courier vans, with tracking statuses and cash settlement lines

Integrating your online store with a courier means that every confirmed order automatically becomes a shipment: the store sends the address, phone number, package details and cash-on-delivery amount to the courier's API, prints the airway bill, books the pickup, receives status updates, and later matches the courier's COD settlement to your orders. No copying addresses into a courier dashboard, no chasing drivers on the phone, and no guessing which cash payments are still missing.

For Egyptian stores this matters more than in most markets, because a large share of orders are paid in cash at the door and the courier is also your cash collector. When shipping and collection are handled manually, errors pile up quietly: wrong areas, duplicated shipments, parcels stuck for days, and settlement amounts nobody checks.

This guide explains what a good courier integration does, the options available (plugins, bulk uploads and direct APIs), how to handle COD reconciliation and returns, and a step-by-step plan to implement it.

Key takeaways

  • A courier integration automates shipment creation, airway bills, pickups, tracking updates and COD reconciliation.
  • Direct API integration gives the most control; plugins and bulk uploads are quicker but limited.
  • Use the courier's own city and zone codes in your checkout so addresses map correctly the first time.
  • Sync delivery statuses automatically and notify customers, especially before the delivery attempt.
  • Reconcile every COD settlement against your orders; unmatched amounts are money you may never recover.

What manual shipping really costs

A store handling 50 orders a day by hand typically has someone copying each order into the courier's dashboard, printing labels, updating order statuses from a separate screen and checking settlement sheets in Excel. Each step invites mistakes:

  • Typos in phone numbers and addresses that lead to "customer unreachable" returns.
  • Orders shipped twice, or not at all.
  • Customers asking "where is my order?" because the store does not know either.
  • COD amounts that differ from the order total, noticed weeks later or never.

As volume grows, these errors grow faster than the team. That is usually the moment to integrate.

What a courier integration automates

StageManual processIntegrated process
Order confirmedStaff copy details to the courier dashboardStore creates the shipment through the API automatically
Airway billPrinted from the courier site one by onePrinted in bulk from the store's order screen
PickupPhone call or WhatsApp to the courierPickup request created from the store
TrackingStaff check the courier siteStatus updates flow into the order and trigger customer messages
Delivery and CODAssumed deliveredDelivered status and collected amount recorded per order
SettlementExcel sheet compared by eyeSettlement lines matched to orders, differences flagged
ReturnsDiscovered when the parcel arrivesReturn status updates stock and triggers follow-up

Leading couriers publish APIs for exactly these steps. Bosta, for example, publishes SDKs whose documented operations include creating and updating shipments, tracking, printing airway bills, creating pickups and listing its cities and zones (Bosta Node.js SDK).

Your integration options

Ready-made plugins

If your store runs on a SaaS platform or WooCommerce, the courier may offer a plugin. It is fast to install, but you get the plugin's features only: often shipment creation and tracking, with limited control over COD rules, multi-courier routing or reconciliation.

Bulk upload

Export orders as a spreadsheet and upload them to the courier dashboard. It is better than typing, but statuses and settlements still need manual handling.

Direct API integration

Your store talks directly to the courier's REST API. You decide when shipments are created (for example, only after order confirmation), which courier handles which governorate, how statuses map to your order states, and how settlements are reconciled. This is the right option for custom stores and for businesses with an ERP.

OptionSetup effortControlBest for
PluginLowLow to mediumSmall stores on SaaS or WooCommerce
Bulk uploadVery lowLowEarly-stage stores with few orders
Direct APIMedium to highHighGrowing stores, multi-courier, ERP users

Get the address data right

Most failed deliveries in Egypt start at the address field. The US Commerce Department's 2025 country guide highlights fragmented last-mile logistics, especially in rural areas, as a barrier to e-commerce growth (trade.gov, 2025). You cannot fix roads, but you can fix your data:

  • Load the courier's list of cities and zones through its API and use it for your checkout dropdowns.
  • Ask for building, floor, apartment and a landmark in separate fields.
  • Validate Egyptian mobile numbers and ask for an optional second number.
  • Save the courier's zone code with the order so the shipment is created without guesswork.
  • Store the courier's tracking number and your own order reference on both sides.

Sync statuses and keep customers informed

There are two ways to get updates: webhooks, where the courier notifies your store when a status changes, or polling, where your store asks the courier at intervals. Use webhooks where available and polling as a fallback. Then:

  1. Map each courier status to a small set of store statuses (for example: ready, picked up, out for delivery, delivered, failed attempt, returning, returned).
  2. Trigger customer messages on the statuses that matter: shipped, out for delivery today, failed attempt.
  3. Alert your team when a parcel has not moved for a set number of days.
  4. Show the live status in the customer's account so they do not need to call.

A WhatsApp message on the morning of delivery, with the amount to prepare in cash, is one of the simplest ways to reduce refused parcels. Our guide to reducing COD returns and fake orders covers the rest.

COD collection and reconciliation

With cash on delivery, the courier collects your money and transfers it later, minus shipping and collection fees. A reliable reconciliation process:

  • Imports each settlement (through the API or a report) with order references, collected amounts and fees.
  • Matches every line to an order and marks it paid.
  • Flags differences: amount mismatches, delivered orders missing from settlements, and fees above the agreed rate.
  • Posts the net amounts to your accounting or ERP system.
  • Reports days-to-cash per courier, which directly affects your working capital.

Returns and exchanges

Returns have their own lifecycle: refused at the door, returned after acceptance, or exchanged. Your integration should update stock only when the item is back and inspected, record the reason, and handle exchanges as a linked outbound shipment. Clear return steps also support your obligations under the Consumer Protection Law, which gives distance buyers a 14-day withdrawal right.

Working with more than one courier

Many Egyptian stores use two or more couriers: one strong in Greater Cairo and Alexandria, another for Upper Egypt and the Delta, or a specialist for bulky items. Scale varies widely; Bosta reported about 250,000 shipments a day and a target of around 80 million shipments in 2026 (Ahram Online, 2026). With a direct API integration you can route orders by governorate, weight or COD value, and compare couriers on a simple scorecard: delivery success rate, average delivery time, days to cash and cost per delivered order.

Implementation plan in eight steps

  1. List your couriers, their API documentation and sandbox access.
  2. Define when a shipment is created (usually after confirmation) and who can override it.
  3. Rebuild checkout address fields around the courier's city and zone codes.
  4. Build shipment creation, airway bill printing and pickup requests.
  5. Connect webhooks or polling and map statuses.
  6. Add customer notifications for key statuses.
  7. Build settlement import and reconciliation, with alerts.
  8. Test with real parcels to a few governorates before switching all volume.

How Nilex helps

Nilex builds online stores and business systems that connect directly to courier APIs through secure REST API integrations: automatic shipment creation after confirmation, bulk airway bills, status webhooks, customer notifications, and COD settlement reconciliation that feeds your accounts or ERP system.

Frequently asked questions

How do I connect my online store to Bosta or another courier?

Use the courier's plugin if your platform has one, or integrate directly with its API. A direct integration lets you create shipments automatically after confirmation, print airway bills, receive status updates and reconcile COD settlements.

What is a shipping webhook?

It is a message the courier's system sends to your store when a shipment's status changes, such as delivered or returned. It keeps order statuses current without anyone checking the courier's website.

How do I reconcile cash-on-delivery payments from couriers?

Import each settlement with its order references, match every line to a delivered order, and flag missing or different amounts. Automating this in your store or ERP removes spreadsheet work and catches losses early.

Should I use more than one courier?

Often yes, once volume grows. Different couriers perform better in different regions and product types. Integrate through APIs so you can route orders by governorate or weight and compare performance with real data.

How long does a courier API integration take?

It depends on the courier's API quality and your requirements. Shipment creation and tracking are usually quick; reconciliation, returns and multi-courier routing take longer. Plan a pilot on a few governorates first.

If your team still copies orders into courier dashboards, integration will pay for itself in time and in cash you no longer lose. Book a free consultation with Nilex to plan your shipping integration.

LET'S BUILD

YOUR VISION.
OUR TECHNOLOGY.

Tell us what your business needs. We'll build the system around it.

START A CONVERSATION →

or email us at info@nilexdigitalsystems.com