Setup Guide

Pakistani Courier Setup Guide — Connect TCS, Leopards, Trax and 4 More

What you will learn: How to get API credentials from all 7 Pakistani couriers, connect them to Kliovo Shop, configure smart routing rules that assign the right courier automatically, and set up TCS COD reconciliation to catch payment shortfalls.

15 min read
By Kliovo TeamUpdated May 2026

Inside this guide

What this guide covers

01

Getting API credentials from each courier

Where to find them, what type they are, and common errors by courier

02

Connecting couriers in Kliovo Shop

The connection flow, testing, and what error codes mean

03

Setting up smart routing rules

4-layer routing system, rule examples, and Pakistan-specific best practices

04

TCS COD reconciliation setup

How to match TCS payments to orders and catch shortfalls

TCSLeopardsTraxBlueExPostExSwyftSonic

Section 1

Getting API credentials from each courier

Each courier has its own API portal and credential type. Below is the exact process for each courier, including where credentials live and the most common error for each.

1

TCS

Account ID + Password + Service Mode

TCS Business Portal → Account Settings → API Access → Generate credentials. TCS requires a registered corporate account. Personal TCS accounts do not have API access — you need to sign a corporate contract with TCS first.

Common error

Authentication error: your TCS account type may not have API access enabled. Contact TCS Business Development (not customer support) to enable merchant API access on your account.

TCS is the only Pakistani courier with a COD reconciliation API — important for Lever 4 of RTO reduction. Enable reconciliation mode when connecting.

2

Leopards

API Key + Password

Leopards Courier Business Portal → Developer Section → API Credentials. If you do not see a developer section, contact your Leopards account manager and request API access activation. It takes 1–2 business days.

Common error

Incorrect password: Leopards uses a separate API password distinct from your portal login password. Request API-specific credentials — do not use your portal login.

Leopards has the widest overall Pakistan coverage. Recommended as default courier for brands without city-specific routing requirements.

3

Trax (CallCourier)

Client ID + Client Secret

Trax Merchant Portal → API Settings. If not visible, contact [email protected] and request API credential generation. Trax typically processes API requests within 24 hours for active merchant accounts.

Common error

Invalid client secret: Trax rotates client secrets periodically. If your connection stops working, regenerate the secret in the portal and update Kliovo Shop settings.

Trax (formerly CallCourier) has the strongest interior Sindh and rural Pakistan coverage. Recommended for brands serving Sindh outside Karachi.

4

BlueEx

Email + API Key

BlueEx Merchant Portal → Developer / API Settings → Generate API Key. The API key is tied to your registered merchant email. If you do not see API settings, contact BlueEx merchant support and request API activation on your account.

Common error

Email mismatch: ensure you enter the email address registered with your BlueEx merchant account — not a different email. The API key is email-bound.

BlueEx has strong Karachi and Lahore COD delivery performance. Recommended as the primary courier for Karachi COD orders.

5

PostEx

Authorization Token

PostEx Merchant Portal → API Settings → Generate Token. PostEx uses a bearer token model — there is no username/password pair. Copy the full token string including any prefix. PostEx tokens do not expire unless manually regenerated.

Common error

Token format error: paste the complete token string. PostEx tokens are long — ensure you did not accidentally truncate when copying.

PostEx has good prepaid order handling and a decent delivery network for prepaid orders across major cities. Recommended for prepaid routing rules.

6

Swyft

Vendor ID + Token

Swyft Merchant Portal → Developer Settings → API. Swyft provides a vendor ID (numeric) and a separate API token. Both are required. If you do not have a Swyft merchant account, you need to sign up at swyftlogistics.com and request merchant API access.

Common error

Invalid vendor ID: vendor IDs are numeric. If you received a string like 'VND-00123', use only the numeric portion '123'.

Swyft is growing its Pakistan network but has more limited coverage than TCS or Leopards. Use as secondary courier for specific cities where Swyft rates are competitive.

7

Sonic

API Key

Sonic Merchant Portal → API / Developer Settings → Generate API Key. Sonic is a newer courier — if the developer section is not present in your portal, contact [email protected] and request merchant API credentials. Processing time is typically 2–3 business days.

Common error

