PHPackages                             web3e/crypto-gateway-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. web3e/crypto-gateway-php

ActiveLibrary[Payment Processing](/categories/payments)

web3e/crypto-gateway-php
========================

PHP SDK for the Web3e crypto payment gateway — request signing (v2) and webhook verification. Zero runtime dependencies.

v1.0.2(4w ago)02↓66.7%MITPHPPHP &gt;=7.4CI passing

Since Jul 17Pushed 4w agoCompare

[ Source](https://github.com/web3e-cc/crypto-gateway-php)[ Packagist](https://packagist.org/packages/web3e/crypto-gateway-php)[ Docs](https://web3e.cc)[ RSS](/packages/web3e-crypto-gateway-php/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependenciesVersions (5)Used By (0)

 [![Web3e](https://raw.githubusercontent.com/web3e-cc/crypto-gateway-php/main/art/logo.png)](https://raw.githubusercontent.com/web3e-cc/crypto-gateway-php/main/art/logo.png)

web3e/crypto-gateway-php
========================

[](#web3ecrypto-gateway-php)

PHP SDK for the **Web3e** crypto payment gateway. Zero runtime dependencies (just `ext-curl` + `ext-hash`), PHP 7.4+, so it drops into any host — including plugins that vendor it into a zip.

It does two things:

1. **Signs requests** to the public REST v1 API (v2 signing scheme: HMAC-SHA256 over `METHOD\nPATH\nQUERY\nTIMESTAMP\nNONCE\nSHA256(body)`, single-use nonce, `SM-Idempotency-Key` on POST).
2. **Verifies inbound webhooks** (`SM-Webhook-Signature: v1,t=…,s1=…`, canonical `v1.{id}.{ts}.{body}`, ±300s window, constant-time, rotation-aware).

Install
-------

[](#install)

```
composer require web3e/crypto-gateway-php
```

> If the `web3e` vendor is already taken on Packagist, we publish as `web3e-cc/crypto-gateway-php`.

Accept a payment (hosted checkout)
----------------------------------

[](#accept-a-payment-hosted-checkout)

```
use Web3e\Gateway\Client;

$client = new Client('gwk_public_id', 'api_secret', 'https://api.web3e.cc');

$invoice = $client->createInvoice([
    'orderId'       => '1001',
    'orderAmount'   => '49.90',
    'orderCurrency' => 'USD',
    'successUrl'    => 'https://shop.example/thank-you',
    'cancelUrl'     => 'https://shop.example/cart',
    'callbackUrl'   => 'https://shop.example/ipn/web3e',
]);

header('Location: ' . $invoice['checkoutUrl']); // redirect the buyer
```

Verify a webhook (IPN)
----------------------

[](#verify-a-webhook-ipn)

```
use Web3e\Gateway\WebhookVerifier;

$raw       = file_get_contents('php://input');
$webhookId = $_SERVER['HTTP_SM_WEBHOOK_ID'] ?? '';
$signature = $_SERVER['HTTP_SM_WEBHOOK_SIGNATURE'] ?? '';

$verifier = new WebhookVerifier('your_webhook_secret');
if (!$verifier->verify($raw, $webhookId, $signature)) {
    http_response_code(401);
    exit;
}
$event   = json_decode($raw, true);
$payment = $event['payment'] ?? [];
// mark $payment['merchantOrderId'] paid when $payment['status'] is credited/overpaid
```

Wire vocabulary
---------------

[](#wire-vocabulary)

Fields are **camelCase in both directions** (`orderId`, `orderAmount`, `checkoutUrl`, `payAddress`, `merchantOrderId`). Headers use the platform's universal `SM-` prefix — `SM-Api-Key`, `SM-Timestamp`, `SM-Nonce`, `SM-Signature`, `SM-Idempotency-Key` outbound; `SM-Webhook-Id`, `SM-Webhook-Signature` inbound. There is no snake\_case or `X-`-prefixed fallback left on the server.

Test
----

[](#test)

```
php tests/run.php     # zero-dependency; no composer install required
```

License
-------

[](#license)

MIT — see [LICENSE](LICENSE).

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance94

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~5 days

Total

4

Last Release

29d ago

Major Versions

v0.1.0 → v1.0.02026-07-20

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/313991?v=4)[Paul Yakubets](/maintainers/fatalist)[@fatalist](https://github.com/fatalist)

---

Top Contributors

[![sergio-fatalist](https://avatars.githubusercontent.com/u/1297233?v=4)](https://github.com/sergio-fatalist "sergio-fatalist (6 commits)")

---

Tags

cryptopaymentgatewaywebhookcheckoutUSDTweb3e

### Embed Badge

![Health badge](/badges/web3e-crypto-gateway-php/health.svg)

```
[![Health](https://phpackages.com/badges/web3e-crypto-gateway-php/health.svg)](https://phpackages.com/packages/web3e-crypto-gateway-php)
```

###  Alternatives

[sebdesign/laravel-viva-payments

A Laravel package for integrating the Viva Payments gateway

4954.1k](/packages/sebdesign-laravel-viva-payments)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
