PHPackages                             lai3221/laravel-wise - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. lai3221/laravel-wise

ActiveLibrary[API Development](/categories/api)

lai3221/laravel-wise
====================

A Laravel package for integrating with the Wise (formerly TransferWise) API

v1.0.8(8mo ago)1153[1 issues](https://github.com/lai3221/laravel-wise/issues)MITPHPPHP ^8.2

Since Mar 3Pushed 8mo ago1 watchersCompare

[ Source](https://github.com/lai3221/laravel-wise)[ Packagist](https://packagist.org/packages/lai3221/laravel-wise)[ RSS](/packages/lai3221-laravel-wise/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (8)Dependencies (5)Versions (9)Used By (0)

Laravel Wise API Integration
============================

[](#laravel-wise-api-integration)

A Laravel package for integrating with the Wise (formerly TransferWise) API.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require lai3221/laravel-wise
```

Configuration
-------------

[](#configuration)

Publish the configuration file:

```
php artisan vendor:publish --tag=wise-config
```

Add the following environment variables to your `.env` file:

```
WISE_ENVIRONMENT=sandbox # or production
WISE_API_KEY=your_api_key_here
```

Usage
-----

[](#usage)

### Basic Usage

[](#basic-usage)

```
use Lai3221\LaravelWise\Services\WiseService;
use Lai3221\LaravelWise\Exceptions\WiseException;
use Lai3221\LaravelWise\Exceptions\AuthenticationException;
use Lai3221\LaravelWise\Exceptions\ValidationException;
use Lai3221\LaravelWise\Exceptions\NotFoundException;
use Lai3221\LaravelWise\Exceptions\ApiException;

class WiseController extends Controller
{
    protected $wiseService;

    public function __construct(WiseService $wiseService)
    {
        $this->wiseService = $wiseService;
    }

    public function getBalances($profileId)
    {
        try {
            $balances = $this->wiseService->getBalances($profileId);
            return response()->json($balances);
        } catch (AuthenticationException $e) {
            return response()->json([
                'error' => 'Authentication failed',
                'message' => $e->getMessage(),
                'details' => $e->getErrorResponse()
            ], 401);
        } catch (NotFoundException $e) {
            return response()->json([
                'error' => 'Resource not found',
                'message' => $e->getMessage(),
                'details' => $e->getErrorResponse()
            ], 404);
        } catch (ValidationException $e) {
            return response()->json([
                'error' => 'Validation failed',
                'message' => $e->getMessage(),
                'details' => $e->getErrorResponse()
            ], 422);
        } catch (ApiException $e) {
            return response()->json([
                'error' => 'API error',
                'message' => $e->getMessage(),
                'details' => $e->getErrorResponse()
            ], 500);
        }
    }

    public function getBalanceByCurrency($profileId, $currency)
    {
        try {
            $balance = $this->wiseService->getBalanceByCurrency($profileId, $currency);
            return response()->json($balance);
        } catch (WiseException $e) {
            return response()->json([
                'error' => 'Wise API error',
                'message' => $e->getMessage(),
                'details' => $e->getErrorResponse()
            ], $e->getCode());
        }
    }

    public function createTransfer(Request $request)
    {
        $data = [
            'profile' => $request->profile_id,
            'source_currency' => $request->source_currency,
            'target_currency' => $request->target_currency,
            'source_amount' => $request->amount,
            'target_amount' => $request->target_amount,
            'target_account' => $request->target_account,
        ];

        return $this->wiseService->createTransfer($data);
    }
}
```

### Available Methods

[](#available-methods)

#### Balance Operations

[](#balance-operations)

- `getBalances(int $profileId): array`
- `getBalanceByCurrency(int $profileId, string $currency): ?array`

#### Transfer Operations

[](#transfer-operations)

- `createTransfer(array $data): array`
- `getTransfer(int $transferId): array`
- `cancelTransfer(int $transferId): array`

### Exception Handling

[](#exception-handling)

The package throws the following exceptions:

- `WiseException`: Base exception class for all Wise-related errors
- `AuthenticationException`: Thrown when API authentication fails (401)
- `ValidationException`: Thrown when request validation fails (422)
- `NotFoundException`: Thrown when a resource is not found (404)
- `ApiException`: Thrown for general API errors (500)

All exceptions contain:

- Message: A human-readable error message
- Code: The HTTP status code
- Error Response: The full error response from the API

Example of catching specific exceptions:

```
try {
    $balances = $wiseService->getBalances($profileId);
} catch (AuthenticationException $e) {
    // Handle authentication error
    $errorDetails = $e->getErrorResponse();
} catch (ValidationException $e) {
    // Handle validation error
    $errorDetails = $e->getErrorResponse();
} catch (WiseException $e) {
    // Handle any other Wise-related error
    $errorDetails = $e->getErrorResponse();
}
```

Testing
-------

[](#testing)

```
composer test
```

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance40

Moderate activity, may be stable

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~26 days

Total

8

Last Release

252d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/938cb78b071f9f1bfc156b0447d2c0bf814af4ac86f0a512dbe17ac6fed6b880?d=identicon)[lai3221](/maintainers/lai3221)

---

Top Contributors

[![lai3221](https://avatars.githubusercontent.com/u/25782046?v=4)](https://github.com/lai3221 "lai3221 (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/lai3221-laravel-wise/health.svg)

```
[![Health](https://phpackages.com/badges/lai3221-laravel-wise/health.svg)](https://phpackages.com/packages/lai3221-laravel-wise)
```

###  Alternatives

[simplestats-io/laravel-client

Client for SimpleStats!

4515.5k](/packages/simplestats-io-laravel-client)[jasara/php-amzn-selling-partner-api

A fluent interface for Amazon's Selling Partner API in PHP

1344.8k1](/packages/jasara-php-amzn-selling-partner-api)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)[surface/laravel-webfinger

A Laravel package to create an ActivityPub webfinger.

113.8k](/packages/surface-laravel-webfinger)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
