SoftSquare Shipping Gateway for WooCommerce – TCS Courier Pakistan

By Izhan

0+ active installationsVersion 1.4.3

Book TCS courier shipments in Pakistan from WooCommerce: print TCS labels, collect cash on delivery (COD) and give customers live parcel tracking.

Description

SoftSquare Shipping Gateway for WooCommerce is a TCS Pakistan shipping plugin that connects your WooCommerce store to TCS for shipment booking, shipment tracking, shipping label generation, COD delivery, and day-to-day shipment management, without anyone retyping an address into a courier portal.

It is built for online stores in Pakistan that ship with TCS (TCS Express): book a parcel from the order screen, print the consignment note, collect cash on delivery, and let customers follow their parcel on your own site.

This is an independent third-party integration developed and maintained by SoftSquare. It is not affiliated with, endorsed by, sponsored by, or officially supported by TCS. TCS is a trademark of its respective owner and is used here only to describe the courier this plugin connects WooCommerce to.

This plugin does not talk to TCS directly; it works through the SoftSquare service, which is required for booking, printing or tracking. See External Services below for exactly what is sent and when.

Watch a short tour of setup, booking, tracking and customer emails:

Features

  • Book a TCS shipment directly from a WooCommerce order, or automatically when an order reaches a status you choose
  • Cancel a TCS booking, re-book it with corrected details, or book a TCS reverse pickup
  • TCS COD (cash-on-delivery) support, with the amount to collect taken from the order total or set per order
  • Generate and print a TCS shipping label (consignment note) as a PDF, stored locally so reprints are instant
  • Bulk-book TCS shipments and bulk-print TCS shipping labels from the orders list
  • Track a TCS consignment from the WooCommerce order screen, and from a public TCS tracking page via the [tcs_tracking] shortcode
  • Hourly TCS shipment status refresh, plus a signed webhook the service can call the moment a status changes
  • Move the WooCommerce order status automatically when TCS delivers or returns a parcel
  • Email the customer, the store, or both when a TCS shipment’s status changes, optionally through your own SMTP server
  • A searchable list of TCS Pakistan destinations at checkout, bundled with the plugin, so every order carries a station code TCS recognises
  • Enter and test your TCS account credentials from the WooCommerce settings screen
  • An activity log of every call the site makes to the SoftSquare/TCS gateway, with credentials redacted
  • A dashboard showing the connection, shipment counts and when the status sync last ran, with a button to run it now
  • Book a parcel again and keep the old consignment number, for a parcel TCS has already returned
  • The consignment number and tracking link in WooCommerce’s own order emails
  • Refresh TCS tracking in bulk from the orders list
  • Optional: ask the rider to call before delivery, and require a valid Pakistani mobile number at checkout
  • Link a consignment booked on the TCS portal to an order, so labels, tracking and emails work for it
  • Print a sheet of consignee copies, three to an A4 page, for a packing run (a real PDF needs the Imagick PHP extension with Ghostscript; without it you get an on-screen preview)
  • Print a label at 6 x 4 in, 4 x 6 in or A4, cropped to the copy you want
  • Status rules: move the order and send your own email when TCS reports a chosen status
  • A branded HTML status email, with an Email tester to preview and try it
  • Optional area and block lists at checkout, and a destination editor on the order screen
  • A live tracking card on the customer’s order page

SoftSquare Pro services

These are optional paid services that run on the SoftSquare service, not in this plugin. The work and the data are on SoftSquare’s servers, because they depend on the courier records and TCS payment reports the service already holds on your behalf. The plugin sends a request and displays the answer.

  • Returns management: a list of returned parcels per consignment, receiving by barcode scanner or camera, and returns added by hand
  • Shipment analytics: parcels booked, delivered and returned, TCS costs, and average delivery time for any period
  • Shipping profit or loss: delivery charged to customers against what TCS billed, order by order
  • Return rate over time: by month or by week
  • Delivery time by city: average, fastest and slowest per destination
  • Cost sync: TCS charges read from the COD Payment Report and stored per consignment, with a daily update
  • Consignment charges: everything TCS charged for one consignment
  • COD payment report: the TCS Payment Detail report for a date range

Every one of them is off until SoftSquare turns it on for your site. Until then, its place on the Dashboard or Returns screen shows a short description and a link to contact SoftSquare. Those panels appear only on this plugin’s own screens, and every other feature of the plugin works the same whether or not you use these services. Contact SoftSquare for availability and pricing: https://softsquare.io/softsquare-shipping-gateway/

