Download the PHP package comfino/php-api-client without Composer

On this page you can find all versions of the php package comfino/php-api-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-api-client

Comfino PHP API client

Latest Version PHP Version Build Status Total Downloads API Documentation

Comfino PHP API client library

A portable, PSR-compliant PHP protocol layer for the Comfino payment gateway REST API. This library handles all HTTP communication with the Comfino API: creating and managing loan applications (orders), querying available financial products, verifying webhook signatures, and generating paywall iframe authentication tokens for the shop checkout page. It imposes no concrete HTTP client, serializer, or framework dependency — bring your own PSR-18 client and PSR-17 factories.

Features

Requirements

Installation

Suggested companion packages:

Quick start

The API key is issued by Comfino when your shop signs a merchant contract. It authenticates all server-to-server API calls and must be kept secret — never expose it in frontend code, browser requests, or public repositories.

Usage

Client configuration

Querying financial products

Order management

See request-signing.md for details on how request signatures are computed automatically for order creation.

Account and widget

The widget key is a public identifier associated with the Comfino merchant account pointed to by the API key. Unlike the API key, it is safe to embed in frontend scripts — it is used by the Comfino Web Frontend SDK to render the promotional banner widget and the paywall iframe at the shop checkout page.

Notifications (fire-and-forget)

These methods catch all exceptions internally and return bool. They are safe to call without a try/catch block.

Webhook signature verification

Comfino signs status-update webhook requests with a CR-Signature header. Verify it before processing:

See webhook-verification.md for comprehensive webhook handling patterns, including framework integration, multiple API keys, replay attack prevention, and troubleshooting.

Paywall authentication token

The Comfino paywall iframe embedded at the shop checkout page requires a short-lived signed token. Generate one server-side per page render using the public widget key and the private API key, then pass only the resulting token to the frontend — the API key never leaves the server:

Tokens are valid for 15 minutes (enforced server-side).

Retry and timeout escalation

Wrap the client with a RetryExecutor to retry transient network failures with exponential backoff:

When the HTTP client also implements TimeoutAwareClientInterface, the executor automatically escalates connection and transfer timeouts on each retry attempt according to the policy schedule.

Error handling

All API errors are thrown as typed exceptions that implement HttpErrorExceptionInterface and preserve the original request and response bodies for debugging:

HTTP status Exception Description
400 Comfino\Api\Exception\RequestValidationError Invalid request data.
401 Comfino\Api\Exception\AuthorizationError Missing or invalid API key.
403 Comfino\Api\Exception\Forbidden Permission issues.
404 Comfino\Api\Exception\NotFound Resource not found.
405 Comfino\Api\Exception\MethodNotAllowed HTTP method not allowed.
409 Comfino\Api\Exception\Conflict Resource state conflict.
5xx Comfino\Api\Exception\ServiceUnavailable Server-side error.
timeout/retry exhausted Comfino\Api\Exception\ConnectionTimeout HTTP client timeout or all retry attempts failed.

Development

The bin/ wrappers delegate to Docker containers when docker-compose is available, or fall back to the host PHP. Two containers are used:

PSR standards

Changelog

See CHANGELOG for recent changes.

License

BSD 3-Clause License. See LICENSE for details.

Support

Bug reports and feature requests: GitHub issue tracker.

Contributing

The GitHub repository is a read-only public mirror that receives automated clean-snapshot releases. Please report bugs and suggest improvements via the issue tracker.


All versions of php-api-client with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
ext-json Version *
ext-sodium Version *
ext-zlib Version *
psr/http-client Version ^1.0
psr/http-factory Version ^1.0
psr/http-message Version ^1.1 || ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package comfino/php-api-client contains the following files

Loading the files please wait ...