404 on connection test: Sonic occasionally changes API endpoint URLs. If connection fails after successful credential entry, contact Kliovo support — we keep endpoint URLs updated as couriers push changes.

Sonic covers major cities and is expanding. Use as an alternative courier for price-competitive routes or when other couriers are at capacity.

Keep API credentials in a secure password manager. Kliovo Shop stores them encrypted. Never share courier API keys in WhatsApp groups, emails, or document tools. Rotate credentials immediately if you suspect they were exposed — most courier portals allow key regeneration without service interruption.

Section 2

Connecting couriers in Kliovo Shop

Once you have your API credentials, the connection process is the same for all 7 couriers:

1

Go to Settings → Couriers

In Kliovo Shop's left sidebar, navigate to Settings → Integrations → Couriers.

2

Click Add Courier and select the courier

Choose from the dropdown list. The form fields will change to match the credential type required by that courier (API key, token, Client ID + Secret, etc.).

3

Enter your credentials and select service mode

For TCS, Leopards, and Trax you will also select a service mode (overnight, two-day, etc.). Match this to your contracted service with the courier.

4

Click Test Connection

Kliovo sends a test API call to the courier's server. A green success indicator confirms the credentials are correct. A red error indicator shows the specific failure reason.

5

Save and set as active

Click Save. The courier is now available for manual assignment and routing rule targeting. Repeat for each courier you want to connect.

Common connection error codes

Error codes and what they mean

401 UnauthorizedWrong credentials. Re-check API key, password, or token. Ensure no trailing spaces.
403 ForbiddenAPI access not enabled on your courier account. Contact the courier to activate merchant API.
404 Not FoundEndpoint URL has changed on the courier's side. Contact Kliovo support — we update endpoints as couriers change them.
Connection TimeoutCourier's API server is down or unreachable. Try again in 10–15 minutes. If persistent, contact courier support.
Invalid Service ModeThe service mode you selected is not available on your account. Check your courier contract for activated services.

Test each courier connection with 3–5 manual bookings before enabling in routing rules. Create test orders with real addresses in different cities, book them manually to each courier, and verify CN creation, tracking number generation, and label printing all work correctly.

Section 3

Setting up smart routing rules

Smart routing evaluates each order against a 4-layer hierarchy. The right courier is assigned automatically — no manual selection needed for the vast majority of orders. Configure routing in Settings → Courier Routing.

The 4-layer routing system

1

Layer 1: Manual Assignment

Always wins

Set a specific courier on an individual order from the order detail screen. Always overrides all rules. Use for special cases or VIP orders.

Use when: When a specific order needs a specific courier for a specific reason.

2

Layer 2: Rule-Based Routing

Create rules that match on conditions: city, weight range, payment method, order value range, store. First matching rule wins. Rules are evaluated in the order you arrange them.

Use when: Your primary routing logic. This is where most orders are assigned automatically.

3

Layer 3: City Mapping

A simple city-to-courier map. If no Layer 2 rule matches, Kliovo looks up the delivery city in your mapping table and assigns that courier.

Use when: Catchall for cities that do not need complex rule logic — just a default courier per city.

4

Layer 4: Store Default

The courier assigned to your store as default. Every order that does not match Layers 1–3 goes to this courier.

Use when: Backup. Should handle very few orders if Layers 2 and 3 are properly configured.

Layer 2 rule examples — Pakistan-specific setup

Rules are evaluated in order — first match wins. Arrange your most specific rules first, your broadest rules last. Here is a recommended starting configuration for a typical Pakistani D2C brand:

Example routing rules — Layer 2 (rule order matters)

#1Payment = COD AND City = KarachiBlueEx
#2Payment = COD AND City = LahoreTCS
#3Payment = COD AND City = IslamabadTCS or Leopards
#4Payment = COD AND City in [Interior Sindh cities]Trax
#5Payment = Prepaid AND Weight <= 2kgPostEx
#6Weight > 2kgLeopards
#7Order Value > Rs 15,000 AND Payment = CODTCS

Fallback courier

Always set a store default courier (Layer 4). It should be your most broadly-connected courier — Leopards or TCS work for most brands as the fallback. Orders from cities not covered in your city mapping or Layer 2 rules will go here.

Testing routing before going live

