PHPackages                             plutopay/plutopay-php - 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. [API Development](/categories/api)
4. /
5. plutopay/plutopay-php

ActiveLibrary[API Development](/categories/api)

plutopay/plutopay-php
=====================

PlutoPay PHP SDK — accept card, ACH, terminal, and hosted-checkout payments.

v0.1.0(1mo ago)00MITPHPPHP ^8.1

Since Jul 11Pushed 1mo agoCompare

[ Source](https://github.com/PlutoPayUS/plutopay-php)[ Packagist](https://packagist.org/packages/plutopay/plutopay-php)[ Docs](https://docs.plutopayus.com)[ RSS](/packages/plutopay-plutopay-php/feed)WikiDiscussions main Synced 1w ago

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

PlutoPay PHP SDK
================

[](#plutopay-php-sdk)

The official [PlutoPay](https://plutopayus.com) SDK for PHP — accept card, ACH, terminal, and hosted-checkout payments. First-class for **Laravel** and WooCommerce merchants.

- 📘 Docs: ****
- 🧩 Typed methods for every endpoint, generated from the [OpenAPI spec](./openapi.yaml)
- 🔁 Automatic retries with backoff on `429` / `5xx`
- 🔐 Webhook signature verification helper
- 💵 All amounts are integers in cents

Install
-------

[](#install)

```
composer require plutopay/plutopay-php
```

Requires PHP 8.1+.

Quick start
-----------

[](#quick-start)

```
use PlutoPay\Client;
use PlutoPay\Model\CreateTransactionRequest;

$pluto = new Client(getenv('PLUTOPAY_SECRET_KEY'));

$txn = $pluto->transactions->createPayment(
    new CreateTransactionRequest([
        'amount'   => 4750,          // $47.50 in cents
        'currency' => 'usd',
        'payment_method_type' => 'card',
        'description' => 'Order #1001',
    ]),
    'order_1001'                     // Idempotency-Key
);

echo $txn->getData()->getId();
echo $txn->getClientSecret();        // confirm client-side with the Payment Element
```

Using with Laravel
------------------

[](#using-with-laravel)

### Config

[](#config)

Add your key to `.env`:

```
PLUTOPAY_SECRET_KEY=sk_live_...
PLUTOPAY_WEBHOOK_SECRET=whsec_...

```

`config/services.php`:

```
'plutopay' => [
    'secret'         => env('PLUTOPAY_SECRET_KEY'),
    'webhook_secret' => env('PLUTOPAY_WEBHOOK_SECRET'),
],
```

Bind the client as a singleton in `AppServiceProvider::register()`:

```
use PlutoPay\Client;

$this->app->singleton(Client::class, fn () => new Client(config('services.plutopay.secret')));
```

### Create a hosted checkout (controller)

[](#create-a-hosted-checkout-controller)

```
use PlutoPay\Client;
use PlutoPay\Model\CreateCheckoutSessionRequest;

class CheckoutController extends Controller
{
    public function store(Request $request, Client $pluto)
    {
        $session = $pluto->checkout->createCheckoutSession(
            new CreateCheckoutSessionRequest([
                'amount'      => 4750,
                'currency'    => 'usd',
                'success_url' => route('thanks'),
                'cancel_url'  => route('cart'),
            ]),
            (string) Str::uuid()      // Idempotency-Key
        );

        return redirect($session->getData()->getUrl());
    }
}
```

### Verify a webhook (route)

[](#verify-a-webhook-route)

Use the **raw** request body — Laravel exposes it via `$request->getContent()`:

```
use PlutoPay\Webhook;

Route::post('/webhooks/plutopay', function (Request $request) {
    try {
        $event = Webhook::constructEvent(
            $request->getContent(),
            $request->header('X-PlutoPay-Signature', ''),
            config('services.plutopay.webhook_secret'),
        );
    } catch (\RuntimeException $e) {
        return response('invalid signature', 400);
    }

    match ($event['type']) {
        'payment.succeeded' => /* fulfill the order */ null,
        default             => null,
    };

    return response('', 200);
})->withoutMiddleware(\App\Http\Middleware\VerifyCsrfToken::class);
```

Errors
------

[](#errors)

Non-2xx responses throw `PlutoPay\ApiException`, which carries the canonical error envelope:

```
use PlutoPay\ApiException;

try {
    $pluto->transactions->createPayment($req);
} catch (ApiException $e) {
    $error = json_decode($e->getResponseBody(), true)['error'] ?? [];
    // $error['type'], $error['message'], $error['code'], $error['param']
    report($e);
}
```

Resources
---------

[](#resources)

`$pluto->transactions`, `->checkout`, `->paymentLinks`, `->refunds`, `->terminal`, `->customers`, `->payouts`, `->disputes`, `->merchant`, `->webhookEndpoints`.

Regenerating
------------

[](#regenerating)

The API classes are generated from `openapi.yaml` (the single source of truth):

```
bash scripts/generate.sh
```

License
-------

[](#license)

[MIT](./LICENSE)

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance90

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity32

Early-stage or recently created project

 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

51d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8c691aa6be7693058cd3106f50fe7b9a2a80e4a4586a0b65c555827bf19fef82?d=identicon)[hosniabushbak](/maintainers/hosniabushbak)

---

Top Contributors

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

---

Tags

apilaravelsdkpaymentscheckoutachplutopaystripe-alternative

### Embed Badge

![Health badge](/badges/plutopay-plutopay-php/health.svg)

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

###  Alternatives

[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

353.6k](/packages/eslazarev-wildberries-sdk)[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.4k567.5M2.9k](/packages/aws-aws-sdk-php)[resend/resend-php

Resend PHP library.

639.6M57](/packages/resend-resend-php)[checkout/checkout-sdk-php

Checkout.com SDK for PHP

563.7M17](/packages/checkout-checkout-sdk-php)[oat-sa/tao-core

TAO core extension

64152.2k172](/packages/oat-sa-tao-core)[fingerprint/fingerprint-pro-server-api-sdk

Fingerprint Server API allows you to get, search, and update Events in a server environment. It can be used for data exports, decision-making, and data analysis scenarios. Server API is intended for server-side usage, it's not intended to be used from the client side, whether it's a browser or a mobile device. The API also supports collection of Automation Intelligence for requests to your server in edge, pre-origin, or middleware contexts.

33339.6k1](/packages/fingerprint-fingerprint-pro-server-api-sdk)

PHPackages © 2026

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