PHPackages                             shahzad/revolut-merchant-api - 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. [Payment Processing](/categories/payments)
4. /
5. shahzad/revolut-merchant-api

ActiveLibrary[Payment Processing](/categories/payments)

shahzad/revolut-merchant-api
============================

Laravel package for integrating with Revolut Merchant API

1.0.0(5mo ago)02MITPHPPHP ^8.1

Since Nov 16Pushed 5mo agoCompare

[ Source](https://github.com/shahzad-io/revolut-merchant-api)[ Packagist](https://packagist.org/packages/shahzad/revolut-merchant-api)[ RSS](/packages/shahzad-revolut-merchant-api/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (7)Versions (2)Used By (0)

Revolut Merchant API Laravel Package
====================================

[](#revolut-merchant-api-laravel-package)

A comprehensive Laravel package for the Revolut Merchant API, providing a clean and intuitive interface for payment processing, order management, and merchant operations.

Features
--------

[](#features)

- 💳 **Complete Payment Processing**: Create orders, process payments, handle refunds
- 🏪 **Merchant Management**: Locations, Apple Pay domains, webhook configuration
- 📊 **Reporting**: Generate settlement reports, payout statements, custom reports
- ⚖️ **Dispute Handling**: Manage payment disputes and evidence submission
- 🔄 **Payout Management**: Track payouts and manage beneficiary accounts
- 🧪 **Webhook Testing**: Test synchronous webhooks for all event types
- 🔒 **Secure &amp; Reliable**: Built-in error handling, validation, and retry mechanisms
- 🎯 **Developer Friendly**: Clean API, comprehensive tests, and detailed documentation

Requirements
------------

[](#requirements)

- PHP 8.1 or higher
- Laravel 10.0, 11.0, or 12.0
- Composer
- ext-json extension
- ext-curl extension

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

[](#installation)

Install via Composer:

```
composer require shahzad/revolut-merchant-api
```

Quick Start
-----------

[](#quick-start)

### Laravel Service Provider (Auto-discovered)

[](#laravel-service-provider-auto-discovered)

The package will be auto-discovered by Laravel. Simply install and you're ready to go!

### Using the Facade

[](#using-the-facade)

```
use RevolutMerchant;

// Create a payment order
$order = RevolutMerchant::orders()->create([
    'amount' => 2500, // €25.00 in cents
    'currency' => 'EUR',
    'description' => 'Premium Subscription',
    'merchant_order_id' => 'ORDER-12345'
]);

echo "Order created: {$order['id']}\n";
echo "Checkout URL: {$order['checkout_url']}\n";

// Retrieve order details
$orderDetails = RevolutMerchant::orders()->find($order['id']);
echo "Order status: {$orderDetails['state']}\n";
```

### Using Dependency Injection

[](#using-dependency-injection)

```
use Shahzad\RevolutMerchantApi\RevoltMerchantClient;

class PaymentController extends Controller
{
    public function createOrder(RevoltMerchantClient $client)
    {
        $order = $client->orders()->create([
            'amount' => 2500,
            'currency' => 'EUR',
            'description' => 'Premium Subscription',
            'merchant_order_id' => 'ORDER-12345'
        ]);

        return response()->json($order);
    }
}
```

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

[](#configuration)

### Authentication

[](#authentication)

This package uses **Secret Key** authentication with the Revolut Merchant API. You need to obtain your secret key from your Revolut Merchant Dashboard.

**Important**: The package has been updated to use `secret_key` instead of the deprecated `api_key` for better security and compatibility with Revolut's latest API requirements.

### Environment Variables

[](#environment-variables)

```
REVOLUT_SECRET_KEY=your_secret_key_here
REVOLUT_MERCHANT_ENVIRONMENT=sandbox # or 'production'
```

### Service Container Configuration

[](#service-container-configuration)

The client is automatically registered in Laravel's service container. You can configure it in `config/revolut-merchant-api.php`:

```
return [
    'app_key' => env('REVOLUT_APP_KEY'),
    'secret_key' => env('REVOLUT_SECRET_KEY'),
    'environment' => env('REVOLUT_MERCHANT_ENVIRONMENT', 'sandbox'),
    'timeout' => env('REVOLUT_MERCHANT_TIMEOUT', 30),
    'retry_attempts' => env('REVOLUT_MERCHANT_RETRY_ATTEMPTS', 3),
    'retry_delay' => env('REVOLUT_MERCHANT_RETRY_DELAY', 1000),
    'base_url' => env('REVOLUT_MERCHANT_BASE_URL'), // Optional
];
```

### Manual Client Initialization (if needed)

[](#manual-client-initialization-if-needed)

```
use Shahzad\RevolutMerchantApi\RevoltMerchantClient;

$client = new RevoltMerchantClient([
    'secret_key' => config('revolut-merchant-api.secret_key'),
    'environment' => config('revolut-merchant-api.environment'),
    'timeout' => config('revolut-merchant-api.timeout', 30),
    'retry' => [
        'enabled' => true,
        'max_attempts' => config('revolut-merchant-api.retry.max_attempts', 3),
        'retry_delay' => config('revolut-merchant-api.retry.retry_delay', 1000),
    ]
]);
```

Resources
---------

[](#resources)

The client provides dedicated resource classes for different API areas:

- **Orders**: Payment order management
- **Payments**: Payment processing and status tracking
- **Refunds**: Refund processing and management
- **Customers**: Customer data management
- **Webhooks**: Webhook configuration and management
- **Disputes**: Dispute handling and evidence submission
- **Payouts**: Payout tracking and management
- **Report Runs**: Report generation (settlement, payout statements, custom)
- **Locations**: Merchant location management
- **Apple Pay**: Apple Pay domain verification and configuration
- **Synchronous Webhooks**: Test webhooks for all event types

Documentation
-------------

[](#documentation)

For comprehensive documentation, examples, and API reference, see [DOCUMENTATION.md](DOCUMENTATION.md).

Troubleshooting
---------------

[](#troubleshooting)

### Common Issues

[](#common-issues)

**401 Unauthorized**: Make sure you're using your **Secret Key** (not API Key) from your Revolut Merchant Dashboard. The secret key should be set in your `.env` file as `REVOLUT_SECRET_KEY`.

**404 Not Found**: Some endpoints like merchant profile may return 404 if they're not available for your account type. This is expected behavior.

**Field Name Changes**: If you're upgrading from an older version, note that `reference` has been changed to `merchant_order_id` in order creation.

Testing
-------

[](#testing)

Run the test suite:

```
# Run all tests
php vendor/bin/phpunit

# Run static analysis
composer analyse
```

For comprehensive testing documentation, see [DOCUMENTATION.md](DOCUMENTATION.md#testing).

Contributing
------------

[](#contributing)

We welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.

License
-------

[](#license)

This package is open-sourced software licensed under the [MIT license](LICENSE).

Support
-------

[](#support)

- 📚 **Documentation**: [DOCUMENTATION.md](DOCUMENTATION.md)
- 🐛 **Issues**: [GitHub Issues](https://github.com/revolut/revolut-merchant-api/issues)
- 📧 **Email**:
- 🌐 **API Docs**: [Revolut Developer Portal](https://developer.revolut.com/)

---

**Note**: This package is not officially maintained by Revolut. It's a community-driven effort to provide a clean PHP interface to the Revolut Merchant API.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance70

Regular maintenance activity

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity43

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

Unknown

Total

1

Last Release

178d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/cd8b20bb341004fbe99530a453d9143cbaa98f83a7ee3b733ac77d83730e0d1e?d=identicon)[shahzad-io](/maintainers/shahzad-io)

---

Top Contributors

[![shahzad-be](https://avatars.githubusercontent.com/u/71887214?v=4)](https://github.com/shahzad-be "shahzad-be (1 commits)")

---

Tags

phplaravelpaymentgatewayrevolutmerchant-api

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/shahzad-revolut-merchant-api/health.svg)

```
[![Health](https://phpackages.com/badges/shahzad-revolut-merchant-api/health.svg)](https://phpackages.com/packages/shahzad-revolut-merchant-api)
```

###  Alternatives

[sebdesign/laravel-viva-payments

A Laravel package for integrating the Viva Payments gateway

4845.9k](/packages/sebdesign-laravel-viva-payments)[omalizadeh/laravel-multi-payment

A driver-based laravel package for online payments via multiple gateways

491.1k](/packages/omalizadeh-laravel-multi-payment)[baklysystems/laravel-paymob

Laravel PayMob online payment gateway package

282.4k](/packages/baklysystems-laravel-paymob)

PHPackages © 2026

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