Official PHP client for the Oxialink crypto payment gateway. Create invoices, verify webhooks, send withdrawals. No dependencies beyond curl.
composer require oxialink/oxialink-phpOr drop src/ into your project and require the two files.
use Oxialink\OxialinkClient;
$oxialink = new OxialinkClient('API_KEY', 'API_SECRET');
$invoice = $oxialink->createInvoice([
'amount' => 10, // in fiat_currency, or in the coin with amount_type => 'crypto'
'fiat_currency' => 'USD',
'coin' => 'USDT_TON',
'external_id' => 'order-1234', // echoed back in every webhook
'callback_url' => 'https://your-site.com/webhook.php',
]);
header('Location: ' . $invoice['url']); // hosted checkout with QR + live confirmationsuse Oxialink\Webhook;
$delivery = Webhook::verifyCurrentRequest('WEBHOOK_SECRET'); // throws on bad signature
if ($delivery['event'] === 'payment.completed') {
markOrderPaid($delivery['data']['external_id'], $delivery['data']['tx_hash']);
}Events: payment.completed, payment.underpaid, payment.uncredited, invoice.expired, withdrawal.completed.
getInvoice($code), getBalance($coin), createWithdrawal($coin, $amount, $to), validateAddress($coin, $address), createTelegramInvoiceButton([...]).
Full API reference: https://oxialink.com/api-docs