Create test orders with addresses in each city you have rules for
Verify each order is auto-assigned to the expected courier before CN generation
Check that orders outside your rule set fall back to your store default correctly
Run 5–10 real orders manually on each courier before relying on auto-routing
Check CN label format for each courier — they differ in barcode size and field layout
Routing rule changes take effect immediately on all new orders. Existing orders in the queue are not re-routed when you change rules — they keep whatever assignment they had at creation. Test routing changes during low-volume periods to catch misconfigurations before they affect large order batches.

Section 4

TCS COD reconciliation setup

TCS collects COD payments at the door and remits to you in batches — typically weekly or bi-weekly. The remittance is a bank transfer with a TCS payment reference. Without reconciliation, you have no way to verify that every delivered order's COD amount was actually remitted.

TCS COD reconciliation in Kliovo Shop matches your TCS payment records against your dispatched orders automatically. It flags any order where the COD amount was not included in a remittance, or where the remitted amount differs from the order's COD amount.

How TCS remittance works

TCS COD remittance cycle

Day 1Order dispatched to TCS with COD amount on CN
Day 3–5TCS delivers order and collects COD from customer
Day 7–14TCS batches collected COD payments
Day 14–21TCS remits batch payment via bank transfer
Same dayTCS provides a load sheet (CSV or portal export) showing CN numbers and amounts

Setting up reconciliation in Kliovo Shop

1

Enable TCS reconciliation mode

In Settings → Couriers → TCS, toggle on 'COD Reconciliation'. This enables the reconciliation data fetch from TCS's API when you run reports.

2

Download TCS load sheet

When TCS makes a remittance, log into the TCS Business Portal and download the load sheet for that remittance period. This is a CSV file with CN numbers and COD amounts.

3

Import into Kliovo Shop reconciliation report

Go to Reports → Advanced Reports → TCS COD Reconciliation → Upload Load Sheet. Kliovo matches the CN numbers against your orders and calculates expected vs. received.

4

Review flagged discrepancies

Orders where the TCS remittance amount differs from the order's COD amount are flagged. Orders not included in any remittance after 30 days are flagged separately for follow-up with TCS.

5

Dispute shortfalls within 30 days

TCS has a 30-day dispute window for remittance discrepancies. Flag any shortfalls in the reconciliation report and contact TCS with the CN number and expected amount.

Run TCS COD reconciliation weekly, not monthly. Catching a shortfall in week one is trivial to dispute — you have fresh data, the TCS rep can see the CN in their system, and the dispute window is wide open. Discovering a shortfall 35 days later means you are outside the dispute window and the money is gone. Schedule reconciliation every Friday or the day after each TCS remittance.

Key takeaways

What to remember when setting up your courier connections.

1

Every courier requires separate API credentials — there is no shared login

TCS uses Account ID + Password, Leopards uses API Key + Password, Trax uses Client ID + Secret, BlueEx uses Email + API Key, PostEx uses a token, Swyft uses Vendor ID + Token, Sonic uses an API key. Each is obtained from that courier's business portal.

2

Test each courier with 3–5 manual orders before enabling in routing rules

Verify CN creation, tracking number generation, and label printing work correctly for each courier before orders are routed automatically. Catching a misconfiguration in testing saves a dispatched-without-CN anomaly later.

3

Layer 2 rules with city + payment method cover 80% of routing decisions

Start with these two conditions. Most Pakistani D2C brands can serve their entire routing logic with 5–8 Layer 2 rules covering major cities and COD/prepaid split.

4

TCS COD reconciliation should run weekly, not monthly

TCS has a 30-day dispute window. Monthly reconciliation leaves you outside that window for the first 30 days of any issue. Weekly reconciliation catches shortfalls in time to dispute them.

5

API credentials must be stored securely — rotate them if exposed

Courier API credentials give full access to your shipping account. Treat them like passwords. Store in a password manager, not in Slack or email. If you suspect exposure, regenerate immediately in the courier portal.

Related resources

Connect your couriers

All 7 Pakistani couriers in one dashboard

Connect TCS, Leopards, Trax, BlueEx, PostEx, Swyft, and Sonic to Kliovo Shop. Configure smart routing rules once — every order goes to the right courier automatically, forever.