Files
alfa-bank-sdk/RELEASE_NOTES.md
2026-01-18 21:52:11 +03:00

2.4 KiB

Alfa Bank SDK - Release Notes v1.0.0

🚀 Overview

The Alfa Bank SDK is a production-ready, enterprise-grade library for integrating with Alfa Bank's API (BaaS & SBP). It is built on top of Saloon v3 and Spatie Laravel Data, ensuring strict typing, robustness, and idiomatic Laravel integration.

✨ Key Features

1. Unified API Access

  • BaaS (Bank-as-a-Service): Full coverage of Accounts, Payments, Cards, Statements, and Salary projects.
  • SBP (Faster Payments): Dedicated connector for C2B/B2C/B2B payouts with automated body signing (JCS/RSA-SHA256).
  • Security: Native support for mTLS (GOST/RSA), detached CMS/PKCS#7 signatures, and JWS transport security.

2. Architecture & Quality

  • DTO-Driven: 100% of requests and responses are mapped to Data Transfer Objects. No more raw arrays.
  • Saloon Power: Middleware for error handling, automatic retries, and timeouts.
  • Pagination: Smart AlfaOffsetPaginator handling various response formats automatically.
  • Testing: 63 automated tests verifying every module.

3. Laravel Integration

  • Zero-Config: Auto-discovery via Service Provider.
  • Facades: AlfaBank:: and Sbp:: for static access.
  • Config: Publishable config/alfa-bank.php.
  • Webhooks: Route macro Route::alfaWebhooks() and event dispatching.

🛠️ Installation

composer require apoloz/alfa-bank-sdk

📖 Usage Examples

Create a Payment

use AlfaBank;
use Apoloz\AlfaBank\Requests\Payments\CreatePaymentRequest;
use Apoloz\AlfaBank\Data\Payments\PaymentData;

$data = new PaymentData(
    amount: 100.50,
    payeeAccount: '40702...',
    // ...
);

$response = AlfaBank::send(new CreatePaymentRequest($data));
echo $response->id; // "EXT-123"

Iterate Transactions (Pagination)

use Apoloz\AlfaBank\Requests\Statement\GetTransactionsRequest;

$paginator = AlfaBank::paginate(new GetTransactionsRequest('40702...'));

foreach ($paginator as $transaction) {
    echo $transaction->amount;
}

SBP Payout

use Sbp;
use Apoloz\AlfaBank\Sbp\Requests\Payouts\CreatePayoutRequest;

// The SDK handles body signing automatically
Sbp::send(new CreatePayoutRequest($payoutData));

✅ Verification Status

  • Tests Passed: 63/63
  • Static Analysis: PHPStan Level 5 (0 errors)
  • Integration Test: Verified in Laravel 12 environment via alfa-bank-app.

Ready for deployment.