CEND / Developers / WooCommerce

Plugin · version 0.1

WooCommerce plugin.

Live CEND prices at checkout, automatic booking when an order is paid, and tracking in the order and the customer’s email.

What it does

Your shoppers see a live CEND delivery price at checkout. When an order is paid, the plugin books the delivery with CEND. The tracking link goes on the order, on the customer’s order page and in their email.

  • The price comes from your pickup address to the address the shopper types. We find both on the map for you.
  • Deliveries are paid from your CEND wallet or credit account, as agreed with us.
  • The order’s items become the parcel description, and the declared value is what the customer paid for them after discounts, not counting delivery or tax.
  • Optional: when CEND delivers, the order is marked completed for you.

What you need

  • WordPress 6 or newer, WooCommerce 7 or newer, and a store that sells in naira.
  • A CEND business account with API access. Ask for it on the Developers page; we approve it, usually within one working day.
  • A secret key from Developers in your CEND account. Start with a test key.
  • Products with weights. The price depends on weight, so give real weights where you can.

Set it up

  • Download the plugin. In WordPress choose Plugins, Add New, Upload Plugin, then activate it.
  • Open WooCommerce, CEND Delivery. Paste the secret key. If you have not saved a pickup address in your CEND account, enter where parcels are collected here. We find that address on the map when you save.
  • Open WooCommerce, Settings, Shipping, pick a zone (for example Nigeria), Add shipping method, CEND delivery. You can rename it and set a free delivery amount.
  • Put a product in the cart and go to checkout. The CEND price appears once the shopper has entered their address.
  • Place a test order. With a test key the delivery is pretend: it is never charged and moves through the stages by itself.
  • When you are happy, ask us to take you live, then replace the test key with the live key.

The settings

  • Secret key. Starts with sk_test_ or sk_live_. Keep it private.
  • Where parcels are collected. Optional. Leave it empty to use the pickup address saved in your CEND account (Developers, Your pickup address). Fill it in to use a different one for this shop.
  • Book the delivery when an order is. Paid (the default), marked completed, or never automatically, in which case you use Book with CEND in the order actions.
  • Mark the order completed on delivery. Optional. Needs the order updates below.
  • Weight to use when a product has none. Used for pricing only.
  • Free delivery over. On the shipping method itself. The shopper pays nothing and you still pay CEND.

Order updates (optional)

In Developers, add https://YOUR-SHOP/wp-json/cend/v1/webhook as a webhook address and paste its secret into the plugin. The order then gets a note each time the parcel moves. Only calls signed with that secret are believed. How webhooks work is on the webhooks page.

If something does not work

  • No CEND price at checkout: the key, the zone method or a pickup address (in this plugin or saved in your CEND account) is missing, the shop currency is not naira, or the shopper’s address could not be found on the map.
  • The order did not book: open the order. A note says what CEND answered. Fix it, then choose Book with CEND in the order actions. It never books twice.
  • The price changed after checkout: if the price had expired, the plugin prices the same route again and adds a note to the order.
  • Logs are under WooCommerce, Status, Logs, source cend-delivery.
  • Businesses whose own customers pay CEND directly cannot use this plugin yet.

Stuck, or want something changed?

Tell us what you are building and we will reply within one working day.