PHPackages                             netipar/simplepay - 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. netipar/simplepay

ActiveLibrary[Payment Processing](/categories/payments)

netipar/simplepay
=================

Modern Laravel package for SimplePay online payment integration

v1.0.2(2mo ago)280↓100%MITPHPPHP ^8.2CI passing

Since Mar 2Pushed 2mo agoCompare

[ Source](https://github.com/NETipar/simplepay)[ Packagist](https://packagist.org/packages/netipar/simplepay)[ RSS](/packages/netipar-simplepay/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (5)Versions (4)Used By (0)

  ![laravel-simplepay](art/banner.svg)SimplePay for Laravel
=====================

[](#simplepay-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/985349024f3c4d77965c8378b6cf066f80f40b47b16f28959e0ce33daeb420fb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e6574697061722f73696d706c657061792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/netipar/simplepay)[![Tests](https://camo.githubusercontent.com/bd27a51c911e1c0c35dbd8afb65ec946b20d26353385fc768f89975f4266ad77/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f4e4554697061722f73696d706c657061792f74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/NETipar/simplepay/actions?query=workflow%3ATests+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/18eed2c9ffd8c54e6d0f6b69c5a59e66c5221f86453e7f09900fa34cb8127e94/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e6574697061722f73696d706c657061792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/netipar/simplepay)

Modern Laravel package for [SimplePay](https://simplepay.hu) online payment integration. Start payments, handle IPN webhooks, manage card storage, process refunds, and more.

Based on the official [SimplePay PHP SDK](https://simplepay.hu/fejlesztoknek/) v2.1, rebuilt for Laravel with typed DTOs, Enums, Events, and full API coverage.

Quick Example
-------------

[](#quick-example)

```
use Netipar\SimplePay\Facades\SimplePay;
use Netipar\SimplePay\Enums\Currency;
use Netipar\SimplePay\Enums\PaymentMethod;
use Netipar\SimplePay\Dto\PaymentRequest;
use Netipar\SimplePay\Dto\Address;

$response = SimplePay::payment()->start(new PaymentRequest(
    currency: Currency::HUF,
    total: 2500,
    orderRef: 'ORDER-123',
    customerEmail: 'customer@example.com',
    language: 'HU',
    url: route('simplepay.back'),
    methods: [PaymentMethod::CARD],
    invoice: new Address(
        name: 'John Doe',
        country: 'hu',
        city: 'Budapest',
        zip: '1111',
        address: 'Main Street 1',
    ),
));

return redirect($response->paymentUrl);
```

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

[](#requirements)

- PHP 8.2+
- Laravel 11 or 12
- A [SimplePay](https://simplepay.hu) merchant account

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

[](#installation)

```
composer require netipar/simplepay
```

Publish the config file:

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

Add your merchant credentials to `.env`:

```
SIMPLEPAY_SANDBOX=true
SIMPLEPAY_HUF_MERCHANT=your_merchant_id
SIMPLEPAY_HUF_SECRET_KEY=your_secret_key
SIMPLEPAY_BACK_URL=https://yourdomain.com/payment/back

```

Usage
-----

[](#usage)

### Obtaining the Services

[](#obtaining-the-services)

Access all services through the `SimplePay` facade:

```
use Netipar\SimplePay\Facades\SimplePay;

SimplePay::payment();      // PaymentService
SimplePay::cardStorage();  // CardStorageService
SimplePay::autoPayment();  // AutoPaymentService
SimplePay::rtp();          // RtpService
```

### Start a Payment

[](#start-a-payment)

```
use Netipar\SimplePay\Facades\SimplePay;
use Netipar\SimplePay\Enums\Currency;
use Netipar\SimplePay\Enums\PaymentMethod;
use Netipar\SimplePay\Dto\PaymentRequest;
use Netipar\SimplePay\Dto\Address;
use Netipar\SimplePay\Dto\Item;

$response = SimplePay::payment()->start(new PaymentRequest(
    currency: Currency::HUF,
    total: 25400,
    orderRef: 'ORDER-2026-001',
    customerEmail: 'customer@example.com',
    language: 'HU',
    url: route('simplepay.back'),
    methods: [PaymentMethod::CARD],
    invoice: new Address(
        name: 'Customer Kft.',
        country: 'hu',
        city: 'Budapest',
        zip: '1234',
        address: 'Main Street 1.',
    ),
    items: [
        new Item(
            title: 'Product name',
            price: 10000,
            quantity: 2,
        ),
        new Item(
            title: 'Delivery',
            price: 5400,
            quantity: 1,
        ),
    ],
));

$response->transactionId; // SimplePay transaction ID
$response->paymentUrl;    // Redirect URL to SimplePay payment page
$response->timeout;       // Payment timeout

return redirect($response->paymentUrl);
```

### Two-Step Payment (Authorize + Finish)

[](#two-step-payment-authorize--finish)

```
use Netipar\SimplePay\Dto\PaymentRequest;
use Netipar\SimplePay\Dto\FinishRequest;

// Step 1: Authorize with twoStep enabled
$response = SimplePay::payment()->start(new PaymentRequest(
    // ... same as above
    twoStep: true,
));

// Step 2: Later, finish the authorized payment
$result = SimplePay::payment()->finish(new FinishRequest(
    currency: Currency::HUF,
    transactionId: $transactionId,
    orderRef: 'ORDER-2026-001',
    approveTotal: 25400,
));
```

### Refund a Transaction

[](#refund-a-transaction)

```
use Netipar\SimplePay\Dto\RefundRequest;

// Full refund
$result = SimplePay::payment()->refund(new RefundRequest(
    currency: Currency::HUF,
    transactionId: $transactionId,
    orderRef: 'ORDER-2026-001',
    refundTotal: 25400,
));

// Partial refund
$result = SimplePay::payment()->refund(new RefundRequest(
    currency: Currency::HUF,
    transactionId: $transactionId,
    orderRef: 'ORDER-2026-001',
    refundTotal: 10000,
));
```

### Query Transaction Status

[](#query-transaction-status)

```
$result = SimplePay::payment()->query(
    currency: Currency::HUF,
    transactionId: $transactionId,
);

$result->status;         // PaymentStatus enum
$result->remainingTotal; // Remaining amount
$result->paymentDate;    // Payment date
$result->finishDate;     // Finish date (two-step)
```

### Cancel a Transaction

[](#cancel-a-transaction)

```
SimplePay::payment()->cancel(
    currency: Currency::HUF,
    transactionId: $transactionId,
);
```

### Card Storage (OneClick Payments)

[](#card-storage-oneclick-payments)

```
use Netipar\SimplePay\Dto\CardStorageDoRequest;

// Pay with a stored card
$result = SimplePay::cardStorage()->do(new CardStorageDoRequest(
    currency: Currency::HUF,
    total: 5000,
    orderRef: 'ORDER-2026-002',
    customerEmail: 'customer@example.com',
    cardId: $savedCardId,
));

// Query stored card
$card = SimplePay::cardStorage()->cardQuery(Currency::HUF, $cardId);

// Remove stored card
SimplePay::cardStorage()->cardCancel(Currency::HUF, $cardId);
```

### Recurring Payments

[](#recurring-payments)

```
use Netipar\SimplePay\Dto\RecurringRequest;

$result = SimplePay::cardStorage()->doRecurring(new RecurringRequest(
    currency: Currency::HUF,
    total: 9900,
    orderRef: 'SUB-2026-003',
    customerEmail: 'customer@example.com',
    token: $recurringToken,
));
```

### Apple Pay

[](#apple-pay)

```
use Netipar\SimplePay\Dto\ApplePayStartRequest;
use Netipar\SimplePay\Dto\ApplePayDoRequest;

// Start Apple Pay session
$session = SimplePay::payment()->startApplePay(new ApplePayStartRequest(
    currency: Currency::HUF,
    total: 5000,
    orderRef: 'ORDER-AP-001',
    customerEmail: 'customer@example.com',
));

// Complete Apple Pay payment
$result = SimplePay::payment()->doApplePay(new ApplePayDoRequest(
    currency: Currency::HUF,
    transactionId: $session->transactionId,
    applePayToken: $tokenFromJs,
));
```

### EAM / Qvik Payment

[](#eam--qvik-payment)

```
use Netipar\SimplePay\Dto\EamStartRequest;

$response = SimplePay::payment()->startEam(new EamStartRequest(
    currency: Currency::HUF,
    total: 3000,
    orderRef: 'ORDER-EAM-001',
    customerEmail: 'customer@example.com',
    url: route('simplepay.back'),
));
```

### Request to Pay (RTP)

[](#request-to-pay-rtp)

```
use Netipar\SimplePay\Dto\RtpStartRequest;

// Start RTP transaction
$result = SimplePay::rtp()->start(new RtpStartRequest(
    currency: Currency::HUF,
    total: 15000,
    orderRef: 'RTP-2026-001',
    customerEmail: 'customer@example.com',
    url: route('simplepay.back'),
));

// Query RTP status
$status = SimplePay::rtp()->query(Currency::HUF, transactionId: $id);

// Refund RTP
SimplePay::rtp()->refund(Currency::HUF, $transactionId, 15000);

// Reverse RTP
SimplePay::rtp()->reverse(Currency::HUF, $transactionId);
```

IPN Webhook
-----------

[](#ipn-webhook)

The package automatically registers a `POST /simplepay/ipn` route with signature verification middleware. Listen to payment events in your application:

```
// In EventServiceProvider or via Event::listen()
use Netipar\SimplePay\Events\PaymentSucceeded;
use Netipar\SimplePay\Events\PaymentFailed;

protected $listen = [
    PaymentSucceeded::class => [HandlePaymentSuccess::class],
    PaymentFailed::class => [HandlePaymentFailure::class],
];
```

Available events (all receive `IpnMessage` DTO):

EventTrigger`IpnReceived`Every IPN notification`PaymentSucceeded`FINISHED status`PaymentAuthorized`AUTHORIZED (two-step)`PaymentFailed`NOTAUTHORIZED`PaymentCancelled`CANCELLED`PaymentTimedOut`TIMEOUT`PaymentRefunded`REFUNDThe `IpnMessage` DTO contains:

```
$event->ipnMessage->orderRef;       // Your order reference
$event->ipnMessage->transactionId;  // SimplePay transaction ID
$event->ipnMessage->status;         // PaymentStatus enum
$event->ipnMessage->paymentMethod;  // PaymentMethod enum
$event->ipnMessage->cardMask;       // Masked card number
```

Back URL Handling
-----------------

[](#back-url-handling)

The package registers a `GET /simplepay/back` route. Customize the response by binding your own `BackUrlResponse` in `AppServiceProvider`:

```
use Netipar\SimplePay\Contracts\BackUrlResponse;
use App\Http\Responses\SimplePayBackResponse;

// AppServiceProvider::register()
$this->app->singleton(BackUrlResponse::class, SimplePayBackResponse::class);
```

```
use Netipar\SimplePay\Contracts\BackUrlResponse;
use Netipar\SimplePay\Dto\BackResponse;
use Netipar\SimplePay\Enums\BackEvent;

class SimplePayBackResponse implements BackUrlResponse
{
    public function toResponse(Request $request, BackResponse $back): Response
    {
        return match ($back->event) {
            BackEvent::Success => redirect()->route('payment.success', $back->orderRef),
            BackEvent::Fail    => redirect()->route('payment.failed'),
            BackEvent::Cancel  => redirect()->route('checkout'),
            BackEvent::Timeout => redirect()->route('payment.timeout'),
        };
    }
}
```

Enums
-----

[](#enums)

Always use enum cases instead of raw strings:

- **`Currency`** -- `HUF`, `EUR`, `USD`
- **`PaymentMethod`** -- `CARD`, `WIRE`, `EAM`
- **`PaymentStatus`** -- `INIT`, `FINISHED`, `AUTHORIZED`, `NOTAUTHORIZED`, `INPAYMENT`, `CANCELLED`, `TIMEOUT`, `INFRAUD`, `FRAUD`, `REFUND`, `REVERSED`
- **`BackEvent`** -- `SUCCESS`, `FAIL`, `CANCEL`, `TIMEOUT`
- **`TransactionType`** -- `CIT` (Customer Initiated), `MIT` (Merchant Initiated), `REC` (Recurring)
- **`ErrorCode`** -- 358+ error codes with Hungarian descriptions

Error Handling
--------------

[](#error-handling)

The package throws `SimplePayApiException` when the SimplePay API returns error codes:

```
use Netipar\SimplePay\Exceptions\SimplePayApiException;

try {
    $response = SimplePay::payment()->start($request);
} catch (SimplePayApiException $e) {
    $e->getMessage();       // "[5083] Token times szükséges"
    $e->getErrorCodes();    // [5083]
    $e->hasErrorCode(5083); // true
    $e->getResolvedCodes(); // [ErrorCode::TokenTimesRequired]
}
```

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

[](#configuration)

Key `.env` variables:

```
SIMPLEPAY_SANDBOX=true
SIMPLEPAY_HUF_MERCHANT=your_merchant_id
SIMPLEPAY_HUF_SECRET_KEY=your_secret_key
SIMPLEPAY_BACK_URL=https://yourdomain.com/payment/back
SIMPLEPAY_TIMEOUT=600
SIMPLEPAY_LOG_CHANNEL=simplepay
SIMPLEPAY_AUTO_CHALLENGE=true

```

Multi-currency support -- each currency has its own merchant credentials:

```
SIMPLEPAY_EUR_MERCHANT=your_eur_merchant_id
SIMPLEPAY_EUR_SECRET_KEY=your_eur_secret_key
SIMPLEPAY_USD_MERCHANT=your_usd_merchant_id
SIMPLEPAY_USD_SECRET_KEY=your_usd_secret_key

```

Logos and Assets
----------------

[](#logos-and-assets)

The package includes the official SimplePay merchant logo pack. Publish the assets:

```
php artisan vendor:publish --tag=simplepay-assets
```

This copies logos and pre-composed variations to `public/vendor/simplepay/`.

Usage in Blade, Vue.js, or React:

```
{{-- Blade --}}

```

```

```

Available logos: SimplePay (multiple sizes/orientations + white variants), Visa, Mastercard, Maestro, Amex, Apple Pay, Google Pay, Qvik, OTP SZÉP. Pre-composed card type combinations are also included. See [examples](examples/en/logos-and-assets.md) for Blade, Vue.js, and React checkout page examples.

Logging
-------

[](#logging)

Set `SIMPLEPAY_LOG_CHANNEL` to any Laravel log channel name. Example dedicated channel in `config/logging.php`:

```
'simplepay' => [
    'driver' => 'daily',
    'path' => storage_path('logs/simplepay.log'),
    'days' => 14,
],
```

Services Overview
-----------------

[](#services-overview)

ServiceAccessPurpose`PaymentService``SimplePay::payment()`Standard payments, refunds, queries, Apple Pay, EAM`CardStorageService``SimplePay::cardStorage()`OneClick, recurring, card/token management`AutoPaymentService``SimplePay::autoPayment()`PCI-DSS direct card payments`RtpService``SimplePay::rtp()`Request to Pay (bank transfers)SDK Compatibility
-----------------

[](#sdk-compatibility)

This package is built based on the **SimplePay PHP SDK v2.1** (API v2). All API requests include the `sdkVersion: SimplePay_PHP_SDK_2.1_Laravel` identifier.

Examples
--------

[](#examples)

- [English examples](examples/en/)
- [Magyar példák](examples/hu/)

Testing
-------

[](#testing)

```
composer test
```

Credits
-------

[](#credits)

- [NETipar](https://netipar.hu)

License
-------

[](#license)

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

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance85

Actively maintained with recent releases

Popularity16

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

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 ~0 days

Total

3

Last Release

77d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/63ebd403a206ac48ef1923c8237326df547be3598c1e46ade9d244315ec25735?d=identicon)[NETipar](/maintainers/NETipar)

---

Top Contributors

[![hegedustibor](https://avatars.githubusercontent.com/u/6483104?v=4)](https://github.com/hegedustibor "hegedustibor (6 commits)")

---

Tags

apple-payhungarylaravelotppaymentpayment-gatewayphprecurring-paymentssimplepaywebhookslaravelpaymenthungarySimplePay

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/netipar-simplepay/health.svg)

```
[![Health](https://phpackages.com/badges/netipar-simplepay/health.svg)](https://phpackages.com/packages/netipar-simplepay)
```

###  Alternatives

[dena-a/iran-payment

a Laravel package to handle Internet Payment Gateways for Iran Banking System

312.4k1](/packages/dena-a-iran-payment)[parsisolution/gateway

A Laravel package for connecting to all Iraninan payment gateways

231.7k](/packages/parsisolution-gateway)

PHPackages © 2026

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