PHPackages                             sudiptpa/transdirect - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. sudiptpa/transdirect

ActiveLibrary[API Development](/categories/api)

sudiptpa/transdirect
====================

A clean, dependency-free PHP client for the Transdirect REST API.

v2.0.0(2mo ago)11142MITPHPPHP &gt;=7.0CI passing

Since Apr 30Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/sudiptpa/transdirect)[ Packagist](https://packagist.org/packages/sudiptpa/transdirect)[ GitHub Sponsors](https://github.com/sudiptpa)[ RSS](/packages/sudiptpa-transdirect/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (7)Dependencies (5)Versions (8)Used By (0)

Transdirect API client
----------------------

[](#transdirect-api-client)

[![CI](https://github.com/sudiptpa/transdirect/actions/workflows/ci.yml/badge.svg)](https://github.com/sudiptpa/transdirect/actions/workflows/ci.yml)[![Latest Stable Version](https://camo.githubusercontent.com/d9b643219a6e6a58f178d63649305753dee71c5ae9b637b863d23e6d884cb126/68747470733a2f2f706f7365722e707567782e6f72672f73756469707470612f7472616e736469726563742f762f737461626c653f666f726d61743d666c6174)](https://packagist.org/packages/sudiptpa/transdirect)[![Total Downloads](https://camo.githubusercontent.com/b7a949bac95f33fd2eee163feddfe8b84d099423f9bfda173e2e0543ad46da21/68747470733a2f2f706f7365722e707567782e6f72672f73756469707470612f7472616e736469726563742f646f776e6c6f6164733f666f726d61743d666c6174)](https://packagist.org/packages/sudiptpa/transdirect)[![License](https://camo.githubusercontent.com/710cff635fd3ec50f5f5a2ba756e9f44a67440ba821ba0552b5c9d45d40ba77d/68747470733a2f2f706f7365722e707567782e6f72672f73756469707470612f7472616e736469726563742f6c6963656e73653f666f726d61743d666c6174)](https://packagist.org/packages/sudiptpa/transdirect)

A clean, dependency-free PHP client for the Transdirect REST API.

- PHP 7.0+
- no runtime HTTP dependency
- fluent resource API
- configurable live and sandbox endpoints
- transport injection for tests

### Install

[](#install)

```
composer require sudiptpa/transdirect
```

### Quick start

[](#quick-start)

```
use Sujip\Transdirect\Transdirect;

$client = Transdirect::connect($apiKey);

$response = $client->quotes()->create([
    'declared_value' => '1000.00',
    'referrer' => 'API',
    'requesting_site' => 'https://example.com.au',
    'items' => [
        [
            'weight' => '38.63',
            'height' => '0.25',
            'width' => '1.65',
            'length' => '3.32',
            'quantity' => 1,
            'description' => 'carton',
        ],
    ],
    'sender' => [
        'address' => '21 Kirksway Place',
        'company_name' => 'Sender Company',
        'email' => 'sender@example.com',
        'name' => 'Sender Name',
        'postcode' => '2000',
        'phone' => '0212345678',
        'state' => 'NSW',
        'suburb' => 'SYDNEY',
        'type' => 'business',
        'country' => 'AU',
    ],
    'receiver' => [
        'address' => '216 Moggill Rd',
        'company_name' => 'Receiver Company',
        'email' => 'receiver@example.com',
        'name' => 'Receiver Name',
        'postcode' => '3000',
        'phone' => '0312345678',
        'state' => 'VIC',
        'suburb' => 'MELBOURNE',
        'type' => 'business',
        'country' => 'AU',
    ],
]);

$quotes = $response->getQuotes();
```

### Resources

[](#resources)

```
$client->quotes()->create($payload);
$client->bookings()->create($payload);
$client->bookings()->find($bookingId);
$client->bookings()->update($bookingId, $payload);
$client->bookings()->delete($bookingId);
$client->bookings()->action($bookingId, 'confirm', $payload);
$client->bookings()->nested($bookingId, 'label');
$client->orders()->create($payload);
$client->locations()->get(['q' => 'Sydney']);
$client->couriers()->get();
$client->member()->get();
$client->frequentRates()->get();
```

### Helpers

[](#helpers)

```
$client->tracking($bookingId);
$client->postcode('3000');
$client->pagedLocations(2);
```

### Sandbox

[](#sandbox)

```
$client = Transdirect::connect($apiKey)
    ->setSandboxEndpoint('https://sandbox.example.test/api')
    ->useSandbox();
```

Sandbox mode now requires an explicit sandbox endpoint.

### Custom transport

[](#custom-transport)

```
$client = new Transdirect($apiKey, function ($method, $url, $headers, $body) {
    return [
        'status' => 200,
        'headers' => ['Content-Type' => 'application/json'],
        'body' => '{"ok":true}',
    ];
});
```

### Testing

[](#testing)

```
composer test
composer stan
find src tests -name '*.php' -print0 | xargs -0 -n1 php -l
```

### Docs

[](#docs)

###  Health Score

46

—

FairBetter than 92% of packages

Maintenance84

Actively maintained with recent releases

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~544 days

Recently: every ~817 days

Total

7

Last Release

80d ago

Major Versions

1.6.0 → v2.0.02026-04-13

PHP version history (2 changes)1.0.0PHP ~5.5|~7.0

v2.0.0PHP &gt;=7.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7222620?v=4)[Sujip Thapa](/maintainers/sudiptpa)[@sudiptpa](https://github.com/sudiptpa)

---

Top Contributors

[![sudiptpa](https://avatars.githubusercontent.com/u/7222620?v=4)](https://github.com/sudiptpa "sudiptpa (90 commits)")

---

Tags

apiphp-sdkshippingtransdirectapishippingcouriertransdirect

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/sudiptpa-transdirect/health.svg)

```
[![Health](https://phpackages.com/badges/sudiptpa-transdirect/health.svg)](https://phpackages.com/packages/sudiptpa-transdirect)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M46](/packages/tencentcloud-tencentcloud-sdk-php)[easypost/easypost-php

EasyPost Shipping API Client Library for PHP

1743.4M6](/packages/easypost-easypost-php)[resend/resend-php

Resend PHP library.

617.2M38](/packages/resend-resend-php)[files.com/files-php-sdk

Files.com PHP SDK

2481.1k](/packages/filescom-files-php-sdk)[checkout/checkout-sdk-php

Checkout.com SDK for PHP

563.6M13](/packages/checkout-checkout-sdk-php)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

252.5k](/packages/eslazarev-wildberries-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
