Download the PHP package blaaiz/blaaiz-laravel-sdk without Composer
On this page you can find all versions of the php package blaaiz/blaaiz-laravel-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download blaaiz/blaaiz-laravel-sdk
More information about blaaiz/blaaiz-laravel-sdk
Files in blaaiz/blaaiz-laravel-sdk
Package blaaiz-laravel-sdk
Short Description Official Laravel SDK for Blaaiz RaaS (Remittance as a Service) API
License MIT
Homepage https://docs.business.blaaiz.com
Informations about the package blaaiz-laravel-sdk
Blaaiz Laravel SDK
A comprehensive Laravel SDK for the Blaaiz RaaS (Remittance as a Service) API. This SDK provides easy-to-use methods for payment processing, collections, payouts, customer management, and more.
Installation
Quick Start
Features
- Customer Management: Create, update, and manage customers with KYC verification
- Collections: Support for multiple collection methods (Open Banking, Card, Crypto, Bank Transfer)
- Payouts: Bank transfers and Interac payouts across multiple currencies
- Virtual Bank Accounts: Create and manage virtual accounts for NGN collections
- Wallets: Multi-currency wallet management
- Transactions: Transaction history and status tracking
- Webhooks: Webhook configuration and management with signature verification
- Files: Document upload with pre-signed URLs
- Fees: Real-time fee calculations and breakdowns
- Banks & Currencies: Access to supported banks and currencies
- Laravel Integration: Native service provider, facade, and configuration
Supported Currencies & Methods
Collections
- CAD: Interac (push mechanism)
- NGN: Bank Transfer (VBA) and Card Payment
- USD: Card Payment
- EUR/GBP: Open Banking
Payouts
- Bank Transfer: All supported currencies
- Interac: CAD transactions
API Reference
Customer Management
Create a Customer
Get Customer
List All Customers
Update Customer
File Management & KYC
Upload Customer Documents
Method 1: Complete File Upload (Recommended)
Method 2: Manual 3-Step Process
Note: The
uploadFileComplete
method is recommended as it handles all three steps automatically: getting the pre-signed URL, uploading the file to S3, and associating the file with the customer. It supports multiple file input formats:
- String path/content: Direct binary data or file path
- Base64 string: Plain base64 encoded data
- Data URL: Complete data URL with mime type (e.g.,
data:image/jpeg;base64,/9j/4AAQ...
)- Public URL: HTTP/HTTPS URL that will be downloaded automatically (supports redirects, content-type detection, and filename extraction)
Collections
Initiate Open Banking Collection (EUR/GBP)
Initiate Card Collection (NGN/USD)
Crypto Collection
Attach Customer to Collection
Payouts
Bank Transfer Payout
Interac Payout (CAD)
Virtual Bank Accounts
Create Virtual Bank Account
List Virtual Bank Accounts
Wallets
List All Wallets
Get Specific Wallet
Transactions
List Transactions
Get Transaction Details
Banks & Currencies
List Banks
Bank Account Lookup
List Currencies
Fees
Get Fee Breakdown
Webhooks
Register Webhooks
Get Webhook Configuration
Replay Webhook
Advanced Usage
Complete Payout Workflow
Complete Collection Workflow
Using Dependency Injection
Error Handling
The SDK uses a custom BlaaizException
class that provides detailed error information:
Rate Limiting
The Blaaiz API has a rate limit of 100 requests per minute. The SDK automatically includes rate limit headers in responses:
X-RateLimit-Limit
: Maximum requests per minuteX-RateLimit-Remaining
: Remaining requests in current windowX-RateLimit-Reset
: When the rate limit resets
Webhook Handling
Webhook Signature Verification
The SDK provides built-in webhook signature verification to ensure webhook authenticity:
Complete Laravel Webhook Handler
Webhook Routes
Add these routes to your routes/web.php
or routes/api.php
:
Disable CSRF Protection for Webhooks
Add webhook routes to the CSRF exception list in app/Http/Middleware/VerifyCsrfToken.php
:
Environment Configuration
The SDK configuration can be customized via the .env
file:
Configuration File
After publishing the config file with php artisan vendor:publish --tag=blaaiz-config
, you can modify config/blaaiz.php
:
Best Practices
- Always validate customer data before creating customers
- Use the fees API to calculate and display fees to users
- Always verify webhook signatures using the SDK's built-in methods
- Store customer IDs and transaction IDs for tracking
- Handle rate limiting gracefully with exponential backoff
- Use environment variables for API keys and webhook secrets
- Implement proper error handling and logging
- Test webhook endpoints thoroughly with signature verification
- Disable CSRF protection for webhook endpoints
- Return appropriate HTTP status codes from webhook handlers (200 for success, 400 for invalid signatures)
Requirements
- PHP 8.1 or higher
- Laravel 9.0, 10.0, or 11.0
- GuzzleHTTP 7.0 or higher
Support
For support and additional documentation:
- Email: [email protected]
- Documentation: https://docs.business.blaaiz.com
License
This SDK is provided under the MIT License