Configuration

All settings for connecting WooCommerce to TCS Pakistan live under SoftSquare Shipping → Settings in the WordPress admin.

  • TCS account — your API username, password and bearer token, your TCS account number and cost centre. These are issued by TCS, not by SoftSquare or by this plugin.
  • Collection address — where parcels are picked up from. A booking is refused without it.
  • Booking defaults — service code, currency, default weight, what goes in the content description.
  • Store behaviour — which payment methods count as COD, which order statuses trigger an automatic booking, whether to show the TCS city field at checkout.
  • Status emails and Sending mail (SMTP) — who is told when a parcel moves, and which mail server sends it.

Press Test connection after saving. It asks the service to authenticate against TCS there and then, and reports what TCS said.

Usage

Open any WooCommerce order. The TCS shipment panel on the right will book the parcel, and from then on shows the consignment number, the current status and a button to print the consignment note.

To book several at once, tick them in the orders list and choose Book with TCS from the bulk actions menu.

For customers, put the [tcs_tracking] shortcode on a page. Activating the plugin creates a draft page called Track your order containing it; publish that page to turn it on. The shortcode accepts [tcs_tracking accent="#7b2d52" width="900px"] if you want it to match your theme more closely than it manages on its own.

External Services

This plugin relies on one external service and cannot work without it.

Service: SoftSquare Shipping Gateway
Operated by: SoftSquare
Endpoint: https://app.softsquare.io

Why it is used. The service holds your TCS credentials and performs the courier API calls. Your WordPress site never contacts TCS directly. This exists so that one set of courier credentials can serve a store without those credentials being used from the store’s own server.

What is sent, and when.

When you press “Connect this site” under SoftSquare Shipping → Settings: the site URL and its domain, the site name, the administrator email address, and the plugin and WordPress versions, so the service can register the site, issue a signing secret and contact you about the account. The service then fetches a one-time random token back from this site to prove the domain is yours. Nothing is sent to SoftSquare before you press this button.

When you save the settings screen: the TCS credentials you entered (API username, password, bearer token), your TCS account number, customer number and cost centre code, your collection address (name, street address, postcode, city, country, mobile number), your booking defaults, and any extra print parameters. This is the only time credentials are transmitted, and only because you pressed Save.

When an order is booked — either by pressing Book, by a bulk action, or automatically when an order reaches a status you configured: the order number and reference, and for the recipient: first and last name, full shipping address including city, postcode and country, phone number, and email address. Also the COD amount, order total, currency, parcel weight and piece count, service code, cost centre, and a description of the contents. If “Send the order items to TCS” is on, each line item’s description, quantity, unit price and SKU are included.

When you print a label: the consignment number, plus any extra print parameters you entered in the settings.

When you link a consignment booked elsewhere to an order: the consignment number, the order ID and number, and the customer’s name, mobile number and city. When you remove one, the consignment number. Neither is sent to TCS.

When you track a parcel, and hourly for parcels still in transit: the consignment number.

When a visitor uses the tracking shortcode: only the consignment number they typed. No customer or order data is sent for a public tracking lookup.

When a customer views their order, if the live tracking card is on (it is by default, and can be turned off): that order’s consignment number, at most about once every five minutes. No customer or order data is included.

If you turn on the area and block lists: when a visitor picks a city or an area at checkout, or you do on the order screen, that city’s code or that area’s code, the first time it is asked for. Answers are kept for up to a week. No customer data and no visitor IP address is sent, and this happens before an order is placed, so tell customers about it in your privacy policy if you use it. The chosen area and block then go with the booking.

When you cancel, re-book or book a reverse pickup: the consignment number, and for a re-booking the same order data as the original booking.

When you open the Dashboard: a request for your shipment counts, and for each Pro service switched on for your site, a request for its figures with the date range you chose.

When you open the Dashboard or Returns screen, at most about once an hour: a request asking which Pro services are on for this site. No order or customer data is included.

If Returns management is on, when you use the Returns screen: the consignment number you scanned or typed, your search text, and the WordPress user ID of whoever received or added a return, so the screen can show who did it. The name itself is looked up on your own site and is not sent.

If Shipping profit or loss is on, when you open the Dashboard and once a day: for each booked order that changed: the order ID, status and date, and the shipping, fee and payment discount amounts. No customer name, address, phone number or email is included. Nothing is sent while this service is off.

If Consignment charges or the COD payment report is on, when you run one: the consignment number or the date range.

