getruba / sdk
Typed PHP client for Ruba payments, billing, customers, and webhooks.
v0.10.4
2026-07-22 16:32 UTC
Requires
- php: >=8.2
- brick/date-time: >=0.7.0
- brick/math: >=0.12.1
- galbar/jsonpath: >=3.0
- guzzlehttp/guzzle: ^7.0
- phpdocumentor/type-resolver: >=1.8
- speakeasy/serializer: ^4.0.3
Requires (Dev)
- laravel/pint: 1.29.0
- orchestra/testbench: >=9.6
- phpstan/phpstan: 2.1.44
- phpunit/phpunit: >=10
- roave/security-advisories: dev-latest
README
Use typed clients and models to connect PHP applications to Ruba payments, billing, customers, subscriptions, orders, and webhooks.
Requirements
- PHP 8.2 or newer
- Composer
Install with Composer
composer require getruba/sdk
Set up the client
<?php declare(strict_types=1); require __DIR__ . '/vendor/autoload.php'; $ruba = Ruba\Ruba::builder() ->setSecurity($_ENV['RUBA_ACCESS_TOKEN']) ->build(); $pages = $ruba->organizations->list(page: 1, limit: 10); foreach ($pages as $page) { if ($page->statusCode === 200) { var_dump($page); } }
Store the access token outside your source code. Use sandbox credentials during development and production credentials only on your deployed server.
Documentation and support
Endpoint schemas and authentication details are available in the Ruba API reference. Open an issue if the PHP client behaves differently from the documented API.
License
MIT