PHPackages                             dutycalculator/dutycalculator-php-sdk - 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. dutycalculator/dutycalculator-php-sdk

ActiveLibrary[API Development](/categories/api)

dutycalculator/dutycalculator-php-sdk
=====================================

DutyCalculator API PHP SDK

1.0.0(12y ago)56.7k3Apache2PHPPHP &gt;=5.2.0

Since Jan 30Pushed 12y ago3 watchersCompare

[ Source](https://github.com/DutyCalculator/dutycalculator-php-sdk)[ Packagist](https://packagist.org/packages/dutycalculator/dutycalculator-php-sdk)[ Docs](https://github.com/dutycalculator/dutycalculator-php-sdk)[ RSS](/packages/dutycalculator-dutycalculator-php-sdk/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)DependenciesVersions (3)Used By (0)

DutyCalculator PHP SDK (v.1.0.0)
--------------------------------

[](#dutycalculator-php-sdk-v100)

This repository contains the open source PHP SDK that allows you to access DutyCalculator from your PHP app. The SDK requires a DutyCalculator API account (go to ). Full documentation about DutyCalculator API you can find [here](http://www.dutycalculator.com/api-center/dutycalculator-api-2-1-documentation/).

Usage
-----

[](#usage)

The [examples](/examples/example.php) are a good place to start. The minimal you'll need to have is:

```
require 'dutycalculator-php-sdk/src/dutycalculator.php';

$client = new DutyCalculator_Client('YOUR_API_KEY');

/*
 * Example of getting available import to countries
 */
$countriesTo = $client->getImportToCountries();
print_r($countriesTo->getAsArray());
```

All [API calls](http://www.dutycalculator.com/api-center/dutycalculator-api-2-1-documentation/) have function representation in the client class. But you can make an API call using next code:

```
try
{
	$countriesFrom = $client->sendRequest('supported-countries/from', array('display_alpha2_code' => true));
}
catch (DutyCalculator_Exception $e)
{
	error_log($e);
	$countriesFrom = null;
}
```

With Composer:

- Add the `"dutycalculator/dutycalculator-php-sdk": "@stable"` into the `require` section of your `composer.json`.
- Run `composer install`.
- The example will look like

```
$client = new DutyCalculator_Client('YOUR_API_KEY');

/*
 * Example of getting available import to countries
 */
$countriesTo = $client->getImportToCountries();
```

Report Issues/Bugs
==================

[](#report-issuesbugs)

[Bugs](mailto:bugs@dutycalculator.com)

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 63.6% 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

Unknown

Total

1

Last Release

4486d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fba805ae0221544075c7979b3e9b6afd551d39b4b65c52793d827a64245b305a?d=identicon)[DutyCalculator](/maintainers/DutyCalculator)

---

Top Contributors

[![aleksandr-voytik](https://avatars.githubusercontent.com/u/114742036?v=4)](https://github.com/aleksandr-voytik "aleksandr-voytik (7 commits)")[![DutyCalculator](https://avatars.githubusercontent.com/u/6469562?v=4)](https://github.com/DutyCalculator "DutyCalculator (2 commits)")[![4litr](https://avatars.githubusercontent.com/u/6506095?v=4)](https://github.com/4litr "4litr (1 commits)")[![IlyaPokamestov](https://avatars.githubusercontent.com/u/2771864?v=4)](https://github.com/IlyaPokamestov "IlyaPokamestov (1 commits)")

---

Tags

phpapisdkdutycalculator

### Embed Badge

![Health badge](/badges/dutycalculator-dutycalculator-php-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/dutycalculator-dutycalculator-php-sdk/health.svg)](https://phpackages.com/packages/dutycalculator-dutycalculator-php-sdk)
```

###  Alternatives

[jstolpe/instagram-graph-api-php-sdk

Instagram Graph API PHP SDK

13998.4k2](/packages/jstolpe-instagram-graph-api-php-sdk)[clever/clever-php

231.6k](/packages/clever-clever-php)

PHPackages © 2026

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