SDK
SDK for working with the API
A ready-made library that makes integrating with our API much easier and faster. Create invoices, check statuses and verify webhooks in just a few lines of code.
crynova-php-sdk.zip
PHP SDK · archive
PHP 8.1+ · ext-curl · no external dependencies
Getting started
Download the SDK
Download the archive with the latest version of the library and unpack it into your project.
Connect the files
Add it via Composer (path repository) or a plain require — instructions are in the README inside the archive.
Start the integration
Create a client with your API key and call methods for invoices, statuses and webhooks.
Usage example
use Crynova\CrynovaClient;
$crynova = new CrynovaClient('sk_live_your_api_key');
$invoice = $crynova->createInvoice([
'currency' => 'USD', // fiat or crypto (BTC, USDT_TRC20, …)
'amount' => 49.90,
'order_id' => 'ORDER-1024',
'description' => 'Pro plan — 1 month',
'expires_in' => 60, // minutes
], idempotencyKey: 'ORDER-1024');
header('Location: ' . $invoice['checkout_url']);
// ── Verify a webhook ──────────────────────────────
use Crynova\Webhook;
$payload = file_get_contents('php://input');
$signature = $_SERVER['HTTP_X_CRYNOVA_SIG'] ?? '';
$event = Webhook::parse($payload, $signature, $webhookSecret);
if ($event['event'] === 'invoice.paid') {
// fulfil the order
}
Need endpoint details?
Full reference for every API method, parameter and webhook is in the documentation.