The United Payment Georgia API PHP Client provides convenient access to the United Payment Georgia API from applications written in the PHP language.
- PHP 7.4 or higher
You can install the bindings via Composer. Run the following command:
composer require moka-united/moka-united-ge-phpTo use the bindings, use Composer's autoload:
require_once('vendor/autoload.php');If you do not wish to use Composer, you can download the latest release. Then, to use the bindings, include the autoload.php file.
require_once('autoload.php');The bindings require the following PHP extensions in order to work properly:
If you use Composer, these dependencies should be handled automatically. If you install manually, you'll want to make sure that these extensions are available.
use MokaUnitedGE\MokaUnitedClient;
$client = new MokaUnitedClient([
'dealerCode' => '',
'username' => '',
'password' => '',
]);All service calls return a Response object. Common methods:
$response->getStatusCode();
$response->getResultCode();
$response->getResultMessage();
$response->getData();
$response->getBody();
$response->getHeaders();
$response->getException();
$response->isSuccessful();If isSuccessful() returns true, access the payload via getData().
$client->payments()->create([
"Amount" => 0.01,
"Currency" => "GEL",
"BankCode" => 1,
"CardToken" => "63F8C2BF-F76D-46C1-BB0E-C699692CB678",
"InstallmentNumber" => 1,
"ClientIP" => "203.0.113.21",
"OtherTrxCode" => "ORDER-20250101-0001",
"SubMerchantName" => "",
"IsPoolPayment" => 0,
"IsPreAuth" => 0,
"IsTokenized" => 0,
"IntegratorId" => 0,
"Software" => "Postman",
"Description" => "",
"ReturnHash" => 1,
"RedirectUrl" => "https://www.unitedpayment.ge/callback?trx=ORDER-20250101-0001",
"RedirectType" => 0,
"BuyerInformation" => [
"BuyerFullName" => "Test User",
"BuyerGsmNumber" => "5341234567",
"BuyerEmail" => "email@email.com",
"BuyerAddress" => "Levent Mah. Meltem Sok...",
],
"CustomerInformation" => [
"DealerCustomerId" => "",
"CustomerCode" => "1234",
"FirstName" => "Test",
"LastName" => "User",
"Email" => "test@unitedpayment.ge",
"CardName" => "My Card"
]
]);$client->payments()->all([
"PaymentStartDate" => "2025-10-01 00:00",
"PaymentEndDate" => "2025-11-01 00:00"
]);$client->refunds()->create([
"VirtualPosOrderId" => "ORDER-20250101-0001",
"OtherTrxCode" => "REFUND-20250101-0001",
"Amount" => 14.25
]);$client->cards()->all([
"DealerCustomerId" => "",
"CustomerCode" => "1234"
]);$client->cards()->create([
"DealerCustomerId" => "",
"CustomerCode" => "1234",
"CardHolderFullName" => "Test User",
"CardNumber" => "4111111111111111",
"ExpMonth" => "12",
"ExpYear" => "2026",
"CardName" => "My Card"
]);$client->cards()->retrieve([
"CardToken" => "63F8C2BF-F76D-46C1-BB0E-C699692CB678"
]);$client->cards()->update([
"CardToken" => "63F8C2BF-F76D-46C1-BB0E-C699692CB678",
"CardName" => "Updated Card Name"
]);$client->cards()->delete([
"CardToken" => "63F8C2BF-F76D-46C1-BB0E-C699692CB678"
]);