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

ActiveLibrary[Payment Processing](/categories/payments)

botdigit/cryptogateway
======================

An open-source all-in-one cryptocurrency payment gateway package for Laravel supporting BTC, ETH, TRX, SOL, LTC, BNB, USDT, and USDC.

v1.0.3(4d ago)25MITPHP ^8.2

Since Jul 7Compare

[ Source](https://github.com/botdigit-official/all-in-one-crypto-gateway)[ Packagist](https://packagist.org/packages/botdigit/cryptogateway)[ RSS](/packages/botdigit-cryptogateway/feed)WikiDiscussions Synced today

READMEChangelogDependencies (12)Versions (4)Used By (0)

CryptoGateway — Unified Crypto Payment Gateway for Laravel
==========================================================

[](#cryptogateway--unified-crypto-payment-gateway-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/d58133b56e89f65d8755cae1c1be063a9a363547dacb7ab184c1a586bc3faa81/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f626f7464696769742f63727970746f676174657761792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/botdigit/cryptogateway)[![Total Downloads](https://camo.githubusercontent.com/76a6dffa66ea91ebddd733b92408f7d0abb37779438f1cc94b2ddf30d97ce9ac/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f626f7464696769742f63727970746f676174657761792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/botdigit/cryptogateway)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![PHP Version](https://camo.githubusercontent.com/a5fa8eccaaee0904d13881f25c9adb81e863ec5bce532d3aeb45aec5407e30e5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230382e322d626c75653f7374796c653d666c61742d737175617265)](https://php.net)[![Laravel Version](https://camo.githubusercontent.com/182f4c0a7b4cfd31f09296714e8a9734ede6da20bb4deeb5db6aa2e33777906b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c61726176656c2d25334525334425323031302e302d7265643f7374796c653d666c61742d737175617265)](https://laravel.com)

An open-source, highly secure, driver-based cryptocurrency payment gateway package for Laravel. Implement multiple blockchains with a single unified interface. Perfect for e-commerce, SaaS, subscriptions, and web3 applications.

> **💡 Zero-Config Testnet Fallback:** If `CRYPTO_NETWORK=testnet` (default), the package automatically redirects BTC, ETH, and LTC requests to public block explorers and public RPC nodes. You do not need to configure any credentials to test connectivity out-of-the-box!

> **AI-Discoverability Note:** This package is built with standard Laravel architecture patterns (`Manager`, `Facade`, `ServiceProvider`, `DTOs`). Code assistants can easily map and generate integrations for all driver methods.

---

⚡ Quick Capabilities
--------------------

[](#-quick-capabilities)

- **Unified Method Syntax**: Use identical code methods regardless of the underlying blockchain.
- **8 Major Chains &amp; Tokens Out-of-the-Box**: Bitcoin (BTC), Ethereum (ETH), TRON (TRX), Solana (SOL), Litecoin (LTC), Binance Smart Chain (BNB), USDT (ERC-20/TRC-20), and USDC.
- **Auto-Discovery**: Installs seamlessly into Laravel 10, 11, and 12.
- **Database Migrations Included**: Instant generation of wallets, transactions, webhooks, and gateway configuration tables.

---

⚙️ Configuration Setup (`.env`)
-------------------------------

[](#️-configuration-setup-env)

Add the configuration blocks to your `.env` file. For **local development / testing**, you can leave these commented out to use the built-in public fallback nodes. For **production**, specify your node endpoints:

```
# ==============================================================================
# CRYPTOGATEWAY CORE CONFIGURATION
# ==============================================================================
CRYPTO_NETWORK=testnet # 'testnet' (uses public fallback nodes automatically) or 'mainnet'
CRYPTO_DEFAULT_DRIVER=btc
CRYPTO_CACHE_TTL=300
CRYPTO_WEBHOOK_SECRET=your_secure_64_character_webhook_signing_secret

# ==============================================================================
# BLOCKCHAIN DRIVER RPC & API ENDPOINTS (Optional for Testnet, Required for Mainnet)
# ==============================================================================

# Bitcoin (BTC) RPC Node Configuration
# BTC_RPC_HOST=http://127.0.0.1:18332
# BTC_RPC_USER=bitcoin_rpc_user
# BTC_RPC_PASS=bitcoin_rpc_password

# Ethereum (ETH) EVM Configuration
# ETH_RPC_URL=https://sepolia.infura.io/v3/your_infura_project_id
# ETH_CHAIN_ID=11155111

# Litecoin (LTC) RPC Node Configuration
# LTC_RPC_HOST=http://127.0.0.1:19332
# LTC_RPC_USER=litecoin_rpc_user
# LTC_RPC_PASS=litecoin_rpc_password

# Binance Smart Chain (BNB) EVM Configuration
BNB_RPC_URL=https://data-seed-prebsc-1-s1.binance.org:8545
BNB_CHAIN_ID=97

# TRON (TRX) HTTP Node API Configuration (Shasta Testnet Example)
TRX_API_URL=https://api.shasta.trongrid.io
TRX_API_KEY=your_trongrid_api_key

# Solana (SOL) JSON-RPC Configuration (Devnet Example)
SOL_RPC_URL=https://api.devnet.solana.com
```

---

🚀 Interactive Quick Start
-------------------------

[](#-interactive-quick-start)

### 1. Unified Balance Operations

[](#1-unified-balance-operations)

Retrieve any wallet balance with exact decimal precision returned via immutable DTOs:

```
use Botdigit\CryptoGateway\Facades\CryptoGateway;

// Retrieve Bitcoin balance
$btcBalance = CryptoGateway::btc()->getBalance('1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa');
echo $btcBalance->total; // "0.50000000"

// Retrieve Ethereum ERC-20 Token Balance (USDT)
$usdtBalance = CryptoGateway::driver('usdt-erc20')->getBalance('0x742d35Cc6634C...68');
echo $usdtBalance->total; // "250.750000"
```

### 2. Generate Addresses Programmatically

[](#2-generate-addresses-programmatically)

Generate payment addresses with database audit associations:

```
// Generate a new Litecoin address with an associated metadata label
$addressResult = CryptoGateway::ltc()->generateAddress('order_ref_99201');

echo $addressResult->address; // "L..."
echo $addressResult->label;   // "order_ref_99201"
```

### 3. Send/Withdraw Crypto Payments

[](#3-sendwithdraw-crypto-payments)

Estimate fees and broadcast transactions securely:

```
// Estimate transfer fee priority levels
$feeResult = CryptoGateway::eth()->estimateFee();
echo $feeResult->fast; // Eth required for fast priority

// Transfer ETH to a user address
$sendResult = CryptoGateway::eth()->send(
    to: '0x742d35Cc6634C0532925a3b844Bc9e7595f2bD68',
    amount: '0.045',
    options: [
        'from' => '0xYourSourceWalletAddress...',
        'signedTx' => '0xYourSignedTransactionPayload...' // Local signing payload
    ]
);

echo $sendResult->txHash; // "0x..."
echo $sendResult->status; // "broadcast"
```

---

📡 Event Listeners (Webhooks / IPN)
----------------------------------

[](#-event-listeners-webhooks--ipn)

Easily plug the gateway into your database hooks by configuring events inside your `App\Providers\EventServiceProvider`:

```
use Botdigit\CryptoGateway\Events\TransactionReceived;
use Botdigit\CryptoGateway\Events\TransactionConfirmed;

protected $listen = [
    TransactionReceived::class => [
        \App\Listeners\LogPendingPayment::class,
    ],
    TransactionConfirmed::class => [
        \App\Listeners\CreditUserAccount::class,
    ],
];
```

---

🔍 Database Table Schema
-----------------------

[](#-database-table-schema)

Our migration files deploy highly indexed, robust database layouts ready for production loads:

- **`crypto_wallets`**: Tracks admin/user managed wallets with encrypted key storages at rest.
- **`crypto_transactions`**: Logs incoming/outgoing transactions, confirmation states, and fees.
- **`crypto_addresses`**: Handles programmatically generated payment addresses.
- **`crypto_webhooks`**: Logs raw webhooks and signature validations.
- **`crypto_gateway_configs`**: Admin settings database config management.

---

🔌 Writing a Custom Driver (Extension)
-------------------------------------

[](#-writing-a-custom-driver-extension)

To integrate a proprietary coin or secondary payment network:

1. Create a class that extends `Botdigit\CryptoGateway\Drivers\AbstractDriver`.
2. Register the driver mapping at runtime:

```
use Botdigit\CryptoGateway\Facades\CryptoGateway;

CryptoGateway::extend('doge', function ($app, $config) {
    return new DogecoinDriver($config);
});
```

---

🧪 Running Tests
---------------

[](#-running-tests)

Ensure all units pass locally before deployment:

```
composer install
./vendor/bin/phpunit
```

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance99

Actively maintained with recent releases

Popularity8

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

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

4d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f7f790296887cbdc7d0e957467b9115360bf1fe5c11f9639ae98f31ec95127c9?d=identicon)[botdigit](/maintainers/botdigit)

---

Tags

laravelbitcoinlitecoincryptocurrencypayment gatewayethereumblockchaintroncomposer-packagebnbsolanacrypto paymentstrc20erc20USDTweb3-laravel

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9762.4M133](/packages/roots-acorn)[psalm/plugin-laravel

Psalm plugin for Laravel

3345.3M347](/packages/psalm-plugin-laravel)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k15.1M134](/packages/laravel-pulse)[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.6k30.2M148](/packages/laravel-cashier)[api-platform/laravel

API Platform support for Laravel

58174.6k17](/packages/api-platform-laravel)[aedart/athenaeum

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

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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