Skip to main content

Libraries & SDKs

Official libraries and SDKs to simplify Wallet API integration in various programming languages.

Quick Start

Choose your preferred language and get started in minutes with ready-to-use code examples.

Available Libraries

PHP Library

Status: ✅ Official, actively maintained Repository: GitHub Installation: Composer Documentation: PHP Library Guide

composer require paysera/lib-wallet-php-client

Best for:

  • Server-side payment processing
  • E-commerce backends
  • API integrations
  • Webhook handlers
JavaScript SDK

Status: ✅ Official
Type: Client-side library
Documentation: JavaScript SDK Guide

<script src="https://developers-old.paysera.com/bundles/evpwallet/downloads/WebToPayWallet.min.js"></script>

Best for:

  • Payment dialogs (lightbox/popup)
  • OAuth integration
  • Client-side user flows
  • Upload funds/Cash out dialogs

Quick Comparison

FeaturePHP LibraryJavaScript SDK
EnvironmentServer-sideClient-side (Browser)
AuthenticationMAC / SSL CertificateClient ID only
API CallsFull API accessLimited (dialog management)
Payment Creation✅ Yes❌ No (server handles)
User Dialogs❌ No✅ Yes (lightbox/popup)
Callbacks✅ Handle webhooks✅ Dialog events
OAuth✅ Token management✅ OAuth dialog

Typical Architecture

Flow:

  1. User interacts with your site (JavaScript)
  2. Backend creates payment (PHP Library)
  3. Frontend opens confirmation dialog (JavaScript SDK)
  4. User confirms on Paysera
  5. Backend receives callback (PHP Library)
  6. Update order status

Language-Specific Guides

Server-Side Libraries
LanguageStatusRepository
PHP✅ Officialpaysera/lib-wallet-php-client
Python🔄 CommunityCheck GitHub
Node.js🔄 CommunityCheck GitHub
Java🔄 CommunityCheck GitHub
Community Libraries

Community-maintained libraries may have varying levels of support. Always check the repository for latest updates and compatibility.


Getting Started

For PHP Developers
  1. Install library via Composer
  2. Configure authentication credentials
  3. Create your first payment
  4. Handle callbacks

Start here: PHP Library Guide

For Frontend Developers
  1. Include SDK script
  2. Initialize with client ID
  3. Open payment dialogs
  4. Handle callbacks

Start here: JavaScript SDK Guide


Authentication Methods

Libraries support different authentication methods:

MAC Authentication
  • Used by PHP Library
  • Requires: client_id, mac_key, mac_algorithm
  • Best for: Most integrations
SSL Certificate
  • Used by PHP Library (optional)
  • Requires: SSL certificate + private key
  • Best for: High-security requirements
Client ID Only
  • Used by JavaScript SDK
  • Requires: client_id only
  • Best for: Client-side dialogs

Common Use Cases

E-Commerce Checkout

Backend (PHP):

// Create payment
$transaction = $client->createTransaction([
'payments' => [[
'description' => 'Order #1234',
'price' => 2999,
'currency' => 'EUR'
]]
]);

Frontend (JavaScript):

// Open confirmation dialog
WebToPayWallet.openConfirmationDialog(transactionKey);
OAuth User Authentication

Backend (PHP):

// Get access token
$token = $client->getOAuthToken($code);
// Get user info
$user = $client->getUser($token);

Frontend (JavaScript):

// Open OAuth dialog
WebToPayWallet.openDialog(oauthUrl, callbacks);

Support & Resources

Official Resources

Community

Examples


Migration Guides

Upgrading PHP Library

When upgrading to a new major version:

  1. Check CHANGELOG
  2. Review breaking changes
  3. Update code accordingly
  4. Test thoroughly with small amounts
JavaScript SDK Updates

The SDK is backward compatible. Simply update the script source:

<!-- Always use latest -->
<script src="https://developers-old.paysera.com/bundles/evpwallet/downloads/WebToPayWallet.min.js"></script>

What's Next?

Choose your library and start building:

  1. 🐘 PHP Library Guide - Server-side integration
  2. 🌐 JavaScript SDK Guide - Client-side dialogs
  3. 💡 Use Cases - Real-world examples
  4. 📖 API Reference - Complete API docs

Need Help?

Quick Start

Most developers start with the PHP Library for backend and add JavaScript SDK for better UX.