PHPackages                             stidner/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. stidner/php-sdk

AbandonedArchivedLibrary[Utility &amp; Helpers](/categories/utility)

stidner/php-sdk
===============

Stidner Complete PHP SDK

02PHP

Since Apr 20Pushed 9y ago2 watchersCompare

[ Source](https://github.com/Stidner/php-sdk)[ Packagist](https://packagist.org/packages/stidner/php-sdk)[ RSS](/packages/stidner-php-sdk/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (0)

[![StyleCI](https://camo.githubusercontent.com/1f1a58a17e8f9d0e507dac8307e98a58968dcdb51e4601d2f8076cd0752cc9ac/68747470733a2f2f7374796c6563692e696f2f7265706f732f35393231313135322f736869656c64)](https://styleci.io/repos/59211152)

Stidner PHP SDK
===============

[](#stidner-php-sdk)

Requirements
============

[](#requirements)

At least PHP 5.4.

Installation
============

[](#installation)

Please install the SDK via [Composer](https://getcomposer.org/).

```
composer require stidner/php-sdk

```

And then load the SDK using Composer's autoload:

```
require_once('vendor/autoload.php');

```

Dependencies
============

[](#dependencies)

The SDK depends on:

- The [`Httpful`](https://github.com/nategood/httpful) library,
- and the `curl` extension.

When using Composer, these should be automatically handled.

Usage
=====

[](#usage)

We suggest you read our full documentation at [http://developer.stidner.com](http://developer.stidner.com/?php-sdk).

Create new order
----------------

[](#create-new-order)

...but to summarize, you need to:

1. Create a new API instance; this includes your API key and user ID.

```
$api_handle = new \Stidner\Api(API_USER_ID, 'API_KEY');
```

2. Craft the various objects that the API requires. Please click the links for complete example code.

Required:

- [merchant URLs](http://developer.stidner.com/?php-sdk#urls-subobject),
- [items array](http://developer.stidner.com/?php-sdk#item-subobject).

Optional:

- [billing address](http://developer.stidner.com/?php-sdk#address-subobject),
- [checkout options](http://developer.stidner.com/?php-sdk#options-subobject).

3. Create the [Order](http://developer.stidner.com/?php-sdk#order-object) object, which contains the above objects and a few final variables.

```
$order = new \Stidner\Model\Order();
$order->setMerchantReference1(null)
    ->setMerchantReference2(null)
    ->setPurchaseCountry('SE')
    ->setPurchaseCurrency('SEK')
    ->setLocale('sv_se')
    ->setTotalPriceExcludingTax(171000)
    ->setTotalPriceIncludingTax(213750)
    ->setTotalTaxAmount(42750)
    ->setBillingAddress($billingAddress) // Don't forget to add all the objects!
    ->addItem($item[1])
    ->addItem($item[2])
    ->setMerchantUrls($merchant)
    ->setOptions($options);
```

4. Finally, send the now-complete json object off to the API server! If successful, the response should be the entire order object, and include a URL to our Stidner Complete payment system; this URL should be loaded in an iframe on your checkout page!

```
try {
    $request = $api_handle->createOrder($order);
    $iframeUrl = $request->getIframeUrl();
    echo "";
} catch (\Stidner\ApiException $e) {
    print $e;
} catch (\Stidner\Api\ResponseException $e) {
    print $e;
}
```

Checking an order's status
--------------------------

[](#checking-an-orders-status)

Same with creating an order, you must create the API instance:

```
$api_handle = new \Stidner\Api(API_USER_ID, 'API_KEY');
```

Now do getOrder(), with the orderID as a parameter. This loads the entire order json object from the API.

```
$request = $api_handle->getOrder('ORDER_ID');
```

Finally, getStatus() on the response's json object. This will be: purchase\_incomplete, purchase\_complete, or purchase\_refunded.

```
$orderStatus = $request->getStatus();
```

License
=======

[](#license)

Stidner's PHP SDK is licensed under the [Apache License, Version 2](https://www.apache.org/licenses/LICENSE-2.0).

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

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

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/18695235?v=4)[YatesHarry](/maintainers/YatesHarry)[@YatesHarry](https://github.com/YatesHarry)

---

Top Contributors

[![YatesHarry](https://avatars.githubusercontent.com/u/18695235?v=4)](https://github.com/YatesHarry "YatesHarry (12 commits)")[![bkielbasa](https://avatars.githubusercontent.com/u/1235620?v=4)](https://github.com/bkielbasa "bkielbasa (8 commits)")

### Embed Badge

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

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

###  Alternatives

[protonemedia/laravel-mixins

Laravel Mixins

15462.9k1](/packages/protonemedia-laravel-mixins)[chasegiunta/craft-jason

A field type for displaying &amp; editing JSON data.

1434.7k](/packages/chasegiunta-craft-jason)

PHPackages © 2026

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