PHPackages                             tropayment/laravel - 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. tropayment/laravel

ActiveLibrary[Payment Processing](/categories/payments)

tropayment/laravel
==================

Official tropayment.com Merchant API package for Laravel

1.1.0(yesterday)01↑2900%MITPHPPHP ^8.1

Since Aug 8Pushed todayCompare

[ Source](https://github.com/tropayment/sdk-laravel)[ Packagist](https://packagist.org/packages/tropayment/laravel)[ RSS](/packages/tropayment-laravel/feed)WikiDiscussions main Synced today

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

tropayment/laravel
==================

[](#tropaymentlaravel)

Official **Laravel package** for [tropayment.com](https://tropayment.com) Merchant API (v1.1).

For Laravel **10 / 11 / 12** · PHP **8.1+**

Install
-------

[](#install)

```
composer require tropayment/laravel
```

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

Create payment (Stripe-style)
-----------------------------

[](#create-payment-stripe-style)

```
use Tropayment\Laravel\Facades\Tropayment;

$payment = Tropayment::payments()->create([

    'amount' => 150.00,

    'currency' => 'USDT',

    'network' => 'TRON',

    'order_id' => 'ORD-' . $order->id,

    'title' => 'Order #' . $order->id,

    'callback_url' => route('tropayment.webhook'),

    'return_url' => route('checkout.return', $order), // UX only — NOT trusted

    'metadata' => [

        'order_id' => $order->id,

        'store_currency' => 'USD',

        'store_amount' => 150.00,

    ],

]);

return redirect($payment['payment_page_url']);
```

Webhook (middleware)
--------------------

[](#webhook-middleware)

```
Route::post('/webhooks/tropayment', TropaymentWebhookController::class)

    ->middleware('tropayment.webhook')

    ->name('tropayment.webhook');
```

```
class TropaymentWebhookController extends WebhookController

{

    protected function handlePaid(array $payload, Request $request): void

    {

        $orderId = $payload['metadata']['order_id'] ?? null;

        Order::where('id', $orderId)->update(['status' => 'paid']);

    }

}
```

return\_url guard
-----------------

[](#return_url-guard)

```
use Tropayment\Laravel\Support\ReturnUrlGuard;

// Return controller — UX only

public function return(Request $request)

{

    ReturnUrlGuard::guardQueryParams($request->query());

    $ctx = ReturnUrlGuard::returnPageContext($request->query('order_id'));

    return view('checkout.return', $ctx);

}
```

Auth (automatic)
----------------

[](#auth-automatic)

- Headers: `X-API-KEY`, `X-TIMESTAMP`, `X-NONCE`, `X-SIGNATURE`, `X-APP-ID`
- HMAC: `timestamp + nonce + METHOD + path + body`

Webhook validation
------------------

[](#webhook-validation)

Middleware enforces: **POST**, `Content-Type: application/json`, max body 64KB, `X-Signature`, timestamp freshness.

API methods
-----------

[](#api-methods)

| Resource | Method |

|----------|--------|

| `payments()->create()` | Create payment |

| `payments()->retrieve()` | Get payment |

| `payments()->retrieveStatus()` | Poll status |

| `payments()->cancel()` | Cancel |

| `payments()->list()` | List |

| `balance()->retrieve()` | Balance |

| `networks()->list()` | Networks |

Legacy facade methods (`createPayment`, `getPayment`, …) still work.

Related
-------

[](#related)

- [@tropayment/core](../tropayment-core) (JS shared lib — PHP mirrors same rules)
- [@tropayment/node](../tropayment-node)
- [@tropayment/nextjs](../tropayment-nextjs)

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance100

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity42

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

1d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/290301047?v=4)[tropayment](/maintainers/tropayment)[@tropayment](https://github.com/tropayment)

---

Top Contributors

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

---

Tags

laravelcryptopaymentwebhookUSDTtropayment

### Embed Badge

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

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.4M354](/packages/psalm-plugin-laravel)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

79227.1M206](/packages/laravel-mcp)[laravel/cashier

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

2.6k31.8M156](/packages/laravel-cashier)[api-platform/laravel

API Platform support for Laravel

58190.1k19](/packages/api-platform-laravel)[intervention/image-laravel

Laravel Integration of Intervention Image

1589.8M214](/packages/intervention-image-laravel)[fleetbase/core-api

Core Framework and Resources for Fleetbase API

1239.7k25](/packages/fleetbase-core-api)

PHPackages © 2026

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