Download the PHP package orcarail/cashier-orcarail without Composer
On this page you can find all versions of the php package orcarail/cashier-orcarail. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download orcarail/cashier-orcarail
More information about orcarail/cashier-orcarail
Files in orcarail/cashier-orcarail
Package cashier-orcarail
Short Description Laravel Cashier driver for OrcaRail — subscriptions, checkout, and webhooks for stablecoin payments
License MIT
Homepage https://github.com/OrcaRail/sdks-laravel-cashier
Informations about the package cashier-orcarail
Cashier OrcaRail
Laravel Cashier-style billing for OrcaRail — subscriptions, one-off checkout, and webhook sync for stablecoin payments.
Requires the official PHP SDK orcarail/orcarail-php.
Requirements
- PHP 8.1+
- Laravel 10, 11, or 12
Installation
Publish the config and run migrations:
Configuration
Add credentials to your .env:
Live vs sandbox keys
Use a sandbox organization key (ak_test_… / sk_test_…, testnets only, no real funds) in local and staging .env files, and the live key (ak_live_…) only in production. Create the sandbox with Go to sandbox in the OrcaRail dashboard. Webhook payloads carry livemode (false for sandbox events), so a production app can ignore test events. Cashier::livemode() returns false when the configured key is a sandbox key. See Sandbox.
Billable model
Add the Billable trait to your user (or other billable) model:
Subscriptions
Create a subscription and redirect the payer to the hosted pay page:
Check subscription state locally (synced via webhooks):
Direct amount (no catalog price):
One-off checkout
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).
Complete the payment on your return route (required). OrcaRail keeps a paid Payment Intent processing until you complete it; until then the payment is not final, is never withdrawn and no payment_intent.completed webhook is sent. The hosted pay page sends the customer to your return_url with ?payment_intent=<id> once the payment is confirmed:
Webhooks
Cashier registers POST /orcarail/webhook (configurable via ORCARAIL_WEBHOOK_PATH) and verifies the timestamped x-webhook-timestamp + x-webhook-signature-v2 HMAC headers. Deliveries older than five minutes are rejected (replay protection); the legacy body-only x-webhook-signature is not accepted.
Point your OrcaRail API key webhook URL at:
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\WebhookReceivedOrcaRail\Cashier\Events\WebhookHandled
Customization
Access the underlying PHP SDK client:
Testing
Unit / feature (testbench):
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.
Leave the Laravel stack up after a run:
Requires Docker, curl, jq, openssl, and the usual real-flow Redis/MailDev stack under api/.
License
MIT
All versions of cashier-orcarail with dependencies
ext-json Version *
illuminate/contracts Version ^10.0|^11.0|^12.0
illuminate/database Version ^10.0|^11.0|^12.0
illuminate/http Version ^10.0|^11.0|^12.0
illuminate/routing Version ^10.0|^11.0|^12.0
illuminate/support Version ^10.0|^11.0|^12.0
orcarail/orcarail-php Version ^1.0