PHP SDK
A single-file PHP client.
Download PaymentGateway.php (no dependencies, PHP 8.0+ with cURL) and the OpenAPI 3.0 specification.
<?php
require 'PaymentGateway.php';
$gateway = new PaymentGateway('sk_live_xxx', 'https://pay-test.qanawat.store');
// Create an invoice
$invoice = $gateway->createInvoice(['amount' => '10', 'network' => 'bep20', 'order_id' => 'A-77']);
// Retrieve / cancel
$invoice = $gateway->getInvoice($invoice['id']);
$gateway->cancelInvoice($invoice['id']);
// Verify a webhook (throws on failure)
$event = PaymentGateway::verifyWebhook(file_get_contents('php://input'), $_SERVER, 'whsec_xxx');
Need help? Contact us
Last updated: Nov 17, 2026