In Western Europe, most online shoppers pay by card, PayPal or bank transfer. In several markets – including the Western Balkans – cash on delivery (COD) is still how many customers prefer to pay. For a Shopify store in those markets, offering COD through a local courier is not optional.
Shopify does not connect to every local courier out of the box. In our project for Ami's Beauty, a Shopify store with courier cash-on-delivery integration for an Albanian beauty brand, we built this kind of integration. This article describes the general approach and the lessons, without store-specific details.
How the integration works
1. Order webhook
When a customer places an order, Shopify sends an order event (a webhook) to a small middleware service.
2. Middleware
The middleware receives the order, checks it, and translates it into the format the courier's API expects: recipient, address, phone number, parcel details and the amount to collect on delivery.
3. Courier API and label
The middleware creates the shipment through the courier's API. The courier returns a waybill number (AWB) and a shipping label, which the store team prints and attaches to the parcel.
4. Status updates
As the courier moves the parcel – picked up, in transit, delivered, returned – statuses flow back and update the order in Shopify.
5. Payment reconciliation
When the courier collects the cash and transfers it to the store, the order is marked as paid.
Lesson 1: map statuses carefully
Shopify's standard order flow assumes payment first, then fulfilment. With COD, payment happens at delivery. We mapped courier statuses so that an order counts as fulfilled only when it is actually delivered, not when the label is created. Otherwise, reports show sales that may still be returned or refused.
Lesson 2: COD as a payment method
Cash on delivery is set up as a manual payment method in Shopify, so customers can choose it at checkout. The confirmation email and thank-you page must explain clearly that payment happens on delivery, and how much.
Lesson 3: discounts and free shipping must reach the courier
This one is easy to miss. If a customer uses a discount code or qualifies for free shipping, the amount the courier collects must reflect that. Passing the original price creates disputes at the door and reconciliation problems later. We make sure the middleware sends the final amount, including discounts, shipping and any fees.
Lesson 4: phone numbers and addresses
Couriers depend on a reachable phone number and a usable address. In markets where addresses are less standardised, we make the phone field mandatory and add guidance in the address fields.
Lesson 5: error handling
APIs fail sometimes: the courier's system is down, an address is rejected, a field is missing. The middleware must log errors and alert the store team, rather than silently leaving an order without a shipment.
Lesson 6: test with real parcels
Test orders in Shopify only prove half the flow. Real shipments through the courier are the only way to confirm that labels, statuses and COD amounts all match, so we plan a few of them before launch.
What the store team needs
| Task | Who |
|---|---|
| Courier contract and API credentials | Store owner |
| Middleware development and hosting | Us |
| Status mapping and payment method setup | Us |
| Label printing workflow | Store team, with our instructions |
| Returns and refused parcels process | Store owner |
| Reconciliation of collected cash | Store owner, supported by order statuses |
Timeline
An integration like this adds a technical phase to a Shopify project. The store build follows the usual steps – design, products, payments, shipping – while the middleware is developed in parallel. The dependencies are on the client and courier side: signing the courier contract, receiving API credentials and test access, and agreeing how labels will be printed. Requesting courier API access at kickoff is the single most useful step.
Returns and refusals
COD comes with a higher rate of refused deliveries than prepaid orders – customers change their mind or are not home. The integration should mark these clearly, so stock is returned and reports stay accurate. The store should also decide whether repeated refusals affect who can use COD in future.
Other markets and couriers
The same architecture works for other couriers and other flows: fulfilment providers, local parcel lockers, ERP systems that need order data. One webhook, a small middleware, a clear mapping and good error handling.
When an app is enough
For many couriers there is an existing Shopify app. If it covers labels, statuses and COD amounts correctly, use it. A custom middleware makes sense when no app exists, the app does not handle COD properly, or the store needs custom logic.
FAQ
Does Shopify support cash on delivery?
Yes, as a manual payment method. Connecting it to a courier that collects the cash and reports status usually needs an app or integration.
Can discounts work with COD?
Yes, if the integration passes the final discounted amount to the courier. That is one of the details we test explicitly.
Who hosts the middleware?
We can host it on our cloud infrastructure or on the client's server. It is a small service with low running costs.
Who adds the products to the store?
Either side. We set up the structure and import products from a spreadsheet; if you add them yourself, we show you how and check a sample before launch.
Why should payment accounts be set up early?
Payment providers verify the business before payouts work, and that can take days. In our experience it is one of the most common reasons a finished shop waits to launch.
Planning a Shopify project?
If you want a realistic plan for your own project, book a short call with our team and we will walk you through the phases, what we need from you and where projects like yours usually lose time. You can also browse finished work in our Shopify portfolio.
Comments