PHPackages                             collector-bank/collector-checkout-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. collector-bank/collector-checkout-sdk

ActiveLibrary[API Development](/categories/api)

collector-bank/collector-checkout-sdk
=====================================

SDK for Collector Bank Checkout API

v1.0.22(5mo ago)09.8k↓40.9%2[1 issues](https://github.com/collector-bank/Checkout-PHP-SDK/issues)[1 PRs](https://github.com/collector-bank/Checkout-PHP-SDK/pulls)2PHP

Since Apr 30Pushed 5mo ago2 watchersCompare

[ Source](https://github.com/collector-bank/Checkout-PHP-SDK)[ Packagist](https://packagist.org/packages/collector-bank/collector-checkout-sdk)[ RSS](/packages/collector-bank-collector-checkout-sdk/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)DependenciesVersions (36)Used By (2)

Checkout api SDK
================

[](#checkout-api-sdk)

Php package used to communicate with Collector Bank Checkout API. Used when creating orders.

[Checkout API reference](https://payments.collectorbank.se/docs/checkout/introduction)

Data objects are immutable. Pass all variables in the constructor.

### Example initialization

[](#example-initialization)

```
$config = new \Webbhuset\CollectorCheckoutSDK\Config\Config;  // Either use this class or create your own class, implementing \Webbhuset\CollectorCheckoutSDK\Config\ConfigInterface
$config->setUsername('my-username')
    ->setSharedAccessKey('my-shared-access-key')
    ->setCountryCode('SE')
    ->setStoreId('1')
    ->setRedirectPageUri('https://example.com')
    ->setMerchantTermsUri('https://example.com')
    ->setNotificationUri('https://example.com')
    ->setValidationUri('https://example.com');

$adapter = new \Webbhuset\CollectorCheckoutSDK\Adapter\CurlAdapter($config);

$shippingFee = new \Webbhuset\CollectorCheckoutSDK\Checkout\Fees\Fee(1, "Shipping fee", 10, 25);
$fees = new \Webbhuset\CollectorCheckoutSDK\Checkout\Fees($shippingFee, null);
$item = new \Webbhuset\CollectorCheckoutSDK\Checkout\Cart\Item(
    'my-sku',
    'The product name',
    59,
    1,
    25,
    false,
    'my-sku'
);
$cart = new \Webbhuset\CollectorCheckoutSDK\Checkout\Cart([$item]);
$customer = new \Webbhuset\CollectorCheckoutSDK\Checkout\Customer\InitializeCustomer(
    'test@example.com',
    '0123456789',
    '89123456',
    '12345'
);

$countryCode = 'SE';
$reference = 'ref-000001';

$session = new \Webbhuset\CollectorCheckoutSDK\Session($adapter);

try {
    $session->initialize($this->getConfig(), $fees, $cart, $customer, $countryCode, $reference);

} catch (RequestError $e) {
    // do stuff
} catch (ResponseError $e) {
    // do stuff
}

$iframeSnippet = \Webbhuset\CollectorCheckoutSDK\Iframe->getScript($iframeConfig)

```

If an address is updated (not handled in this lib), you might have to update items or fees if address has changed

```
$session = new Session($config)
$checkoutData = $session->load($privateId)
    ->getCheckoutData() //initialized

$deliveryCountry = $checkoutData->getCustomer()->getDeliveryAddress()
->getCountry();

if ($deliveryCountry == 'Sverige') {
    $shippingFee = new \Webbhuset\CollectorCheckoutSDK\Checkout\Fees\Fee(
            1,
            "Shipping fee for sweden",
            20,
            25
    );
    $newFees = new \Webbhuset\CollectorCheckoutSDK\Checkout\Fees($shippingFee, null);
    $session->updateFees($newFees)
}

```

To render checkout or success iframe

```

// If the session got initalized in another request, you have to save to public token and use it
$session = new Session($config);
$publicToken = $mySavedToken;

// Or initialize new session
$session->initialize($this->getConfig(), $fees, $cart, $customer, $countryCode, $reference);
$publicToken = $session->getPublicToken();

$iframeConfig = new \Webbhuset\CollectorCheckoutSDK\Config\IframeConfig(
    $publicToken
);

$iframe = $session->getIframe($iframeConfig)

```

###  Health Score

49

—

FairBetter than 95% of packages

Maintenance72

Regular maintenance activity

Popularity25

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 70% 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 ~93 days

Recently: every ~65 days

Total

23

Last Release

160d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/71d07dae715b23d9439cdf774f7f304f558b21c534f7501724203b9ce34dd129?d=identicon)[collectorbank](/maintainers/collectorbank)

---

Top Contributors

[![kristoffer124](https://avatars.githubusercontent.com/u/48550705?v=4)](https://github.com/kristoffer124 "kristoffer124 (35 commits)")[![tobiassundgren-collector](https://avatars.githubusercontent.com/u/37371012?v=4)](https://github.com/tobiassundgren-collector "tobiassundgren-collector (7 commits)")[![kristoffer-webbhuset](https://avatars.githubusercontent.com/u/64462063?v=4)](https://github.com/kristoffer-webbhuset "kristoffer-webbhuset (3 commits)")[![ethwh](https://avatars.githubusercontent.com/u/99415356?v=4)](https://github.com/ethwh "ethwh (2 commits)")[![davidhagg](https://avatars.githubusercontent.com/u/1506085?v=4)](https://github.com/davidhagg "davidhagg (1 commits)")[![albtje](https://avatars.githubusercontent.com/u/22145678?v=4)](https://github.com/albtje "albtje (1 commits)")[![vestman](https://avatars.githubusercontent.com/u/564243?v=4)](https://github.com/vestman "vestman (1 commits)")

### Embed Badge

![Health badge](/badges/collector-bank-collector-checkout-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/collector-bank-collector-checkout-sdk/health.svg)](https://phpackages.com/packages/collector-bank-collector-checkout-sdk)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[facebook/php-business-sdk

PHP SDK for Facebook Business

90821.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

74513.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

265103.1M454](/packages/google-gax)[google/common-protos

Google API Common Protos for PHP

173103.7M50](/packages/google-common-protos)

PHPackages © 2026

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