PHPackages                             orcarail/cashier-orcarail - 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. orcarail/cashier-orcarail

ActiveLibrary[Payment Processing](/categories/payments)

orcarail/cashier-orcarail
=========================

Laravel Cashier driver for OrcaRail — subscriptions, checkout, and webhooks for stablecoin payments

v1.0.1(today)01↑2900%MITPHPPHP ^8.1CI passing

Since Jul 31Pushed todayCompare

[ Source](https://github.com/OrcaRail/sdks-laravel-cashier)[ Packagist](https://packagist.org/packages/orcarail/cashier-orcarail)[ Docs](https://github.com/OrcaRail/sdks-laravel-cashier)[ RSS](/packages/orcarail-cashier-orcarail/feed)WikiDiscussions main Synced today

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

Cashier OrcaRail
================

[](#cashier-orcarail)

Laravel Cashier-style billing for [OrcaRail](https://orcarail.com) — subscriptions, one-off checkout, and webhook sync for stablecoin payments.

Requires the official PHP SDK [`orcarail/orcarail-php`](https://github.com/OrcaRail/sdks-php).

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

[](#requirements)

- PHP 8.1+
- Laravel 10, 11, or 12

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

[](#installation)

```
composer require orcarail/cashier-orcarail
```

Publish the config and run migrations:

```
php artisan vendor:publish --tag=orcarail-cashier-config
php artisan migrate
```

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

[](#configuration)

Add credentials to your `.env`:

```
ORCARAIL_API_KEY=ak_live_xxx
ORCARAIL_API_SECRET=sk_live_xxx
ORCARAIL_WEBHOOK_SECRET=whsec_xxx
ORCARAIL_BASE_URL=https://api.orcarail.com/api/v1
ORCARAIL_PAY_URL=https://pay.orcarail.com
ORCARAIL_CURRENCY=usd
```

Billable model
--------------

[](#billable-model)

Add the `Billable` trait to your user (or other billable) model:

```
use OrcaRail\Cashier\Billable;

class User extends Authenticatable
{
    use Billable;
}
```

Subscriptions
-------------

[](#subscriptions)

Create a subscription and redirect the payer to the hosted pay page:

```
use Illuminate\Http\Request;

Route::post('/subscribe', function (Request $request) {
    $checkout = $request->user()
        ->newSubscription('default', 'price_xxx')
        ->trialDays(14)
        ->create([
            'payer_email' => $request->user()->email,
            'return_url' => route('billing.return'),
            'cancel_url' => route('billing.cancel'),
        ]);

    return $checkout; // RedirectResponse to hosted pay URL
});
```

Check subscription state locally (synced via webhooks):

```
$user->subscribed();           // active / trialing / grace period
$user->onTrial();
$user->subscription()?->cancel();
$user->subscription()?->resume();
```

Direct amount (no catalog price):

```
$user->newSubscription('default')
    ->withAmount([
        'amount' => '10.00',
        'currency' => 'usd',
        'token_id' => '...',
        'network_id' => '...',
        'interval' => 'month',
    ])
    ->create();
```

One-off checkout
----------------

[](#one-off-checkout)

```
// Catalog price
return $user->checkout('price_xxx', [
    'return_url' => route('orders.return'),
]);

// Direct amount
return $user->charge([
    'amount' => '25.00',
    'currency' => 'usd',
    'tokenId' => '...',
    'networkId' => '...',
    'return_url' => route('orders.return'),
]);
```

Cashier creates a Payment Intent, confirms it when needed, and redirects to the hosted pay URL from `next_action.redirect_to_url.url` (or `pay_url` / `payment_link.link`).

Webhooks
--------

[](#webhooks)

Cashier registers `POST /orcarail/webhook` (configurable via `ORCARAIL_WEBHOOK_PATH`) and verifies the `x-webhook-signature` HMAC header.

Point your OrcaRail API key webhook URL at:

```
https://your-app.test/orcarail/webhook

```

Handled subscription events sync the local `subscriptions` table (`status`, `trial_ends_at`, `ends_at`). Unknown event types return `200` so you can listen to:

- `OrcaRail\Cashier\Events\WebhookReceived`
- `OrcaRail\Cashier\Events\WebhookHandled`

Customization
-------------

[](#customization)

```
use OrcaRail\Cashier\Cashier;

Cashier::ignoreMigrations();
Cashier::ignoreRoutes();
Cashier::useSubscriptionModel(App\Models\Subscription::class);
```

Access the underlying PHP SDK client:

```
Cashier::api()->rates->list();
```

Testing
-------

[](#testing)

Unit / feature (testbench):

```
cd sdks-laravel-cashier
composer test
composer analyse
composer cs-check
```

### Docker real-flow E2E

[](#docker-real-flow-e2e)

Full harness (mirrors WooCommerce `bin/run-woo-real-flow.sh`): starts/reuses the local real-flow API + pay app, spins up a fresh Laravel container with this package, then runs subscribe + checkout + signed webhook sync.

```
cd sdks-laravel-cashier
./bin/run-laravel-real-flow.sh
```

Leave the Laravel stack up after a run:

```
ORCARAIL_KEEP_LARAVEL=1 ./bin/run-laravel-real-flow.sh
```

Requires Docker, curl, jq, openssl, and the usual real-flow Redis/MailDev stack under `api/`.

License
-------

[](#license)

MIT

###  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

Maturity43

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

2

Last Release

0d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

laravelcryptobillingpaymentssubscriptionscashierstablecoinorcarail

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/orcarail-cashier-orcarail/health.svg)

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.4M350](/packages/psalm-plugin-laravel)[api-platform/laravel

API Platform support for Laravel

58174.6k18](/packages/api-platform-laravel)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

78727.1M203](/packages/laravel-mcp)[laravel/cashier

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

2.5k30.2M153](/packages/laravel-cashier)[laravel/scout

Laravel Scout provides a driver based solution to searching your Eloquent models.

1.7k57.2M655](/packages/laravel-scout)[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)
