Download the PHP package andriichuk/liqpay-php-sdk without Composer

On this page you can find all versions of the php package andriichuk/liqpay-php-sdk. 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 liqpay-php-sdk

LiqPay PHP SDK — Fluent LiqPay API v7 Client

CI

A fluent, framework-agnostic client for LiqPay API v7, requiring PHP 8.2+. Each operation has a concrete request class with typed methods and IDE completion. JSON responses are decoded into native PHP values, with objects represented as associative arrays.

This is an independent SDK. Its initial version has not been published to Packagist or tested against a live merchant account.

Features

Security

Getting started

Install from GitHub

The package is not on Packagist yet. Add its GitHub repository to your application's Composer configuration:

Include vendor/autoload.php when your application does not already load Composer. The examples below use LIQPAY_PUBLIC_KEY and LIQPAY_PRIVATE_KEY from your application's environment.

Refund a payment

send() is the execution boundary. Setters build a request; they never make HTTP calls. This lets optional fields appear in any order. Checkout/widget builders instead produce a signed local payload using payload() or send().

API v7 uses SHA3-256 signatures. The older official PHP SDK and many documentation code samples still use API v3 and SHA-1. To reproduce a legacy call explicitly:

The current v7 refund parameter table marks amount as required, while the older v3 examples omit it. This SDK requires it for v7 and permits omission for v3. Version 7, 3, their string equivalents, and ApiVersion::V7 / ApiVersion::V3 are accepted. Other versions are rejected rather than signed with a guessed algorithm.

PHP 8.2 is the oldest security-supported PHP branch as of 16 October 2026; its upstream security support ends on 31 December 2026. The package supports PHP 8.2 through 8.x.

HTTP configuration

Guzzle is included for the simple constructor. Configure its timeouts, proxy, TLS certificates, handlers, middleware, and other client-level settings through Configuration:

Or supply any PSR-18 client and optional PSR-17 factories, following the approach in the BlueSnap SDK:

httpOptions configures only the built-in Guzzle client; configure an injected client yourself. Default timeouts are 30 seconds overall and 10 seconds to connect. PSR-18 Guzzle requests do not follow redirects and return unsuccessful HTTP responses for the SDK to handle. No automatic retries are added. Applications control middleware and retries, including reconciliation after an uncertain payment result.

Configuration also accepts apiVersion, apiBaseUri, checkoutUrl, publicBaseUri, posDataUrl, posCallbackUrl, and posRequestUrl. Endpoint overrides must be absolute HTTPS URLs. The documented checkout URL remains /api/3/checkout even when the signed payload uses version 7.

Subscriptions and invoices

subscription() and invoice() are shortcuts for the respective create() builder. The server-to-server card flows require the corresponding merchant access; hosted checkout is also available.

Checkout and widgets

Pass data and signature to LiqPay's browser SDK to render a widget. Browser SDKs and frontend components are external to this PHP package. donation() and authorization() provide hosted paydonate and auth builders. Checkout also supports action('hold') and action('subscribe').

For splitting and fiscal receipts, pass native arrays:

splitRules() encodes arrays to the JSON string required by that API field. Nested objects such as rroInfo() remain arrays in the payload. There is no separate split-payment endpoint in the current splitting guide.

Other operations

See the complete endpoint coverage matrix for all 58 operations, including partner and outbound POS APIs.

Callback verification

The expected version defaults to the client configuration. Pass version: 3 only for callbacks belonging to a legacy integration. Verification never automatically falls back to SHA-1 based on unverified callback data. POS callbacks use verifyPos($data, $signature) because their protocol omits merchant public_key and API version.

Applications should check order, amount, currency and final status, and deduplicate callback processing before changing their order state.

Response array shapes

The response annotations require PHPStan 2.3.1+ for inline field comments. Every operation declares its PHPStan response aliases directly on the existing request class, with field comments and a link to its LiqPay source. Shared nested shapes are imported from the SDK classes that own them. The fluent builders preserve the alias through send(); responses remain native arrays. Nested token details, report rows, MCC data, exchange rates and POS records are shaped too.

Fields omitted by some statuses or error responses are optional. CSV/XML report operations use array-shape-or-string unions. See response contracts and aliases for the type definitions and documentation gaps. The aliases describe the API contract without adding runtime response validation or conversion.

Response and error behavior

Request reuse and extension fields

Builders are immutable. Keep the returned object when setting fields in separate statements:

withParameters() accepts a native array for additional API fields. Reserved fields such as credentials, action, version, data and signature cannot be overridden this way.

Development

PHP CS Fixer uses the official Laravel Pint Laravel preset, saved in tools/php-cs-fixer/laravel.php with its MIT license. It formats src/, tests/, and the formatter configuration. Run composer format to apply fixes or composer format:check to check without editing files. The formatting check is included in composer check and CI.

Tests use fake PSR clients or Guzzle's mock handler; they need no credentials and make no live payment requests. CI runs PHP 8.2, 8.3, 8.4 and 8.5, plus a PHP 8.2 run with the lowest supported dependency versions. Static analysis runs at PHPStan's maximum level and checks response-type inference through all 58 fluent entry points plus callbacks.

The facade composes independent request builders, an executor, signer, payload codec and PSR transport. Modules depend on RequestExecutorInterface; the executor depends on TransportInterface and SignerInterface; HTTP transport depends on PSR-18/17. Concrete operation classes expose the documented payload fields without runtime magic methods or response models.

Support and license

Report reproducible bugs through GitHub Issues. Read SECURITY.md for private vulnerability reports.

Documentation sources include the LiqPay API and official PHP SDK. This SDK is maintained independently by Serhii Andriichuk.

Licensed under the upstream MIT license.


All versions of liqpay-php-sdk with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-hash Version *
ext-json Version *
guzzlehttp/guzzle Version ^7.9
guzzlehttp/psr7 Version ^2.7
psr/http-client Version ^1.0
psr/http-factory Version ^1.0
psr/http-message Version ^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 andriichuk/liqpay-php-sdk contains the following files

Loading the files please wait ...