PHPackages                             fiizy/fiizy-api-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. fiizy/fiizy-api-sdk

ActiveLibrary[API Development](/categories/api)

fiizy/fiizy-api-sdk
===================

Fiizy API PHP SDK

v1.0.6(3y ago)21.2kMITPHPPHP &gt;= 5.6.0

Since Feb 11Pushed 3y agoCompare

[ Source](https://github.com/Fiizy/php-sdk)[ Packagist](https://packagist.org/packages/fiizy/fiizy-api-sdk)[ RSS](/packages/fiizy-fiizy-api-sdk/feed)WikiDiscussions main Synced today

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

Fiizy PHP SDK
=============

[](#fiizy-php-sdk)

[![Fiizy](https://camo.githubusercontent.com/97d855988c6760e3ca15f998dff7cee4462771de80d73d2260448acb8a086684/687474703a2f2f63646e2e6669697a792e636f6d2f6c6f676f732f6c6f676f2e737667)](https://fiizy.com)

[Fiizy](https://fiizy.com) financing solutions.

Installation
------------

[](#installation)

You can use [Composer](https://getcomposer.org):

```
composer require fiizy/fiizy-api-sdk
```

Usage
-----

[](#usage)

Create a new order and redirect user to complete the flow. Once user flow completes user will be redirected to `returnUrl` and `webhookUrl` endpoint will be called with result of the flow. In case user cancels the flow, he will be redirected to `cancelUrl`.

```
$item = new LineItem();
$item->type = LineItemType::Product;
$item->subType = LineItemSubType::PhysicalProduct;
$item->reference = 'product-101';
$item->status = LineItemStatus::InStock;
$item->name = 'Product name';
$item->description = 'Product description';
$item->url = 'http://product-url';
$item->imageUrl = 'http://product-image-url';
$item->quantity = 1;
$item->price = new Decimal(97.45);
$item->taxRate = new Decimal(21.00);
$item->totalAmount = new Decimal(117.91);
$item->metadata = array('id' => 101);

$shipping = new LineItem();
$shipping->type = LineItemType::Fee;
$shipping->subType = LineItemSubType::ShippingFee;
$shipping->reference = 'shipping-1';
$shipping->name = 'Flat rate';
$shipping->quantity = 1;
$shipping->price = new Decimal(11.85);
$shipping->taxRate = new Decimal(21.00);
$shipping->totalAmount = new Decimal(14.34);
$shipping->metadata = array('id' => 1);

$discount = new LineItem();
$discount->type = LineItemType::Discount;
$discount->subType = LineItemSubType::DiscountDiscount;
$discount->reference = 'discount-1';
$discount->name = 'Discount';
$discount->quantity = 1;
$discount->price = new Decimal(5.00);
$discount->totalAmount = new Decimal(5.00);
$discount->metadata = array();

$request = new CheckoutRequest();
$request->order = new Order();
$request->order->reference = 'ref-1';
$request->order->number = '#001';
$request->order->status = OrderStatus::NewOrder;
$request->order->currency = 'EUR';
$request->order->taxAmount = new Decimal(22.95);
$request->order->totalAmount = new Decimal(127.25);
$request->order->metadata = array('id' => 1);
$request->order->lineItems = array($item, $shipping, $discount);

$request->customer = new Customer();
$request->customer->gender = 'male';
$request->customer->firstName = 'Johnny';
$request->customer->lastName = 'Appleseed';
$request->customer->dateOfBirth = '1987-12-23';
$request->customer->email = 'johnny.appleseed@fiizy.com';
$request->customer->phoneNumber = '+34111111111';
$request->customer->nationalIdentificationNumber = '123';

$request->shippingAddress = new Address();
$request->shippingAddress->firstName = 'Johnny';
$request->shippingAddress->lastName = 'Appleseed';
$request->shippingAddress->phone = '+34111111111';
$request->shippingAddress->countryIso = 'ES';
$request->shippingAddress->postalCode = '28013';
$request->shippingAddress->state = 'Madrid';
$request->shippingAddress->city = 'Madrid';
$request->shippingAddress->addressLine1 = 'Prta del Sol';
$request->shippingAddress->addressLine2 = '1';

$request->billingAddress = $request->shippingAddress;

$request->endpoints = new Endpoints();
$request->endpoints->returnUrl = 'http://return-url';
$request->endpoints->cancelUrl = 'http://cancel-url';
$request->endpoints->webhookUrl = 'http://webhook-url';

$request->client = new Client();
$request->client->language = 'en';
$request->client->ip = '127.0.0.1';
$request->client->userAgent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.55 Safari/537.36';

$normalizer = new ObjectNormalizer();
$client = new Client();
$client->setHttpClient(new CurlHttpClient('Fiizy-PHP-SDK/1.0.0'));
$client->setSerializer(new SimpleSerializer(array($normalizer)));
$client->setDenormalizer($normalizer);
$client->setAuthorizationKeys('public-key', 'private-key');
$checkout = new Checkout($client);
$response = $checkout->start($request);

header('Location: ' . $response->redirectUrl);
```

To handle the webhook callback please extend `Fiizy\Api\Webhook\Receiver` and implement required methods. You should return HTTP status code 2XX in case receiver was able to receive and process event. Webhook callback supports a retry mechanism for callback failure (in case HTTP status code was not 2XX).

```
// WebhookReceiver extends Fiizy\Api\Webhook\Receiver and implements required methods.
// $receiver = new WebhookReceiver();
$secret  = 'private-key';

try {
    $headers = getallheaders();

    if (!isset($headers[\Fiizy\Api\Util\Signature::HEADER_KEY])) {
        throw new \Exception('missing signature', 401);
    }

    $payload = @file_get_contents( 'php://input' );

    $processed = $receiver->process( $payload, $headers[ \Fiizy\Api\Util\Signature::HEADER_KEY ], $secret );

    if (true === $processed) {
        // store data has been modified.
        $statusCode = 204;
    } else {
        // store data has been left as is.
        $statusCode = 202;
    }

    http_response_code( $statusCode );
    header( 'Content-Type: application/json' );
} catch ( \Exception $e ) {
    http_response_code( $e->getCode() );
}

```

Documentation
-------------

[](#documentation)

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 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 ~44 days

Total

7

Last Release

1338d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fc1e1937007b6ff74aef1e812c14a0530183fa29a190217452b9f1678eaefccd?d=identicon)[it@fiizy.com](/maintainers/it@fiizy.com)

---

Top Contributors

[![stanislavprokopovf](https://avatars.githubusercontent.com/u/95920060?v=4)](https://github.com/stanislavprokopovf "stanislavprokopovf (24 commits)")

---

Tags

fiizy

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/fiizy-fiizy-api-sdk/health.svg)

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

###  Alternatives

[algolia/algoliasearch-client-php

API powering the features of Algolia.

69735.1M157](/packages/algolia-algoliasearch-client-php)[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.6k](/packages/aws-aws-sdk-php)[cakephp/cakephp

The CakePHP framework

8.9k19.5M1.8k](/packages/cakephp-cakephp)[moonshine/moonshine

Laravel administration panel

1.3k253.1k81](/packages/moonshine-moonshine)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

85036.3k](/packages/flow-php-flow)[n1ebieski/ksef-php-client

PHP API client that allows you to interact with the API Krajowego Systemu e-Faktur

9067.8k](/packages/n1ebieski-ksef-php-client)

PHPackages © 2026

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