yield-tech / sdk-php
The official Yield SDK for PHP
v0.7.1
2025-07-09 03:32 UTC
Requires
- php: >=8.2
- psr/http-client: ^1.0
- psr/http-client-implementation: *
- psr/http-factory: ^1.1
- psr/http-factory-implementation: *
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.70
- guzzlehttp/guzzle: ^7.9
- guzzlehttp/psr7: ^2.7
- nyholm/psr7: ^1.8
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^10.5
- symfony/http-client: ^6.4
README
The official Yield SDK for PHP.
Documentation
Installation
composer require yield-tech/sdk-php
Usage
// For security, don't save the actual key in your code or repo $client = new YieldTech\SdkPhp\Client(getenv('YIELD_API_KEY')); // Fetch an existing order $order = $client->order->fetch('ord_...'); print_r($order->customer->registeredName); // Or create a new one $newOrder = $client->order->create([ 'customer_id' => 'org_...', 'total_amount' => 'PHP 1234.50', 'note' => 'Test order from the PHP SDK!', ]);
For more details, check out our API reference.