Download the PHP package nomokonov/sber-sdk-php without Composer
On this page you can find all versions of the php package nomokonov/sber-sdk-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package sber-sdk-php
Sber API SDK (PHP)
A lightweight PHP SDK for integrating with Sberbank's SberAPI: authorization, H2H direct integration, instant payments and payroll projects. A PHP port of the official Node.js SDK.
The SDK contains three modules:
- Authorization module (
Nomokonov\SberSdk\Authorization) — obtaining, refreshing and revoking tokens, rotating the client secret, retrieving user info, PKCE and JWT signature verification. - H2H direct integration module (
Nomokonov\SberSdk\H2H) — dictionaries, client info, crypto operations and certificates, payments, statements, payroll sheets, SBP B2B links. - Instant payments module (
Nomokonov\SberSdk\InstantPayment) — creating payment order drafts from an invoice and building the payment URL.
Requirements
- PHP 8.5+
- Extensions:
ext-openssl,ext-zip,ext-json - Guzzle 7.9+ (HTTP client)
Installation
Client configuration
The client uses mTLS: a client certificate in PKCS#12 format (.p12) and trusted
root certificates (CA). Production certificates are located in the certs/
directory.
Logging
With enableLogs => true, pass a PSR-3 logger as the third argument. Sensitive
data (tokens, accounts, INN, amounts, etc.) is masked automatically
(MaskingInterceptor):
Custom HTTP client
For tests or fine-tuning you can pass your own Guzzle instance — in that case certificates are not required:
Usage
Authorization
PKCE
JWT signature verification
The signature of id_token/user-info is verified natively via the OpenSSL
extension — no Java or external processes are required. Sber tokens are signed
with RSA (RS256/RS384/RS512), which is fully supported by PHP.
The certificate may be in PEM or DER format (.cer/.crt).
H2H — direct integration
Instant payments
Validation
Requests are validated before being sent using
schemas that mirror the Joi schemas of the Node.js
SDK. On failure a Nomokonov\SberSdk\Exception\ValidationException is thrown with
the list of fields and messages (getErrors()), without any network call.
Error handling
All exceptions extend Nomokonov\SberSdk\Exception\SberApiException:
ConfigurationException— invalid configuration (missing host/certificate).ValidationException— the request failed validation.SignatureVerificationException— JWT signature verification error.SberApiException— network and response errors (after retries).
Transient failures (connection errors and 5xx responses) are retried automatically with exponential backoff.
Development
CI
.gitlab-ci.yml runs PHP CS Fixer, Rector and PHPUnit on every
merge request and on pushes to the default branch.
License
MIT
All versions of sber-sdk-php with dependencies
ext-json Version *
ext-openssl Version *
ext-zip Version *
guzzlehttp/guzzle Version ^7.9
psr/log Version ^3.0