No analytics, usage statistics or telemetry are sent. Apart from the Pro service data described above, no data is sent on a schedule except the hourly status check, which carries consignment numbers only.

Terms of service: https://softsquare.io/wp-term
Privacy policy: https://softsquare.io/wp-privacy

Privacy

The customer data this sends, and when, is listed in full under External Services above; this section covers what that means for your own privacy obligations.

Data is only ever sent as a result of an action you or your configuration initiated: pressing Book, running a bulk action, saving settings, or an order reaching a status you chose to auto-book on. Nothing is sent when a customer simply places an order unless you turned automatic booking on.

If you are subject to GDPR or a similar regime, you should name SoftSquare as a processor in your privacy policy, alongside TCS as the carrier.

If you use the Pro services, the service also keeps the returns and cost records it works out for you, and if Shipping profit or loss is on, the order amounts described under External Services. Delivered and returned dates are recorded for every shipment, because they are part of tracking it.

Stored on your own site: an activity log of every call made to the service, with credentials redacted but the rest of the request and response kept as sent — so a booking call’s log entry includes the same recipient name, address, phone number and order details that went to the gateway. This log is only visible to users who can manage WooCommerce, is kept for 30 days by default (configurable), and can be cleared at any time from SoftSquare Shipping → Activity log. Also stored: consignment numbers and courier status against each order; and label PDFs in wp-content/uploads/ssg-labels/, protected by a random filename and served only to users who can already view the order. Uninstalling deletes the settings, the activity log and the stored labels. Consignment numbers on orders are kept, because they are the record of a real shipment.

Security

TCS credentials are entered by the merchant and stored in the WordPress options table with the plugin’s other settings. They are sent to the SoftSquare service over HTTPS when you save the settings screen, and are held there — the plugin does not need them again to book a parcel.

Credentials are never printed in full in the admin. A saved value shows only its length, and for the bearer token the first and last few characters, which is enough to tell a wrong credential from one that was truncated on the way in. Credentials are stripped from the activity log before it is written, and never appear in an error message shown to a customer.

Requests from this site to the service are signed with HMAC-SHA256. The webhook the service calls back on is signed the same way and verified with hash_equals before anything is acted on.

No credentials are hard-coded anywhere in this plugin.

Third-party libraries

The Returns screen includes jsQR 1.4.0 (assets/js/vendor/jsqr.js, unmodified), which reads QR codes from the camera on browsers with no barcode reader of their own. Copyright its authors, licensed under the Apache License 2.0, included as assets/js/vendor/jsqr-LICENSE.txt. Source: https://github.com/cozmo/jsQR

Credits

Developed and maintained by SoftSquare — https://softsquare.io/

TCS is a trademark of its respective owner. SoftSquare Shipping Gateway for WooCommerce is an independent third-party integration and is not affiliated with, endorsed by, sponsored by, or officially supported by TCS.

Installation

  1. Install and activate WooCommerce. This plugin does nothing without it.
  2. Upload the plugin through Plugins → Add New → Upload Plugin, or install SoftSquare Shipping Gateway for WooCommerce directly from the WordPress plugin directory.
  3. Activate it, and open SoftSquare Shipping → Settings. A setup guide at the top takes you through each step and ticks them off as you go.
  4. Press Connect this site. The site registers itself with the SoftSquare service and proves it owns the domain. No key to paste.
  5. Enter the API details TCS gave you, your account number and cost centre, and save. If you do not have them yet, see “Where do I get my TCS API details?” below.
  6. Add your collection address, press Test connection, and publish the “Track your order” page.
  7. Open any order and press Book with TCS.

FAQ

Is this an official TCS plugin?

No. SoftSquare Shipping Gateway for WooCommerce is an independent third-party integration developed and maintained by SoftSquare. TCS is a trademark of its respective owner, and this plugin is not affiliated with, endorsed by, sponsored by, or officially supported by TCS.

Does this plugin integrate WooCommerce with TCS Pakistan?

Yes. It connects your WooCommerce store to TCS Pakistan through the SoftSquare service, so orders can be booked, tracked and managed as TCS shipments without leaving WordPress.

Can I book TCS shipments from WooCommerce?

Yes. Book a TCS shipment from the order screen, in bulk from the orders list, or automatically when an order reaches a status you choose.

Can I track TCS shipments?

Yes. Track a TCS consignment from the WooCommerce order screen, from a public tracking page via the [tcs_tracking] shortcode, or let the plugin check hourly on its own for shipments still in transit.

