ZenoBank PHP SDK for payment checkout and webhook verification

Maintainers

Package info

github.com/zenobank/php-sdk

pkg:composer/zenobank/sdk

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.5.0 2026-04-11 18:48 UTC

This package is auto-updated.

Last update: 2026-05-11 18:56:40 UTC


README

The official PHP SDK for ZenoBank's Crypto Payment Gateway API. Accept crypto payments with checkout sessions and verify webhooks.

Installation

composer require zenobank/sdk

Usage

Initialize the client

use ZenoBank\Sdk\ZenoBankClient;

$client = new ZenoBankClient('your-api-key');

Create a checkout

$checkout = $client->checkouts->create([
    'order_id' => 'order-123',
    'price_amount' => '10.00',
    'price_currency' => 'USD',
    'success_redirect_url' => 'https://example.com/success',
]);

// Redirect the customer
header('Location: ' . $checkout->checkout_url);

Verify webhooks

use ZenoBank\Sdk\Exceptions\WebhookVerificationError;
use ZenoBank\Sdk\Types\Generated\CheckoutStatus;
use ZenoBank\Sdk\Types\WebhookEvent;

$payload = file_get_contents('php://input');
$headers = getallheaders();
$secret = 'whsec_...';

try {
    $client->webhooks->verify($payload, $secret, $headers);
    $event = WebhookEvent::from_array(json_decode($payload, true));

    if ($event->data->status === CheckoutStatus::COMPLETED) {
        // Payment received
    }
} catch (WebhookVerificationError $e) {
    // Invalid signature or missing headers
    http_response_code(400);
}

Get a checkout

$checkout = $client->checkouts->get('ch_0gJfH4a9B2Eg1jpES');