login( clientId: 'your-client-id', clientSecret: 'your-client-secret' ); echo "Authentication Successful!\n"; // 2. Create a Beneficiary (Counterparty) echo "Creating Beneficiary...\n"; // In a real app, use the DTOs // $payload = new CreateBeneficiaryRequestData(...); // $baas->send(new CreateBeneficiaryRequest($payload)); echo "Beneficiary Request Sent (Mock).\n"; } catch (\Exception $e) { echo "Error: " . $e->getMessage() . "\n"; if ($e instanceof \Apoloz\AlfaBank\Exceptions\AlfaBankException) { echo "API Code: " . $e->getErrorCode() . "\n"; } }