PHPackages                             payment4/cryptogateway - 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. payment4/cryptogateway

ActiveLibrary[Payment Processing](/categories/payments)

payment4/cryptogateway
======================

Payment4 Crypto Payment Gateway for Laravel

v1.0.2(1y ago)0982MITPHPPHP ^8.0|^8.1|^8.2|^8.3

Since Dec 5Pushed 1y agoCompare

[ Source](https://github.com/payment4-labs/payment4_laravel_sdk)[ Packagist](https://packagist.org/packages/payment4/cryptogateway)[ RSS](/packages/payment4-cryptogateway/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (2)Versions (3)Used By (0)

Payment4 Official SDK Documentation
===================================

[](#payment4-official-sdk-documentation)

Payment4 revolutionizes the way businesses transact. Seamlessly accept a variety of digital currencies, ensuring swift, secure, and borderless transactions to empower your global enterprise.

- Streamlined and Efficient
- Promises/A+ Compatibility
- Secure Sandboxing

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

[](#installation)

You can install the package via composer:

```
composer require payment4/cryptogateway
```

Next, you should publish the configuration file using the `vendor:publish` Artisan command. The configuration file will be placed in your application's `config` directory.

```
 php artisan vendor:publish --provider="Payment4\CryptoGateway\Payment4ServiceProvider"
```

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

[](#requirements)

- php "^7.2|^8.0|^8.1|^8.2|^8.3"
- laravel-framework "^7.0|^8.0|^9.0|^10.0|^11.0"
- Register for Free or Login on the
- Create new gateway and get apiKey

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

[](#configuration)

#### Add your APIKEY in Payment4 config.

[](#add-your-apikey-in-payment4-config)

```
'apiKey' => env('PAYMENT4_API_KEY', ''),
```

furthermore, you can add your APIKEY to .env file, please look at to following example:

```
PAYMENT4_API_KEY= __YOUR_API_KEY
```

#### If you use callbackUrl as static url you can set it here, otherwise, leave it blank.

[](#if-you-use-callbackurl-as-static-url-you-can-set-it-here-otherwise-leave-it-blank)

```
'callbackUrl' => env('PAYMENT4_CALLBACK_URL', ''),
```

#### If you use webhookUrl as static url you can set it here, otherwise, leave it blank.

[](#if-you-use-webhookurl-as-static-url-you-can-set-it-here-otherwise-leave-it-blank)

```
'webhookUrl' => env('PAYMENT4_WEBHOOK_URL', ''),
```

#### languages

[](#languages)

```
'language' => 'EN',
```

#### Supported Languages :

[](#supported-languages-)

- FR
- ES
- AR
- TR
- FA
- EN

Note : non-sensitive to uppercase or lowercase

#### currency

[](#currency)

```
'currency' => 'USD',
```

#### Supported Currencies :

[](#supported-currencies-)

- USD
- EUR
- TRY
- GBP
- AED
- IRT

Note : non-sensitive to uppercase or lowercase

- sandBox

to activation set True

```
'sandBox' => false,
```

Usage
-----

[](#usage)

### Create Payment4 instance

[](#create-payment4-instance)

#### Ex1:

[](#ex1)

```
/**
* apiKey and sandBox are optional if already set them to config file.
*/

$initParams = [
'apiKey' => '######',
'sandBox' => false,
];

$paymentInstance = Payment4($initParams);
```

#### Ex2:

[](#ex2)

```
$paymentInstance = Payment4();
```

### Requesting a Payment

[](#requesting-a-payment)

```
/**
 * amount is required
 * callbackParams, webhookParams, webhookUrl, language, currency are optional.
 * callbackUrl is optional if already set it to config file.
 * If no language is provided, the default language is set to 'en'.
 * If no currency is provided, the default currency is set to 'USD'.
 */

$amount = 10;
$options = [
  'callbackUrl' => "https://your-domain.com/callback",
  'callbackParams' => [
    'your key' => 'your value',
    'your key' => 'your value',
  ],
  'webhookUrl' => "https://your-domain.com/webhook",
  'webhookParams' => [
    'your key' => 'your value',
    'your key' => 'your value',
  ],
  'language' => 'EN',
  'currency' => 'USD',
];

$response = $paymentInstance->requestPayment($amount, $options);

if ($createPayment->status) {
    return responseSuccess(
        [
            'url' => $createPayment->data->paymentUrl,
        ]
    );
} else {
   return responseError(
        [
            'message' => $createPayment->message ?? '',
        ]
    );
}
```

### Verifying a Payment

[](#verifying-a-payment)

```
/**
 * amount and paymentUid are required
 */

$paymentUid = '';
$amount = 10;
$options = [
  'currency' => 'USD',
];

$response = $paymentInstance->verifyPayment($paymentUid, $amount, $options);
```

---

Powered by [Payment4](https://payment4.com)

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 60% 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 ~273 days

Total

2

Last Release

622d ago

PHP version history (2 changes)v1.0.1PHP ^8.0|^8.1

v1.0.2PHP ^8.0|^8.1|^8.2|^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/64e6f97ebd2c757d04f72a2ce13b4875b29acb77d3d9aeef6fd3a7afefa51a0f?d=identicon)[payment4](/maintainers/payment4)

---

Top Contributors

[![abbasvaranloo](https://avatars.githubusercontent.com/u/46842818?v=4)](https://github.com/abbasvaranloo "abbasvaranloo (3 commits)")[![mhnobakht](https://avatars.githubusercontent.com/u/80899303?v=4)](https://github.com/mhnobakht "mhnobakht (2 commits)")

---

Tags

laravelcryptopaymentpayment4

### Embed Badge

![Health badge](/badges/payment4-cryptogateway/health.svg)

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

###  Alternatives

[evryn/laravel-toman

A simple stable Laravel package to handle popular payment gateways in Iran including ZarinPal and IDPay.

1079.9k](/packages/evryn-laravel-toman)[sebdesign/laravel-viva-payments

A Laravel package for integrating the Viva Payments gateway

4845.9k](/packages/sebdesign-laravel-viva-payments)[tsaiyihua/laravel-linepay

linepay library for laravel

102.9k](/packages/tsaiyihua-laravel-linepay)[victorybiz/laravel-crypto-payment-gateway

GoUrl.io Crypto Payment Gateway for Laravel

642.5k](/packages/victorybiz-laravel-crypto-payment-gateway)[henryejemuta/laravel-monnify

A laravel package to seamlessly integrate monnify api within your laravel application

132.1k](/packages/henryejemuta-laravel-monnify)

PHPackages © 2026

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