Does it support TCS COD shipments?

Yes. Cash-on-delivery orders are booked with the amount to collect taken from the order total, or you can set a different amount per order.

Can I generate TCS shipping labels?

Yes. A TCS shipping label (consignment note) can be printed as a PDF as soon as a shipment is booked, individually or in bulk, and is stored locally so reprints are instant.

Can TCS shipment booking be automated?

Yes. Choose the WooCommerce order statuses that should trigger a TCS booking automatically — for example, as soon as an order becomes Processing — and the plugin books it without anyone opening the order.

Do I need a TCS account?

Yes. You need your own TCS COD API credentials — an API username, password and bearer token, plus an account number and cost centre. TCS issues these. Neither this plugin nor SoftSquare can create them for you.

Where do I get my TCS API details?

From TCS. In short:

  1. You need a TCS business account. If you do not have one, use “Open an Account” on TCS’s e-commerce page (https://www.tcsexpress.com/ecom-solution) and TCS will contact you.
  2. Ask TCS for access to their COD API, sometimes called the E-COM API. Your TCS account manager can arrange it, or contact TCS through their website (https://www.tcsexpress.com/customer-services).
  3. TCS usually gives you sandbox details first. Choose Sandbox under TCS account, save, and test a booking. Then ask TCS to approve your account for production, which can take a few working days.
  4. TCS can also tell you your account number, customer number and cost centre codes if you do not have them.

You will end up with a bearer token, an API username and password (these are not your TCS website login), an account number, a customer number and at least one cost centre code. The setup guide in the plugin explains each one.

Do I need a SoftSquare account?

You do not create one by hand. Press “Connect this site” under SoftSquare Shipping → Settings and the plugin registers your site with the SoftSquare service and proves it owns the domain. There is no sign-up form, no key to paste, and no account to pay for before the plugin will work — and nothing is sent to SoftSquare until you press that button.

What are the SoftSquare Pro services?

Optional paid services for returns, analytics and TCS cost reports. They run on the SoftSquare service, and SoftSquare turns them on per site. Booking, labels, tracking, COD, status emails and everything else listed under Features work without them. See SoftSquare Pro services above.

Why does the Returns screen show a Pro panel?

Because that service is not on for your site. Contact SoftSquare if you want it. If it was turned on recently, press Refresh Pro services on the Dashboard.

Does the plugin send customer information to an external service?

Yes. Booking a parcel sends the recipient’s name, address, phone number and email to the SoftSquare service, which passes what TCS needs to TCS. This is what makes a delivery possible. The External Services section above lists everything that is sent and when.

Can I use it without the SoftSquare service?

No. The service is what talks to TCS. Without it the plugin can store settings but cannot book, print or track. If you run your own copy of the service, point the plugin at it with the SSGW_SERVICE_URL constant in wp-config.php.

Does it work with High-Performance Order Storage?

Yes. The plugin reads and writes order data through the WooCommerce CRUD API and declares compatibility with both HPOS and the block-based cart and checkout.

What happens to my data if I uninstall?

Settings, the activity log and stored label PDFs are deleted. Consignment numbers and courier statuses on your orders are kept, so you can still answer a customer asking where their parcel went. Nothing is deleted from the SoftSquare service.

Screenshots

Changelog

1.4.3

  • The plugin is now listed as “SoftSquare Shipping Gateway for WooCommerce – TCS Courier Pakistan”, so stores looking for TCS can find it. Nothing else changes.

1.4.2

  • Fix: on the Shipments screen, the booked date sat under the latest status and the Booked column was empty.
  • Fix: tracking times on a shipment’s details screen are now shown as readable dates instead of raw timestamps.
  • New screenshots showing every part of the plugin.

1.4.1

  • New: a setup guide at the top of the settings screen takes a new store from installing to its first booking, ticking off each step as it is done. It can be hidden, and goes away once every step is done.
  • New: “Where do I get these from TCS?” explains which details TCS issues and how to ask for them.
  • New: one welcome notice after a first activation, on the Plugins and Dashboard screens only, pointing at the guide. It can be dismissed.

1.4.0

  • New: link a consignment booked on the TCS portal to an order, replace it, or remove it if it was mistyped.
  • New: print a sheet of consignee copies, three to an A4 page, from the orders list. It is a real PDF where the host has Imagick with Ghostscript, and an on-screen preview elsewhere.
  • New: print a label at 6 x 4 in, 4 x 6 in or A4, cropped to one copy, and send extra print parameters.
  • New: status rules that move the order and send your own email when TCS reports a chosen status. There are none until you add one.
  • New, off by default: a branded HTML status email. Plain text stays the default. An Email tester previews either without touching the order.
  • New, off by default: area and block lists at checkout. A destination editor on the order screen corrects the city, area and block on any order.
  • New: a live tracking card on the customer’s order page, which can be turned off. A number on an order that TCS has not scanned yet now says the parcel is with the courier rather than “not found”.
  • Fixed: a Delivered line in the tracking history could fill the progress bar for a parcel that was on its way back.
  • Fixed: changing the print settings had no effect on labels already stored.
  • Fixed: a COD amount, weight or service code typed on the order screen was lost on a re-book. They are now kept on the order, and can be changed after booking.
  • Fixed: a product with no weight counted as weighing nothing in a mixed cart. The default weight is now added once for the parcel. Orders already booked are not flagged as changed because of this.

1.3.0

  • New Dashboard and Returns screens. The Dashboard shows the connection, shipment counts and the status sync, with a button to run it now.
  • Added support for the optional SoftSquare Pro services: returns management, shipment analytics, shipping profit or loss, return rate, delivery time by city, cost sync, consignment charges and the COD payment report. These run on the SoftSquare service and are off until SoftSquare turns them on for a site.
  • New: book a parcel again and keep the old consignment number, for a parcel TCS has already returned.
  • New: the consignment number and tracking link in WooCommerce order emails. Can be turned off in the settings.
  • New: refresh tracking in bulk from the orders list, and a service code override on the order screen.
  • New, off by default: ask the rider to call before delivery, and require a valid Pakistani mobile number at checkout.
  • Fixed: on stores using classic order storage, a status update could be applied to the newest order instead of the order it belonged to, and the status sync could pick the wrong orders. Stores on High-Performance Order Storage were not affected.
  • Fixed: “Undelivered” statuses were read as delivered, which could complete the order, stop tracking the parcel and email the customer the wrong news.
  • Fixed: the status sync could stop reaching newer parcels once its batch filled with finished ones.
  • Fixed: a late update about an old consignment or a reverse pickup could overwrite the status of the live parcel.
  • Fixed: “TCS city” was in the shipping section of the checkout, which is hidden until “Ship to a different address” is ticked, so a customer could be refused over a field they could not see.
  • Fixed: automatic booking now runs in the background, so a customer’s checkout no longer waits on the courier.
  • Fixed: order items are no longer sent when “Send the order items to TCS” is off.
  • Fixed: the filter forms on the Shipments and Activity log screens, and the links from the Shipments list, pointed at the wrong page.
  • Readme: the External Services section now lists everything sent when connecting, including the site name, administrator email and versions.

1.2.4

  • Connecting to the SoftSquare service is now a deliberate action: press “Connect this site” under SoftSquare Shipping → Settings. Nothing is sent to SoftSquare automatically on activation or on an admin page load anymore.
  • The plugin’s text domain now matches the plugin slug (softsquare-shipping-gateway-for-woocommerce), as WordPress.org requires.
  • Removed the duplicate “Tested up to” declaration from the plugin header — it is now declared in this readme only.
  • Fixed the Settings link on the Plugins screen, which pointed at the wrong page slug.
  • No functional changes beyond how the initial connection is triggered — existing settings, bookings and consignment numbers are kept, and already-connected sites are unaffected.

1.2.3

  • Corrective release for the WordPress.org review: menu-icon CSS is now added through wp_add_inline_style() instead of an inline <style> tag, internal PHP class/function/constant names now use the SSGW_/ssgw_ prefix instead of the collision-prone SSG_/ssg_, and the plugin now declares compatibility up to WordPress 7.1. No functional changes, and no stored setting, order metadata, database table, hook, AJAX action or REST route was renamed — existing installations are unaffected.

1.2.2

  • Renamed to SoftSquare Shipping Gateway for WooCommerce for clarity on the WordPress.org plugin directory. No functional changes — existing settings, bookings and consignment numbers are kept.

1.2.1

  • Renamed to SoftSquare Shipping Gateway and prepared for the WordPress plugin directory.
  • Labels are stored locally, so reprinting one no longer needs a round trip to the service.
  • A bundled, searchable list of TCS destinations at checkout, so the field cannot disappear when the network does.
  • Tracking results are no longer stored by page caches.
  • Saved credentials are masked more strictly in the admin.
  • Removed a byte-order mark from the main plugin file.

1.0.0

  • First release.