orcarail/orcarail-php

Official PHP SDK for the OrcaRail API

Maintainers

Package info

github.com/OrcaRail/sdks-php

pkg:composer/orcarail/orcarail-php

Transparency log

Statistics

Installs: 17

Dependents: 1

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.2 2026-07-31 12:29 UTC

This package is auto-updated.

Last update: 2026-07-31 12:53:11 UTC


README

The official PHP 8.1+ client for the OrcaRail API. Tested on PHP 8.1–8.4.

composer require orcarail/orcarail-php
use OrcaRail\OrcaRailClient;

$orcarail = new OrcaRailClient([
    'api_key' => 'pk_live_...',
    'api_secret' => 'sk_live_...',
]);

$intent = $orcarail->paymentIntents->create([
    'price_id' => 'price_...',
    'return_url' => 'https://example.com/return',
]);

echo $intent->id;

Services are exposed lazily as paymentIntents, subscriptions, pay, rates, products, and prices. API responses are OrcaRailObject values that support both property and array access.

Webhook events must be constructed from the unmodified request body:

$event = \OrcaRail\Webhook::constructEvent(
    file_get_contents('php://input'),
    $_SERVER['HTTP_X_WEBHOOK_SIGNATURE'] ?? '',
    'sk_live_...',
);

Documentation

Development

composer install
composer test
composer analyse
composer cs-check