oxialink/oxialink-php

Official PHP SDK for the Oxialink crypto payment gateway: create invoices, verify webhooks, send withdrawals.

Maintainers

Package info

github.com/oxialink/php-sdk

Homepage

pkg:composer/oxialink/oxialink-php

Transparency log

Statistics

Installs: 2

Dependents: 1

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.0 2026-08-20 04:07 UTC

This package is auto-updated.

Last update: 2026-08-20 04:13:32 UTC


README

Official PHP client for the Oxialink crypto payment gateway. Create invoices, verify webhooks, send withdrawals. No dependencies beyond curl.

Install

composer require oxialink/oxialink-php

Or drop src/ into your project and require the two files.

Create an invoice

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 confirmations

Verify a webhook

use 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.

Also available

getInvoice($code), getBalance($coin), createWithdrawal($coin, $amount, $to), validateAddress($coin, $address), createTelegramInvoiceButton([...]).

Full API reference: https://oxialink.com/api-docs