The official Yield SDK for PHP.
composer require yield-tech/sdk-php
// 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.