Skip to main content

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.

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.

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

FeatureManual IntegrationWith Library
Setup Time4-8 hours15 minutes
MAC AuthImplement yourself✅ Automatic
Type SafetyManual validation✅ Built-in
Error HandlingCustom implementation✅ Exception-based
UpdatesManual tracking✅ Composer/NuGet updates
TestingWrite all tests✅ Library tested
MaintenanceYour responsibility✅ Maintained by Paysera

Language Support

LanguageLibrary AvailableStatus
PHP✅ YesRecommended
C# / .NET✅ YesRecommended
Python❌ NoUse REST API directly
Node.js❌ NoUse REST API directly
Java❌ NoUse REST API directly
Ruby❌ NoUse REST API directly
Go❌ NoUse REST API directly
No Library for Your Language?

You can still integrate using the REST API directly. Check our:

Getting Help

Library Issues

For library-specific issues:

  1. Check GitHub Issues

  2. Create New Issue

    • Include error messages
    • Provide code examples
    • Specify library version
  3. Stack Overflow

    • Tag: paysera
    • Search existing questions

API Support

For API-related questions:

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:

  1. GitHub Watch - Watch the repository for releases
  2. Composer/NuGet - Check for updates regularly
  3. 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

Additional Resources