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 4w ago

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 43% 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

1284d 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.

69333.0M114](/packages/algolia-algoliasearch-client-php)[thecodingmachine/graphqlite

Write your GraphQL queries in simple to write controllers (using webonyx/graphql-php).

5723.1M30](/packages/thecodingmachine-graphqlite)[team-reflex/discord-php

An unofficial API to interact with the voice and text service Discord.

1.1k379.4k24](/packages/team-reflex-discord-php)[wordpress/php-ai-client

A provider agnostic PHP AI client SDK to communicate with any generative AI models of various capabilities using a uniform API.

26236.6k14](/packages/wordpress-php-ai-client)[php-tmdb/api

PHP wrapper for TMDB (TheMovieDatabase) API v3. Supports two types of approaches, one modelled with repositories, models and factories. And the other by simple array access to RAW data from The Movie Database.

424378.6k16](/packages/php-tmdb-api)[n1ebieski/ksef-php-client

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

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

PHPackages © 2026

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