Sdk for payhub

v2.0.10 2024-06-13 08:56 UTC


PHP 8.x Laravel 8.x Yii 2.x Latest Stable Version Release date Release Version Total Downloads Pull requests Software License Stars

Payhub SDK is a PSR-compatible PHP package for working with payhub api.

API Documentation


The recommended way to install Payhub SDK is through Composer.

# Install Composer
curl -sS | php

Next, run the Composer command to install the latest stable version of Guzzle:

composer require businessprocess/payhub-sdk

After installing, you need to require Composer's autoloader:

require 'vendor/autoload.php';

You can then later update Guzzle using composer:

composer update


$client = new \Payhub\Service\Payhub([
    'url' => '', # Project url  
    'token' => Oidc::serviceToken(), # Api token
$order = \Payhub\Models\Order::make([
    'type' => 1,
    'callback_url' => 'https://your-callback.url',
$response = $client->create($order);

echo $response->all(); # '[{"link": ...}'

Usage Laravel

$order = \Payhub\Models\Order::make([
    'type' => 1,
    'callback_url' => 'https://your-callback.url',
$response = \Payhub\Facade\Payhub::create($order);

echo $response->all(); # '[{"link": ...}'

Available Methods

Methods Description Return value
create Create order OrderCreateResponse
getList Get order list array
getById Get order by id Order
getPaymentMethods Get available payment methods array
getTurnover Get turnover by payment methods PaymentTurnover
webhook Get webhook methods Webhook