Libraries & SDKs
Official libraries to simplify Transfer API integration and eliminate the complexity of authentication, request signing, and error handling.
Available Libraries
PHP Library
Recommended for PHP developers - Handles all complexity of MAC authentication automatically.
- Repository: lib-wallet-transfer-rest-client
- Package:
paysera/lib-wallet-transfer-rest-client - License: MIT
- Requirements: PHP 7.4+
Installation
Install via Composer:
composer require paysera/lib-wallet-transfer-rest-client
Quick Start
<?php
use Paysera\Client\TransferClient;
// Initialize client
$client = TransferClient::create([
'auth' => [
'mac' => [
'mac_id' => 'your_client_id',
'mac_secret' => 'your_mac_key',
],
],
'base_url' => 'https://wallet.paysera.com/transfer/rest/v1',
]);
// Create transfer
$transfer = $client->createTransfer([
'amount' => '10.00',
'currency' => 'EUR',
'beneficiary' => [
'name' => 'John Doe',
'account_number' => 'LT123...',
],
'description' => 'Payment for services',
]);
echo "Transfer ID: " . $transfer->getId();
echo "Status: " . $transfer->getStatus();
Features
- ✅ Automatic MAC authentication - No manual signature calculation
- ✅ Type-safe models - PHP objects for all API entities
- ✅ Error handling - Exception-based error handling
- ✅ Pagination support - Easy handling of paginated results
- ✅ PSR-18 compatible - Works with any HTTP client
Common Operations
Get Transfer by ID:
$transfer = $client->getTransfer($transferId);
echo $transfer->getStatus();
List Transfers:
$transfers = $client->getTransfers([
'limit' => 20,
'offset' => 0,
]);
foreach ($transfers as $transfer) {
echo $transfer->getId() . ': ' . $transfer->getStatus() . "\n";
}
Revoke Transfer:
$client->revokeTransfer($transferId);
.NET Library
For C# and .NET developers - Full-featured client library.
- Repository: dotnet-lib-rest-client-common
- Package: Available on NuGet
- License: MIT
- Requirements: .NET Standard 2.0+
Installation
Install via NuGet Package Manager:
Install-Package Paysera.RestClient.Common
Or via .NET CLI:
dotnet add package Paysera.RestClient.Common
Quick Start
using Paysera.RestClient;
using Paysera.Transfer;
// Initialize client
var client = new TransferClient(new ClientConfig
{
MacId = "your_client_id",
MacSecret = "your_mac_key",
BaseUrl = "https://wallet.paysera.com/transfer/rest/v1"
});
// Create transfer
var transfer = await client.CreateTransferAsync(new TransferRequest
{
Amount = "10.00",
Currency = "EUR",
Beneficiary = new Beneficiary
{
Name = "John Doe",
AccountNumber = "LT123..."
},
Description = "Payment for services"
});
Console.WriteLine($"Transfer ID: {transfer.Id}");
Console.WriteLine($"Status: {transfer.Status}");
Features
- ✅ Async/await support - Modern async programming
- ✅ Strongly typed - Full IntelliSense support
- ✅ Automatic retry - Configurable retry policies
- ✅ Logging integration - .NET logging support
Why Use Official Libraries?
Without Library (Manual Implementation)
// You need to implement:
- MAC signature calculation
- Normalized request string
- Nonce generation
- Timestamp handling
- Request signing
- Error parsing
- Retry logic
With Official Library
// Library handles everything:
$transfer = $client->createTransfer($data);
Comparison
| Feature | Manual Integration | With Library |
|---|---|---|
| Setup Time | 4-8 hours | 15 minutes |
| MAC Auth | Implement yourself | ✅ Automatic |
| Type Safety | Manual validation | ✅ Built-in |
| Error Handling | Custom implementation | ✅ Exception-based |
| Updates | Manual tracking | ✅ Composer/NuGet updates |
| Testing | Write all tests | ✅ Library tested |
| Maintenance | Your responsibility | ✅ Maintained by Paysera |
Language Support
| Language | Library Available | Status |
|---|---|---|
| PHP | ✅ Yes | Recommended |
| C# / .NET | ✅ Yes | Recommended |
| Python | ❌ No | Use REST API directly |
| Node.js | ❌ No | Use REST API directly |
| Java | ❌ No | Use REST API directly |
| Ruby | ❌ No | Use REST API directly |
| Go | ❌ No | Use REST API directly |
No Library for Your Language?
You can still integrate using the REST API directly. Check our:
- Authentication Guide - MAC implementation details
- API Basics - Request/response format
- Examples - Code examples in multiple languages
Getting Help
Library Issues
For library-specific issues:
-
Check GitHub Issues
-
Create New Issue
- Include error messages
- Provide code examples
- Specify library version
-
Stack Overflow
- Tag:
paysera - Search existing questions
- Tag:
API Support
For API-related questions:
- 📧 Email: tech_support@paysera.com
- 📖 Documentation: Transfer API
Contributing
We welcome contributions!
- 🐛 Report bugs
- ✨ Suggest features
- 🔧 Submit pull requests
- 📖 Improve documentation
Check the GitHub repositories for contribution guidelines.
Update Notifications
Stay updated with library changes:
- GitHub Watch - Watch the repository for releases
- Composer/NuGet - Check for updates regularly
- Changelog - Review changelog before updating
# PHP: Check for updates
composer update paysera/lib-wallet-transfer-rest-client
# .NET: Check for updates
dotnet list package --outdated