Skip to Content

Daraz Orders Sync for WooCommerce — Documentation

Daraz Orders Sync for WooCommerce — Documentation

What this plugin does

Daraz Orders Sync for WooCommerce connects one Daraz country account to WooCommerce through the Daraz Open Platform API. It imports orders every 15 minutes, maps Daraz statuses to WooCommerce statuses, lets you mark orders Packed and Ready to Ship and open Daraz shipping labels from the order screen, and pushes stock every hour.

Scheduled jobs run on Action Scheduler (WP-Cron if unavailable) and only once the account is authorised and Enable syncing is ticked.

Requirements

  • WordPress 5.8 or later and PHP 7.4 or later
  • WooCommerce 7.0 or later, HPOS or legacy order storage
  • A Daraz seller account and an app at open.daraz.com
  • An HTTPS site for the authorisation callback

Installation

  1. Upload the zip at Plugins → Add New → Upload Plugin and activate it with WooCommerce active.
  2. Open WooCommerce → Daraz Sync. Tabs: Settings, Sync log, Status.

Connecting your Daraz seller account

  1. Create a developer account and an app at open.daraz.com.
  2. Set the app’s callback URL to the one in the Getting connected box, e.g. https://yourstore.com/wp-admin/admin-post.php?action=rau_dos_action&do=callback.
  3. In the plugin, choose your Daraz country, paste the App Key and App Secret, and save.
  4. Click Connect Daraz account, sign in with your seller account on Daraz and approve.
  5. Back in WordPress, tick Enable syncing and press Sync orders now.

Changing the country later requires reconnecting, because each Daraz country has its own API host and authorisation.

Daraz Orders Sync settings with country selector, App Key, App Secret, callback URL and import options
WooCommerce → Daraz Sync: choose your Daraz country, paste the App Key and App Secret, and use the callback URL shown in Getting connected.

Settings reference

SettingWhat it does
Daraz countryPakistan, Bangladesh, Sri Lanka, Nepal or Myanmar. Sets the API host.
App Key / App SecretFrom your app at open.daraz.com. The secret is encrypted at rest.
Enable syncingMaster switch for scheduled jobs.
ImportImport Daraz orders every 15 minutes, and optionally send the WooCommerce order number to Daraz as the invoice number.
New / pending ordersWooCommerce status for newly imported Daraz orders, usually Processing.
ShippedStatus used when Daraz reports the order shipped.
DeliveredStatus used when Daraz reports delivery, usually Completed.
CanceledStatus used when the order is canceled on Daraz.
Returned / shipped backStatus used for returns and failed deliveries.
Look back (days)How far back each sync looks, up to 30 days.
Stock syncPush WooCommerce stock to Daraz every hour, matched by SKU.

Buttons on the settings screen

ButtonWhat it does
Connect Daraz accountStarts the authorisation on Daraz. Appears once App Key and Secret are saved.
Test connectionMakes a signed read-only call and logs the result.
Sync orders nowImports orders immediately.
Push stock nowSends stock immediately.
Refresh tokenForces an access-token refresh. Normally automatic.
DisconnectRemoves the stored tokens.

How orders are imported

Every 15 minutes the plugin requests orders updated within the look-back window, then their items. Each Daraz order becomes a WooCommerce order with the buyer’s address, item prices, shipping fee, voucher discounts and the Daraz payment method — usually COD — without marking it paid.

Items are matched by seller SKU. An item with no WooCommerce match is still imported as a placeholder line with a warning note on the order.

Imports are keyed on the Daraz order ID. Later syncs update the status using your mapping — shipped, delivered, canceled, returned — instead of creating duplicates.

Packing, Ready to Ship and labels

The Daraz panel on the order screen shows the order number, Daraz order ID, number of items, payment method, and whether the order has been packed and set Ready to Ship.

Click Mark packed to pack all items on Daraz with the default shipping provider (Daraz Express unless you change it with the rau_dos_default_provider filter). Then click Ready to ship. Both steps are logged, and the order gets a note.

Click Shipping label to fetch the Daraz label through the API. It is stored in wp-content/uploads/rau-daraz-docs, which the plugin protects from direct access, and opened from the order, so you can print without going to Seller Center.

WooCommerce order with the Daraz panel showing order number, COD payment, packed and ready to ship, and Mark packed, Ready to ship and Shipping label buttons
A Daraz Pakistan order in WooCommerce. The Daraz panel shows the order number, items, Cash-on-Delivery payment and fulfilment state, with Mark packed, Ready to ship and Shipping label buttons.

Stock sync

Every hour stock is pushed for products with a SKU that matches a Daraz seller SKU. Out-of-stock products push zero. Hold back a safety quantity with rau_dos_stock_buffer — worth doing because Daraz penalises cancellations caused by overselling.

The sync log and Status tab

The Sync log lists imports, status updates, packing, Ready to Ship, label downloads, stock pushes and errors, with Daraz’s own error message and the raw API detail. Order entries link straight to the order; entries are kept for seven days.

The Status tab shows country and API host, whether the app is configured and the seller authorised, seller ID, token and refresh-token expiry, last and next sync, orders this month, errors in the last 24 hours and the scheduler.

Daraz Orders Sync log with account connected, imported orders, packed and ready to ship entries
The sync log: seller account connected, two orders imported, one packed and set to Ready to Ship, and an hourly stock push.

What the free version includes

  • Up to 150 imported orders per month
  • One Daraz country account
  • 15-minute order sync and hourly stock sync
  • 30-day order look-back
  • 7-day log retention
  • Pack, Ready to Ship and labels one order at a time

Troubleshooting

What you seeWhat to do
Authorisation fails or loops backThe callback URL in the Daraz app must match the one on the Settings tab exactly.
“IncompleteSignature” or signature errorsThe App Key and App Secret must come from the same app. Re-paste both and save.
Refresh token expiring soonDaraz authorisations lapse after a period. The plugin warns you; reconnect before it expires.
Items import as placeholdersThe seller SKU on Daraz doesn’t match a WooCommerce SKU.
Ready to Ship is rejectedMark the order packed first. Daraz only accepts Ready to Ship for packed items.

For developers: hooks

Every hook below is part of the plugin’s public surface and safe to use from a theme’s functions.php or a small site plugin.

HookTypeUse it to
rau_dos_order_importedactionRun code after a Daraz order is created. Receives the WC_Order and the Daraz order.
rau_dos_default_providerfilterShipping provider used when packing (default “Daraz Express”).
rau_dos_stock_bufferfilterHold back a safety quantity per product.
rau_dos_unmanaged_stock_valuefilterQuantity to push for products that don’t manage stock.
rau_dos_stock_rowsfilterAdjust rows before stock is pushed.
rau_dos_loadedactionFires once the plugin has booted.
// Keep 3 units back on Daraz so a website sale can't oversell.
add_filter( 'rau_dos_stock_buffer', function () {
	return 3;
} );

Uninstalling

Deleting the plugin removes its settings, tokens, counters, log table and the labels and invoices stored in wp-content/uploads/rau-daraz-docs. Imported orders remain in WooCommerce.

Questions people ask

Can I connect two Daraz countries?

One at a time in the free version; all countries at once is a Pro feature.

Does it post to Daraz when I complete an order in WooCommerce?

Fulfilment on Daraz is driven by the Mark packed and Ready to ship buttons, because Daraz’s logistics partner collects the parcel. Delivery status then comes back from Daraz.